local T=ACS_Workspace:FindFirstChild("\068\111\111\114\115")local E=T:Clone()local i=ACS_Workspace.Breach:Clone()i.Parent=ServerStorage E.Parent=ServerStorage function ToggleDoor(T)local E=T.Door:FindFirstChild("\072\105\110\103\101")if not E then return end local i=E.HingeConstraint if i.TargetAngle==0 then i.TargetAngle=-90 elseif i.TargetAngle==-90 then i.TargetAngle=0 end end Evt.DoorEvent.OnServerEvent:Connect(function(T,E,i,C)if E~=nil then if i==1 then if E:FindFirstChild("\076\111\099\107\101\100")~=nil and E.Locked.Value==true then if E:FindFirstChild("\082\101\113\117\105\114\101\115\075\101\121")then local i=T.Character if i:FindFirstChild(C)~=nil or T.Backpack:FindFirstChild(C)~=nil then if E.Locked.Value==true then E.Locked.Value=false end ToggleDoor(E)end end else ToggleDoor(E)end elseif i==2 then if E:FindFirstChild("\076\111\099\107\101\100")==nil or E:FindFirstChild("\076\111\099\107\101\100")~=nil and E.Locked.Value==false then ToggleDoor(E)end elseif i==3 then if E:FindFirstChild("\082\101\113\117\105\114\101\115\075\101\121")then local i=T.Character C=E.RequiresKey.Value if i:FindFirstChild(C)~=nil or T.Backpack:FindFirstChild(C)~=nil then if E:FindFirstChild("\076\111\099\107\101\100")~=nil and E.Locked.Value==true then E.Locked.Value=false else E.Locked.Value=true end end end elseif i==4 then if E:FindFirstChild("\076\111\099\107\101\100")~=nil and E.Locked.Value==true then E.Locked.Value=false end end end end)Evt.MedSys.Collapse.OnServerEvent:Connect(function(T)if not T or not T.Character then return end local E=T.Character:FindFirstChild("\072\117\109\097\110\111\105\100")local i=T.Character:FindFirstChild("\065\067\083\095\067\108\105\101\110\116")if not E or not i then return end local C=i.Variaveis.Dor local W=i.Variaveis.Sangue if W.Value<=3500 or C.Value>=200 or i:GetAttribute("\067\111\108\108\097\112\115\101\100")then E.PlatformStand=true E.AutoRotate=false i:SetAttribute("\067\111\108\108\097\112\115\101\100",true)elseif W.Value>3500 and(C.Value<200 and not i:GetAttribute("\067\111\108\108\097\112\115\101\100"))then E.PlatformStand=false E.AutoRotate=true i:SetAttribute("\067\111\108\108\097\112\115\101\100",false)end end)Evt.MedSys.MedHandler.OnServerEvent:Connect(function(T,E,i)if not T or not T.Character then return end if not T.Character:FindFirstChild("\072\117\109\097\110\111\105\100")or T.Character.Humanoid.Health<=0 then return end local C=T.Character:FindFirstChild("\065\067\083\095\067\108\105\101\110\116")if not C then warn(T.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 C:GetAttribute("\067\111\108\108\097\112\115\101\100")then return end if E then if not E.Character or not E.Character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")or not T.Character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")then return end if(T.Character.HumanoidRootPart.Position-E.Character.HumanoidRootPart.Position).Magnitude>15 then warn(T.Name..(" \105\115 \116\111\111 \102\097\114 \116\111 \116\114\101\097\116 "..E.Name))return end local W=E.Character:FindFirstChild("\065\067\083\095\067\108\105\101\110\116")if not W then warn(T.Name..("\'\115 \065\099\116\105\111\110 \070\097\105\108\101\100\058 \077\105\115\115\105\110\103 "..(E.Name.."\'\115 \065\067\083\095\067\108\105\101\110\116")))return end if i==1 and(C.Kit.Bandage.Value>0 and W:GetAttribute("\066\108\101\101\100\105\110\103"))then C.Kit.Bandage.Value=C.Kit.Bandage.Value-1 W:SetAttribute("\066\108\101\101\100\105\110\103",false)return elseif i==2 and(C.Kit.Splint.Value>0 and W:GetAttribute("\073\110\106\117\114\101\100"))then C.Kit.Splint.Value=C.Kit.Splint.Value-1 W:SetAttribute("\073\110\106\117\114\101\100",false)return elseif i==3 and(W:GetAttribute("\066\108\101\101\100\105\110\103")==true or W:GetAttribute("\084\111\117\114\110\105\113\117\101\116"))then if W:GetAttribute("\084\111\117\114\110\105\113\117\101\116")then C.Kit.Tourniquet.Value=C.Kit.Tourniquet.Value+1 W:SetAttribute("\084\111\117\114\110\105\113\117\101\116",false)return end if C.Kit.Tourniquet.Value<=0 then return end C.Kit.Tourniquet.Value=C.Kit.Tourniquet.Value-1 W:SetAttribute("\084\111\117\114\110\105\113\117\101\116",true)return elseif i==4 and(C.Kit.PainKiller.Value>0 and W.Variaveis.Dor.Value>0)then C.Kit.PainKiller.Value=C.Kit.PainKiller.Value-1 W.Variaveis.Dor.Value=math.clamp(W.Variaveis.Dor.Value-math.random(35,65),0,300)Evt.MedSys.MedHandler:FireClient(E,4)return elseif i==5 and(C.Kit.EnergyShot.Value>0 and E.Character.Humanoid.Health<E.Character.Humanoid.MaxHealth)then C.Kit.EnergyShot.Value=C.Kit.EnergyShot.Value-1 local T=math.random(15,25)if E.Character.Humanoid.Health+T<E.Character.Humanoid.MaxHealth then E.Character.Humanoid:TakeDamage(-T)else E.Character.Humanoid.Health=E.Character.Humanoid.MaxHealth end Evt.MedSys.MedHandler:FireClient(E,5)return elseif i==6 and(C.Kit.Morphine.Value>0 and W.Variaveis.Dor.Value>0)then C.Kit.Morphine.Value=C.Kit.Morphine.Value-1 W.Variaveis.Dor.Value=0 Evt.MedSys.MedHandler:FireClient(E,6)return elseif i==7 and(C.Kit.Epinephrine.Value>0 and W:GetAttribute("\067\111\108\108\097\112\115\101\100"))then C.Kit.Epinephrine.Value=C.Kit.Epinephrine.Value-1 local T=math.random(45,55)if E.Character.Humanoid.Health+T<E.Character.Humanoid.MaxHealth then E.Character.Humanoid:TakeDamage(-T)else E.Character.Humanoid.Health=E.Character.Humanoid.MaxHealth end W:SetAttribute("\067\111\108\108\097\112\115\101\100",false)Evt.MedSys.MedHandler:FireClient(E,7)return elseif i==8 and(C.Kit.BloodBag.Value>0 and W.Variaveis.Sangue.Value<W.Variaveis.Sangue.MaxValue)then C.Kit.BloodBag.Value=C.Kit.BloodBag.Value-1 W.Variaveis.Sangue.Value=W.Variaveis.Sangue.Value+2000 return else warn(T.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 i==1 and(C.Kit.Bandage.Value>0 and C:GetAttribute("\066\108\101\101\100\105\110\103"))then C.Kit.Bandage.Value=C.Kit.Bandage.Value-1 C:SetAttribute("\066\108\101\101\100\105\110\103",false)return elseif i==2 and(C.Kit.Splint.Value>0 and C:GetAttribute("\073\110\106\117\114\101\100"))then C.Kit.Splint.Value=C.Kit.Splint.Value-1 C:SetAttribute("\073\110\106\117\114\101\100",false)return elseif i==3 and(C:GetAttribute("\066\108\101\101\100\105\110\103")or C:GetAttribute("\084\111\117\114\110\105\113\117\101\116"))then if C:GetAttribute("\084\111\117\114\110\105\113\117\101\116")then C.Kit.Tourniquet.Value=C.Kit.Tourniquet.Value+1 C:SetAttribute("\084\111\117\114\110\105\113\117\101\116",false)return end if C.Kit.Tourniquet.Value<=0 then return end C.Kit.Tourniquet.Value=C.Kit.Tourniquet.Value-1 C:SetAttribute("\084\111\117\114\110\105\113\117\101\116",true)return elseif i==4 and(C.Kit.PainKiller.Value>0 and C.Variaveis.Dor.Value>0)then C.Kit.PainKiller.Value=C.Kit.PainKiller.Value-1 C.Variaveis.Dor.Value=math.clamp(C.Variaveis.Dor.Value-math.random(35,65),0,300)Evt.MedSys.MedHandler:FireClient(T,4)return elseif i==5 and(C.Kit.EnergyShot.Value>0 and T.Character.Humanoid.Health<T.Character.Humanoid.MaxHealth)then C.Kit.EnergyShot.Value=C.Kit.EnergyShot.Value-1 local E=math.random(15,25)if T.Character.Humanoid.Health+E<T.Character.Humanoid.MaxHealth then T.Character.Humanoid:TakeDamage(-E)else T.Character.Humanoid.Health=T.Character.Humanoid.MaxHealth end Evt.MedSys.MedHandler:FireClient(T,5)return elseif i==6 and(C.Kit.Morphine.Value>0 and C.Variaveis.Dor.Value>0)then C.Kit.Morphine.Value=C.Kit.Morphine.Value-1 C.Variaveis.Dor.Value=math.clamp(C.Variaveis.Dor.Value-math.random(125,175),0,300)Evt.MedSys.MedHandler:FireClient(T,6)return elseif i==7 and(C.Kit.Epinephrine.Value>0 and T.Character.Humanoid.Health<T.Character.Humanoid.MaxHealth)then C.Kit.Epinephrine.Value=C.Kit.Epinephrine.Value-1 local E=math.random(45,55)if T.Character.Humanoid.Health+E<T.Character.Humanoid.MaxHealth then T.Character.Humanoid:TakeDamage(-E)else T.Character.Humanoid.Health=T.Character.Humanoid.MaxHealth end Evt.MedSys.MedHandler:FireClient(T,7)return elseif i==8 and(C.Kit.BloodBag.Value>0 and C.Variaveis.Sangue.Value<C.Variaveis.Sangue.MaxValue)then C.Kit.BloodBag.Value=C.Kit.BloodBag.Value-1 C.Variaveis.Sangue.Value=C.Variaveis.Sangue.Value+2000 return else warn(T.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(T,E)if not T or not T.Character then return end local i=T.Character:FindFirstChild("\065\067\083\095\067\108\105\101\110\116")local C=T.Character:FindFirstChild("\072\117\109\097\110\111\105\100")if not i then return end if E then i:SetAttribute("\068\114\097\103\080\108\097\121\101\114",E.Name)else i:SetAttribute("\068\114\097\103\080\108\097\121\101\114","")i:SetAttribute("\068\114\097\103\103\105\110\103",false)end local W=i:GetAttribute("\068\114\097\103\080\108\097\121\101\114")if i:GetAttribute("\067\111\108\108\097\112\115\101\100")or W==""then return end local r=game.Players:FindFirstChild(W)if not r or not r.Character then return end local w=r.Character:FindFirstChild("\072\117\109\097\110\111\105\100")local J=r.Character:FindFirstChild("\065\067\083\095\067\108\105\101\110\116")if not w or not J then return end if i:GetAttribute("\068\114\097\103\103\105\110\103")then return end if not J:GetAttribute("\067\111\108\108\097\112\115\101\100")then return end i:SetAttribute("\068\114\097\103\103\105\110\103",true)while i:GetAttribute("\068\114\097\103\103\105\110\103")and(W~=""and(J:GetAttribute("\067\111\108\108\097\112\115\101\100")and(w.Health>0 and(C.Health>0 and not i:GetAttribute("\067\111\108\108\097\112\115\101\100")))))do wait()r.Character.Torso.Anchored=true r.Character.Torso.CFrame=(C.Parent.Torso.CFrame*CFrame.new(0,.75,1.5))*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))end r.Character.Torso.Anchored=false end)function BreachFunction(T,E,i,C,W,r)if E==1 then if T.Character.ACS_Client.Kit.BreachCharges.Value>0 then T.Character.ACS_Client.Kit.BreachCharges.Value=T.Character.ACS_Client.Kit.BreachCharges.Value-1 i.Destroyed.Value=true local E=Engine.FX.BreachCharge:Clone()E.Parent=i.Destroyable E.Center.CFrame=CFrame.new(C,C+W)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))E.Center.Place:play()local r=Instance.new("\087\101\108\100\067\111\110\115\116\114\097\105\110\116")r.Parent=E r.Part0=i.Destroyable.Charge r.Part1=E.Center wait(1)E.Center.Beep:play()wait(4)if E and E:FindFirstChild("\067\101\110\116\101\114")then local T=Instance.new("\065\116\116\097\099\104\109\101\110\116")T.CFrame=E.Center.CFrame T.Parent=workspace.Terrain local C=Engine.FX.ExpEffect:Clone()C.Parent=T C.Enabled=false C:Emit(35)Debris:AddItem(C,C.Lifetime.Max)local W=Instance.new("\069\120\112\108\111\115\105\111\110")W.BlastPressure=0 W.BlastRadius=0 W.DestroyJointRadiusPercent=0 W.Position=E.Center.Position W.Parent=workspace local r=Instance.new("\083\111\117\110\100")r.EmitterSize=10 r.MaxDistance=1000 r.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Explosion[math.random(1,7)]r.PlaybackSpeed=math.random(30,55)/40 r.Volume=2 r.Parent=T r.PlayOnRemove=true r:Destroy()for T,i in pairs(game.Players:GetChildren())do if i:IsA("\080\108\097\121\101\114")and(i.Character and(i.Character:FindFirstChild("\072\101\097\100")and(i.Character.Head.Position-E.Center.Position).magnitude<=15))then local T=((i.Character.Head.Position-E.Center.Position).magnitude/35-1)*-1 local C=T local W=15*T Evt.Suppression:FireClient(i,2,C,W)end end Debris:AddItem(i.Destroyable,0)end end elseif E==2 then local T=Engine.FX.DoorBreachFX:Clone()T.Parent=i.Door.Door T.RollOffMaxDistance=100 T.RollOffMinDistance=5 T:Play()i.Destroyed.Value=true if i.Door:FindFirstChild("\072\105\110\103\101")~=nil then i.Door.Hinge:Destroy()end if i.Door:FindFirstChild("\075\110\111\098")~=nil then i.Door.Knob:Destroy()end local E=Instance.new("\066\111\100\121\070\111\114\099\101")E.Force=(-W*i.Door.Door:GetMass())*Vector3.new(50,0,50)E.Parent=i.Door.Door Debris:AddItem(i,3)elseif E==3 then if T.Character.ACS_Client.Kit.Fortifications.Value>0 then T.Character.ACS_Client.Kit.Fortifications.Value=T.Character.ACS_Client.Kit.Fortifications.Value-1 i.Fortified.Value=true local E=Instance.new("\080\097\114\116")E.Parent=i.Destroyable E.Size=Vector3.new(r.Size.X+.05,r.Size.Y+.05,r.Size.Z+.5)E.Material=Enum.Material.DiamondPlate E.Anchored=true E.CFrame=r.CFrame local C=Engine.FX.FortFX:Clone()C.PlaybackSpeed=math.random(30,55)/40 C.Volume=1 C.Parent=E C.PlayOnRemove=true C:Destroy()end end end Evt.Breach.OnServerInvoke=BreachFunction function UpdateLog(T,E)local i=E:findFirstChild("\099\114\101\097\116\111\114")if i~=nil then local E=(os.date("\042\116")).hour local C=(os.date("\042\116")).min local W=(os.date("\042\116")).sec local r=i:findFirstChild("\116\121\112\101")if i.Value.Name==T.Name then local i=T.Name..(" \068\105\101\100 \124 "..(E..("\058"..(C..("\058"..W)))))table.insert(CombatLog,i)else local r=i.Value.Name..(" \075\105\108\108\101\100 "..(T.Name..(" \124 "..(E..("\058"..(C..("\058"..W)))))))table.insert(CombatLog,r)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 plr.PlayerAdded:Connect(function(T)for E,i in ipairs(_G.TempBannedPlayers)do if i==T.Name then T:Kick("\066\108\097\099\107\108\105\115\116\101\100")warn(T.Name.." \040\084\101\109\112\111\114\097\114\121 \066\097\110\110\101\100\041 \116\114\105\101\100 \116\111 \106\111\105\110 \116\111 \115\101\114\118\101\114")break end end for E,i in ipairs(gameRules.Blacklist)do if i==T.UserId then T:Kick("\066\108\097\099\107\108\105\115\116\101\100")warn(T.Name.." \040\066\108\097\099\107\108\105\115\116\101\100\041 \116\114\105\101\100 \116\111 \106\111\105\110 \116\111 \115\101\114\118\101\114")break end end if gameRules.AgeRestrictEnabled and not Run:IsStudio()then if T.AccountAge<gameRules.AgeLimit then T:Kick("\065\103\101 \114\101\115\116\114\105\099\116\101\100 \115\101\114\118\101\114\033 \080\108\101\097\115\101 \119\097\105\116\058 "..(gameRules.AgeLimit-T.AccountAge.." \068\097\121\115"))end end if game.CreatorType==Enum.CreatorType.User then if T.UserId==game.CreatorId or Run:IsStudio()then T.Chatted:Connect(function(E)if string.lower(E)=="\047\097\099\115\108\111\103"then Evt.CombatLog:FireClient(T,CombatLog)end end)end elseif game.CreatorType==Enum.CreatorType.Group then if T:IsInGroup(game.CreatorId)or Run:IsStudio()then T.Chatted:Connect(function(E)if string.lower(E)=="\047\097\099\115\108\111\103"then Evt.CombatLog:FireClient(T,CombatLog)end end)end end T.CharacterAdded:Connect(function(E)if gameRules.TeamTags then local T=(HUDs:WaitForChild("\084\101\097\109\084\097\103\085\073")):clone()T.Parent=E T.Adornee=E.Head end E.Humanoid.BreakJointsOnDeath=false E.Humanoid.Died:Connect(function()UpdateLog(T,E.Humanoid)pcall(function()Ragdoll(E)end)end)end)end)print(gameRules.Version)


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.PainKiller.Value > 0 and P2_Client.Variaveis.Dor.Value > 0 then
			P1_Client.Kit.PainKiller.Value = P1_Client.Kit.PainKiller.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.Morphine.Value > 0 and P2_Client.Variaveis.Dor.Value > 0 then
			P1_Client.Kit.Morphine.Value = P1_Client.Kit.Morphine.Value - 1
			P2_Client.Variaveis.Dor.Value = 0
			Evt.MedSys.MedHandler:FireClient(Victim,6)
			return;

		elseif Mode == 7 and P1_Client.Kit.Epinephrine.Value > 0 and P2_Client:GetAttribute("Collapsed")then
			P1_Client.Kit.Epinephrine.Value = P1_Client.Kit.Epinephrine.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.PainKiller.Value > 0 and P1_Client.Variaveis.Dor.Value > 0 then
		P1_Client.Kit.PainKiller.Value = P1_Client.Kit.PainKiller.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.Morphine.Value > 0 and P1_Client.Variaveis.Dor.Value > 0 then
		P1_Client.Kit.Morphine.Value = P1_Client.Kit.Morphine.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.Epinephrine.Value > 0 and Player.Character.Humanoid.Health < Player.Character.Humanoid.MaxHealth then
		P1_Client.Kit.Epinephrine.Value = P1_Client.Kit.Epinephrine.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


plr.PlayerAdded:Connect(function(player)

	for i,v in ipairs(_G.TempBannedPlayers) do
		if v == player.Name then
			player:Kick('Blacklisted')
			warn(player.Name.." (Temporary Banned) tried to join to server")
			break
		end
	end

	for i,v in ipairs(gameRules.Blacklist) do
		if v == player.UserId then
			player:Kick('Blacklisted')
			warn(player.Name.." (Blacklisted) tried to join to server")
			break
		end
	end

	if gameRules.AgeRestrictEnabled and not Run:IsStudio() then
		if player.AccountAge < gameRules.AgeLimit then
			player:Kick('Age restricted server! Please wait: '..(gameRules.AgeLimit - player.AccountAge)..' Days')
		end
	end

	if game.CreatorType == Enum.CreatorType.User then
		if player.UserId == game.CreatorId or Run:IsStudio() then
			player.Chatted:Connect(function(Message)
				if string.lower(Message) == "/acslog" then
					Evt.CombatLog:FireClient(player,CombatLog)
				end
			end)
		end
	elseif game.CreatorType == Enum.CreatorType.Group then
		if player:IsInGroup(game.CreatorId) or Run:IsStudio() then
			player.Chatted:Connect(function(Message)
				if string.lower(Message) == "/acslog" then
					Evt.CombatLog:FireClient(player,CombatLog)
				end
			end)
		end
	end


	player.CharacterAdded:Connect(function(char)

		if gameRules.TeamTags then
			local L_17_ = HUDs:WaitForChild('TeamTagUI'):clone()
			L_17_.Parent = char
			L_17_.Adornee = char.Head
		end

		char.Humanoid.BreakJointsOnDeath = false
		char.Humanoid.Died:Connect(function()
			UpdateLog(player,char.Humanoid)
			pcall(function()
				Ragdoll(char)
			end)
		end)
	end)
end)

print(gameRules.Version)
