local b=ACS_Workspace:FindFirstChild("\068\111\111\114\115")local W=b:Clone()local H=ACS_Workspace.Breach:Clone()H.Parent=ServerStorage W.Parent=ServerStorage function ToggleDoor(b)local W=b.Door:FindFirstChild("\072\105\110\103\101")if not W then return end local H=W.HingeConstraint if H.TargetAngle==0 then H.TargetAngle=-90 elseif H.TargetAngle==-90 then H.TargetAngle=0 end end Evt.DoorEvent.OnServerEvent:Connect(function(b,W,H,O)if W~=nil then if H==1 then if W:FindFirstChild("\076\111\099\107\101\100")~=nil and W.Locked.Value==true then if W:FindFirstChild("\082\101\113\117\105\114\101\115\075\101\121")then local H=b.Character if H:FindFirstChild(O)~=nil or b.Backpack:FindFirstChild(O)~=nil then if W.Locked.Value==true then W.Locked.Value=false end ToggleDoor(W)end end else ToggleDoor(W)end elseif H==2 then if W:FindFirstChild("\076\111\099\107\101\100")==nil or W:FindFirstChild("\076\111\099\107\101\100")~=nil and W.Locked.Value==false then ToggleDoor(W)end elseif H==3 then if W:FindFirstChild("\082\101\113\117\105\114\101\115\075\101\121")then local H=b.Character O=W.RequiresKey.Value if H:FindFirstChild(O)~=nil or b.Backpack:FindFirstChild(O)~=nil then if W:FindFirstChild("\076\111\099\107\101\100")~=nil and W.Locked.Value==true then W.Locked.Value=false else W.Locked.Value=true end end end elseif H==4 then if W:FindFirstChild("\076\111\099\107\101\100")~=nil and W.Locked.Value==true then W.Locked.Value=false end end end end)Evt.MedSys.Collapse.OnServerEvent:Connect(function(b)if not b or not b.Character then return end local W=b.Character:FindFirstChild("\072\117\109\097\110\111\105\100")local H=b.Character:FindFirstChild("\065\067\083\095\067\108\105\101\110\116")if not W or not H then return end local O=H.Variaveis.Dor local z=H.Variaveis.Sangue if z.Value<=3500 or O.Value>=200 or H:GetAttribute("\067\111\108\108\097\112\115\101\100")then W.PlatformStand=true W.AutoRotate=false H:SetAttribute("\067\111\108\108\097\112\115\101\100",true)elseif z.Value>3500 and(O.Value<200 and not H:GetAttribute("\067\111\108\108\097\112\115\101\100"))then W.PlatformStand=false W.AutoRotate=true H:SetAttribute("\067\111\108\108\097\112\115\101\100",false)end end)Evt.MedSys.MedHandler.OnServerEvent:Connect(function(b,W,H)if not b or not b.Character then return end if not b.Character:FindFirstChild("\072\117\109\097\110\111\105\100")or b.Character.Humanoid.Health<=0 then return end local O=b.Character:FindFirstChild("\065\067\083\095\067\108\105\101\110\116")if not O then warn(b.Name.."\'\115 \065\099\116\105\111\110 \070\097\105\108\101\100\058 \077\105\115\115\105\110\103 \065\067\083\095\067\108\105\101\110\116")return end if O:GetAttribute("\067\111\108\108\097\112\115\101\100")then return end if W then if not W.Character or not W.Character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")or not b.Character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")then return end if(b.Character.HumanoidRootPart.Position-W.Character.HumanoidRootPart.Position).Magnitude>15 then warn(b.Name..(" \105\115 \116\111\111 \102\097\114 \116\111 \116\114\101\097\116 "..W.Name))return end local z=W.Character:FindFirstChild("\065\067\083\095\067\108\105\101\110\116")if not z then warn(b.Name..("\'\115 \065\099\116\105\111\110 \070\097\105\108\101\100\058 \077\105\115\115\105\110\103 "..(W.Name.."\'\115 \065\067\083\095\067\108\105\101\110\116")))return end if H==1 and(O.Kit.Bandage.Value>0 and z:GetAttribute("\066\108\101\101\100\105\110\103"))then O.Kit.Bandage.Value=O.Kit.Bandage.Value-1 z:SetAttribute("\066\108\101\101\100\105\110\103",false)return elseif H==2 and(O.Kit.Splint.Value>0 and z:GetAttribute("\073\110\106\117\114\101\100"))then O.Kit.Splint.Value=O.Kit.Splint.Value-1 z:SetAttribute("\073\110\106\117\114\101\100",false)return elseif H==3 and(z:GetAttribute("\066\108\101\101\100\105\110\103")==true or z:GetAttribute("\084\111\117\114\110\105\113\117\101\116"))then if z:GetAttribute("\084\111\117\114\110\105\113\117\101\116")then O.Kit.Tourniquet.Value=O.Kit.Tourniquet.Value+1 z:SetAttribute("\084\111\117\114\110\105\113\117\101\116",false)return end if O.Kit.Tourniquet.Value<=0 then return end O.Kit.Tourniquet.Value=O.Kit.Tourniquet.Value-1 z:SetAttribute("\084\111\117\114\110\105\113\117\101\116",true)return elseif H==4 and(O.Kit.PainRelief.Value>0 and z.Variaveis.Dor.Value>0)then O.Kit.PainRelief.Value=O.Kit.PainRelief.Value-1 z.Variaveis.Dor.Value=math.clamp(z.Variaveis.Dor.Value-math.random(35,65),0,300)Evt.MedSys.MedHandler:FireClient(W,4)return elseif H==5 and(O.Kit.EnergyShot.Value>0 and W.Character.Humanoid.Health<W.Character.Humanoid.MaxHealth)then O.Kit.EnergyShot.Value=O.Kit.EnergyShot.Value-1 local b=math.random(15,25)if W.Character.Humanoid.Health+b<W.Character.Humanoid.MaxHealth then W.Character.Humanoid:TakeDamage(-b)else W.Character.Humanoid.Health=W.Character.Humanoid.MaxHealth end Evt.MedSys.MedHandler:FireClient(W,5)return elseif H==6 and(O.Kit.Suppressant.Value>0 and z.Variaveis.Dor.Value>0)then O.Kit.Suppressant.Value=O.Kit.Suppressant.Value-1 z.Variaveis.Dor.Value=0 Evt.MedSys.MedHandler:FireClient(W,6)return elseif H==7 and(O.Kit.EnergyShot.Value>0 and z:GetAttribute("\067\111\108\108\097\112\115\101\100"))then O.Kit.EnergyShot.Value=O.Kit.EnergyShot.Value-1 local b=math.random(45,55)if W.Character.Humanoid.Health+b<W.Character.Humanoid.MaxHealth then W.Character.Humanoid:TakeDamage(-b)else W.Character.Humanoid.Health=W.Character.Humanoid.MaxHealth end z:SetAttribute("\067\111\108\108\097\112\115\101\100",false)Evt.MedSys.MedHandler:FireClient(W,7)return elseif H==8 and(O.Kit.BloodBag.Value>0 and z.Variaveis.Sangue.Value<z.Variaveis.Sangue.MaxValue)then O.Kit.BloodBag.Value=O.Kit.BloodBag.Value-1 z.Variaveis.Sangue.Value=z.Variaveis.Sangue.Value+2000 return else warn(b.Name.."\'\115 \065\099\116\105\111\110 \070\097\105\108\101\100\058 \085\110\107\110\111\119 \077\101\116\104\111\100")end return end if H==1 and(O.Kit.Bandage.Value>0 and O:GetAttribute("\066\108\101\101\100\105\110\103"))then O.Kit.Bandage.Value=O.Kit.Bandage.Value-1 O:SetAttribute("\066\108\101\101\100\105\110\103",false)return elseif H==2 and(O.Kit.Splint.Value>0 and O:GetAttribute("\073\110\106\117\114\101\100"))then O.Kit.Splint.Value=O.Kit.Splint.Value-1 O:SetAttribute("\073\110\106\117\114\101\100",false)return elseif H==3 and(O:GetAttribute("\066\108\101\101\100\105\110\103")or O:GetAttribute("\084\111\117\114\110\105\113\117\101\116"))then if O:GetAttribute("\084\111\117\114\110\105\113\117\101\116")then O.Kit.Tourniquet.Value=O.Kit.Tourniquet.Value+1 O:SetAttribute("\084\111\117\114\110\105\113\117\101\116",false)return end if O.Kit.Tourniquet.Value<=0 then return end O.Kit.Tourniquet.Value=O.Kit.Tourniquet.Value-1 O:SetAttribute("\084\111\117\114\110\105\113\117\101\116",true)return elseif H==4 and(O.Kit.PainRelief.Value>0 and O.Variaveis.Dor.Value>0)then O.Kit.PainRelief.Value=O.Kit.PainRelief.Value-1 O.Variaveis.Dor.Value=math.clamp(O.Variaveis.Dor.Value-math.random(35,65),0,300)Evt.MedSys.MedHandler:FireClient(b,4)return elseif H==5 and(O.Kit.EnergyShot.Value>0 and b.Character.Humanoid.Health<b.Character.Humanoid.MaxHealth)then O.Kit.EnergyShot.Value=O.Kit.EnergyShot.Value-1 local W=math.random(15,25)if b.Character.Humanoid.Health+W<b.Character.Humanoid.MaxHealth then b.Character.Humanoid:TakeDamage(-W)else b.Character.Humanoid.Health=b.Character.Humanoid.MaxHealth end Evt.MedSys.MedHandler:FireClient(b,5)return elseif H==6 and(O.Kit.Suppressant.Value>0 and O.Variaveis.Dor.Value>0)then O.Kit.Suppressant.Value=O.Kit.Suppressant.Value-1 O.Variaveis.Dor.Value=math.clamp(O.Variaveis.Dor.Value-math.random(125,175),0,300)Evt.MedSys.MedHandler:FireClient(b,6)return elseif H==7 and(O.Kit.EnergyShot.Value>0 and b.Character.Humanoid.Health<b.Character.Humanoid.MaxHealth)then O.Kit.EnergyShot.Value=O.Kit.EnergyShot.Value-1 local W=math.random(45,55)if b.Character.Humanoid.Health+W<b.Character.Humanoid.MaxHealth then b.Character.Humanoid:TakeDamage(-W)else b.Character.Humanoid.Health=b.Character.Humanoid.MaxHealth end Evt.MedSys.MedHandler:FireClient(b,7)return elseif H==8 and(O.Kit.BloodBag.Value>0 and O.Variaveis.Sangue.Value<O.Variaveis.Sangue.MaxValue)then O.Kit.BloodBag.Value=O.Kit.BloodBag.Value-1 O.Variaveis.Sangue.Value=O.Variaveis.Sangue.Value+2000 return else warn(b.Name.."\'\115 \065\099\116\105\111\110 \070\097\105\108\101\100\058 \085\110\107\110\111\119 \077\101\116\104\111\100")end return end)Evt.Drag.OnServerEvent:Connect(function(b,W)if not b or not b.Character then return end local H=b.Character:FindFirstChild("\065\067\083\095\067\108\105\101\110\116")local O=b.Character:FindFirstChild("\072\117\109\097\110\111\105\100")if not H then return end if W then H:SetAttribute("\068\114\097\103\080\108\097\121\101\114",W.Name)else H:SetAttribute("\068\114\097\103\080\108\097\121\101\114","")H:SetAttribute("\068\114\097\103\103\105\110\103",false)end local z=H:GetAttribute("\068\114\097\103\080\108\097\121\101\114")if H:GetAttribute("\067\111\108\108\097\112\115\101\100")or z==""then return end local M=game.Players:FindFirstChild(z)if not M or not M.Character then return end local S=M.Character:FindFirstChild("\072\117\109\097\110\111\105\100")local C=M.Character:FindFirstChild("\065\067\083\095\067\108\105\101\110\116")if not S or not C then return end if H:GetAttribute("\068\114\097\103\103\105\110\103")then return end if not C:GetAttribute("\067\111\108\108\097\112\115\101\100")then return end H:SetAttribute("\068\114\097\103\103\105\110\103",true)while H:GetAttribute("\068\114\097\103\103\105\110\103")and(z~=""and(C:GetAttribute("\067\111\108\108\097\112\115\101\100")and(S.Health>0 and(O.Health>0 and not H:GetAttribute("\067\111\108\108\097\112\115\101\100")))))do wait()M.Character.Torso.Anchored=true M.Character.Torso.CFrame=(O.Parent.Torso.CFrame*CFrame.new(0,.75,1.5))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))end M.Character.Torso.Anchored=false end)function BreachFunction(b,W,H,O,z,M)if W==1 then if b.Character.ACS_Client.Kit.BreachCharges.Value>0 then b.Character.ACS_Client.Kit.BreachCharges.Value=b.Character.ACS_Client.Kit.BreachCharges.Value-1 H.Destroyed.Value=true local W=Engine.FX.BreachCharge:Clone()W.Parent=H.Destroyable W.Center.CFrame=CFrame.new(O,O+z)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))W.Center.Place:play()local M=Instance.new("\087\101\108\100\067\111\110\115\116\114\097\105\110\116")M.Parent=W M.Part0=H.Destroyable.Charge M.Part1=W.Center wait(1)W.Center.Beep:play()wait(4)if W and W:FindFirstChild("\067\101\110\116\101\114")then local b=Instance.new("\065\116\116\097\099\104\109\101\110\116")b.CFrame=W.Center.CFrame b.Parent=workspace.Terrain local O=Engine.FX.ExpEffect:Clone()O.Parent=b O.Enabled=false O:Emit(35)Debris:AddItem(O,O.Lifetime.Max)local z=Instance.new("\069\120\112\108\111\115\105\111\110")z.BlastPressure=0 z.BlastRadius=0 z.DestroyJointRadiusPercent=0 z.Position=W.Center.Position z.Parent=workspace local M=Instance.new("\083\111\117\110\100")M.EmitterSize=10 M.MaxDistance=1000 M.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Explosion[math.random(1,7)]M.PlaybackSpeed=math.random(30,55)/40 M.Volume=2 M.Parent=b M.PlayOnRemove=true M:Destroy()for b,H in pairs(game.Players:GetChildren())do if H:IsA("\080\108\097\121\101\114")and(H.Character and(H.Character:FindFirstChild("\072\101\097\100")and(H.Character.Head.Position-W.Center.Position).magnitude<=15))then local b=((H.Character.Head.Position-W.Center.Position).magnitude/35-1)*-1 local O=b local z=15*b Evt.Suppression:FireClient(H,2,O,z)end end Debris:AddItem(H.Destroyable,0)end end elseif W==2 then local b=Engine.FX.DoorBreachFX:Clone()b.Parent=H.Door.Door b.RollOffMaxDistance=100 b.RollOffMinDistance=5 b:Play()H.Destroyed.Value=true if H.Door:FindFirstChild("\072\105\110\103\101")~=nil then H.Door.Hinge:Destroy()end if H.Door:FindFirstChild("\075\110\111\098")~=nil then H.Door.Knob:Destroy()end local W=Instance.new("\066\111\100\121\070\111\114\099\101")W.Force=(-z*H.Door.Door:GetMass())*Vector3.new(50,0,50)W.Parent=H.Door.Door Debris:AddItem(H,3)elseif W==3 then if b.Character.ACS_Client.Kit.Fortifications.Value>0 then b.Character.ACS_Client.Kit.Fortifications.Value=b.Character.ACS_Client.Kit.Fortifications.Value-1 H.Fortified.Value=true local W=Instance.new("\080\097\114\116")W.Parent=H.Destroyable W.Size=Vector3.new(M.Size.X+.05,M.Size.Y+.05,M.Size.Z+.5)W.Material=Enum.Material.DiamondPlate W.Anchored=true W.CFrame=M.CFrame local O=Engine.FX.FortFX:Clone()O.PlaybackSpeed=math.random(30,55)/40 O.Volume=1 O.Parent=W O.PlayOnRemove=true O:Destroy()end end end Evt.Breach.OnServerInvoke=BreachFunction function UpdateLog(b,W)local H=W:findFirstChild("\099\114\101\097\116\111\114")if H~=nil then local W=(os.date("\042\116")).hour local O=(os.date("\042\116")).min local z=(os.date("\042\116")).sec local M=H:findFirstChild("\116\121\112\101")if H.Value.Name==b.Name then local H=b.Name..(" \068\105\101\100 \124 "..(W..("\058"..(O..("\058"..z)))))table.insert(CombatLog,H)else local M=H.Value.Name..(" \075\105\108\108\101\100 "..(b.Name..(" \124 "..(W..("\058"..(O..("\058"..z)))))))table.insert(CombatLog,M)end if#CombatLog>50 then Backup=Backup+1 warn("\065\067\083\058 \067\108\101\097\110\105\110\103 \067\111\109\098\097\116 \076\111\103 \124 \066\097\099\107\117\112\058 "..Backup)warn(CombatLog)CombatLog={}end end end


local DoorsFolder 		= ACS_Workspace:FindFirstChild("Doors")
local DoorsFolderClone 	= DoorsFolder:Clone()
local BreachClone 		= ACS_Workspace.Breach:Clone()
BreachClone.Parent 		= ServerStorage
DoorsFolderClone.Parent = ServerStorage

function ToggleDoor(Door)
	local Hinge = Door.Door:FindFirstChild("Hinge")
	if not Hinge then return end
	local HingeConstraint = Hinge.HingeConstraint

	if HingeConstraint.TargetAngle == 0 then
		HingeConstraint.TargetAngle = -90
	elseif HingeConstraint.TargetAngle == -90 then
		HingeConstraint.TargetAngle = 0
	end	
end

Evt.DoorEvent.OnServerEvent:Connect(function(Player,Door,Mode,Key)
	if Door ~= nil then
		if Mode == 1 then
			if Door:FindFirstChild("Locked") ~= nil and Door.Locked.Value == true then
				if Door:FindFirstChild("RequiresKey") then
					local Character = Player.Character
					if Character:FindFirstChild(Key) ~= nil or Player.Backpack:FindFirstChild(Key) ~= nil then
						if Door.Locked.Value == true then
							Door.Locked.Value = false
						end
						ToggleDoor(Door)
					end	
				end
			else
				ToggleDoor(Door)
			end
		elseif Mode == 2 then
			if Door:FindFirstChild("Locked") == nil or (Door:FindFirstChild("Locked") ~= nil and Door.Locked.Value == false) then
				ToggleDoor(Door)
			end
		elseif Mode == 3 then
			if Door:FindFirstChild("RequiresKey") then
				local Character = Player.Character
				Key = Door.RequiresKey.Value
				if Character:FindFirstChild(Key) ~= nil or Player.Backpack:FindFirstChild(Key) ~= nil then
					if Door:FindFirstChild("Locked") ~= nil and Door.Locked.Value == true then
						Door.Locked.Value = false
					else
						Door.Locked.Value = true
					end
				end
			end
		elseif Mode == 4 then
			if Door:FindFirstChild("Locked") ~= nil and Door.Locked.Value == true then
				Door.Locked.Value = false
			end
		end
	end
end)

Evt.MedSys.Collapse.OnServerEvent:Connect(function(Player)

	if not Player or not Player.Character then return; end;

	local Human 	= Player.Character:FindFirstChild("Humanoid") 
	local PClient 	= Player.Character:FindFirstChild("ACS_Client") 

	if not Human or not PClient then return; end;

	local Dor 		= PClient.Variaveis.Dor
	local Sangue 	= PClient.Variaveis.Sangue

	if (Sangue.Value <= 3500) or (Dor.Value >= 200) or PClient:GetAttribute("Collapsed") then -- Man this Guy's Really wounded,
		Human.PlatformStand = true
		Human.AutoRotate = false	
		PClient:SetAttribute("Collapsed",true)
	elseif (Sangue.Value > 3500) and (Dor.Value < 200) and not PClient:GetAttribute("Collapsed")  then -- YAY A MEDIC ARRIVED! =D
		Human.PlatformStand = false
		Human.AutoRotate = true	
		PClient:SetAttribute("Collapsed",false)
	end
end)

Evt.MedSys.MedHandler.OnServerEvent:Connect(function(Player, Victim, Mode)
	if not Player or not Player.Character then return; end;
	if not Player.Character:FindFirstChild("Humanoid") or Player.Character.Humanoid.Health <= 0 then return; end;

	local P1_Client = Player.Character:FindFirstChild("ACS_Client")
	if not P1_Client then warn(Player.Name.."'s Action Failed: Missing ACS_Client"); return; end;

	if P1_Client:GetAttribute("Collapsed") then return; end;

	if Victim then --Multiplayer functions
		if not Victim.Character or not Victim.Character:FindFirstChild("HumanoidRootPart") or not Player.Character:FindFirstChild("HumanoidRootPart") then return; end;
		if (Player.Character.HumanoidRootPart.Position - Victim.Character.HumanoidRootPart.Position).Magnitude > 15 then warn(Player.Name.." is too far to treat "..Victim.Name); return; end;


		local P2_Client = Victim.Character:FindFirstChild("ACS_Client")
		if not P2_Client then warn(Player.Name.."'s Action Failed: Missing "..Victim.Name.."'s ACS_Client"); return; end;

		if Mode == 1 and P1_Client.Kit.Bandage.Value > 0 and P2_Client:GetAttribute("Bleeding") then
			P1_Client.Kit.Bandage.Value = P1_Client.Kit.Bandage.Value - 1
			P2_Client:SetAttribute("Bleeding",false)
			return;

		elseif Mode == 2 and P1_Client.Kit.Splint.Value > 0 and P2_Client:GetAttribute("Injured") then
			P1_Client.Kit.Splint.Value = P1_Client.Kit.Splint.Value - 1
			P2_Client:SetAttribute("Injured",false)
			return;

		elseif Mode == 3 and (P2_Client:GetAttribute("Bleeding") == true or P2_Client:GetAttribute("Tourniquet")) then --Tourniquet works a little different :T
			if P2_Client:GetAttribute("Tourniquet")then
				P1_Client.Kit.Tourniquet.Value = P1_Client.Kit.Tourniquet.Value + 1
				P2_Client:SetAttribute("Tourniquet",false)
				return;
			end

			if P1_Client.Kit.Tourniquet.Value <= 0 then return; end;
			P1_Client.Kit.Tourniquet.Value = P1_Client.Kit.Tourniquet.Value - 1
			P2_Client:SetAttribute("Tourniquet",true)
			return;

		elseif Mode == 4 and P1_Client.Kit.PainRelief.Value > 0 and P2_Client.Variaveis.Dor.Value > 0 then
			P1_Client.Kit.PainRelief.Value = P1_Client.Kit.PainRelief.Value - 1
			P2_Client.Variaveis.Dor.Value = math.clamp(P2_Client.Variaveis.Dor.Value - math.random(35,65),0,300)
			Evt.MedSys.MedHandler:FireClient(Victim,4)
			return;

		elseif Mode == 5 and P1_Client.Kit.EnergyShot.Value > 0 and Victim.Character.Humanoid.Health < Victim.Character.Humanoid.MaxHealth then
			P1_Client.Kit.EnergyShot.Value = P1_Client.Kit.EnergyShot.Value - 1
			local HealValue = math.random(15,25)
			if Victim.Character.Humanoid.Health + HealValue < Victim.Character.Humanoid.MaxHealth then
				Victim.Character.Humanoid:TakeDamage(-HealValue)
			else
				Victim.Character.Humanoid.Health = Victim.Character.Humanoid.MaxHealth
			end
			Evt.MedSys.MedHandler:FireClient(Victim,5)
			return;

		elseif Mode == 6 and P1_Client.Kit.Suppressant.Value > 0 and P2_Client.Variaveis.Dor.Value > 0 then
			P1_Client.Kit.Suppressant.Value = P1_Client.Kit.Suppressant.Value - 1
			P2_Client.Variaveis.Dor.Value = 0
			Evt.MedSys.MedHandler:FireClient(Victim,6)
			return;

		elseif Mode == 7 and P1_Client.Kit.EnergyShot.Value > 0 and P2_Client:GetAttribute("Collapsed")then
			P1_Client.Kit.EnergyShot.Value = P1_Client.Kit.EnergyShot.Value - 1
			local HealValue = math.random(45,55)
			if Victim.Character.Humanoid.Health + HealValue < Victim.Character.Humanoid.MaxHealth then
				Victim.Character.Humanoid:TakeDamage(-HealValue)
			else
				Victim.Character.Humanoid.Health = Victim.Character.Humanoid.MaxHealth
			end
			P2_Client:SetAttribute("Collapsed",false)
			Evt.MedSys.MedHandler:FireClient(Victim,7)
			return;

		elseif Mode == 8 and P1_Client.Kit.BloodBag.Value > 0 and P2_Client.Variaveis.Sangue.Value < P2_Client.Variaveis.Sangue.MaxValue then
			P1_Client.Kit.BloodBag.Value = P1_Client.Kit.BloodBag.Value - 1
			P2_Client.Variaveis.Sangue.Value = P2_Client.Variaveis.Sangue.Value + 2000
			return;
		else
			warn(Player.Name.."'s Action Failed: Unknow Method")
		end
		return;
	end 
	--Self treat
	if Mode == 1 and P1_Client.Kit.Bandage.Value > 0 and P1_Client:GetAttribute("Bleeding") then
		P1_Client.Kit.Bandage.Value = P1_Client.Kit.Bandage.Value - 1
		P1_Client:SetAttribute("Bleeding",false)
		return;

	elseif Mode == 2 and P1_Client.Kit.Splint.Value > 0 and P1_Client:GetAttribute("Injured") then
		P1_Client.Kit.Splint.Value = P1_Client.Kit.Splint.Value - 1
		P1_Client:SetAttribute("Injured",false)
		return;

	elseif Mode == 3 and (P1_Client:GetAttribute("Bleeding") or P1_Client:GetAttribute("Tourniquet")) then --Tourniquet works a little diferent :T
		if P1_Client:GetAttribute("Tourniquet") then
			P1_Client.Kit.Tourniquet.Value = P1_Client.Kit.Tourniquet.Value + 1
			P1_Client:SetAttribute("Tourniquet",false)
			return;
		end

		if P1_Client.Kit.Tourniquet.Value <= 0 then return; end;
		P1_Client.Kit.Tourniquet.Value = P1_Client.Kit.Tourniquet.Value - 1
		P1_Client:SetAttribute("Tourniquet",true)
		return;

	elseif Mode == 4 and P1_Client.Kit.PainRelief.Value > 0 and P1_Client.Variaveis.Dor.Value > 0 then
		P1_Client.Kit.PainRelief.Value = P1_Client.Kit.PainRelief.Value - 1
		P1_Client.Variaveis.Dor.Value = math.clamp(P1_Client.Variaveis.Dor.Value - math.random(35,65),0,300)
		Evt.MedSys.MedHandler:FireClient(Player,4)
		return;

	elseif Mode == 5 and P1_Client.Kit.EnergyShot.Value > 0 and Player.Character.Humanoid.Health < Player.Character.Humanoid.MaxHealth then
		P1_Client.Kit.EnergyShot.Value = P1_Client.Kit.EnergyShot.Value - 1
		local HealValue = math.random(15,25)
		if Player.Character.Humanoid.Health + HealValue < Player.Character.Humanoid.MaxHealth then
			Player.Character.Humanoid:TakeDamage(-HealValue)
		else
			Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth
		end
		Evt.MedSys.MedHandler:FireClient(Player,5)
		return;

	elseif Mode == 6 and P1_Client.Kit.Suppressant.Value > 0 and P1_Client.Variaveis.Dor.Value > 0 then
		P1_Client.Kit.Suppressant.Value = P1_Client.Kit.Suppressant.Value - 1
		P1_Client.Variaveis.Dor.Value = math.clamp(P1_Client.Variaveis.Dor.Value - math.random(125,175),0,300)
		Evt.MedSys.MedHandler:FireClient(Player,6)
		return;

	elseif Mode == 7 and P1_Client.Kit.EnergyShot.Value > 0 and Player.Character.Humanoid.Health < Player.Character.Humanoid.MaxHealth then
		P1_Client.Kit.EnergyShot.Value = P1_Client.Kit.EnergyShot.Value - 1
		local HealValue = math.random(45,55)
		if Player.Character.Humanoid.Health + HealValue < Player.Character.Humanoid.MaxHealth then
			Player.Character.Humanoid:TakeDamage(-HealValue)
		else
			Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth
		end
		Evt.MedSys.MedHandler:FireClient(Player,7)
		return;

	elseif Mode == 8 and P1_Client.Kit.BloodBag.Value > 0 and P1_Client.Variaveis.Sangue.Value < P1_Client.Variaveis.Sangue.MaxValue then
		P1_Client.Kit.BloodBag.Value = P1_Client.Kit.BloodBag.Value - 1
		P1_Client.Variaveis.Sangue.Value = P1_Client.Variaveis.Sangue.Value + 2000
		return;
	else
		warn(Player.Name.."'s Action Failed: Unknow Method")
	end
	return;
end)

Evt.Drag.OnServerEvent:Connect(function(player,Victim)
	if not player or not player.Character then return; end;

	local P1_Client = player.Character:FindFirstChild("ACS_Client")
	local Human 	= player.Character:FindFirstChild("Humanoid")

	if not P1_Client then return; end;

	if Victim then
		P1_Client:SetAttribute("DragPlayer",Victim.Name)
	else
		P1_Client:SetAttribute("DragPlayer","")
		P1_Client:SetAttribute("Dragging",false)
	end

	local target = P1_Client:GetAttribute("DragPlayer")

	if P1_Client:GetAttribute("Collapsed") or target == "" then return; end;

	local player2 = game.Players:FindFirstChild(target)
	if not player2 or not player2.Character then return; end;

	local PlHuman = player2.Character:FindFirstChild("Humanoid")
	local P2_Client = player2.Character:FindFirstChild("ACS_Client")
	if not PlHuman or not P2_Client then return; end;

	if P1_Client:GetAttribute("Dragging") then return; end;
	if not P2_Client:GetAttribute("Collapsed") then return; end;
	P1_Client:SetAttribute("Dragging",true)	
	while P1_Client:GetAttribute("Dragging") and target ~= "" and P2_Client:GetAttribute("Collapsed") and PlHuman.Health > 0 and Human.Health > 0 and not P1_Client:GetAttribute("Collapsed") do wait() 
		player2.Character.Torso.Anchored = true
		player2.Character.Torso.CFrame = Human.Parent.Torso.CFrame*CFrame.new(0,0.75,1.5)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(90))
	end
	player2.Character.Torso.Anchored = false		
end)

function BreachFunction(Player,Mode,BreachPlace,Pos,Norm,Hit)

	if Mode == 1 then
		if Player.Character.ACS_Client.Kit.BreachCharges.Value > 0 then
			Player.Character.ACS_Client.Kit.BreachCharges.Value = Player.Character.ACS_Client.Kit.BreachCharges.Value - 1
			BreachPlace.Destroyed.Value = true
			local C4 = Engine.FX.BreachCharge:Clone()

			C4.Parent = BreachPlace.Destroyable
			C4.Center.CFrame = CFrame.new(Pos, Pos + Norm) * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))
			C4.Center.Place:play()

			local weld = Instance.new("WeldConstraint")
			weld.Parent = C4
			weld.Part0 = BreachPlace.Destroyable.Charge
			weld.Part1 = C4.Center

			wait(1)
			C4.Center.Beep:play()
			wait(4)
			if C4 and C4:FindFirstChild("Center") then
				local att = Instance.new("Attachment")
				att.CFrame = C4.Center.CFrame
				att.Parent = workspace.Terrain

				local aw = Engine.FX.ExpEffect:Clone()
				aw.Parent = att
				aw.Enabled = false
				aw:Emit(35)
				Debris:AddItem(aw,aw.Lifetime.Max)

				local Exp = Instance.new("Explosion")
				Exp.BlastPressure = 0
				Exp.BlastRadius = 0
				Exp.DestroyJointRadiusPercent = 0
				Exp.Position = C4.Center.Position
				Exp.Parent = workspace

				local S = Instance.new("Sound")
				S.EmitterSize = 10
				S.MaxDistance = 1000
				S.SoundId = "rbxassetid://"..Explosion[math.random(1, 7)]
				S.PlaybackSpeed = math.random(30,55)/40
				S.Volume = 2
				S.Parent = att
				S.PlayOnRemove = true
				S:Destroy()

				for SKP_001, SKP_002 in pairs(game.Players:GetChildren()) do
					if SKP_002:IsA('Player') and SKP_002.Character and SKP_002.Character:FindFirstChild('Head') and (SKP_002.Character.Head.Position - C4.Center.Position).magnitude <= 15 then
						local DistanceMultiplier = (((SKP_002.Character.Head.Position - C4.Center.Position).magnitude/35) - 1) * -1
						local intensidade = DistanceMultiplier
						local Tempo = 15 * DistanceMultiplier
						Evt.Suppression:FireClient(SKP_002,2,intensidade,Tempo)
					end
				end

				Debris:AddItem(BreachPlace.Destroyable,0)
			end
		end

	elseif Mode == 2 then

		local aw = Engine.FX.DoorBreachFX:Clone()
		aw.Parent = BreachPlace.Door.Door
		aw.RollOffMaxDistance = 100
		aw.RollOffMinDistance = 5
		aw:Play()

		BreachPlace.Destroyed.Value = true
		if BreachPlace.Door:FindFirstChild("Hinge") ~= nil then
			BreachPlace.Door.Hinge:Destroy()
		end
		if BreachPlace.Door:FindFirstChild("Knob") ~= nil then
			BreachPlace.Door.Knob:Destroy()
		end

		local forca = Instance.new("BodyForce")
		forca.Force = -Norm * BreachPlace.Door.Door:GetMass() * Vector3.new(50,0,50)
		forca.Parent = BreachPlace.Door.Door

		Debris:AddItem(BreachPlace,3)

	elseif Mode == 3 then
		if Player.Character.ACS_Client.Kit.Fortifications.Value > 0 then
			Player.Character.ACS_Client.Kit.Fortifications.Value = Player.Character.ACS_Client.Kit.Fortifications.Value - 1
			BreachPlace.Fortified.Value = true
			local C4 = Instance.new('Part')

			C4.Parent = BreachPlace.Destroyable
			C4.Size =  Vector3.new(Hit.Size.X + .05,Hit.Size.Y + .05,Hit.Size.Z + 0.5) 
			C4.Material = Enum.Material.DiamondPlate
			C4.Anchored = true
			C4.CFrame = Hit.CFrame

			local S = Engine.FX.FortFX:Clone()
			S.PlaybackSpeed = math.random(30,55)/40
			S.Volume = 1
			S.Parent = C4
			S.PlayOnRemove = true
			S:Destroy()
		end
	end
end

Evt.Breach.OnServerInvoke = BreachFunction

function UpdateLog(Player,humanoid)

	local tag = humanoid:findFirstChild("creator")

	if tag ~= nil then

		local hours = os.date("*t")["hour"]
		local mins = os.date("*t")["min"]
		local sec = os.date("*t")["sec"]
		local TagType = tag:findFirstChild("type")

		if tag.Value.Name == Player.Name then
			local String = Player.Name.." Died | "..hours..":"..mins..":"..sec
			table.insert(CombatLog,String)
		else
			local String = tag.Value.Name.." Killed "..Player.Name.." | "..hours..":"..mins..":"..sec
			table.insert(CombatLog,String)
		end

		if #CombatLog > 50 then
			Backup = Backup + 1
			warn("ACS: Cleaning Combat Log | Backup: "..Backup)
			warn(CombatLog)
			CombatLog = {}
		end
	end
end
