--[[
defib.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 bbleeding = Human.Parent.Saude.Stances.bbleeding
	local o2l = Human.Parent.Saude.Stances.o2
	local isdead = Human.Parent.Saude.Stances.rodeath

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

	if enabled.Value == false then
	
		if Bandagens.Value >= 1 and o2l.Value == true and isdead.Value == true then 
		enabled.Value = true

		wait(4)		
		
			isdead.Value = false
			Caido.Value = false
			
			Human.Health = Human.Health + 100
		
		
		wait(1)
		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 and Bandagens.Value >= 1 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 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)