You should be careful using "Wait" in functions, because it resets local variables and function parameters. But this is not the case here.
The problem here is that you set time scale to 0 when Pause button is pressed, and it remains 0 even after the game is restarted. That's why "Wait 3" is taking forever.