Added an end screen, code is messy for now and only runs when repeating is true