It doesn't work as you expect it in your game because what I gave you is just a small example of what you wanted it's up to you to properly integrate it into your game.
In a couple of minutes I made it unbreakable and so it restarts properly.
[attachment=0:11otinxw][/attachment:11otinxw]
Sorry if I sound harsh at the top it's not meant to be but no one can make an example that works perfectly for a game when they have no idea how it works.
Hope the new version helps