I want to stop the timer

Also I looked at your work and I see the problem. You are using tick which means everything is going to execute every frame so there is no way you can stop that.

Use function timers.