local x=ACS_Storage.Server game.Players.PlayerAdded:connect(function(x)x.CharacterAppearanceLoaded:Connect(function(g)for g,u in pairs(Engine.Essential:GetChildren())do if u then local g=u:clone()g.Parent=x.PlayerGui g.Disabled=false end end if x.Character:FindFirstChild("\072\101\097\100")then Evt.TeamTag:FireAllClients(x,g)end end)x.Changed:connect(function()Evt.TeamTag:FireAllClients(x)end)end)function Weld(x,g,u,e)local Y=Instance.new("\077\111\116\111\114\054\068",x)Y.Part0=x Y.Part1=g Y.Name=x.Name Y.C0=u or x.CFrame:inverse()*g.CFrame Y.C1=e or CFrame.new()return Y end Evt.Recarregar.OnServerEvent:Connect(function(x,g,u)u.ACS_Modulo.Variaveis.StoredAmmo.Value=g end)Evt.Treino.OnServerEvent:Connect(function(x,g)if g.Parent:FindFirstChild("\083\097\117\100\101")~=nil then local x=g.Parent.Saude x.Variaveis.HitCount.Value=x.Variaveis.HitCount.Value+1 end end)Evt.SVFlash.OnServerEvent:Connect(function(x,g,u,e,Y,v,R)if ServerConfig.ReplicatedFlashlight then Evt.SVFlash:FireAllClients(x,g,u,e,Y,v,R)end end)Evt.SVLaser.OnServerEvent:Connect(function(x,g,u,e,Y,v)if ServerConfig.ReplicatedLaser then Evt.SVLaser:FireAllClients(x,g,u,e,Y,v)end end)Evt.Breach.OnServerEvent:Connect(function(x,g,u,e,Y,v)if g==1 then x.Character.Saude.Kit.BreachCharges.Value=x.Character.Saude.Kit.BreachCharges.Value-1 u.Destroyed.Value=true local g=Engine.FX.BreachCharge:Clone()g.Parent=u.Destroyable g.Center.CFrame=CFrame.new(e,e+Y)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))g.Center.Place:play()local v=Instance.new("\087\101\108\100\067\111\110\115\116\114\097\105\110\116")v.Parent=g v.Part0=u.Destroyable.Charge v.Part1=g.Center wait(1)g.Center.Beep:play()wait(4)local R=Instance.new("\069\120\112\108\111\115\105\111\110")R.ExplosionType="\078\111\067\114\097\116\101\114\115"R.BlastPressure=0 R.BlastRadius=0 R.DestroyJointRadiusPercent=0 R.Position=g.Center.Position R.Parent=workspace local G=Instance.new("\083\111\117\110\100")G.EmitterSize=50 G.MaxDistance=1500 G.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Explosion[math.random(1,7)]G.PlaybackSpeed=math.random(30,55)/40 G.Volume=2 G.Parent=R G.PlayOnRemove=true G:Destroy()Debris:AddItem(u.Destroyable,0)elseif g==2 then x.Character.Saude.Kit.BreachCharges.Value=x.Character.Saude.Kit.BreachCharges.Value-1 u.Destroyed.Value=true local g=Engine.FX.BreachCharge:Clone()g.Parent=u g.Center.CFrame=CFrame.new(e,e+Y)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))g.Center.Place:play()local v=Instance.new("\087\101\108\100\067\111\110\115\116\114\097\105\110\116")v.Parent=g v.Part0=u.Door.Door v.Part1=g.Center wait(1)g.Center.Beep:play()wait(4)local R=Instance.new("\069\120\112\108\111\115\105\111\110")R.ExplosionType="\078\111\067\114\097\116\101\114\115"R.BlastPressure=0 R.BlastRadius=0 R.DestroyJointRadiusPercent=0 R.Position=g.Center.Position R.Parent=workspace local G=Instance.new("\083\111\117\110\100")G.EmitterSize=50 G.MaxDistance=1500 G.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Explosion[math.random(1,7)]G.PlaybackSpeed=math.random(30,55)/40 G.Volume=2 G.Parent=R G.PlayOnRemove=true G:Destroy()Debris:AddItem(u,0)elseif g==3 then x.Character.Saude.Kit.Fortifications.Value=x.Character.Saude.Kit.Fortifications.Value-1 u.Fortified.Value=true local g=Instance.new("\080\097\114\116")g.Parent=u.Destroyable g.Size=Vector3.new(v.Size.X+.05,v.Size.Y+.05,v.Size.Z+.5)g.Material=Enum.Material.DiamondPlate g.Anchored=true g.CFrame=v.CFrame local e=Engine.FX.FortFX:Clone()e.PlaybackSpeed=math.random(30,55)/40 e.Volume=1 e.Parent=g e.PlayOnRemove=true e:Destroy()end end)Evt.Hit.OnServerEvent:Connect(function(x,g,u,e,Y,v)Evt.Hit:FireAllClients(x,g,u,e,Y,v)if v.ExplosiveHit==true then local x=Instance.new("\065\116\116\097\099\104\109\101\110\116")x.CFrame=CFrame.new(g,g+e)x.Parent=workspace.Terrain Debris:AddItem(x,5)local u=Instance.new("\069\120\112\108\111\115\105\111\110")u.ExplosionType="\078\111\067\114\097\116\101\114\115"u.BlastPressure=v.ExPressure u.BlastRadius=v.ExpRadius u.DestroyJointRadiusPercent=v.DestroyJointRadiusPercent u.Position=x.Position u.Parent=x local Y=Instance.new("\083\111\117\110\100")Y.EmitterSize=50 Y.MaxDistance=1500 Y.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..Explosion[math.random(1,7)]Y.PlaybackSpeed=math.random(30,55)/40 Y.Volume=2 Y.Parent=u Y.PlayOnRemove=true Y:Destroy()u.Hit:connect(function(x,g)local u=x.Parent and x.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")if u then local x=g/v.ExpRadius x=1-x if x>0 then u:TakeDamage(v.ExplosionDamage*x)end end end)end end)Evt.LauncherHit.OnServerEvent:Connect(function(x,g,u,e)Evt.LauncherHit:FireAllClients(x,g,u,e)end)Evt.Whizz.OnServerEvent:Connect(function(x,g)Evt.Whizz:FireClient(g)end)Evt.Suppression.OnServerEvent:Connect(function(x,g)Evt.Suppression:FireClient(g,1,10,5)end)Evt.ServerBullet.OnServerEvent:connect(function(x,g,u,e,Y,v,R,G,E,r)Evt.ServerBullet:FireAllClients(x,g,u,e,Y,v,R,G,E,r)end)Evt.Equipar.OnServerEvent:Connect(function(x,g)local u=x.Character:FindFirstChild("\084\111\114\115\111")local e=x.Character:FindFirstChild("\072\101\097\100")local Y=x.Character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")if x.Character:FindFirstChild("\072\111\108\115\116"..g.Name)then x.Character["\072\111\108\115\116"..g.Name]:Destroy()end local v=(GunModelServer:FindFirstChild(g.Name)):clone()v.Name="\083"..g.Name local R=require(g.ACS_Modulo.Variaveis:WaitForChild("\083\101\116\116\105\110\103\115"))g.ACS_Modulo.Variaveis.BType.Value=R.BulletType AnimBase=Instance.new("\080\097\114\116",x.Character)AnimBase.FormFactor="\067\117\115\116\111\109"AnimBase.CanCollide=false AnimBase.Transparency=1 AnimBase.Anchored=false AnimBase.Name="\065\110\105\109\066\097\115\101"AnimBase.Size=Vector3.new(.1,.1,.1)AnimBaseW=Instance.new("\077\111\116\111\114\054\068")AnimBaseW.Part0=AnimBase AnimBaseW.Part1=e AnimBaseW.Parent=AnimBase AnimBaseW.Name="\065\110\105\109\066\097\115\101\087"RA=x.Character["\082\105\103\104\116 \065\114\109"]LA=x.Character["\076\101\102\116 \065\114\109"]RightS=x.Character.Torso:WaitForChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114")LeftS=x.Character.Torso:WaitForChild("\076\101\102\116 \083\104\111\117\108\100\101\114")Right_Weld=Instance.new("\077\111\116\111\114\054\068")Right_Weld.Name="\082\065\087"Right_Weld.Part0=RA Right_Weld.Part1=AnimBase Right_Weld.Parent=AnimBase Right_Weld.C0=R.RightArmPos;(x.Character.Torso:WaitForChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114")).Part1=nil Left_Weld=Instance.new("\077\111\116\111\114\054\068")Left_Weld.Name="\076\065\087"Left_Weld.Part0=LA Left_Weld.Part1=AnimBase Left_Weld.Parent=AnimBase Left_Weld.C0=R.LeftArmPos;(x.Character.Torso:WaitForChild("\076\101\102\116 \083\104\111\117\108\100\101\114")).Part1=nil v.Parent=x.Character for x,g in pairs(v:GetChildren())do if g:IsA("\066\097\115\101\080\097\114\116")and g.Name~="\071\114\105\112"then local x=Instance.new("\087\101\108\100\067\111\110\115\116\114\097\105\110\116")x.Parent=g x.Part0=g x.Part1=v.Grip end end local G=Instance.new("\077\111\116\111\114\054\068")G.Name="\071\114\105\112\087"G.Parent=v.Grip G.Part0=v.Grip G.Part1=x.Character["\082\105\103\104\116 \065\114\109"]G.C1=R.ServerGunPos for x,g in pairs(v:GetChildren())do if g:IsA("\066\097\115\101\080\097\114\116")then g.Anchored=false g.CanCollide=false end end end)Evt.SilencerEquip.OnServerEvent:Connect(function(x,g,u)local e=x.Character["\083"..g.Name]local Y if u then e.Silenciador.Transparency=0 else e.Silenciador.Transparency=1 end end)Evt.Desequipar.OnServerEvent:Connect(function(x,g,u)if u.EnableHolster and(x.Character and(x.Character.Humanoid and x.Character.Humanoid.Health>0))then if x.Backpack:FindFirstChild(g.Name)then local e=(GunModelServer:FindFirstChild(g.Name)):clone()e.PrimaryPart=e.Grip e.Parent=x.Character e.Name="\072\111\108\115\116"..g.Name for g,Y in pairs(e:GetDescendants())do if Y:IsA("\066\097\115\101\080\097\114\116")and Y.Name~="\071\114\105\112"then Weld(Y,e.Grip)end if Y:IsA("\066\097\115\101\080\097\114\116")and Y.Name=="\071\114\105\112"then Weld(Y,x.Character[u.HolsterTo],CFrame.new(),u.HolsterPos)end end for x,g in pairs(e:GetDescendants())do if g:IsA("\066\097\115\101\080\097\114\116")then g.Anchored=false g.CanCollide=false end end end end if x.Character:FindFirstChild("\083"..g.Name)~=nil then x.Character["\083"..g.Name]:Destroy()x.Character.AnimBase:Destroy()end if x.Character.Torso:FindFirstChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114")~=nil then(x.Character.Torso:WaitForChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114")).Part1=x.Character["\082\105\103\104\116 \065\114\109"]end if x.Character.Torso:FindFirstChild("\076\101\102\116 \083\104\111\117\108\100\101\114")~=nil then(x.Character.Torso:WaitForChild("\076\101\102\116 \083\104\111\117\108\100\101\114")).Part1=x.Character["\076\101\102\116 \065\114\109"]end if x.Character.Torso:FindFirstChild("\078\101\099\107")~=nil then(x.Character.Torso:WaitForChild("\078\101\099\107")).C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,0);(x.Character.Torso:WaitForChild("\078\101\099\107")).C1=CFrame.new(0,-0.5,0,-1,0,0,0,0,1,0,1,0)end end)Evt.Holster.OnServerEvent:Connect(function(x,g)if x.Character:FindFirstChild("\072\111\108\115\116"..g.Name)then x.Character["\072\111\108\115\116"..g.Name]:Destroy()end end)Evt.HeadRot.OnServerEvent:connect(function(x,g,u,e)Evt.HeadRot:FireAllClients(x,g,u,e)end)local g=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")Evt.Atirar.OnServerEvent:Connect(function(x,g,u,e)Evt.Atirar:FireAllClients(x,g,u,e)end)Evt.Stance.OnServerEvent:Connect(function(x,u,e,Y)if x.Character.Humanoid.Health>0 and(x.Character.AnimBase:FindFirstChild("\082\065\087")~=nil and x.Character.AnimBase:FindFirstChild("\076\065\087")~=nil)then local v=x.Character.AnimBase:WaitForChild("\082\065\087")local R=x.Character.AnimBase:WaitForChild("\076\065\087")if u==0 then(g:Create(v,TweenInfo.new(.3),{C0=e.RightArmPos})):Play();(g:Create(R,TweenInfo.new(.3),{C0=e.LeftArmPos})):Play()elseif u==2 then(g:Create(v,TweenInfo.new(.3),{C0=Y.RightAim})):Play();(g:Create(R,TweenInfo.new(.3),{C0=Y.LeftAim})):Play()elseif u==1 then(g:Create(v,TweenInfo.new(.3),{C0=Y.RightHighReady})):Play();(g:Create(R,TweenInfo.new(.3),{C0=Y.LeftHighReady})):Play()elseif u==-1 then(g:Create(v,TweenInfo.new(.3),{C0=Y.RightLowReady})):Play();(g:Create(R,TweenInfo.new(.3),{C0=Y.LeftLowReady})):Play()elseif u==-2 then(g:Create(v,TweenInfo.new(.3),{C0=Y.RightPatrol})):Play();(g:Create(R,TweenInfo.new(.3),{C0=Y.LeftPatrol})):Play()elseif u==3 then(g:Create(v,TweenInfo.new(.3),{C0=Y.RightSprint})):Play();(g:Create(R,TweenInfo.new(.3),{C0=Y.LeftSprint})):Play()end end end)Evt.Damage.OnServerEvent:Connect(function(x,g,u,e,Y)if g~=nil then if g.Parent:FindFirstChild("\083\097\117\100\101")~=nil then local x=g.Parent.Saude.Protecao.VestVida local u=g.Parent.Saude.Protecao.HelmetVida x.Value=x.Value-e u.Value=u.Value-Y end g:TakeDamage(u)end end)Evt.CreateOwner.OnServerEvent:Connect(function(x,g)local u=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")u.Name="\099\114\101\097\116\111\114"u.Value=x game.Debris:AddItem(u,3)u.Parent=g end)



local BulletModel =  ACS_Storage.Server


game.Players.PlayerAdded:connect(function(SKP_001)	
SKP_001.CharacterAppearanceLoaded:Connect(function(SKP_002)

	for SKP_003, SKP_004 in pairs(Engine.Essential:GetChildren()) do
			if SKP_004 then
				local SKP_005 = SKP_004:clone()
				SKP_005.Parent = SKP_001.PlayerGui
				SKP_005.Disabled = false
			end
		end

	if SKP_001.Character:FindFirstChild('Head') then
		Evt.TeamTag:FireAllClients(SKP_001, SKP_002)
	end
end)

	SKP_001.Changed:connect(function()
		Evt.TeamTag:FireAllClients(SKP_001)
	end)

end)

function Weld(SKP_001, SKP_002, SKP_003, SKP_004)
	local SKP_005 = Instance.new("Motor6D", SKP_001)
	SKP_005.Part0 = SKP_001
	SKP_005.Part1 = SKP_002
	SKP_005.Name = SKP_001.Name
	SKP_005.C0 = SKP_003 or SKP_001.CFrame:inverse() * SKP_002.CFrame
	SKP_005.C1 = SKP_004 or CFrame.new()
	return SKP_005
end


Evt.Recarregar.OnServerEvent:Connect(function(Player, StoredAmmo,Arma)
	Arma.ACS_Modulo.Variaveis.StoredAmmo.Value = StoredAmmo
end)

Evt.Treino.OnServerEvent:Connect(function(Player, Vitima)

	if Vitima.Parent:FindFirstChild("Saude") ~= nil then
	local saude = Vitima.Parent.Saude
		saude.Variaveis.HitCount.Value = saude.Variaveis.HitCount.Value + 1
	end

end)

Evt.SVFlash.OnServerEvent:Connect(function(Player,Mode,Arma,Angle,Bright,Color,Range)
if ServerConfig.ReplicatedFlashlight then
	Evt.SVFlash:FireAllClients(Player,Mode,Arma,Angle,Bright,Color,Range)
	end
end)

Evt.SVLaser.OnServerEvent:Connect(function(Player,Position,Modo,Cor,Arma,IRmode)
	if ServerConfig.ReplicatedLaser then
	Evt.SVLaser:FireAllClients(Player,Position,Modo,Cor,Arma,IRmode)
	end
	--print(Player,Position,Modo,Cor)
end)

Evt.Breach.OnServerEvent:Connect(function(Player,Mode,BreachPlace,Pos,Norm,Hit)
	
	if Mode == 1 then
	Player.Character.Saude.Kit.BreachCharges.Value = Player.Character.Saude.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)
	local Exp = Instance.new("Explosion")
		Exp.ExplosionType = "NoCraters"
		Exp.BlastPressure = 0
		Exp.BlastRadius = 0
		Exp.DestroyJointRadiusPercent = 0
		Exp.Position = C4.Center.Position
		Exp.Parent = workspace
	
	local S = Instance.new("Sound")
		S.EmitterSize = 50
		S.MaxDistance = 1500
		S.SoundId = "rbxassetid://".. Explosion[math.random(1, 7)]
		S.PlaybackSpeed = math.random(30,55)/40
		S.Volume = 2
		S.Parent = Exp
		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/25) - 1) * -1
			local intensidade = DistanceMultiplier
			local Tempo = 15 * DistanceMultiplier
			Evt.Suppression:FireClient(SKP_002,2,intensidade,Tempo)
		end
	end	]]

	Debris:AddItem(BreachPlace.Destroyable,0)
	elseif Mode == 2 then

	Player.Character.Saude.Kit.BreachCharges.Value = Player.Character.Saude.Kit.BreachCharges.Value - 1
	BreachPlace.Destroyed.Value = true
	local C4 = Engine.FX.BreachCharge:Clone()

	C4.Parent = BreachPlace
	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.Door.Door
	weld.Part1 = C4.Center

	wait(1)
	C4.Center.Beep:play()
	wait(4)
	local Exp = Instance.new("Explosion")
		Exp.ExplosionType = "NoCraters"
		Exp.BlastPressure = 0
		Exp.BlastRadius = 0
		Exp.DestroyJointRadiusPercent = 0
		Exp.Position = C4.Center.Position
		Exp.Parent = workspace
	
	local S = Instance.new("Sound")
		S.EmitterSize = 50
		S.MaxDistance = 1500
		S.SoundId = "rbxassetid://".. Explosion[math.random(1, 7)]
		S.PlaybackSpeed = math.random(30,55)/40
		S.Volume = 2
		S.Parent = Exp
		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/25) - 1) * -1
			local intensidade = DistanceMultiplier
			local Tempo = 15 * DistanceMultiplier
			Evt.Suppression:FireClient(SKP_002,2,intensidade,Tempo)
		end
	end]]	

	Debris:AddItem(BreachPlace,0)

	elseif Mode == 3 then

	Player.Character.Saude.Kit.Fortifications.Value = Player.Character.Saude.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)

Evt.Hit.OnServerEvent:Connect(function(Player, Position, HitPart, Normal, Material, Settings)	


	Evt.Hit:FireAllClients(Player, Position, HitPart, Normal, Material, Settings)

	if Settings.ExplosiveHit == true then

		local Hitmark = Instance.new("Attachment")
			Hitmark.CFrame = CFrame.new(Position, Position + Normal)
			Hitmark.Parent = workspace.Terrain
			Debris:AddItem(Hitmark, 5)

		local Exp = Instance.new("Explosion")
		Exp.ExplosionType = "NoCraters"
		Exp.BlastPressure = Settings.ExPressure
		Exp.BlastRadius = Settings.ExpRadius
		Exp.DestroyJointRadiusPercent = Settings.DestroyJointRadiusPercent
		Exp.Position = Hitmark.Position
		Exp.Parent = Hitmark
		
		local S = Instance.new("Sound")
		S.EmitterSize = 50
		S.MaxDistance = 1500
		S.SoundId = "rbxassetid://".. Explosion[math.random(1, 7)]
		S.PlaybackSpeed = math.random(30,55)/40
		S.Volume = 2
		S.Parent = Exp
		S.PlayOnRemove = true
		S:Destroy()

		Exp.Hit:connect(function(hitPart, partDistance)
  		 local humanoid = hitPart.Parent and hitPart.Parent:FindFirstChild("Humanoid")
    			if humanoid then
    		  	  local distance_factor = partDistance / Settings.ExpRadius    -- get the distance as a value between 0 and 1
      		 		 distance_factor = 1 - distance_factor                         -- flip the amount, so that lower == closer == more damage
					if distance_factor > 0 then
					humanoid:TakeDamage(Settings.ExplosionDamage*distance_factor)                -- 0: no damage; 1: max damage
  					 end
				end
		end)
	end

	--[[for SKP_001, SKP_002 in pairs(game.Players:GetChildren()) do
		if SKP_002:IsA('Player') and SKP_002 ~= Player and SKP_002.Character and SKP_002.Character:FindFirstChild('Head') and (SKP_002.Character.Head.Position - Hitmark.WorldPosition).magnitude <= Settings.SuppressMaxDistance then
			Evt.Suppression:FireClient(SKP_002,1,10,5)
		end
	end	]]
end)

Evt.LauncherHit.OnServerEvent:Connect(function(Player, Position, HitPart, Normal)
	Evt.LauncherHit:FireAllClients(Player, Position, HitPart, Normal)
end)

Evt.Whizz.OnServerEvent:Connect(function(Player, Vitima)
	Evt.Whizz:FireClient(Vitima)
end)

Evt.Suppression.OnServerEvent:Connect(function(Player, Vitima)
	Evt.Suppression:FireClient(Vitima,1,10,5)
end)


Evt.ServerBullet.OnServerEvent:connect(function(Player, BulletCF, Tracer, Force, BSpeed, Direction, TracerColor,Ray_Ignore,BulletFlare,BulletFlareColor)
	Evt.ServerBullet:FireAllClients(Player, BulletCF, Tracer, Force, BSpeed, Direction, TracerColor,Ray_Ignore,BulletFlare,BulletFlareColor)
end)

Evt.Equipar.OnServerEvent:Connect(function(Player,Arma)

	local Torso = Player.Character:FindFirstChild('Torso')
	local Head = Player.Character:FindFirstChild('Head')
	local HumanoidRootPart = Player.Character:FindFirstChild('HumanoidRootPart')

	if Player.Character:FindFirstChild('Holst' .. Arma.Name) then
		Player.Character['Holst' .. Arma.Name]:Destroy()
	end

	local ServerGun = GunModelServer:FindFirstChild(Arma.Name):clone()
	ServerGun.Name = 'S' .. Arma.Name
	local Settings = require(Arma.ACS_Modulo.Variaveis:WaitForChild("Settings"))

	Arma.ACS_Modulo.Variaveis.BType.Value = Settings.BulletType

	AnimBase = Instance.new("Part", Player.Character)
	AnimBase.FormFactor = "Custom"
	AnimBase.CanCollide = false
	AnimBase.Transparency = 1
	AnimBase.Anchored = false
	AnimBase.Name = "AnimBase"
	AnimBase.Size = Vector3.new(0.1, 0.1, 0.1)
	
	AnimBaseW = Instance.new("Motor6D")
	AnimBaseW.Part0 = AnimBase
	AnimBaseW.Part1 = Head
	AnimBaseW.Parent = AnimBase
	AnimBaseW.Name = "AnimBaseW"

	RA = Player.Character['Right Arm']
	LA = Player.Character['Left Arm']
	RightS = Player.Character.Torso:WaitForChild("Right Shoulder")
	LeftS = Player.Character.Torso:WaitForChild("Left Shoulder")
	
	Right_Weld = Instance.new("Motor6D")
	Right_Weld.Name = "RAW"
	Right_Weld.Part0 = RA
	Right_Weld.Part1 = AnimBase
	Right_Weld.Parent = AnimBase
	Right_Weld.C0 = Settings.RightArmPos
	Player.Character.Torso:WaitForChild("Right Shoulder").Part1 = nil
		
	Left_Weld = Instance.new("Motor6D")
	Left_Weld.Name = "LAW"
	Left_Weld.Part0 = LA
	Left_Weld.Part1 = AnimBase
	Left_Weld.Parent = AnimBase
	Left_Weld.C0 = Settings.LeftArmPos
	Player.Character.Torso:WaitForChild("Left Shoulder").Part1 = nil

	ServerGun.Parent = Player.Character

	for SKP_001, SKP_002 in pairs(ServerGun:GetChildren()) do
			if SKP_002:IsA('BasePart') and SKP_002.Name ~= 'Grip' then
				local SKP_003 = Instance.new('WeldConstraint')
				SKP_003.Parent = SKP_002
				SKP_003.Part0 = SKP_002
				SKP_003.Part1 = ServerGun.Grip
			end;
		end
		
		local SKP_004 = Instance.new('Motor6D')
		SKP_004.Name = 'GripW'
		SKP_004.Parent = ServerGun.Grip
		SKP_004.Part0 = ServerGun.Grip
		SKP_004.Part1 = Player.Character['Right Arm']
		SKP_004.C1 = Settings.ServerGunPos
		
		for L_74_forvar1, L_75_forvar2 in pairs(ServerGun:GetChildren()) do
			if L_75_forvar2:IsA('BasePart') then
				L_75_forvar2.Anchored = false
				L_75_forvar2.CanCollide = false
			end
		end
	
end)

Evt.SilencerEquip.OnServerEvent:Connect(function(Player,Arma,Silencer)
	local Arma = Player.Character['S' .. Arma.Name]
	local Fire

	if Silencer then
		Arma.Silenciador.Transparency = 0
	else
		Arma.Silenciador.Transparency = 1
	end

end)

Evt.Desequipar.OnServerEvent:Connect(function(Player,Arma,Settings)

	if Settings.EnableHolster and Player.Character and Player.Character.Humanoid and Player.Character.Humanoid.Health > 0 then
			if Player.Backpack:FindFirstChild(Arma.Name) then
				local SKP_001 = GunModelServer:FindFirstChild(Arma.Name):clone()
				SKP_001.PrimaryPart = SKP_001.Grip
				SKP_001.Parent = Player.Character
				SKP_001.Name = 'Holst' .. Arma.Name
				
				for SKP_002, SKP_003 in pairs(SKP_001:GetDescendants()) do
					if SKP_003:IsA('BasePart') and SKP_003.Name ~= 'Grip' then
						Weld(SKP_003, SKP_001.Grip)
					end
					
					if SKP_003:IsA('BasePart') and SKP_003.Name == 'Grip' then
						Weld(SKP_003, Player.Character[Settings.HolsterTo], CFrame.new(), Settings.HolsterPos)
					end
				end
				
				for SKP_004, SKP_005 in pairs(SKP_001:GetDescendants()) do
					if SKP_005:IsA('BasePart') then
						SKP_005.Anchored = false
						SKP_005.CanCollide = false
					end
				end
			end
		end

	if Player.Character:FindFirstChild('S' .. Arma.Name) ~= nil then
		Player.Character['S' .. Arma.Name]:Destroy()
		Player.Character.AnimBase:Destroy()
	end

	if Player.Character.Torso:FindFirstChild("Right Shoulder") ~= nil then
		Player.Character.Torso:WaitForChild("Right Shoulder").Part1 = Player.Character['Right Arm']
	end
	if Player.Character.Torso:FindFirstChild("Left Shoulder") ~= nil then
		Player.Character.Torso:WaitForChild("Left Shoulder").Part1 = Player.Character['Left Arm']
	end
	if Player.Character.Torso:FindFirstChild("Neck") ~= nil then
		Player.Character.Torso:WaitForChild("Neck").C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
		Player.Character.Torso:WaitForChild("Neck").C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
	end
end)

Evt.Holster.OnServerEvent:Connect(function(Player,Arma)
	if Player.Character:FindFirstChild('Holst' .. Arma.Name) then
		Player.Character['Holst' .. Arma.Name]:Destroy()
	end
end)

Evt.HeadRot.OnServerEvent:connect(function(Player, Rotacao, Offset, Equipado)
	Evt.HeadRot:FireAllClients(Player, Rotacao, Offset, Equipado)
end)

local TS = game:GetService('TweenService')

Evt.Atirar.OnServerEvent:Connect(function(Player,FireRate,Anims,Arma)
	
	Evt.Atirar:FireAllClients(Player,FireRate,Anims,Arma)

end)

Evt.Stance.OnServerEvent:Connect(function(Player,stance,Settings,Anims)
	if Player.Character.Humanoid.Health > 0 and Player.Character.AnimBase:FindFirstChild("RAW") ~= nil and Player.Character.AnimBase:FindFirstChild("LAW") ~= nil then

		local Right_Weld = Player.Character.AnimBase:WaitForChild("RAW")
		local Left_Weld = Player.Character.AnimBase:WaitForChild("LAW")

		if stance == 0 then
		
			TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Settings.RightArmPos} ):Play()
			TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Settings.LeftArmPos} ):Play()

		elseif stance == 2 then
		
			TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Anims.RightAim} ):Play()
			TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Anims.LeftAim} ):Play()

		elseif stance == 1 then
		
			TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Anims.RightHighReady} ):Play()
			TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Anims.LeftHighReady} ):Play()

		elseif stance == -1 then

			TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Anims.RightLowReady} ):Play()
			TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Anims.LeftLowReady} ):Play()

		elseif stance == -2 then

			TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Anims.RightPatrol} ):Play()
			TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Anims.LeftPatrol} ):Play()

		elseif stance == 3 then

			TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Anims.RightSprint} ):Play()
			TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Anims.LeftSprint} ):Play()
		
		end
	end
end)


Evt.Damage.OnServerEvent:Connect(function(Player,VitimaHuman,Dano,DanoColete,DanoCapacete)
	
	if VitimaHuman ~= nil then
		if VitimaHuman.Parent:FindFirstChild("Saude") ~= nil then
			local Colete = VitimaHuman.Parent.Saude.Protecao.VestVida
			local Capacete = VitimaHuman.Parent.Saude.Protecao.HelmetVida
			Colete.Value = Colete.Value - DanoColete
			Capacete.Value = Capacete.Value - DanoCapacete
		end
	VitimaHuman:TakeDamage(Dano)
	end
	
end)

Evt.CreateOwner.OnServerEvent:Connect(function(Player,VitimaHuman)
	local c = Instance.new("ObjectValue")
			c.Name = "creator"
			c.Value = Player
			game.Debris:AddItem(c, 3)
			c.Parent = VitimaHuman
end)
