So I made a server script that made a new folder called "Gamepasses" and inside the folder is a boolvalue named "BlueFire" and is set to false
what I want to do with the gamepass is set that value to true
local id = 9736269
game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
if purchased and id == ido then
plr.Gamepasses.BlueFire.Value = true
end
end)
game.Players.PlayerAdded:Connect(function(plr)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId,id) then
game.Players:WaitForChild(plr.Name).Gamepasses.BlueFire.Value = true
end
end)
It was working fine but then I added datastore2 and some reason it doesn't work idk y.

2 comments
I'm not sure why you are adding datastores for gamepass you just need to out an if statement for if the player owns the gamepass
I didn't add a datastore for gamepass, I added a data store for a money value and I didn't change the gamepass code AT ALL. Idk why its doing this