local function M(M,n)local e=M.Character local a=e:WaitForChild("\072\117\109\097\110\111\105\100")local F=a:WaitForChild("\065\114\109\111\114")local Y=a:WaitForChild("\068\111\119\110")local t=script.SquadFrame:Clone()t.NameLabel.Text=M.Name t.NameLabel.TextColor3=n t.Parent=SQUAD_GUI local function P()t.Bars.Health.Size=UDim2.new(a.Health/a.MaxHealth,0,.6,-1)t.Bars.Armor.Size=UDim2.new(F.Value/150,0,.4,-1)t.Bars.Health.BackgroundColor3=Y.Value and DOWN_COLOR or HEALTH_COLOR t.DownLabel.Visible=Y.Value end a.HealthChanged:connect(P)F.Changed:connect(P)Y.Changed:connect(function()if Y.Value then script.DownSound:Play()end P()end)P()end script.TrackPlayer.Event:connect(M)
-- functions

local function TrackPlayer(player, color)
	local character = player.Character
	local humanoid = character:WaitForChild("Humanoid")
	local armor = humanoid:WaitForChild("Armor")
	local down = humanoid:WaitForChild("Down")

	local frame = script.SquadFrame:Clone()
	frame.NameLabel.Text = player.Name
	frame.NameLabel.TextColor3 = color
	frame.Parent = SQUAD_GUI

	local function Update()
		frame.Bars.Health.Size = UDim2.new(humanoid.Health / humanoid.MaxHealth, 0, 0.6, -1)
		frame.Bars.Armor.Size = UDim2.new(armor.Value / 150, 0, 0.4, -1)

		frame.Bars.Health.BackgroundColor3 = down.Value and DOWN_COLOR or HEALTH_COLOR
		frame.DownLabel.Visible = down.Value
	end

	humanoid.HealthChanged:connect(Update)
	armor.Changed:connect(Update)
	down.Changed:connect(function()
		if down.Value then
			script.DownSound:Play()
		end

		Update()
	end)

	Update()
end

script.TrackPlayer.Event:connect(TrackPlayer)
