extends Node onready var music_player = get_node('/root/MusicPlayer') as MusicPlayer func _ready(): $Buttons/PlayButton.grab_focus() for button in $Buttons.get_children(): button.connect('pressed', self, '_on_Button_pressed', [button.scene_to_load]) func _on_Button_pressed(scene_to_load : String): if scene_to_load != "": music_player.fade_out() get_tree().change_scene(scene_to_load) else: music_player.fade_out() get_tree().quit()