
This is a robust system developed to save player economy.
When the player joins the game, their balance is queried from a DataStore. If the player does not have existing data, they'll be given the base amount.
Every time the player's balance is called afterwards, it'll get the current balance from the cache. It will also update the player's economy in the cache when it increases or decreases.
This system features a function that will tell you if a player has enough to purchase something from a by-you specified minimum value, allowing you to focus on scripting rather than doing the backend.
Once the player leaves, that's when the new balance is saved into the datastore.

