yes but it would take some tedious work
1) Make a global variable for each character with its own localstorage key.
2) When you buy the character, make sure to update the global variable and the key so it saves you buying the character.
3) Update your code if your global variable is the right value, then you don't get charged for the charater.