Going from Uno to ATTINY85 for controlling LEDs

Hi All,
Yet another Arduino beginner here, looking for a bit of help! Basically, I'm want to run an ATTINY85 that changes between 3 pulsing LED's via a push button. Working out the code I got it going on my Uno, including using a few lines for debouncing and set up my Uno to program ATTINY's. However, when I transfer the code over to the tiny making adjustments for pin allocations and changing one PWN to a basic High/Low, the ATTINY doesn't seem to respond to the button being pushed.

Are there other ways I have to work the code to get button pushes working on an ATTINY vs an Uno? Or would the way I've done debouncing just not work with the ATTINY's limiations?

Apologies in advance for my messy code, its a bit of a frankenstein's monster from other codes I've found.

int redPin = 1;
int greenPin = 4;
int bluePin = 0;
int buttonPin = 3;
int buttonPress = 0;
int buttonState = 0;         
int lastButtonState = 0;    

int value;

long lastDebounceTime = 0;  // the last time the output pin was toggled
long debounceDelay = 500;    // the debounce time; increase if the output flickers
 

long time=0;

int periode = 2000;

unsigned long previousMillis = 0;

const long interval = 00; 


void setup() {
 pinMode(redPin, OUTPUT); 
 digitalWrite(redPin,LOW);

 pinMode(greenPin, OUTPUT);
 digitalWrite(greenPin,LOW);

 pinMode(bluePin, OUTPUT);
 digitalWrite(bluePin,LOW);
 
 pinMode(buttonPin, INPUT);
 digitalWrite(buttonPin,HIGH);  // turn on Pull Up

pinMode(buttonPin, INPUT);

}                      // END of setup()

void loop()
{
 time = millis();
 value = 128+127*cos(2*PI/periode*time);
 
 {
 buttonState = digitalRead(buttonPin);
  if ( (millis() - lastDebounceTime) > debounceDelay) {
  if (buttonState != lastButtonState) {
     if (buttonState == HIGH) {
      buttonPress++;
      lastDebounceTime = millis(); 
    } else { 
    }   
}}
  
  lastButtonState = buttonState;

 if(buttonPress == 0)
   {
 analogWrite(redPin, value);  
     digitalWrite(bluePin, LOW);
   }

   
   else if(buttonPress == 1)
   {
    analogWrite(greenPin, HIGH);  
     digitalWrite(redPin, LOW);
   }
   else if(buttonPress == 2)
   {
    analogWrite(bluePin, value);  
     digitalWrite(greenPin, LOW);
   }
   
   else if(buttonPress >= 3)
   {
    buttonPress = 0;
    }
}}

Any help is appreciated!

You could simplify the buttons using a resistive ladder to get up to 6 buttons on one analog pin.

The one often used on the LCD shields is usually my GOTO for multiple buttons.

There is a destructable with a code example too HERE that also includes debounce options.