This was made out of 35 CODE BLOCKS!!! IT'S INSANE!! Press the flag ONCE. That's all you need.
It will go on forever, but you can stop whenever.