---Explosive Settings---
			elseif Settings.Mode == "Explosive" and Settings.FireModes.Semi == true then
				Gui.FText.Text = "Semi"
				Settings.Mode = "Semi"
			elseif Settings.Mode == "Explosive" and Settings.FireModes.Semi == false and Settings.FireModes.Burst == true  then
				Gui.FText.Text = "Burst"
				Settings.Mode = "Burst"
			elseif Settings.Mode == "Explosive" and Settings.FireModes.Semi == false and Settings.FireModes.Burst == false and Settings.FireModes.Auto == true then
				Gui.FText.Text = "Auto"
				Settings.Mode = "Auto"
			end
		Update_Gui()
end
	if (key == "t") and Equipped and (not NVG or ArmaClone.AimPart:FindFirstChild("NVAim") == nil) and not Reloading then
		if Aiming then
			if ArmaClone:FindFirstChild("AimPart2") ~= nil then
				if AimPartMode == 1 then
					AimPartMode = 2
					tweenFoV(Settings.ChangeFOV[2],120)
					if Settings.FocusOnSight2 and Aiming then
						TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus2Distance}):Play()
						--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play()
					else
						TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play()
						--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play()
					end
					if Settings.adsMesh2 then
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "REG" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play()
								end	
							end
						end
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "ADS" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play()
								end
							end
						end
					else
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "REG" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play()
								end	
							end
						end
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "ADS" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play()
								end
							end
						end
					end
					if Settings.ZoomAnim then
						ZoomAnim()
						Sprint()
					end
				elseif AimPartMode == 2 then
					AimPartMode = 1
					tweenFoV(Settings.ChangeFOV[1],120)
					if Settings.FocusOnSight and Aiming then
						TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus1Distance}):Play()
						--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play()
					else
						TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play()
						--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play()
					end
					if Settings.adsMesh1 then
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "REG" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play()
								end	
							end
						end
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "ADS" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play()
								end
							end
						end
					else
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "REG" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play()
								end	
							end
						end
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "ADS" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play()
								end
							end
						end
					end
					if Settings.ZoomAnim then
						UnZoomAnim()
						Sprint()
					end
				end
			else
				if AimPartMode == 1 then
					AimPartMode = 2
					tweenFoV(Settings.ChangeFOV[2], 120)
					if Settings.FocusOnSight2 and Aiming then
						TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus2Distance}):Play()
						--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play()
					else
						TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play()
						--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play()
					end
					if Settings.adsMesh2 then
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "REG" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play()
								end	
							end
						end
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "ADS" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play()
								end
							end
						end
					else
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "REG" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play()
								end	
							end
						end
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "ADS" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play()
								end
							end
						end
					end
					if Settings.ZoomAnim then
						ZoomAnim()
						Sprint()
					end
				elseif AimPartMode == 2 then
					AimPartMode = 1
					tweenFoV(Settings.ChangeFOV[1], 120)
					if Settings.FocusOnSight and Aiming then
						TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus1Distance}):Play()
						--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play()
					else
						TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play()
						--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play()
					end
					if Settings.adsMesh1 then
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "REG" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play()
								end	
							end
						end
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "ADS" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play()
								end
							end
						end
					else
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "REG" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play()
								end	
							end
						end
						for _,v in pairs(ArmaClone:GetDescendants()) do
							if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then
								if v.Name == "ADS" then
									TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play()
								end
							end
						end
					end
					if Settings.ZoomAnim then
						UnZoomAnim()
						Sprint()
					end
				end
			end
		else
			if AimPartMode == 1 then
				AimPartMode = 2
				if Settings.FocusOnSight2 and Aiming then
					TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus2Distance}):Play()
					--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play()
				else
					TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play()
					--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play()
				end
				if Settings.ZoomAnim then
					ZoomAnim()
					Sprint()
				end
			elseif AimPartMode == 2 then
				AimPartMode = 1
				if Settings.FocusOnSight and Aiming then
					TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus1Distance}):Play()
					--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play()
				else
					TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play()
					--TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play()
				end
				if Settings.ZoomAnim then
					UnZoomAnim()
					Sprint()
				end
			end
		end
	end
	
if (key == "[") and Equipped then
	if Zeroing.Value > Zeroing.MinValue then
		Zeroing.Value = Zeroing.Value - 50
		ArmaClone.Handle.Click:play()
		Update_Gui()
	end
end
if (key == "]" ) and Equipped then
	if Zeroing.Value < Zeroing.MaxValue then
		Zeroing.Value = Zeroing.Value + 50
		ArmaClone.Handle.Click:play()
		Update_Gui()
	end
end
if (key == "r") and Equipped and stance > -2 then
   CancelReload = false
	if StoredAmmo.Value > 0  and Settings.Mode ~= "Explosive" and not Reloading and Settings.ReloadType == 1 then
			if Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo + 1 or not Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo and Chambered.Value == true then
				return
			end
			MouseHeld = false
			Can_Shoot = false
			Reloading = true	
			if Safe then
				Safe = false
				stance = 0
				Evt.Stance:FireServer(stance,Settings,Anims)
				IdleAnim()
				Update_Gui()
				wait(.25)
			end
				ReloadAnim()	
				if Chambered.Value == false and slideback == true and Settings.FastReload == true then
					ChamberBKAnim()
				elseif Chambered.Value == false and slideback == false and Settings.FastReload == true then
					ChamberAnim()
				end
				Sprint()		
			Update_Gui()
			Can_Shoot = true
			Reloading = false

		elseif StoredAmmo.Value > 0  and Settings.Mode ~= "Explosive" and not Reloading and Settings.ReloadType == 2 then
			if Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo + 1 or not Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo and Chambered.Value == true or CancelReload then
				Sprint()
				Update_Gui()
				return
			end
				MouseHeld = false
				Can_Shoot = false
				Reloading = true	
			if Safe then
				Safe = false
				stance = 0
				Evt.Stance:FireServer(stance)
				Sprint()
				Update_Gui()
				wait(.25)
			end
				for i = 1,Settings.Ammo - Ammo.Value do
				if StoredAmmo.Value > 0 and not CancelReload and Ammo.Value < Settings.Ammo and not AnimDebounce then
					ShellInsertAnim()			
				end
				end
			if Chambered.Value == false and slideback == true and Settings.FastReload == true then
				ChamberBKAnim()
			elseif Chambered.Value == false and slideback == false and Settings.FastReload == true then
				ChamberAnim()
			end
			Update_Gui()
			Sprint()
			CancelReload = false
			Can_Shoot = true
			Reloading = false

		elseif StoredAmmo.Value > 0  and Settings.Mode ~= "Explosive" and Reloading and Settings.ReloadType == 2 and AnimDebounce then
			if not CancelReload then
					CancelReload = true
					Sprint()
					Update_Gui()
					wait(.25)
				end
		elseif not Reloading and GLAmmo.Value > 0 and Settings.Mode == "Explosive"  and GLChambered.Value == false then
			MouseHeld = false
			Can_Shoot = false
			Reloading = true
				GLReloadAnim()
				GLChambered.Value = true
			Sprint()
			Update_Gui()
			Can_Shoot = true
			Reloading = false
	end
end
if (key == "f") and Equipped and not Reloading and stance > -2  then
			MouseHeld = false
			Can_Shoot = false
			Reloading = true

			if Safe then
				Safe = false
				stance = 0
				Evt.Stance:FireServer(stance,Settings,Anims)
				IdleAnim()
				Update_Gui()
				--wait(.25)
			end

			if not slideback then
				ChamberAnim()
			else
				ChamberBKAnim()
			end	
			Sprint()			
			Update_Gui()		
			Can_Shoot = true
			Reloading = false
end
if (key == "m") and Equipped and Settings.CanCheckMag and not Reloading and stance > -2 then
			MouseHeld = false
			Can_Shoot = false
			Reloading = true

			if Safe then
				Safe = false
				stance = 0
				Evt.Stance:FireServer(stance,Settings,Anims)
				IdleAnim()
				Update_Gui()
				--wait(.25)
			end
			CheckAnim()
			Sprint()			
			Update_Gui()		
			Can_Shoot = true
			Reloading = false
end
if (key == "h") and Equipped and ArmaClone:FindFirstChild("LaserPoint") then


	if ServerConfig.RealisticLaser and ArmaClone.LaserPoint:FindFirstChild("IR") ~= nil then
		if not LaserAtivo and not IRmode then
			LaserAtivo = not LaserAtivo
			IRmode = not IRmode

			if LaserAtivo then

				Evt.SVLaser:FireServer(Vector3.new(0,0,0),1,ArmaClone.LaserPoint.Color,ArmaClient)
				Pointer = Instance.new('Part')
				Pointer.Shape = 'Ball'
				Pointer.Size = Vector3.new(0.2, 0.2, 0.2)
				Pointer.Parent = ArmaClone.LaserPoint
				Pointer.CanCollide = false
				Pointer.Color = ArmaClone.LaserPoint.Color
				Pointer.Material = Enum.Material.Neon
				
				if ArmaClone.LaserPoint:FindFirstChild("IR") ~= nil then
					Pointer.Transparency = 1
				end
				
				LaserSP = Instance.new('Attachment')
				LaserSP.Parent = ArmaClone.LaserPoint				

				LaserEP = Instance.new('Attachment')
				LaserEP.Parent = ArmaClone.LaserPoint
				
				Laser = Instance.new('Beam')
				Laser.Parent = ArmaClone.LaserPoint
				Laser.Transparency = NumberSequence.new(0)
				Laser.LightEmission = 1
				Laser.LightInfluence = 0
				Laser.Attachment0 = LaserSP
				Laser.Attachment1 = LaserEP
				Laser.Color = ColorSequence.new(ArmaClone.LaserPoint.Color,IRmode)
				Laser.FaceCamera = true
				Laser.Width0 = 0.01
				Laser.Width1 = 0.01

				if ServerConfig.RealisticLaser then
					Laser.Enabled = false
				end

			else
				Evt.SVLaser:FireServer(Vector3.new(0,0,0),2,nil,ArmaClient,IRmode)
				Pointer:Destroy()
				LaserSP:Destroy()
				LaserEP:Destroy()
				Laser:Destroy()
			end

			elseif LaserAtivo and IRmode then
			IRmode = not IRmode
		elseif LaserAtivo and not IRmode then
			LaserAtivo = not LaserAtivo

			if LaserAtivo then

				Evt.SVLaser:FireServer(Vector3.new(0,0,0),1,ArmaClone.LaserPoint.Color,ArmaClient)
				Pointer = Instance.new('Part')
				Pointer.Shape = 'Ball'
				Pointer.Size = Vector3.new(0.2, 0.2, 0.2)
				Pointer.Parent = ArmaClone.LaserPoint
				Pointer.CanCollide = false
				Pointer.Color = ArmaClone.LaserPoint.Color
				Pointer.Material = Enum.Material.Neon
				
				if ArmaClone.LaserPoint:FindFirstChild("IR") ~= nil then
					Pointer.Transparency = 1
				end
				
				LaserSP = Instance.new('Attachment')
				LaserSP.Parent = ArmaClone.LaserPoint				

				LaserEP = Instance.new('Attachment')
				LaserEP.Parent = ArmaClone.LaserPoint
				
				Laser = Instance.new('Beam')
				Laser.Parent = ArmaClone.LaserPoint
				Laser.Transparency = NumberSequence.new(0)
				Laser.LightEmission = 1
				Laser.LightInfluence = 0
				Laser.Attachment0 = LaserSP
				Laser.Attachment1 = LaserEP
				Laser.Color = ColorSequence.new(ArmaClone.LaserPoint.Color,IRmode)
				Laser.FaceCamera = true
				Laser.Width0 = 0.01
				Laser.Width1 = 0.01

				if ServerConfig.RealisticLaser then
					Laser.Enabled = false
				end

			else
				Evt.SVLaser:FireServer(Vector3.new(0,0,0),2,nil,ArmaClient,IRmode)
				Pointer:Destroy()
				LaserSP:Destroy()
				LaserEP:Destroy()
				Laser:Destroy()
			end


		end
	else
		LaserAtivo = not LaserAtivo

		if LaserAtivo then

				Evt.SVLaser:FireServer(Vector3.new(0,0,0),1,ArmaClone.LaserPoint.Color,ArmaClient)
				Pointer = Instance.new('Part')
				Pointer.Shape = 'Ball'
				Pointer.Size = Vector3.new(0.2, 0.2, 0.2)
				Pointer.Parent = ArmaClone.LaserPoint
				Pointer.CanCollide = false
				Pointer.Color = ArmaClone.LaserPoint.Color
				Pointer.Material = Enum.Material.Neon
				
				if ArmaClone.LaserPoint:FindFirstChild("IR") ~= nil then
					Pointer.Transparency = 1
				end
				
				LaserSP = Instance.new('Attachment')
				LaserSP.Parent = ArmaClone.LaserPoint				

				LaserEP = Instance.new('Attachment')
				LaserEP.Parent = ArmaClone.LaserPoint
				
				Laser = Instance.new('Beam')
				Laser.Parent = ArmaClone.LaserPoint
				Laser.Transparency = NumberSequence.new(0)
				Laser.LightEmission = 1
				Laser.LightInfluence = 0
				Laser.Attachment0 = LaserSP
				Laser.Attachment1 = LaserEP
				Laser.Color = ColorSequence.new(ArmaClone.LaserPoint.Color,IRmode)
				Laser.FaceCamera = true
				Laser.Width0 = 0.01
				Laser.Width1 = 0.01

				if ServerConfig.RealisticLaser then
					Laser.Enabled = false
				end

			else
				Evt.SVLaser:FireServer(Vector3.new(0,0,0),2,nil,ArmaClient,IRmode)
				Pointer:Destroy()
				LaserSP:Destroy()
				LaserEP:Destroy()
				Laser:Destroy()
			end

	end
	ArmaClone.Handle.Click:play()


end
if (key == "j") and Equipped and ArmaClone:FindFirstChild("FlashPoint") then
	LanternaAtiva = not LanternaAtiva
	ArmaClone.Handle.Click:play()
			if LanternaAtiva then
				Evt.SVFlash:FireServer(true,ArmaClient,ArmaClone.FlashPoint.Light.Angle,ArmaClone.FlashPoint.Light.Brightness,ArmaClone.FlashPoint.Light.Color,ArmaClone.FlashPoint.Light.Range)
				ArmaClone.FlashPoint.Light.Enabled = true
			else
				Evt.SVFlash:FireServer(false,ArmaClient,nil,nil,nil,nil)
				ArmaClone.FlashPoint.Light.Enabled = false
			end
end
if (key == "u") and Equipped and ArmaClone:FindFirstChild("Silenciador") then
	Silencer.Value = not Silencer.Value
	ArmaClone.Handle.Click:play()
			if Silencer.Value == true then
				ArmaClone.Silenciador.Transparency = 0
				ArmaClone.SmokePart.FlashFX.Brightness = 0
				ArmaClone.SmokePart:FindFirstChild("FlashFX[Flash]").Rate = 0

				Evt.SilencerEquip:FireServer(ArmaClient,Silencer.Value)
				
			else
				ArmaClone.Silenciador.Transparency = 1
				ArmaClone.SmokePart.FlashFX.Brightness = 5
				ArmaClone.SmokePart:FindFirstChild("FlashFX[Flash]").Rate = 1000

				Evt.SilencerEquip:FireServer(ArmaClient,Silencer.Value)
			end
end
if (key == "b") and Equipped and BipodEnabled and ArmaClone:FindFirstChild("BipodPoint") then
	Bipod = not Bipod
	if Bipod == true then
		if ArmaClone.BipodPoint:FindFirstChild("BipodDeploy") ~= nil then
			ArmaClone.BipodPoint.BipodDeploy:play()
		end
	else
		if ArmaClone.BipodPoint:FindFirstChild("BipodRetract") ~= nil then
			ArmaClone.BipodPoint.BipodRetract:play()
		end
	end
end
if (key == "n") and Laserdebounce == false then

		if Player.Character then
		local helmet = Player.Character:FindFirstChild("Helmet")
		if helmet then
			local nvg = helmet:FindFirstChild("Up")
			if nvg then
				Laserdebounce = true
				delay(.8,function()
					NVG = not NVG 

		if Aiming and ArmaClone.AimPart:FindFirstChild("NVAim") ~= nil then
		if NVG then
			tweenFoV(70,120)
			TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play()
		else
			if AimPartMode == 1 then
			tweenFoV(Settings.ChangeFOV[1],120)
			if Settings.FocusOnSight then
					TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play()
				else
					TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play()
				end
		elseif AimPartMode == 2 then
			tweenFoV(Settings.ChangeFOV[2],120)
			if Settings.FocusOnSight2 then
					TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play()
				else
					TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play()
				end
			end
		end
	end	
	Laserdebounce = false		
end)
			
				end
			end
		end
	end
end)