local P=Evt.MedSys local l=Evt.MedSys.Multi local L=P.Compress local y=P.Bandage local d=P.Splint local c=P.PainKiller local X=P.Energetic local H=P.Tourniquet local k=l.Compress local Y=l.Bandage local J=l.Splint local U=l.Epinephrine local o=l.Morphine local Q=l.BloodBag local s=l.Tourniquet local p=P.Algemar local f=P.Fome local T=Evt.MedSys.Stance local O=P.Collapse local G=P.Reset local j=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")L.OnServerEvent:Connect(function(P)local l=P.Character.Humanoid local L=l.Parent.Saude.Variaveis.Doer local y=l.Parent.Saude.Variaveis.MLs local d=l.Parent.Saude.Stances.Caido if L.Value==false and d.Value==false then if y.Value>=2 then L.Value=true wait(.3)y.Value=1 wait(5)L.Value=false end end end)y.OnServerEvent:Connect(function(P)local l=P.Character.Humanoid local L=l.Parent.Saude.Variaveis.Doer local y=l.Parent.Saude.Stances.Sangrando local d=l.Parent.Saude.Variaveis.MLs local c=l.Parent.Saude.Stances.Caido local X=l.Parent.Saude.Stances.Ferido local H=l.Parent.Saude.Kit.Bandagem if L.Value==false and c.Value==false then if H.Value>=1 and y.Value==true then L.Value=true wait(.3)y.Value=false H.Value=H.Value-1 wait(2)L.Value=false end end end)d.OnServerEvent:Connect(function(P)local l=P.Character.Humanoid local L=l.Parent.Saude.Variaveis.Doer local y=l.Parent.Saude.Stances.Sangrando local d=l.Parent.Saude.Variaveis.MLs local c=l.Parent.Saude.Stances.Caido local X=l.Parent.Saude.Stances.Ferido local H=l.Parent.Saude.Kit.Splint if L.Value==false and c.Value==false then if H.Value>=1 and X.Value==true then L.Value=true wait(.3)X.Value=false H.Value=H.Value-1 wait(2)L.Value=false end end end)c.OnServerEvent:Connect(function(P)local l=P.Character.Humanoid local L=l.Parent.Saude.Variaveis.Doer local y=l.Parent.Saude.Stances.Sangrando local d=l.Parent.Saude.Variaveis.MLs local c=l.Parent.Saude.Variaveis.Dor local X=l.Parent.Saude.Stances.Caido local H=l.Parent.Saude.Stances.Ferido local k=l.Parent.Saude.Kit.Aspirina if L.Value==false and X.Value==false then if k.Value>=1 and c.Value>=1 then L.Value=true wait(.3)c.Value=c.Value-math.random(60,75)k.Value=k.Value-1 wait(2)L.Value=false end end end)X.OnServerEvent:Connect(function(P)local l=P.Character.Humanoid local L=l.Parent.Saude.Variaveis.Doer local y=l.Parent.Saude.Stances.Sangrando local d=l.Parent.Saude.Variaveis.MLs local c=l.Parent.Saude.Variaveis.Dor local X=l.Parent.Saude.Stances.Caido local H=l.Parent.Saude.Stances.Ferido local k=l.Parent.Saude.Kit.Energetico if L.Value==false and X.Value==false then if l.Health<l.MaxHealth then L.Value=true wait(.3)l.Health=l.Health+l.MaxHealth/3 k.Value=k.Value-1 wait(2)L.Value=false end end end)H.OnServerEvent:Connect(function(P)local l=P.Character.Humanoid local L=l.Parent.Saude.Variaveis.Doer local y=l.Parent.Saude.Stances.Sangrando local d=l.Parent.Saude.Variaveis.MLs local c=l.Parent.Saude.Variaveis.Dor local X=l.Parent.Saude.Stances.Caido local H=l.Parent.Saude.Stances.Ferido local k=l.Parent.Saude.Kit.Tourniquet if l.Parent.Saude.Stances.Tourniquet.Value==false then if L.Value==false and(y.Value==true and k.Value>0)then L.Value=true wait(.3)l.Parent.Saude.Stances.Tourniquet.Value=true k.Value=k.Value-1 wait(2)L.Value=false end else if L.Value==false then L.Value=true wait(.3)l.Parent.Saude.Stances.Tourniquet.Value=false k.Value=k.Value+1 wait(2)L.Value=false end end end)


local Functions = Evt.MedSys
local FunctionsMulti = Evt.MedSys.Multi

local Compress = Functions.Compress
local Bandage = Functions.Bandage
local Splint = Functions.Splint
local PainKiller = Functions.PainKiller
local Energetic = Functions.Energetic
local Tourniquet = Functions.Tourniquet

local Compress_Multi = FunctionsMulti.Compress
local Bandage_Multi = FunctionsMulti.Bandage
local Splint_Multi = FunctionsMulti.Splint
local Epinephrine_Multi = FunctionsMulti.Epinephrine
local Morphine_Multi = FunctionsMulti.Morphine
local BloodBag_Multi = FunctionsMulti.BloodBag
local Tourniquet_Multi = FunctionsMulti.Tourniquet

local Algemar = Functions.Algemar
local Fome = Functions.Fome
local Stance = Evt.MedSys.Stance
local Collapse = Functions.Collapse
local Reset = Functions.Reset
local TS = game:GetService("TweenService")

Compress.OnServerEvent:Connect(function(player)


	local Human = player.Character.Humanoid
	local enabled = Human.Parent.Saude.Variaveis.Doer
	local MLs = Human.Parent.Saude.Variaveis.MLs
	local Caido = Human.Parent.Saude.Stances.Caido

	if enabled.Value == false and Caido.Value == false then
	
		if MLs.Value >= 2 then 
		enabled.Value = true
		
		wait(.3)		
		
		MLs.Value = 1
			
		wait(5)
		enabled.Value = false
	
		end	
	end
end)

Bandage.OnServerEvent:Connect(function(player)


	local Human = player.Character.Humanoid
	local enabled = Human.Parent.Saude.Variaveis.Doer
	local Sangrando = Human.Parent.Saude.Stances.Sangrando
	local MLs = Human.Parent.Saude.Variaveis.MLs
	local Caido = Human.Parent.Saude.Stances.Caido
	local Ferido = Human.Parent.Saude.Stances.Ferido

	local Bandagens = Human.Parent.Saude.Kit.Bandagem

	if enabled.Value == false and Caido.Value == false  then
	
		if Bandagens.Value >= 1 and Sangrando.Value == true then 
		enabled.Value = true

		wait(.3)		
		
		Sangrando.Value = false
		Bandagens.Value = Bandagens.Value - 1 
		
		
		wait(2)
		enabled.Value = false
	
		end	
	end	
end)

Splint.OnServerEvent:Connect(function(player)


	local Human = player.Character.Humanoid
	local enabled = Human.Parent.Saude.Variaveis.Doer
	local Sangrando = Human.Parent.Saude.Stances.Sangrando
	local MLs = Human.Parent.Saude.Variaveis.MLs
	local Caido = Human.Parent.Saude.Stances.Caido
	local Ferido = Human.Parent.Saude.Stances.Ferido

	local Bandagens = Human.Parent.Saude.Kit.Splint

	if enabled.Value == false and Caido.Value == false  then
	
		if Bandagens.Value >= 1 and Ferido.Value == true  then 
		enabled.Value = true
		
		wait(.3)		
		
		Ferido.Value = false 
		
		Bandagens.Value = Bandagens.Value - 1 
		
		
		wait(2)
		enabled.Value = false
	
		end	
	end	
end)

PainKiller.OnServerEvent:Connect(function(player)


	local Human = player.Character.Humanoid
	local enabled = Human.Parent.Saude.Variaveis.Doer
	local Sangrando = Human.Parent.Saude.Stances.Sangrando
	local MLs = Human.Parent.Saude.Variaveis.MLs
	local Dor = Human.Parent.Saude.Variaveis.Dor
	local Caido = Human.Parent.Saude.Stances.Caido
	local Ferido = Human.Parent.Saude.Stances.Ferido

	local Bandagens = Human.Parent.Saude.Kit.Aspirina

	if enabled.Value == false and Caido.Value == false  then
	
		if Bandagens.Value >= 1  and Dor.Value >= 1  then
		enabled.Value = true
		
		wait(.3)		
		
		Dor.Value = Dor.Value - math.random(60,75)
		
		Bandagens.Value = Bandagens.Value - 1 
		
		
		wait(2)
		enabled.Value = false
	
		end	
	end	
end)

Energetic.OnServerEvent:Connect(function(player)


	local Human = player.Character.Humanoid
	local enabled = Human.Parent.Saude.Variaveis.Doer
	local Sangrando = Human.Parent.Saude.Stances.Sangrando
	local MLs = Human.Parent.Saude.Variaveis.MLs
	local Dor = Human.Parent.Saude.Variaveis.Dor
	local Caido = Human.Parent.Saude.Stances.Caido
	local Ferido = Human.Parent.Saude.Stances.Ferido

	local Bandagens = Human.Parent.Saude.Kit.Energetico
	--local Energia = Human.Parent.Saude.Variaveis.Energia

	if enabled.Value == false and Caido.Value == false  then
	
		if Human.Health < Human.MaxHealth  then
		enabled.Value = true
		
		wait(.3)		
		
		Human.Health = Human.Health + (Human.MaxHealth/3)
		--Energia.Value = Energia.Value + (Energia.MaxValue/3)
		Bandagens.Value = Bandagens.Value - 1
		
		
		wait(2)
		enabled.Value = false
	
		end	
	end	
end)

Tourniquet.OnServerEvent:Connect(function(player)


	local Human = player.Character.Humanoid
	local enabled = Human.Parent.Saude.Variaveis.Doer
	local Sangrando = Human.Parent.Saude.Stances.Sangrando
	local MLs = Human.Parent.Saude.Variaveis.MLs
	local Dor = Human.Parent.Saude.Variaveis.Dor
	local Caido = Human.Parent.Saude.Stances.Caido
	local Ferido = Human.Parent.Saude.Stances.Ferido

	local Bandagens = Human.Parent.Saude.Kit.Tourniquet

if Human.Parent.Saude.Stances.Tourniquet.Value == false then
	if enabled.Value == false and Sangrando.Value == true and Bandagens.Value > 0 then
		enabled.Value = true
		
		wait(.3)		
		
		Human.Parent.Saude.Stances.Tourniquet.Value = true
		Bandagens.Value = Bandagens.Value - 1
		
		
		wait(2)
		enabled.Value = false
		
	end	
else
	if enabled.Value == false then
		enabled.Value = true
		
		wait(.3)		
		
		Human.Parent.Saude.Stances.Tourniquet.Value = false
		Bandagens.Value = Bandagens.Value + 1
		
		
		wait(2)
		enabled.Value = false
	end
end
end)
