Here is what you should do:
Local Key "Gold" doesn't exist (you can do this by right-clicking and clicking Invert): Set Local Key "Gold" to 0
Local Key "Gold" Exists: Set Gold to WebStorage.LocalValue(Gold) << You use these 2 events at the very start of the game.
Then throughout the game as the player is gaining gold, you set the local key value to the Gold variable (so that it is always being updated).
In other words, if you have an event that adds or subtracts gold, you also Set Local Key "Gold" to the gold variable.
Regarding the highscore system, at the start of the game place this event: Local Key "highscore" doesn't exist: Set Local key "highscore" to 0.
Then in the game's event sheet, add an event to check if the score variable is greater than the highscore local key. If true then set the local key to the score variable.
Hopefully that makes sense (I'm terrible at explaining things), tell me if it doesn't.