simpleTimer for relay or Mosfet

Hello everybody
I am very new to programing, hence due to lack of knowledge & experience run into trubles.
Your help is highly appreciated!
I am trying to set a mosfet (or a relay) to go ON for 30 seconds
than oFF for 250 (1/4 of a second 25%) and than back on for 30 seconds &off for 250 (1/4 of a second thats the whole loop
Used the example sketch below, it outputs that loop (30 seconds on 1/4 second off)
but the the problem is i cant turn it off completely. namely, when i press the digital button to OFF it shots down for 30 seconds and than turns on and it starts over
How to add a function which will enable to complete shot down the d4 pin

Wemos D1R1

Thanks in Advance!

[Unformatted code removed by moderator]

THANKS VERY MUCH!

@Arrow008 please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.