Sequencing through sketches with a button press

My level of programing is no where near as advanced as yours and although this sketch looks like it would work, I just don't understand most of it.
What I'm attempting to do is blink 7 segments of LED's (40 LED's in each segment) to mimic the rear Amber section of a service truck light bar.
I've already figured out the wiring for the 40 LED matrix and how to hook them to the Arduino and each sketch works just like I want it to.
The 1st sketch would blink the segments from Left to Right. Progressively lighting each segment.
The 2nd sketch blinks from Right to Left.
The 3rd sketch blinks from the center outward to both ends.
I just need to figure out how to switch from one sketch to the next by pressing a button.
Once I have that figured out I can add different flash patterns.
The sketch that I uploaded was copied from a youtube page that was in Hindi and I couldn't understand what he was saying. However, his solution was working. It just took a very long button press to switch between sketches.
What I need is help understanding how to write a sketch that will work with a button press so I can
keep working on this project.
Thanks to anyone willing to help.