Here is an example i did for someone else saving coins.
Example:
It check if it exists, if it does then load it.
It save it automatically as global variable changes,
It loads when user returns to game,
It has a reset button lol
I did it quick, but it shows the process.