Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local GAMEPASSID = 0000000 --// Set this to your gamepass ID
- if game:GetService("MarketplaceService"):UserOwnsGamepassAsync(game.Players.LocalPlayer.UserId, GAMEPASSID) then --// User HAS the pass
- for i,v in pairs(script.Parent:GetChildren()) do --// Getting all the objects in the GUI, if your GUI has more than 1 frame or no frame at all.
- pcall(function() --// This is to stop it showing errors if you've got any weird objects in your ScreenGui
- v.Visible = true --// Appears
- end)
- end
- else --// User DOESN'T have the pass
- for i,v in pairs(script.Parent:GetChildren()) do --// Getting all the objects in the GUI, if your GUI has more than 1 frame or no frame at all.
- pcall(function() --// This is to stop it showing errors if you've got any weird objects in your ScreenGui
- v.Visible = false --// Doesn't appear
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement