Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onDied(hum,play)
- if hum then
- local tag = hum:FindFirstChild("creator")
- if tag then
- local killer = tag.Value
- if killer.TeamColor == game.Workspace.Allies.TeamColor then -- Allies is the team spawn.
- if play.TeamColor == game.Workspace.RAT.TeamColor then -- RAT is the team spawn.
- killer.TeamColor = game.Workspace.Raiders.TeamColor
- killer.Character:BreakJoints()
- end
- end
- end
- end end
- function Added(player)
- player.CharacterAdded:connect(function(c)spawn(c,player)end)
- end
- function spawn(ch,pl)
- ch.Humanoid.Died:connect(function()onDied(ch.Humanoid,pl)end)
- end
- game.Players.ChildAdded:connect(Added)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement