local M=script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name local B=script.Parent.Border.ImageColor3 function Click(S)if game.Players[M].TeamColor~=(game.Teams:FindFirstChild(script.Parent.Name)).TeamColor then game.Players[M].TeamColor=(game.Teams:FindFirstChild(script.Parent.Name)).TeamColor script.Parent.Border.ImageColor3=Color3.new(.333333,1,0)wait(.25)script.Parent.Border.ImageColor3=B wait(.1)script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health=0 else script.Parent.Border.ImageColor3=Color3.new(1,0,0)wait(.25)script.Parent.Border.ImageColor3=B wait(.1)end end script.Parent.MouseButton1Click:connect(Click)


local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name
local normalBorderColor = script.Parent.Border.ImageColor3

function Click(mouse) 
	if game.Players[plr].TeamColor ~= game.Teams:FindFirstChild(script.Parent.Name).TeamColor then
		game.Players[plr].TeamColor = game.Teams:FindFirstChild(script.Parent.Name).TeamColor

		script.Parent.Border.ImageColor3 = Color3.new(0.333333, 1, 0)
		wait(.25)
		script.Parent.Border.ImageColor3 = normalBorderColor
		wait(.1)
		script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0
	else
		script.Parent.Border.ImageColor3 = Color3.new(1, 0, 0)
		wait(.25)
		script.Parent.Border.ImageColor3 = normalBorderColor
		wait(.1)
	end
	
end 

script.Parent.MouseButton1Click:connect(Click) 
