I can help you You go to you last place where game will end:
Like a path or Bridge or something else.
You only need a
RectangleShape,
Game End,
PlaySound and a
Area TriggerI attached a Screen for you.
If you want to end the game with a lose you type in the end Game Script
e.loseif you want that the guys win when the activate the trigger you write
e.win Hope i can helped you