Adding an on/off button with an existing sketch

to be honest, I did not look at the functionality of what it does.

I think you might be better off writing code from scratch.

If you tell me what exactly you want the code to do I can give you some more pointers.