4zx16

Gamepass Handler v1

Oct 28th, 2021 (edited)
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. --[[
  2.  || 📜 AUTHOR: @4zx16 || GAMEPASS HANDLER v1 || ONLY MESS WITH LOCAL ID AND LOCAL TOOL NAME!
  3. ]]
  4. local GS = game:GetService("GamePassService")
  5. local ServerStorage = game:GetService("ServerStorage")
  6. local RS = game:GetService("ReplicatedStorage")
  7. local id = 0
  8. local tools = {}
  9.  
  10. game.Players.PlayerAdded:Connect(function(plr)
  11.     repeat wait(0.1) until plr.Backpack
  12.     repeat wait(0.1) until plr.StarterGear
  13.  
  14.     if GS:PlayerHasPass(plr, id) then
  15.         for i = 1, #tools do
  16.             ServerStorage:FindFirstChild(tools[i]):Clone().Parent = plr.Backpack
  17.             ServerStorage:FindFirstChild(tools[i]):Clone().Parent = plr.StarterGear
  18.         end
  19.     end
  20. end)
  21. RS.Give.OnServerEvent:Connect(function(plr)
  22.     repeat wait(0.1) until plr.Backpack
  23.     repeat wait(0.1) until plr.StarterGear
  24.  
  25.     if GS:PlayerHasPass(plr, id) then
  26.         for i = 1, #tools do
  27.             ServerStorage:FindFirstChild(tools[i]):Clone().Parent = plr.Backpack
  28.             ServerStorage:FindFirstChild(tools[i]):Clone().Parent = plr.StarterGear
  29.         end
  30.     end
  31. end)
Advertisement
Add Comment
Please, Sign In to add comment