Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Thanks for using this script
- Want to know how to use this and script explanation?
- Check the video here: https://youtu.be/pMFiBFOLSXA
- ]]
- local passId = 155644432
- function createLabel(player)
- local gui = Instance.new("ScreenGui")
- gui.Name = "passUI"
- gui.ResetOnSpawn = false
- local frame = Instance.new("Frame", gui)
- frame.AnchorPoint = Vector2.new(0.5,0)
- frame.Position = UDim2.new(0.5,0,0,0)
- frame.Size = UDim2.new(0.5,0,0.2,0)
- local label = Instance.new("TextLabel", frame)
- label.Text = "You own the gamepass!"
- label.Size = UDim2.new(1,0,1,0)
- label.TextXAlignment = 2 --2 means center
- return gui
- end
- game.Players.PlayerAdded:Connect(function(plr)
- local checkPass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, passId)
- if checkPass then
- print("user owns gamepass")
- local UI = createLabel(plr)
- UI.Parent = plr.PlayerGui
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement