func save_score(save_path, score): # The path must end with .txt to create a txt-file
var f = File.new()
f.open(save_path, File.WRITE)
f.store_line(to_json(score))
f.close()
func read_score(save_path) -> float:
var score: float
var f = File.new()
f.open(save_path, File.READ)
score = parse_json(f.get_line)
return score