function teamFromColor(v)for o,F in pairs((game:GetService("\084\101\097\109\115")):GetChildren())do if F.TeamColor==v then return F end end return nil end function onSpawned(v)local o=(teamFromColor(v.TeamColor)):GetChildren()for o,F in pairs(o)do(F:Clone()).Parent=v.Backpack end end function onChanged(v,o)if v=="\067\104\097\114\097\099\116\101\114"then onSpawned(o)end end function onAdded(v)v.Changed:connect(function(o)onChanged(o,v)end)end game.Players.PlayerAdded:connect(onAdded)


function teamFromColor(color)
for _,t in pairs(game:GetService("Teams"):GetChildren()) do
if t.TeamColor==color then return t end
end
return nil
end

function onSpawned(plr)
local tools = teamFromColor(plr.TeamColor):GetChildren()
for _,c in pairs(tools) do
c:Clone().Parent = plr.Backpack
end
end

function onChanged(prop,plr)
if prop=="Character" then
onSpawned(plr)
end
end

function onAdded(plr)
plr.Changed:connect(function(prop)
onChanged(prop,plr)
end)
end

game.Players.PlayerAdded:connect(onAdded)

