(another) arduino sequencer thread.

I've found something, googling around... now it stays silen until i press the button, but for some reason pressing it again won't deactivate the pin 13 (called DigitalInPippo).

here's the code i'e found and adapted:

{
  if(digitalRead(10) == HIGH) { //If Pin 10 is high (At 5 Volts)
    Button = 1 - Button; //If Button is set as 0 then Button = 1 - 0 (=1) and if Button is 1 then Button=1 - 1 (=0)
  }
  
  if(Button == 1 && OldButton == 0) { //If Button is 1 and OldButton is 0 (This means basically means "If the button was just pressed"
     digitalWrite (DigitalInPippo, HIGH);//Put what you want to happen when the "Switch" is on here
     delay(500); //Delay for half a second
  }
  
  if(Button == 0 && OldButton == 1) {
    digitalWrite (DigitalInPippo, LOW);//Put what you want to happen when the "Switch" is off here
    delay(500); //Delay for half a second
  }

  OldButton = Button; //The data is now old
}

    fPlayMode = digitalRead (DigitalInPippo); //this should activate/deactivate the sounds

any help?