Advertisement
HowToRoblox

GamepassScript

Oct 15th, 2019
2,134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. local MarketplaceService = game:GetService("MarketplaceService")
  2. local GamepassID = 7365423
  3.  
  4. game.Players.PlayerAdded:Connect(function(Player)
  5.  
  6.     if MarketplaceService:UserOwnsGamePassAsync(Player.UserId, GamepassID) then    
  7.         print(Player.Name .. " owns the gamepass: " .. GamepassID)
  8.  
  9.         game.ServerStorage.Gun:clone().Parent = Player:WaitForChild("Backpack")
  10.         game.ServerStorage.Gun:clone().Parent = Player:WaitForChild("StarterGear")
  11.     end
  12. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement