I attempted to find a script for my game, I found this one but it kept giving me errors.
Example: Lets say you joined a 'I love cheeseburgers' group, when you spawn in their game you are geared a cheeseburger for being in the group. If you are not in that group you will not spawn with a cheeseburger.
The error occurred under 'respawned' on the 7th line.
Please help TT-TT
wait(2)
gpid = 2905610
tools = ("170897263")
GPS = Game:GetService("GamePassService")
fuction respawned(char) -- This is where the error is
player = game.Players:FindFirstChild(char.Name)
print ("Respawned")
if char:FindFirstChild("Head") ~= nil then
print("Player")
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
game.Workspace.ChildAdded:connect(respawned)

2 comments
Done, read the comment in the code.
That's not a script error. You should check this page and debug it yourself. http://wiki.roblox.com/index.php?title=Lua_errors