I suggest you define a new function which you call on level load that only resets the relevant parts.
You can try to use proc_kill to stop all other instances of the main function (i.e. stop all its other loops).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends