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

2 comments
please give more info about your problem!
Don't use an if statement to check if they have the pass, use a variable, and use UserOwnsGamePassAsync instead of PlayerHasPass