Need help with the logic in code to pulse a light on button press

Hi thank you for the response, the button I am using for the application is a push button, meant to cycle between states.
the code I have submitted will make the button act as a toggle for the light only. push to turn on push to turn off.