extends Label var lastscore = 0 func load_game(): var save_game = File.new() if not save_game.file_exists("user://savegame.save"): return save_game.open("user://savegame.save", File.READ) while save_game.get_position() < save_game.get_len(): var data = parse_json(save_game.get_line()) lastscore = data["lastscore"] func _ready(): load_game() text="Score\n" + str(round(lastscore))