Players of a Group Script
local Player = script.Parent.Parent.Parent.Parent.Parent
local teamcolor = "Bright green"
function onClick()
if Player.TeamColor == BrickColor.new(teamcolor) then
return
else
Player.TeamColor = BrickColor.new(teamcolor)
Player.Character.Humanoid.Health = 0
end
end
script.Parent.MouseButton1Down:connect(onClick)
Allies of a Group Script
local Player = script.Parent.Parent.Parent.Parent.Parent
local teamcolor = "Bright blue"
function onClick()
if Player.TeamColor == BrickColor.new(teamcolor) then
return
else
Player.TeamColor = BrickColor.new(teamcolor)
Player.Character.Humanoid.Health = 0
end
end
script.Parent.MouseButton1Down:connect(onClick)
