So, it has recently come to my attention that gamepasses can be manually deleted from players’ inventories. My current system checks whether a user owns a gamepass when they join the game and adjusts their inventory size and other values accordingly.
Now, the main issue arises when the player deletes the gamepass. They should no longer receive the perks of the gamepass as they no longer own the gamepass, but the problem with this is that they’ve previously used perks from the gamepass. This can cause the data that I’m saving for the player to become corrupted (for example, if they delete a gamepass that expands their inventory size, and their current inventory exceeds a normal player’s inventory capacity, the extra items of their inventory will be deleted).
Honestly, it perplexes me that deleting a gamepass is even an option, but I do want to take this into consideration and have been grappling with what the best solution would be. Currently, the only approach to come to mind is to save all the gamepasses that each player has ever purchased inside my DataStore, but I want to see if there is another, simpler workaround.
I mean, if a player buys a gamepass that gives them extra perks and they delete it, would you even want to remove their perks? They bought it once and there’s a chance it was deleted on accident.
Odds are Roblox will remove the ability to remove a gamepass from your inventory sooner or later, so I don’t think adding in a whole system to avoid corrupting data is a waste of time and most likely useless besides super rare scenarios where a player doesn’t want perks that they payed for anymore.
I’m aware and I wasn’t even referring to Roblox’s built-in features, I was referring to making sure their scripts were secure enough so they couldn’t rebuy it and gain 2x the perks or whatever.
Also you don’t need DataStoreService. Everytime they load their data just check if they own the gamepass then if they do, allow them to have extra perks and if they don’t have it then remove their perks if the game says they have them.
I understand that it’s not a huge problem and will probably affect a very, very tiny fraction of players. It might not be a problem worth acknowledging, if not for the possibility that a player’s data could be corrupted in ways that aren’t easily reversible. The data corruption will likely force the player to delete their save.
I’m guessing DataStoreService is the only workaround for this which is a bit annoying, but I can’t think of any other solutions.
That would be a good approach, but removing their perks isn’t a simple process. The game I’m building is a sandbox tycoon. If they purchase a gamepass that expands their plot and later delete it, I’d have to delete half their tycoon which isn’t ideal.