There is an add-on that does that I believe. But to use VCE, the most basic way I know how to do it is this when buying:
Check if the player has variable
If true, give them the item.
If false, check if they have enough money to buy it
If true, give them the item and the variable (player = if they die they loose it, client = if they leave the game they loose it)
Then when they rejoin or respawn have them click a button that loads the variable back. There's a VCE add-on that just loads the variable 0 or whatever.