Hidden Gamepasses

[size=2]This seems like it fits in Web Features, right?[/size]

A feature for gamepasses I thought of could be useful in a few situations, mostly the one I’ll elaborate here in a second, but “hidden gamepasses” would basically be a way to hide gamepasses from the game’s page by ticking a checkbox in its configuration page, making it only able to be purchased by an in-game prompt.

This would mainly be used for paying access to something you can alternative unlock later-on for free. Such as below.

The advantage behind this is the situation you have when a player has already unlocked the section in the game and the gamepass is then useless, yet we wouldn’t want a confused player wasting their money by buying the gamepass after that.

And I’m aware that lots of devs use developer products linked with DataStore to basically do the same exact thing, but DataStore leaves me dazed and confused when I try to understand it, and I feel it wouldn’t be worth figuring out just to fix this single situation.

1 Like

Someone should probably make an easy-to-use module for inexperienced developers in regards to dev products. I guess I can be that someone. Give me a minute.

Dev products I understand completely as far as I know, it’s the DataStore I can never figure out. And I’ve tried a good few times.

The datastore stuff would be built into that module, but if you don’t want it, that’s fine. All you need to do is run this when they purchase it:

local ds = game:GetService(“DataStoreService”):GetDataStore(“PlayerPurchases”)
ds:SetAsync(player.userId…upgradeName, true)

To check if the player owns it:

if ds:GetAsync(player.userId…upgradeName) == true then
– player purchased item.
end

[quote] The datastore stuff would be built into that module, but if you don’t want it, that’s fine. All you need to do is run this when they purchase it:

local ds = game:GetService(“DataStoreService”):GetDataStore(“PlayerPurchases”)
ds:SetAsync(player.userId…upgradeName, true)

To check if the player owns it:

if ds:GetAsync(player.userId…upgradeName) == true then
– player purchased item.
end [/quote]

Adding on to this, once you get datastores down, I find it easier to store the dev product value (ie) VIP Tier 1, as a bool value (instead of needing to call the datastore each time you check for if the player has VIP - because that takes way longer than checking a bool value). And to be safe from exploiters I store the actual bool value in server storage in a folder named (plr.Name…“_Stats”) And that folder is added / removed from server storage when the player joins / leaves

Datastores are totally worth learning. The possibilities with them are awesome. Good luck!

Thanks guys, I’ll see if I can get a handle on it later tonight now that it’s been a bit more simplified for me.