Humanoid.Died:Connect(function()(TS:Create(char.Humanoid,TweenInfo.new(1),{CameraOffset=Vector3.new(0,0,0)})):Play()Main.Visible=false end)local q=TS:Create(Main.Poses.Bleeding,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,-1,true),{ImageColor3=Color3.fromRGB(150,0,0)})q:Play();(saude:GetAttributeChangedSignal("\083\117\114\114\101\110\100\101\114")):Connect(function()local q=saude:GetAttribute("\083\117\114\114\101\110\100\101\114")Evt.Stance:FireServer(nil,nil,q)end);(saude:GetAttributeChangedSignal("\066\108\101\101\100\105\110\103")):Connect(function()Main.Poses.Bleeding.Visible=saude:GetAttribute("\066\108\101\101\100\105\110\103")end);(saude:GetAttributeChangedSignal("\073\110\106\117\114\101\100")):Connect(function()local q=saude:GetAttribute("\073\110\106\117\114\101\100")if q==true then(TS:Create(Main.Poses.Levantado,TweenInfo.new(.2,Enum.EasingStyle.Linear),{ImageColor3=Color3.fromRGB(150,0,0)})):Play();(TS:Create(Main.Poses.Agaixado,TweenInfo.new(.2,Enum.EasingStyle.Linear),{ImageColor3=Color3.fromRGB(150,0,0)})):Play();(TS:Create(Main.Poses.Deitado,TweenInfo.new(.2,Enum.EasingStyle.Linear),{ImageColor3=Color3.fromRGB(150,0,0)})):Play()else(TS:Create(Main.Poses.Levantado,TweenInfo.new(.2,Enum.EasingStyle.Linear),{ImageColor3=Color3.fromRGB(255,255,255)})):Play();(TS:Create(Main.Poses.Agaixado,TweenInfo.new(.2,Enum.EasingStyle.Linear),{ImageColor3=Color3.fromRGB(255,255,255)})):Play();(TS:Create(Main.Poses.Deitado,TweenInfo.new(.2,Enum.EasingStyle.Linear),{ImageColor3=Color3.fromRGB(255,255,255)})):Play()end end)local n=Main.Vest local g=Main.Helm local M=Main.Poses.Energy function Vest()if Protecao.VestProtect.Value<=0 then(TS:Create(n,TweenInfo.new(1),{ImageTransparency=1})):Play()else(TS:Create(n,TweenInfo.new(1),{ImageTransparency=.125})):Play()end end function Helmet()if Protecao.HelmetProtect.Value<=0 then(TS:Create(g,TweenInfo.new(1),{ImageTransparency=1})):Play()else(TS:Create(g,TweenInfo.new(1),{ImageTransparency=.125})):Play()end end function Stamina()if ServerConfig.EnableStamina then if saude.Variaveis.Stamina.Value<=saude.Variaveis.Stamina.MaxValue/2 then M.ImageColor3=Color3.new(1,saude.Variaveis.Stamina.Value/(saude.Variaveis.Stamina.MaxValue/2),saude.Variaveis.Stamina.Value/saude.Variaveis.Stamina.MaxValue)M.Visible=true elseif saude.Variaveis.Stamina.Value<saude.Variaveis.Stamina.MaxValue then M.ImageColor3=Color3.new(1,1,saude.Variaveis.Stamina.Value/saude.Variaveis.Stamina.MaxValue)M.Visible=true elseif saude.Variaveis.Stamina.Value>=saude.Variaveis.Stamina.MaxValue then M.Visible=false end else saude.Variaveis.Stamina.Value=saude.Variaveis.Stamina.MaxValue M.Visible=false end end Vest()Helmet()Stamina()Protecao.VestProtect.Changed:Connect(Vest)Protecao.HelmetProtect.Changed:Connect(Helmet)saude.Variaveis.Stamina.Changed:Connect(Stamina)function L_150_.Update()if saude.Variaveis.Stamina.Value<=saude.Variaveis.Stamina.MaxValue/2 then local q=(1-saude.Variaveis.Stamina.Value/(saude.Variaveis.Stamina.MaxValue/2))/20 Camera.CoordinateFrame=Camera.CoordinateFrame*CFrame.Angles(math.rad(q*math.sin(tick()*3.5)),math.rad(q*math.sin(tick()*1)),0)end end maxAir=100 air=maxAir lastHealth=100 lastHealth2=100 maxWidth=.96 local N=false Humanoid.StateChanged:connect(function(q)if q==Enum.HumanoidStateType.Swimming then N=true else N=false end end);(game:GetService("\082\117\110\083\101\114\118\105\099\101")):BindToRenderStep("\067\097\109\101\114\097 \085\112\100\097\116\101",200,L_150_.Update)while wait()do if ServerConfig.CanDrown and player.Character:FindFirstChild("\072\101\097\100")then local q=player.Character.Head.Position-.1*player.Character.Head.Size local n=player.Character.Head.Position+.1*player.Character.Head.Size local g=(Region3.new(q,n)):ExpandToGrid(4)local M=(workspace.Terrain:ReadVoxels(g,4))[1][1][1]if player.Character.Humanoid.Health>0 then if M==Enum.Material.Water then if air>0 then air=air-.15 elseif air<=0 then air=0 player.Character.Humanoid.Health=0 end else if air<maxAir then air=air+.5 end end end if air<=50 then script.Parent.Frame.Oxygen.ImageColor3=Color3.new(1,air/50,air/100)script.Parent.Frame.Oxygen.Visible=true elseif air<maxAir then script.Parent.Frame.Oxygen.ImageColor3=Color3.new(1,1,air/100)script.Parent.Frame.Oxygen.Visible=true elseif air>=maxAir then script.Parent.Frame.Oxygen.Visible=false end script.Parent.Efeitos.Oxigen.ImageTransparency=air/100 if air<=25 then script.Parent.Efeitos.Oxigen.BackgroundTransparency=air/25 end end end


Humanoid.Died:Connect(function()
	TS:Create(char.Humanoid, TweenInfo.new(1), {CameraOffset = Vector3.new(0,0,0)} ):Play()
	Main.Visible = false
end)

local BleedTween = TS:Create(Main.Poses.Bleeding, TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,-1,true), {ImageColor3 =  Color3.fromRGB(150, 0, 0)} )
BleedTween:Play()

saude:GetAttributeChangedSignal("Surrender"):Connect(function()
	local Valor = saude:GetAttribute("Surrender")
	Evt.Stance:FireServer(nil,nil,Valor)
end)

saude:GetAttributeChangedSignal("Bleeding"):Connect(function()
	Main.Poses.Bleeding.Visible = saude:GetAttribute("Bleeding")
end)

saude:GetAttributeChangedSignal("Injured"):Connect(function()
	local Valor = saude:GetAttribute("Injured")

	if Valor == true then
		TS:Create(Main.Poses.Levantado, TweenInfo.new(.2,Enum.EasingStyle.Linear), {ImageColor3 =  Color3.fromRGB(150, 0, 0)}):Play()
		TS:Create(Main.Poses.Agaixado, TweenInfo.new(.2,Enum.EasingStyle.Linear), {ImageColor3 =  Color3.fromRGB(150, 0, 0)}):Play()
		TS:Create(Main.Poses.Deitado, TweenInfo.new(.2,Enum.EasingStyle.Linear), {ImageColor3 =  Color3.fromRGB(150, 0, 0)}):Play()
	else
		TS:Create(Main.Poses.Levantado, TweenInfo.new(.2,Enum.EasingStyle.Linear), {ImageColor3 =  Color3.fromRGB(255, 255, 255)}):Play()
		TS:Create(Main.Poses.Agaixado, TweenInfo.new(.2,Enum.EasingStyle.Linear), {ImageColor3 =  Color3.fromRGB(255, 255, 255)}):Play()
		TS:Create(Main.Poses.Deitado, TweenInfo.new(.2,Enum.EasingStyle.Linear), {ImageColor3 =  Color3.fromRGB(255, 255, 255)}):Play()
	end
end)

local a = Main.Vest
local b = Main.Helm
local Ener = Main.Poses.Energy

function Vest()
	if Protecao.VestProtect.Value <= 0 then
		TS:Create(a, TweenInfo.new(1), {ImageTransparency = 1} ):Play()
	else
		TS:Create(a, TweenInfo.new(1), {ImageTransparency = .125} ):Play()
	end
end

function Helmet()
	if Protecao.HelmetProtect.Value <= 0 then
		TS:Create(b, TweenInfo.new(1), {ImageTransparency = 1} ):Play()
	else
		TS:Create(b, TweenInfo.new(1), {ImageTransparency = .125} ):Play()
	end
end

function Stamina()
	if ServerConfig.EnableStamina then
		if saude.Variaveis.Stamina.Value <= (saude.Variaveis.Stamina.MaxValue/2) then
			Ener.ImageColor3 = Color3.new(1,saude.Variaveis.Stamina.Value/(saude.Variaveis.Stamina.MaxValue/2),saude.Variaveis.Stamina.Value/saude.Variaveis.Stamina.MaxValue)
			Ener.Visible = true
		elseif saude.Variaveis.Stamina.Value < saude.Variaveis.Stamina.MaxValue then
			Ener.ImageColor3 = Color3.new(1,1,saude.Variaveis.Stamina.Value/saude.Variaveis.Stamina.MaxValue)
			Ener.Visible = true
		elseif saude.Variaveis.Stamina.Value >= saude.Variaveis.Stamina.MaxValue then
			Ener.Visible = false
		end
	else
		saude.Variaveis.Stamina.Value = saude.Variaveis.Stamina.MaxValue
		Ener.Visible = false
	end
end

Vest()
Helmet()
Stamina()

Protecao.VestProtect.Changed:Connect(Vest)
Protecao.HelmetProtect.Changed:Connect(Helmet)
saude.Variaveis.Stamina.Changed:Connect(Stamina)



function L_150_.Update()
	if saude.Variaveis.Stamina.Value <= (saude.Variaveis.Stamina.MaxValue/2) then
		local StaminaX = (1 - (saude.Variaveis.Stamina.Value)/(saude.Variaveis.Stamina.MaxValue/2))/20
		Camera.CoordinateFrame = Camera.CoordinateFrame * CFrame.Angles( math.rad( StaminaX * math.sin( tick() * 3.5 )) , math.rad( StaminaX * math.sin( tick() * 1 )), 0)
	end
end





maxAir = 100
air = maxAir

lastHealth = 100
lastHealth2 = 100
maxWidth = 0.96

local Nadando = false
Humanoid.StateChanged:connect(function(state)
	if state == Enum.HumanoidStateType.Swimming then
		Nadando = true
	else
		Nadando = false
	end
end)

game:GetService("RunService"):BindToRenderStep("Camera Update", 200, L_150_.Update)

while wait() do

	if ServerConfig.CanDrown and player.Character:FindFirstChild("Head") then
		local min = player.Character.Head.Position - (.1 * player.Character.Head.Size)
		local max = player.Character.Head.Position + (.1 * player.Character.Head.Size)	
		local region = Region3.new(min,max):ExpandToGrid(4)

		local material = workspace.Terrain:ReadVoxels(region,4)[1][1][1] 

		if player.Character.Humanoid.Health > 0 then
			if material == Enum.Material.Water then
				if air > 0 then
					air = air-0.15
				elseif air <= 0 then
					air = 0
					player.Character.Humanoid.Health = 0
				end
			else
				if air < maxAir then
					air = air + .5
				end
			end
		end

		if air <= 50 then
			script.Parent.Frame.Oxygen.ImageColor3 = Color3.new(1,air/50,air/100)
			script.Parent.Frame.Oxygen.Visible = true
		elseif air < maxAir then
			script.Parent.Frame.Oxygen.ImageColor3 = Color3.new(1,1,air/100)
			script.Parent.Frame.Oxygen.Visible = true
		elseif air >= maxAir then
			script.Parent.Frame.Oxygen.Visible = false
		end
		script.Parent.Efeitos.Oxigen.ImageTransparency = air/100
		if air <= 25 then
			script.Parent.Efeitos.Oxigen.BackgroundTransparency = air/25
		end
	end
end
