I have a VIP gamepass that gives a set amount of premium currency and a chat tag. It works fine when purchased in-game, but whenever the player purchases the gamepass when not in game via the shop menu in the game’s description, the game doesn’t know they’ve purchased the gamepass and doesn’t give them the premium currency. What would be the best way to fix this?
These are the ideas I’ve had so far:
I could have some kind of saved value that tracks whether or not a player has recieved the reward from buying the VIP gamepass and awards it when they join if it sees they got the gamepass but not the reward. (Seems pointless to have this value lying around for every player on the off chance they buy the gamepass while not in game.)
I could change the reward to not be a one-time thing, but instead a constant multiplier on income or a daily reward of premium currency. (I’m worried this will affect the balance of the game.)
Is there anything that would make more sense I could try?
datastoring is cheap, it’s honestly negligible to add a value to whatever saving method you use for a player. alternatively, just use developer products if it’s a one-time perk and use a datastore to save the user’s VIP chat tag eligibility.
Quite right, perhaps a playeradded function with this.
local MS = game:GetService(“MarketplaceService”)
local function OnPlayerAdded(plr)
if MS:UserOwnsGamepasaAsync(plr.UserId, —[[VIP game pass id here]]) then
— Do stuff to give premium currency
end
end
you can make listener, that checks if player’s buy-gamepass value is redemned when joining, if not then give rewards and save them, also it can prevent glitch where player buys many gamepasses of the same type and get a lot of the same reward