i spent 2 days on this i tried a lots but it wont worked here my scripts
local id = 6278294 game.Players.PlayerAdded:Connect(function(player) if game:GetService("GamePassService"):PlayerHasPass(player, id) then player.PlayerGui.Pets.TextButton.Frame.Pet1equip.TextButton.Visible = true end
It worked in studio but it doesn’t work in the real game
Please Help me fix this
You haven't gave much information about you're problem. Here's the script anyways.
local id = 6278294 game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased) if purchased and ido == id then player.PlayerGui.Pets.TextButton.Frame.Pet1equip.TextButton.Visible = true end end) game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:connect(function(char) if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then player.PlayerGui.Pets.TextButton.Frame.Pet1equip.TextButton.Visible = true end end) end)