But when do not exist, I want to create it, how do I do it?
Because the "else" is not supported.
It will 'exist' after you set a trigger for it to exist.
Example:
Player - On destroyed > System - Set lives (lives is the global variable) to 4
Then add the action to set lives to localstorage:
Localstorage - set lives_key(1) to lives(2)
Number 1, the lives_key is just a name for THAT data in localstorage. You can call it anything you want, but most people will use the global variable its saving and some will add the KEY after it, just as a quick reference so they don't, i mean me, get confused.
So when you start the game again, that localstorage WILL exist now, and it will have the value of 4.