Crash From Duration

I’m having some trouble allowing my program to run without crashing… It goes about a minute then crashes

Edit:

So one of the problems seems to be if you let it go it works fine, but if you have an auto clicker thing it crashes after a while, with no explanation

Uhh, never mind that thing… I’ll post a pastebin with the files