def end_game(): global gameState, player, highscore gameState = GAMESTETE_GAMEOVER highscore.add(Highscore.Entry(player.score)) global music_bg music_bg.stop()