Remembering button state

so to get my code to work i need to do major changes to get the button to remember the sate for the lights for a set time? & executing the loop. also by getting rid of a delay i can use "millis" is millis a built in timer ?