How to make a servo stop at 90 when a push button is in the low position

I am working on a project and trying to figure out how to make my servo stop at 90 degrees when a button is in the LOW position and return to the middle (0) position when the button is in the HIGH position. Attached is my working code which rotates my servo 90 degrees when the button is pressed and back to 0 in a sweep. I am using a HS-7950th servo.

#include <Servo.h>

Servo myservo;  // create servo object to control a servo 

int pos = 0;  // variable to store the servo position 
int button = 7;  // The button will be on Pin 7 

void setup() 
{ 
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
pinMode(pos, OUTPUT);
pinMode(button, INPUT); 
digitalWrite (button, LOW);
} 

void loop() 
{ 
  
    if (digitalRead(button) == HIGH)

  for(pos = 90; pos <= 180; pos += 1)  // goes from 0 degrees to 90 degrees 
  {                                  // in steps of  degree 
    myservo.write(pos); 
    delay(60);   // tell servo to go to position in variable 'pos' 
  } 
  
  if (digitalRead(button) == LOW) 
  
  for(pos = 90; pos>= 90; pos-= 1)     // goes from 90 degrees to 0 degrees 
  {                                
     myservo.write(pos);              // tell servo to go to position in variable 'pos' 
  delay(50);                             // waits 50ms for the servo to reach the position 
  }
  
}
#include <Servo.h>

Servo myservo; 
const byte button = 7;  

void setup() 
{ 
  myservo.attach(9);  
 pinMode(button, INPUT); 
} 

void loop() 
{ 
    if (digitalRead(button) == HIGH) {
      myservo.write(0); 
   } 
   else {                      
     myservo.write(90);      
  }
}

Uncompiled, untested

unfortunately I did not have any luck with that code nothing happened with the servo

Check your wiring.