Advertisement
4zx16

Default Gamepass Handler

Nov 12th, 2021 (edited)
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. --[[
  2.  || 📜 AUTHOR: @4zx16 || DEFAULT GAMEPASS HANDLER || ONLY MESS WITH ID AND THEN THE FUNCTIONS YOU WANT IT TO DO.
  3. ]]
  4. local MPS = game:GetService("MarketplaceService")
  5. local RS = game:GetService("ReplicatedStorage")
  6. local id = 0
  7.  
  8. game.Players.PlayerAdded:Connect(function(plr)
  9.     if MPS:UserOwnsGamePassAsync(plr.UserId, id) then
  10.         print(plr.Name.. " owns GamepassId ".. id)
  11.         -- then this happens
  12.     end
  13. end)
  14. RS.Active.OnServerEvent:Connect(function(plr)
  15.     if MPS:UserOwnsGamePassAsync(plr.UserId, id) then
  16.         print(plr.Name.. " owns GamepassId ".. id)
  17.         -- then this happens
  18.     end
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement