Adding a restart button and ending door

How can I add a restart button and ending door to Nathan’s tutorial? I’m a pretty big begginner and I like to know the code. Like, when you get all the coins the door appears. Also, how can I make a restart button that is always there, and follows the screen, when I only have one frame in the whole game? Thanks