So, here is the script that awards the player the gear if they have a GAMEPASS
wait(2) gpid = 1111111111 tools = {"gear"} GPS = Game:GetService("GamePassService") function respawned(char) player = game.Players:FindFirstChild(char.Name) print("Respawned") if char:FindFirstChild("Head") ~= nil then print("A wild player has appeared!") if GPS:PlayerHasPass(player, gpid) then print("Has GPID") for i = 1,#tools do game.Lighting:FindFirstChild(tools[i]):Clone().Parent = player.Backpack end else print("No GPID") end end end game.Workspace.ChildAdded:connect(respawned)
Anyone know how to edit it to make it so you have a badge, then it awards the gear? Also, if you already know a have badge award gear script, just post it here.
NOTE: The gear needs to be grabbed out of ingame, in a spot such as lighting. Not from the catalog.
I suppose you want a script that gives the player a gear if they have a badge when they join the game or respawn (if they earn the badge they can use the gear simply by respawning).
badgeid = 123456789 -- id of badge needed toolstorage = game.ServerStorage -- where to store the gear(s) tools = {"Gear"} -- names of the tools (you can put as many as you want) game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) if game:GetService("BadgeService"):UserHasBadge(p.userId, badgeid) then for i,v in pairs(tools) do local clone = toolstorage:WaitForChild(v):Clone() clone.Parent = p.Backpack end end end) end)
I'm not sure if this works. Please tell me if it does :)
EDIT: Trying to see if I can make it award instantly
EDIT 2: Improved