help with windows electric shouters code

If you want a button press to cancel an active press of the same button, you could do something like this:

instead of this:

if(millis() >= off1 ) //see if it's time to turn off LED

do this

if(millis() >= off1 ||  digitalRead(buttonUp) == LOW  ) //see if it's time to turn off LED

You have couple of problems, though:

  1. You have no button debounce or status change check which might cause the new code to be immediately executed because the user may not be able to release the button quickly enoough.

You could get away with either adding a short delay, say 250mS, after setting led1 to HIGH or doing something like this (but see point 2 below):

if(millis() >= off1 ||  ( digitalRead(buttonUp) == LOW  && off1 - millis() > 250 && off1 - millis() < 5000 )  ) //see if it's time to turn off LED
  1. Your use of millis() does not handle the situation approaching the millis() rollover so is not usual way of writing such code. Better is to set the time of the button press, not to calculate the expiry time in advance. So your test would be something like:
if ( millis() - buttonPressedAt > 5000 )  // button press expired