GUI.MobileButtons.FireButton.MouseButton1Down:connect(function()Down=true local Y=false if Equipped and(Enabled and(Down and(not Reloading and(not HoldDown and(Mag>0 and Humanoid.Health>0)))))then Enabled=false if Module.ChargedShotEnabled then if HandleToFire:FindFirstChild("\067\104\097\114\103\101\083\111\117\110\100")then HandleToFire.ChargeSound:Play()end wait(Module.ChargingTime)Y=true end if Module.MinigunEnabled then if HandleToFire:FindFirstChild("\087\105\110\100\085\112")then HandleToFire.WindUp:Play()end wait(Module.DelayBeforeFiring)end while Equipped and(not Reloading and(not HoldDown and((Down or Y)and(Mag>0 and Humanoid.Health>0))))do Y=false Player.PlayerScripts.BulletVisualizerScript.VisualizeM:Fire(nil,HandleToFire,Module.MuzzleFlashEnabled,{Module.MuzzleLightEnabled;Module.LightBrightness,Module.LightColor;Module.LightRange,Module.LightShadows,Module.VisibleTime},script:WaitForChild("\077\117\122\122\108\101\069\102\102\101\099\116"))VisualizeMuzzle:FireServer(HandleToFire,Module.MuzzleFlashEnabled,{Module.MuzzleLightEnabled,Module.LightBrightness,Module.LightColor;Module.LightRange,Module.LightShadows;Module.VisibleTime},script:WaitForChild("\077\117\122\122\108\101\069\102\102\101\099\116"))for Y=1,Module.BurstFireEnabled and Module.BulletPerBurst or 1,1 do spawn(RecoilCamera)EjectShell(HandleToFire)CrosshairModule.crossspring:accelerate(Module.CrossExpansion)for Y=1,Module.ShotgunEnabled and Module.BulletPerShot or 1,1 do Fire(HandleToFire,GUI.Crosshair.AbsolutePosition)end Mag=Mag-1 ChangeMagAndAmmo:FireServer(Mag,Ammo)UpdateGUI()if Module.BurstFireEnabled then wait(Module.BurstRate)end if Mag<=0 then break end end HandleToFire=(HandleToFire==Handle and Module.DualEnabled)and Handle2 or Handle wait(Module.FireRate)if not Module.Auto then break end end if HandleToFire.FireSound.Playing and HandleToFire.FireSound.Looped then HandleToFire.FireSound:Stop()end if Module.MinigunEnabled then if HandleToFire:FindFirstChild("\087\105\110\100\068\111\119\110")then HandleToFire.WindDown:Play()end wait(Module.DelayAfterFiring)end Enabled=true if Mag<=0 then Reload()end end end)


GUI.MobileButtons.FireButton.MouseButton1Down:connect(function()
	Down = true
	local IsChargedShot = false
	if Equipped and Enabled and Down and not Reloading and not HoldDown and Mag > 0 and Humanoid.Health > 0 then
		Enabled = false
		if Module.ChargedShotEnabled then
			if HandleToFire:FindFirstChild("ChargeSound") then HandleToFire.ChargeSound:Play() end
			wait(Module.ChargingTime)
			IsChargedShot = true
		end
		if Module.MinigunEnabled then
			if HandleToFire:FindFirstChild("WindUp") then HandleToFire.WindUp:Play() end
			wait(Module.DelayBeforeFiring)
		end
		while Equipped and not Reloading and not HoldDown and (Down or IsChargedShot) and Mag > 0 and Humanoid.Health > 0 do
			IsChargedShot = false
			
			Player.PlayerScripts.BulletVisualizerScript.VisualizeM:Fire(nil,HandleToFire,
				                                                       Module.MuzzleFlashEnabled,
			                                                          {Module.MuzzleLightEnabled,Module.LightBrightness,Module.LightColor,Module.LightRange,Module.LightShadows,Module.VisibleTime},
			                                                           script:WaitForChild("MuzzleEffect"))
			VisualizeMuzzle:FireServer(HandleToFire,
				            Module.MuzzleFlashEnabled,
						    {Module.MuzzleLightEnabled,Module.LightBrightness,Module.LightColor,Module.LightRange,Module.LightShadows,Module.VisibleTime},
						    script:WaitForChild("MuzzleEffect"))	
			
			for i = 1,(Module.BurstFireEnabled and Module.BulletPerBurst or 1) do
				spawn(RecoilCamera)
				EjectShell(HandleToFire)
				CrosshairModule.crossspring:accelerate(Module.CrossExpansion)		
				for x = 1,(Module.ShotgunEnabled and Module.BulletPerShot or 1) do
					Fire(HandleToFire, GUI.Crosshair.AbsolutePosition)
				end
				Mag = Mag - 1
				ChangeMagAndAmmo:FireServer(Mag,Ammo)
				UpdateGUI()
				if Module.BurstFireEnabled then wait(Module.BurstRate) end
				if Mag <= 0 then break end
			end
			HandleToFire = (HandleToFire == Handle and Module.DualEnabled) and Handle2 or Handle
			wait(Module.FireRate)
			if not Module.Auto then break end
		end
		if HandleToFire.FireSound.Playing and HandleToFire.FireSound.Looped then HandleToFire.FireSound:Stop() end
		if Module.MinigunEnabled then
			if HandleToFire:FindFirstChild("WindDown") then HandleToFire.WindDown:Play() end
			wait(Module.DelayAfterFiring)
		end
		Enabled = true
		if Mag <= 0 then Reload() end
	end
end)
