For replay you can make a if statement that has a goto within it. Also this is just a suggestion you could have the numbers saved into a text file, and have an if statement that reads from that text file so it doesn't repeat, and then at exit have it delete that same file.