extends Label var hiscore var numOfCoins 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()) hiscore = data["hiscore"] numOfCoins = data["numOfCoins"] func _ready(): load_game() text = str(numOfCoins)