Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script now working,Trying to give killer (Knightmare) weopen?

Asked by 10 years ago
function teamFromColor(color) 
for _,t in pairs(game:GetService("Teams"):GetChildren()) do 
if t.TeamColor==color then return "Crescendo, The Soul Stealer"  end 
end 
return nil 
end 

function onSpawned(plr) 
local tools = teamFromColor(plr.TeamColor):GetChildren() 
for _,c in pairs(tools) do 
c:Clone(Crescendo, The Soul Stealer).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) 

Answer this question