Break loop with pushbutton input

Hello All,

I'm still a newbie with Arduino programming. What I'm trying to accomplish below is for an LED to flash on/off (when a PIR motion is detected) until either the # of times is reached OR a pushbutton is depressed. So far, the flashing LED works fine when motion is detected, however, I can't seem to break the WHILE loop with input from the pushbutton. What am I doing wrong?

void loop()
{
    buttonState = digitalRead(resetbutton);
    senseMotion = digitalRead(motionPin);

  
    // Everything is fine
    if (senseMotion == LOW) // no motion detected 
        {
        digitalWrite(SafePin, HIGH); // Light the Safe LED
        digitalWrite(AlarmPin, LOW); // Turn off the Alarm LED
        }
  
    // Sense for Motion -------------------------------------------------------------------
    if (senseMotion == HIGH)
            
            {
               digitalWrite(SafePin, LOW); // Turn off the Safe Pin
               
               int x=0;
               while (x < 200 && buttonState == LOW)   
                  {
                    digitalWrite(AlarmPin, HIGH);
                    delay(100);
                    digitalWrite(AlarmPin, LOW);
                    delay(100);
                    x++;
                  }
              
              
            }

Thanks for the reply, Delta. What I want it to do is break the while loop when it a HIGH signal from a pushbutton "buttonState" is detected; which is why I had the while statement have two conditions it must check for. I'm really new to programming, so please bear with me.

What statement/line should I insert to listen for the pushbutton HIGH signal?

Ahhh... gotcha! I understand now. That made it work. Thank you, Delta! Appreciate the help!