SKP_7.HealthChanged:Connect(function(t)if t<SKP_20 and t<SKP_7.MaxHealth/2 then local o=(t/SKP_20-1)*-1 local e=script.FX.Blur:clone()e.Parent=game.Workspace.CurrentCamera local N=script.FX.ColorCorrection:clone()N.Parent=game.Workspace.CurrentCamera e.Size=((t/SKP_7.MaxHealth)/2-1)*-35 N.TintColor=Color3.new(1,(t/2)/SKP_20,(t/2)/SKP_20);(SKP_10:Create(e,TweenInfo.new(3*o,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{Size=0})):Play();(SKP_10:Create(N,TweenInfo.new(3*o,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false,0),{TintColor=Color3.new(1,1,1)})):Play()SKP_11:AddItem(e,3*o)SKP_11:AddItem(N,3*o)end SKP_20=t end)local t=false SKP_18.Changed:Connect(function(t) end)SKP_17.Changed:Connect(function(t)if t>=SKP_17.MaxValue/2 then SKP_12.Saturation=math.max(-1,(t-SKP_17.MaxValue/2)/(SKP_17.MaxValue/2)-1)end end)SKP_HC.Changed:Connect(function(t)if t>=3 then SKP_4.Render:FireServer(true,"\078\047\065")end end);(SKP_15:GetAttributeChangedSignal("\067\111\108\108\097\112\115\101\100")):Connect(function()local t=SKP_15:GetAttribute("\067\111\108\108\097\112\115\101\100")if t==true then SKP_13.Brightness=-10 else SKP_13.Brightness=0 end end)SKP_7.Died:Connect(function()Morto=true SKP_7.AutoRotate=false SKP_13.TintColor=Color3.new(1,1,1)SKP_12.Saturation=0 SKP_12.Contrast=0 SKP_14.Size=0 SKP_12.Saturation=0 SKP_12.Contrast=0 SKP_15.Variaveis.Dor.Value=0 for t,o in pairs(SKP_2.Character:GetChildren())do if o:IsA("\077\101\115\104\080\097\114\116")or o:IsA("\080\097\114\116")then o.LocalTransparencyModifier=0 end end if SKP_19==true then Tween=(SKP_10:Create(SKP_13,TweenInfo.new(game.Players.RespawnTime/1.25,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{Brightness=0,Contrast=0,TintColor=Color3.new(0,0,0)})):Play()end end)local o=script.Parent.Parent.Humanoid local e=game.ReplicatedStorage.ACS_Engine.Events.MedSys.Collapse function onChanged()if SKP_17.Value<=3500 or SKP_18.Value>=200 or SKP_15:GetAttribute("\067\111\108\108\097\112\115\101\100")then SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)o:UnequipTools()e:FireServer()elseif SKP_17.Value>3500 and(SKP_18.Value<200 and not SKP_15:GetAttribute("\067\111\108\108\097\112\115\101\100"))then e:FireServer()if not SKP_15:GetAttribute("\083\117\114\114\101\110\100\101\114")then SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)end end end onChanged()SKP_17.Changed:Connect(onChanged)SKP_18.Changed:Connect(onChanged);(SKP_15:GetAttributeChangedSignal("\083\117\114\114\101\110\100\101\114")):Connect(function()local t=SKP_15:GetAttribute("\083\117\114\114\101\110\100\101\114")if t==true then o:UnequipTools()SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)else SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)end end)local N=game:GetService("\082\117\110\083\101\114\118\105\099\101")N.RenderStepped:connect(function(t)if Morto and(SKP_2.Character and SKP_2.Character:FindFirstChild("\072\101\097\100")~=nil)then game.Workspace.CurrentCamera.CameraType=Enum.CameraType.Scriptable game.Workspace.CurrentCamera.CFrame=SKP_2.Character.Head.CFrame end end)while true do(SKP_10:Create(SKP_14,TweenInfo.new(2.5,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out,0,false,2.5),{Size=(SKP_15.Variaveis.Dor.Value/200)*25})):Play()wait(5);(SKP_10:Create(SKP_14,TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false,0),{Size=0})):Play()wait(2.5)end




SKP_7.HealthChanged:Connect(function(Health)

	if Health < SKP_20 and Health < SKP_7.MaxHealth/2  then

		local Hurt = ((Health/SKP_20) - 1) * -1

		local SKP_22 = script.FX.Blur:clone()
		SKP_22.Parent = game.Workspace.CurrentCamera

		local SKP_23 = script.FX.ColorCorrection:clone()
		SKP_23.Parent = game.Workspace.CurrentCamera

		SKP_22.Size 		= ((Health/SKP_7.MaxHealth/2) - 1) * -35
		SKP_23.TintColor 	= Color3.new(1,((Health/2) /SKP_20),((Health/2)/SKP_20))

		SKP_10:Create(SKP_22,TweenInfo.new(3 * Hurt,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{Size = 0}):Play()
		SKP_10:Create(SKP_23,TweenInfo.new(3 * Hurt,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false,0),{TintColor = Color3.new(1,1,1)}):Play()

		SKP_11:AddItem(SKP_22, 3 * Hurt)
		SKP_11:AddItem(SKP_23, 3 * Hurt)
	end

	SKP_20 = Health
end)

local SKP_24 = false

SKP_18.Changed:Connect(function(Valor)

end)

SKP_17.Changed:Connect(function(Valor)
	if Valor >= SKP_17.MaxValue/2 then
		SKP_12.Saturation = math.max(-1,(Valor - (SKP_17.MaxValue/2)) / (SKP_17.MaxValue/2)-1)
	end
end)

SKP_HC.Changed:Connect(function(Valor)
	if Valor >= 3 then
		SKP_4.Render:FireServer(true,"N/A")
	end
end)

SKP_15:GetAttributeChangedSignal("Collapsed"):Connect(function()
	local Valor = SKP_15:GetAttribute("Collapsed")
	if Valor == true then
		SKP_13.Brightness = -10
	else
		SKP_13.Brightness = 0
	end
end)


SKP_7.Died:Connect(function()

	Morto = true

	SKP_7.AutoRotate = false

	SKP_13.TintColor = Color3.new(1,1,1)

	--SKP_13.Brightness = 0

	SKP_12.Saturation = 0

	SKP_12.Contrast = 0

	SKP_14.Size = 0

	SKP_12.Saturation = 0

	SKP_12.Contrast = 0

	SKP_15.Variaveis.Dor.Value = 0

	for _,Child in pairs(SKP_2.Character:GetChildren()) do
		if Child:IsA("MeshPart") or Child:IsA("Part") then
			Child.LocalTransparencyModifier = 0
		end
	end

	if SKP_19 == true then
		Tween = SKP_10:Create(SKP_13,TweenInfo.new(game.Players.RespawnTime/1.25,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{Brightness = 0, Contrast = 0,TintColor = Color3.new(0,0,0)}):Play()
	end	
end)


local SKP_25 = script.Parent.Parent.Humanoid
local SKP_26 = game.ReplicatedStorage.ACS_Engine.Events.MedSys.Collapse

function onChanged()
	if (SKP_17.Value <= 3500) or (SKP_18.Value >= 200) or SKP_15:GetAttribute("Collapsed") then
		SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
		SKP_25:UnequipTools()
		SKP_26:FireServer()
	elseif (SKP_17.Value > 3500) and (SKP_18.Value < 200) and not SKP_15:GetAttribute("Collapsed") then -- YAY A MEDIC ARRIVED! =D
		SKP_26:FireServer()
		if not SKP_15:GetAttribute("Surrender") then
			SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)	
		end
	end
end

onChanged()

SKP_17.Changed:Connect(onChanged)
SKP_18.Changed:Connect(onChanged)

SKP_15:GetAttributeChangedSignal("Surrender"):Connect(function()
	local Valor = SKP_15:GetAttribute("Surrender")
	if Valor == true then
		SKP_25:UnequipTools()
		SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
	else
		SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
	end
end)

local RS = game:GetService("RunService")
RS.RenderStepped:connect(function(Update)
	if Morto and SKP_2.Character and  SKP_2.Character:FindFirstChild("Head") ~= nil then
		game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
		game.Workspace.CurrentCamera.CFrame =  SKP_2.Character.Head.CFrame
	end
end)

while true do
	SKP_10:Create(SKP_14,TweenInfo.new(2.5,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out,0,false,2.5),{Size = (SKP_15.Variaveis.Dor.Value/200) * 25}):Play()
	wait(5)
	SKP_10:Create(SKP_14,TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false,0),{Size = 0}):Play()
	wait(2.5)
end
