I haven’t gotten around to doing much with the MemoryStoreService, I’m just aware of what it does and figured it’d be useful for what you’re trying to do.
I’m not really sure about the accuracy of the MemoryStoreService, you’ll need to wait for someone more experienced to respond.
Working with data on Roblox is very annoying and painful, but in my experience it is usually wise to use a DataStore module, specifically I use ProfileService.
You can read all about it on the provided link, has a ton of great perks and benefits and is easy to use with plenty of documentation.
As for how to code the system, the global bank will need to have a key such as “BANK_001” and each player will need to have their own individual key. Whenever a player makes a purchase you just need to add the value into your bank’s saved key.
Here are some youtube videos on ProfileService which you may find usefull: ProfileService - YouTube
The problem with soley relying on a DataStore solution is that results will cache, so you won’t get live results.
The solution you’re looking for is MemoryStoreService, which is apart of the Roblox API. This allows data to persist across servers in real-time. The main issue is that MemoryStoreService only stores information for a certain amount of time, so that’s why on to of this you still need a data storing solution.
As the owner of StatsManager (which also supports DataStore2 and ProfileService), I’m going to be adding support for Server-side stats in a later update. I’m aiming to automatically embed the MemoryService and Data saving code which are the functionalities you are looking for.