You press the green flag, then you just click the green flag again to restart if you die. Also, on the part where you discover the girl, you can type 'No Way Out' and it'll give you another ending, but its a bit finicky, so you might have to type each letter multiple times.
Made literally all by myself. It was for my Com. Tech class, but I did all the coding myself.