--[[
game.Workspace.Player.Humanoid.Running:Connect(function(speed)
    if speed > 1 and Sangrando.Value == true then
		 Sang.Value = (Sang.Value - (MLs.Value/30))	
	end
		
	if speed > 1 and bbleeding.Value == true then
		 Sang.Value = (Sang.Value - (MLs.Value/30))	
	end
	
	end)

]]

--



while configuracao.EnableMedSys do
	wait()
	
	if Sangrando.Value == true then
		if PastasStan.Tourniquet.Value == false then
			Sang.Value = (Sang.Value - (MLs.Value/60))
			MLs.Value = MLs.Value + 0.025
		if PastasStan.skit.Value == true then
		Sang.Value = Sang.Value - (MLs.Value/500)
				
	
			end	
			UltimoSang = Sang.Value
		end
	end
	
	if bbleeding.Value == true then
		if PastasStan.Tourniquet.Value == false then
			Sang.Value = (Sang.Value - (MLs.Value/100))
			
		elseif PastasStan.Tourniquet.Value == true then
			Sang.Value = (Sang.Value - (MLs.Value/220))
			
			end
			MLs.Value = MLs.Value + 0.025
		if PastasStan.skit.Value == true then
		Sang.Value = Sang.Value - (MLs.Value/500)
				
	
			end	
			UltimoSang = Sang.Value

	end
	
	if balloonbleed.Value == true then
			Sang.Value = (Sang.Value - (MLs.Value/10000))
			
		MLs.Value = MLs.Value + 0.025
		if PastasStan.skit.Value == true then
		Sang.Value = Sang.Value - (MLs.Value/300)
			
	
		end	
		UltimoSang = Sang.Value
	
	end
	
	if surg2.Value == true then
			Sang.Value = (Sang.Value - (MLs.Value/110))
			
		MLs.Value = MLs.Value + 0.025
		if PastasStan.skit.Value == true then
		Sang.Value = Sang.Value - (MLs.Value/300)
			
	
		end	
		UltimoSang = Sang.Value
	
	end
	
	if clamped.Value == true then
		Sang.Value = (Sang.Value - (MLs.Value/1000))
			
		MLs.Value = MLs.Value + 0.025
	
			
	
		
		UltimoSang = Sang.Value
	
	end
	
	if cutopen.Value == true then
		
		Sang.Value = (Sang.Value - (MLs.Value/600))
			
		MLs.Value = MLs.Value + 0.025

		UltimoSang = Sang.Value
	
	end
	
	
	
	--hey mop removed o2 if you see this hah--
	
	
	

	if PastasStan.Tourniquet.Value == true then
		Dor.Value = Dor.Value + 0.1
	end


	
	if (human.Health - ultimavida < 0) then
		Dor.Value = math.ceil(Dor.Value + (human.Health - ultimavida)*(-configuracao.PainMult))
		--Energia.Value = math.ceil(Energia.Value + (human.Health - ultimavida)*(5))
	end	
	

	if (human.Health - ultimavida < 0) --[[and (Sangrando.Value == true)]] then
		MLs.Value = MLs.Value + ((ultimavida - human.Health)* (configuracao.BloodMult))
	end

	if script.Parent.Parent.Humanoid.Health < ultimavida -(configuracao.BleedDamage) then
		Sangrando.Value = true
	
		if script.Parent.Parent.Humanoid.Health < ultimavida -(configuracao.InjuredDamage) then
			Ferido.Value = true
			bbleeding.Value = true
			Sangrando.Value = true
			if script.Parent.Parent.Humanoid.Health < ultimavida -(configuracao.KODamage) then
				Caido.Value = true
				local bruh = math.random(1,2)
				if bruh == 2 then
					surg2.Value = true
				else
					surg2.Value = false
				end
				Sangrando.Value = true
				bbleeding.Value = true
					
			end	
		end
	end
	
	if script.Parent.Parent.Humanoid.Health <= 2 then
		rodeath.Value = true
		human.PlatformStand = true
		human.AutoRotate = false
		Caido.Value = true	
		--cpr.Value = false
		life.Value = false
		--Sangrando.Value = true
		bbleeding.Value = true
			end
	
	
	
	
	
	


	
	
	if human.Health >= human.MaxHealth and Sangrando.Value == false then
		Sang.Value = Sang.Value + 0.5	
		Dor.Value = Dor.Value - 0.025
		MLs.Value = MLs.Value - 0.025		
			
	end

	ultimavida = script.Parent.Parent.Humanoid.Health


	spawn(function(timer)
			if Sang.Value >= 3500 and Dor.Value < 200 and Caido.Value == true and debounce == false then
				debounce = true
				wait(60)
				debounce = false
			end	
	end)
	
	local currhealth = 100
	

	
	if life.Value == false or rodeath.Value == true then
		
		human.PlatformStand = true
		human.AutoRotate = false	
		Caido.Value = true	
		
		local bruh = math.clamp(MLs.Value/8000, 0.1, 0.14)
			if o2.Value == true then
			bruh = 0.005
			MLs.Value = 0
		end
		human.Health = human.Health - bruh
		if PastasStan.Tourniquet.Value == false then
			Sang.Value = (Sang.Value - (MLs.Value/90))
			MLs.Value = MLs.Value + 0.025
		else
			Sang.Value = (Sang.Value - (MLs.Value/210))
			MLs.Value = MLs.Value + 0.025
		end
		end
	
	
	
	

		
end




 -- Quero um pouco de credito,plox :P --
     --  FEITO 100% POR SCORPION --
		-- Oficial Release 1.5 --