function lowerSpread()if not loweringSpread then loweringSpread=true local C=nil C=RS.Heartbeat:connect(function(Q)if MB1Down and Firing then C:disconnect()end local A=currentSpread-S.spreadSettings.Decrease*Q currentSpread=A<0 and 0 or A if currentSpread==0 then C:disconnect()end end)loweringSpread=false end end local function C()if not canFire then return end canFire=false if not Knifing then Firing=true while MB1Down and(not Reloading and(not isCrawling and not Knifing))do if Modes[(rawFireMode-1)%numModes+1]~="\065\085\084\079"then break end if Humanoid.Health==0 then break end if Ammo.Value>0 then Ammo.Value=Ammo.Value-1 if Aimed and(steadyKeyPressed and S.scopeSettings.unSteadyOnFire)then steadyKeyPressed=false currentSteadyTime=0 end newMag=false fireGun()end if S.reloadSettings.magIsBullet then for C,Q in pairs(Gun:GetChildren())do if Q.Name:sub(1,3)=="\077\097\103"then Q.Transparency=1 end end end if Ammo.Value==0 and S.reloadSettings.autoReload then wait(.2)Reload()end wait(60/S.roundsPerMin)end end Firing=false canFire=true end local function Q()if not canFire then return end canFire=false if not Knifing and(not isCrawling and Humanoid.Health~=0)then Firing=true if Ammo.Value>0 then Ammo.Value=Ammo.Value-1 if Aimed and(steadyKeyPressed and S.scopeSettings.unSteadyOnFire)then steadyKeyPressed=false currentSteadyTime=0 end newMag=false fireGun()end if S.reloadSettings.magIsBullet then for C,Q in pairs(Gun:GetChildren())do if Q.Name:sub(1,3)=="\077\097\103"then Q.Transparency=1 end end end if Ammo.Value==0 and S.reloadSettings.autoReload then wait(.2)Reload()end wait(60/S.roundsPerMin)end Firing=false canFire=true end local function A()if not canFire then return end canFire=false local C=60/S.roundsPerMin if not Knifing and not isCrawling then Firing=true for Q=1,S.burstSettings.Amount,1 do if Ammo.Value>0 then Ammo.Value=Ammo.Value-1 if Humanoid.Health~=0 then if Aimed and(steadyKeyPressed and S.scopeSettings.unSteadyOnFire)then steadyKeyPressed=false currentSteadyTime=0 end newMag=false fireGun()end end if Ammo.Value==0 and S.reloadSettings.autoReload then wait(.2)Reload()break end wait(S.burstSettings.fireRateBurst and C or S.burstSettings.Time/S.burstSettings.Amount)end end if S.reloadSettings.magIsBullet then for C,Q in pairs(Gun:GetChildren())do if Q.Name:sub(1,3)=="\077\097\103"then Q.Transparency=1 end end end Firing=false wait(S.burstSettings.fireRateBurst and C or S.burstSettings.Wait)canFire=true end function fireGun()local C=Handle:FindFirstChild("\070\105\114\101\083\111\117\110\100")if C then C:Play()end for C=1,S.gunType.Shot and S.ShotAmount or 1,1 do local Q=RAD(RAND(0,365))local A=RAD(RAND(-(baseSpread+currentSpread),baseSpread+currentSpread,.01))local m=CFrame.fromAxisAngle(V3(0,0,1),Q)*CFANG(A,0,0)local L=((Aimed and S.guiScope)and Head.CFrame or Handle.CFrame)*m local Y=(CF(L.p,L.p+L.lookVector)).lookVector if S.bulletSettings.instantHit then local Q=Ray.new(Main.CFrame.p,Y*S.bulletSettings.Range)local A,m,L=workspace:FindPartOnRayWithIgnoreList(Q,Ignore)local q=m if A then if S.gunType.Explosive then if S.explosionSettings.soundId~=""then local C=Instance.new("\080\097\114\116")C.Transparency=1 C.Anchored=true C.CanCollide=false C.Size=V3(1,1,1)C.CFrame=CFrame.new(m)C.Parent=gunIgnore local Q=Instance.new("\083\111\117\110\100")Q.Pitch=S.explosionSettings.Pitch Q.SoundId=S.explosionSettings.soundId Q.Volume=S.explosionSettings.Volume Q.Parent=C Q:Play()DS:AddItem(C,Q.TimeLength)end createBulletImpact:FireServer(A,m,L,Y,false,gunIgnore,S)createShockwave:FireServer(m,S.explosionSettings.Radius,gunIgnore,S)local C=Instance.new("\069\120\112\108\111\115\105\111\110")C.BlastPressure=S.explosionSettings.Pressure C.BlastRadius=S.explosionSettings.Radius C.DestroyJointRadiusPercent=S.explosionSettings.rangeBasedDamage and 0 or 1 C.ExplosionType=S.explosionSettings.Type C.Position=m C.Hit:connect(function(C,Q)if C.Name=="\084\111\114\115\111"and not C:IsDescendantOf(Char)then if S.explosionSettings.rangeBasedDamage then local A=(C.Position-m).unit local L,Y=workspace:FindPartOnRayWithIgnoreList(Ray.new(m-A*.1,A*999),Ignore)local q=L:IsDescendantOf(C.Parent)if S.explosionSettings.rayCastExplosions and q or not S.explosionSettings.rayCastExplosions then local A=findFirstClass(C.Parent,"\072\117\109\097\110\111\105\100")if A and(A.Health>0 and isEnemy(A))then local C=Q/S.explosionSettings.Radius local L=math.max(1-C,0)local Y=L*getBaseDamage((m-Main.CFrame.p).magnitude)local q=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")q.Value=Player q.Name="\099\114\101\097\116\111\114"q.Parent=A DS:AddItem(q,.3)A:TakeDamage(Y)markHit()end end else local Q=findFirstClass(C.Parent,"\072\117\109\097\110\111\105\100")if Q and(Q.Health>0 and isEnemy(Q))then local C=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")C.Value=Player C.Name="\099\114\101\097\116\111\114"C.Parent=Q DS:AddItem(C,.3)markHit()end end end end)C.Parent=game.Workspace else C,q=penetrateWall(A,m,Y,L,{Char;ignoreModel},0,(m-Main.CFrame.p).magnitude,nil)end end if S.bulletTrail and S.trailSettings.Transparency~=1 then createTrail:FireServer(Main.CFrame.p,q,gunIgnore,S)end else local C=Instance.new("\080\097\114\116")C.CFrame=Gun.Chamber.CFrame*CFrame.fromEulerAnglesXYZ(-1.5,0,0)C.Size=Vector3.new(1,1,1)C.BrickColor=BrickColor.new(24)C.Reflectance=.5 C.CanCollide=false C.BottomSurface=0 C.TopSurface=0 C.Name="\083\104\101\108\108"C.Velocity=Gun.Chamber.CFrame.lookVector*30+Vector3.new(math.random(-10,10),20,math.random(-10,10))C.RotVelocity=Vector3.new(0,200,0)local Q=Instance.new("\067\121\108\105\110\100\101\114\077\101\115\104")Q.Scale=Vector3.new(.1,.8,.1)Q.Parent=C C.Parent=game.Workspace;(game:GetService("\068\101\098\114\105\115")):addItem(C,2)local A=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")A.Scale=Vector3.new(.9,.9,3)A.MeshId="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\057\053\051\056\055\055\053\057"A.TextureId="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\057\053\051\056\055\055\056\057"A.MeshType="\070\105\108\101\077\101\115\104"A.Parent=C end end function MarkHit()spawn(function()if Gui_Clone:IsDescendantOf(game)then Gui_Clone.HitMarker.Visible=true local C=tick()LastMark=C wait(.5)if LastMark<=C then Gui_Clone.HitMarker.Visible=false end end end)end currentSpread=currentSpread+S.spreadSettings.Increase for C,Q in pairs(Plugins.Firing)do spawn(function()Q()end)end local Q=RAND(S.recoilSettings.Recoil.Back.Min,S.recoilSettings.Recoil.Back.Max,.01)local A=RAND(S.recoilSettings.Recoil.Up.Min,S.recoilSettings.Recoil.Up.Max,.01)local m=0 if lastSideRecoil[1]<0 and lastSideRecoil[2]<0 then m=RAND(0,1,.1)elseif lastSideRecoil[1]>0 and lastSideRecoil[2]>0 then m=RAND(-1,0,.1)else m=RAND(-1,1,.1)end local L=numLerp(S.recoilSettings.Recoil.Side.Left,S.recoilSettings.Recoil.Side.Right,m/2+.5)local Y=numLerp(S.recoilSettings.Recoil.Tilt.Left,S.recoilSettings.Recoil.Tilt.Right,m/2+.5)local q=V3(0,0,-Q)*(Aimed and S.recoilSettings.aimedMultiplier or 1)local N=V3(Aimed and 0 or-RAD(A*10)*(firstShot and S.recoilSettings.firstShotMultiplier or 1),RAD(L*10),RAD(Y*10))*(Aimed and S.recoilSettings.aimedMultiplier or 1)local M=(V3(-RAD(L*10),(RAD(A*10)*(firstShot and S.recoilSettings.firstShotMultiplier or 1))*S.recoilSettings.camMultiplier,0)*(Aimed and S.recoilSettings.aimedMultiplier or 1))*stanceSway tweenRecoil(q,N,Sine,.2)tweenCam("\082\101\099\111\105\108",M,Sine,.15*(firstShot and S.recoilSettings.firstShotMultiplier or 1))for C,Q in pairs(Main:GetChildren())do if Q.Name:sub(1,7)=="\070\108\097\115\104\070\088"then Q.Enabled=true end end local O=Instance.new("\080\097\114\116")O.CFrame=Gun.Chamber.CFrame*CFrame.fromEulerAnglesXYZ(-1.5,0,0)O.Size=Vector3.new(.2,.5,.2)O.CanCollide=true O.Name="\083\104\101\108\108"O.Velocity=Gun.Chamber.CFrame.lookVector*30+Vector3.new(math.random(-10,10),20,math.random(-10,10))O.RotVelocity=Vector3.new(0,200,0)O.Parent=game.Workspace;(game:GetService("\068\101\098\114\105\115")):addItem(O,2)local E=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")E.Scale=Vector3.new(.5,.5,.5)E.MeshId="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\057\052\050\052\056\049\050\052"E.TextureId="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\057\052\050\049\057\052\055\048"E.MeshType="\070\105\108\101\077\101\115\104"E.Parent=O delay(.05,function()tweenRecoil(V3(),V3(),Sine,.2)tweenCam("\082\101\099\111\105\108",V3(),Sine,.2)for C,Q in pairs(Main:GetChildren())do if Q.Name:sub(1,7)=="\070\108\097\115\104\070\088"then Q.Enabled=false end end end)updateClipAmmo()firstShot=false shotCount=shotCount+1 lastSideRecoil[shotCount%2+1]=m end function markHit()spawn(function()if mainGUI:IsDescendantOf(game)then hitMarker.Visible=true local C=tick()hitMarker.lastMark.Value=C wait(.5)if hitMarker.lastMark.Value<=C then hitMarker.Visible=false end end end)end


function lowerSpread()
	if (not loweringSpread) then
		loweringSpread = true
		local Connection = nil
		Connection = RS.Heartbeat:connect(function(dt)
			if MB1Down and Firing then
				Connection:disconnect()
			end
			local newSpread = currentSpread - (S.spreadSettings.Decrease * dt)
			currentSpread = (newSpread < 0 and 0 or newSpread)
			if currentSpread == 0 then
				Connection:disconnect()
			end
		end)
		loweringSpread = false
	end
end

local function autoFire()
	if (not canFire) then return end
	canFire = false
	
	if (not Knifing) then
		Firing = true
		while MB1Down and (not Reloading) and (not isCrawling) and (not Knifing) do
			if Modes[((rawFireMode - 1) % numModes) + 1] ~= "AUTO" then break end
			if Humanoid.Health == 0 then break end
			if Ammo.Value > 0 then
				Ammo.Value = Ammo.Value - 1
				if Aimed and steadyKeyPressed and S.scopeSettings.unSteadyOnFire then
					steadyKeyPressed = false
					currentSteadyTime = 0
				end
				newMag = false
				fireGun()
			end
			if S.reloadSettings.magIsBullet then
				for _, Mag in pairs(Gun:GetChildren()) do
					if Mag.Name:sub(1, 3) == "Mag" then
						Mag.Transparency = 1
					end
				end
			end
			if Ammo.Value == 0 and S.reloadSettings.autoReload then
				wait(0.2)
				Reload()
			end
			wait(60 / S.roundsPerMin)
		end
	end
	
	Firing = false
	canFire = true
end

local function semiFire()
	if (not canFire) then return end
	canFire = false
	
	if (not Knifing) and (not isCrawling) and Humanoid.Health ~= 0 then
		Firing = true
		if Ammo.Value > 0 then
			Ammo.Value = Ammo.Value - 1
			if Aimed and steadyKeyPressed and S.scopeSettings.unSteadyOnFire then
				steadyKeyPressed = false
				currentSteadyTime = 0
			end
			newMag = false
			fireGun()
		end
		if S.reloadSettings.magIsBullet then
			for _, Mag in pairs(Gun:GetChildren()) do
				if Mag.Name:sub(1, 3) == "Mag" then
					Mag.Transparency = 1
				end
			end
		end
		if Ammo.Value == 0 and S.reloadSettings.autoReload then
			wait(0.2)
			Reload()
		end
		wait(60 / S.roundsPerMin)
	end
	
	Firing = false
	canFire = true
end

local function burstFire()
	if (not canFire) then return end
	canFire = false
	
	local burstTime = 60 / S.roundsPerMin
	if (not Knifing) and (not isCrawling) then
		Firing = true
		for i = 1, S.burstSettings.Amount do
			if Ammo.Value > 0 then
				Ammo.Value = Ammo.Value - 1
				if Humanoid.Health ~= 0 then
					if Aimed and steadyKeyPressed and S.scopeSettings.unSteadyOnFire then
						steadyKeyPressed = false
						currentSteadyTime = 0
					end
					newMag = false
					fireGun()
				end
			end
			if Ammo.Value == 0 and S.reloadSettings.autoReload then
				wait(0.2)
				Reload()
				break
			end
			wait(S.burstSettings.fireRateBurst and burstTime or S.burstSettings.Time / S.burstSettings.Amount)
		end
	end
	if S.reloadSettings.magIsBullet then
		for _, Mag in pairs(Gun:GetChildren()) do
			if Mag.Name:sub(1, 3) == "Mag" then
				Mag.Transparency = 1
			end
		end
	end
	
	Firing = false
	
	wait(S.burstSettings.fireRateBurst and burstTime or S.burstSettings.Wait)
	
	canFire = true
end

function fireGun()
	local fireSound = Handle:FindFirstChild("FireSound")
	if fireSound then fireSound:Play() end
	----------------------------------------------------------------------------------
	for _ = 1, (S.gunType.Shot and S.ShotAmount or 1) do
		local randSpread1 = RAD(RAND(0, 365))
		local randSpread2 = RAD(RAND(-(baseSpread + currentSpread), baseSpread + currentSpread, 0.01))
		local spreadDir = CFrame.fromAxisAngle(V3(0, 0, 1), randSpread1) * CFANG(randSpread2, 0, 0)
		
		local originCF = ((Aimed and S.guiScope) and Head.CFrame or Handle.CFrame) * spreadDir
		local bulletDirection = CF(originCF.p, originCF.p + originCF.lookVector).lookVector
		
		if S.bulletSettings.instantHit then
			local newRay = Ray.new(Main.CFrame.p, bulletDirection * S.bulletSettings.Range)
			local H, P, N = workspace:FindPartOnRayWithIgnoreList(newRay, Ignore)
			local finalP = P
			if H then
				if S.gunType.Explosive then
					if S.explosionSettings.soundId ~= "" then
						local soundPart = Instance.new("Part")
						soundPart.Transparency = 1
						soundPart.Anchored = true
						soundPart.CanCollide = false
						soundPart.Size = V3(1, 1, 1)
						soundPart.CFrame = CFrame.new(P)
						soundPart.Parent = gunIgnore
						
						local Sound = Instance.new("Sound")
						Sound.Pitch = S.explosionSettings.Pitch
						Sound.SoundId = S.explosionSettings.soundId
						Sound.Volume = S.explosionSettings.Volume
						Sound.Parent = soundPart
						Sound:Play()
						
						DS:AddItem(soundPart, Sound.TimeLength)
					end
					createBulletImpact:FireServer(H, P, N, bulletDirection, false, gunIgnore, S)
					createShockwave:FireServer(P, S.explosionSettings.Radius, gunIgnore, S)
					local E = Instance.new("Explosion")
					E.BlastPressure = S.explosionSettings.Pressure
					E.BlastRadius = S.explosionSettings.Radius
					E.DestroyJointRadiusPercent = (S.explosionSettings.rangeBasedDamage and 0 or 1)
					E.ExplosionType = S.explosionSettings.Type
					E.Position = P
					E.Hit:connect(function(Obj, Dist)
						if Obj.Name == "Torso" and (not Obj:IsDescendantOf(Char)) then
							if S.explosionSettings.rangeBasedDamage then
								local Dir = (Obj.Position - P).unit
								local expH, _ = workspace:FindPartOnRayWithIgnoreList(
									Ray.new(P - Dir * 0.1, Dir * 999),
									Ignore
								)
								local rayHitHuman = expH:IsDescendantOf(Obj.Parent)
								if (S.explosionSettings.rayCastExplosions and rayHitHuman) or (not S.explosionSettings.rayCastExplosions) then
									local hitHumanoid = findFirstClass(Obj.Parent, "Humanoid")
									if hitHumanoid and hitHumanoid.Health > 0 and isEnemy(hitHumanoid) then
										local distFactor = Dist / S.explosionSettings.Radius
										local distInvert = math.max(1 - distFactor,0)
										local newDamage = distInvert * getBaseDamage((P - Main.CFrame.p).magnitude)
										
										local Tag = Instance.new("ObjectValue")
										Tag.Value = Player
										Tag.Name = "creator"
										Tag.Parent = hitHumanoid
										DS:AddItem(Tag, 0.3)
										hitHumanoid:TakeDamage(newDamage)
										markHit()
									end
								end
							else
								local hitHumanoid = findFirstClass(Obj.Parent, "Humanoid")
								if hitHumanoid and hitHumanoid.Health > 0 and isEnemy(hitHumanoid) then
									local Tag = Instance.new("ObjectValue")
									Tag.Value = Player
									Tag.Name = "creator"
									Tag.Parent = hitHumanoid
									DS:AddItem(Tag, 0.3)
									markHit()
								end
							end
						end
					end)
					E.Parent = game.Workspace
				else
					_, finalP = penetrateWall(H, P, bulletDirection, N, {Char, ignoreModel}, 0, (P - Main.CFrame.p).magnitude, nil)
				end
			end
			if S.bulletTrail and S.trailSettings.Transparency ~= 1 then
				createTrail:FireServer(Main.CFrame.p, finalP, gunIgnore, S)
			end
		else
				local shell = Instance.new("Part")
	shell.CFrame = Gun.Chamber.CFrame * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
	shell.Size = Vector3.new(1,1,1)
	shell.BrickColor = BrickColor.new(24)
	shell.Reflectance = .5
	shell.CanCollide = false	
	shell.BottomSurface = 0
	shell.TopSurface = 0
	shell.Name = "Shell"
	shell.Velocity = Gun.Chamber.CFrame.lookVector * 30 + Vector3.new(math.random(-10,10),20,math.random(-10,10))
	shell.RotVelocity = Vector3.new(0,200,0)
	local shellmesh = Instance.new("CylinderMesh")
	shellmesh.Scale = Vector3.new(0.1, 0.8, 0.1)
	shellmesh.Parent = shell
	shell.Parent = game.Workspace
	game:GetService("Debris"):addItem(shell,2)
	
	local shellmesh = Instance.new("SpecialMesh")
	shellmesh.Scale = Vector3.new(0.9,0.9,3)
	shellmesh.MeshId = "http://www.roblox.com/asset/?id=95387759"
	shellmesh.TextureId = "http://www.roblox.com/asset/?id=95387789"
	shellmesh.MeshType = "FileMesh"
	shellmesh.Parent = shell
		end
	end
	function MarkHit()
	spawn(function()
		if Gui_Clone:IsDescendantOf(game) then
			Gui_Clone.HitMarker.Visible = true
			local StartMark = tick()
			LastMark = StartMark
			wait(0.5)
			if LastMark <= StartMark then
				Gui_Clone.HitMarker.Visible = false
			end
		end
	end)
end
	
	----------------------------------------------------------------------------------
	
	currentSpread = currentSpread + S.spreadSettings.Increase
	
	for _, Plugin in pairs(Plugins.Firing) do
		spawn(function()
			Plugin()
		end)
	end
	
	local backRecoil = RAND(S.recoilSettings.Recoil.Back.Min, S.recoilSettings.Recoil.Back.Max, 0.01) --Get the kickback recoil
	local upRecoil = RAND(S.recoilSettings.Recoil.Up.Min, S.recoilSettings.Recoil.Up.Max, 0.01) --Get the up recoil
	local sideRecoilAlpha = 0
	if lastSideRecoil[1] < 0 and lastSideRecoil[2] < 0 then --This conditional basically makes sure the gun tilt isn't in the same direction for more than 2 shots
		sideRecoilAlpha = RAND(0, 1, 0.1)
	elseif lastSideRecoil[1] > 0 and lastSideRecoil[2] > 0 then
		sideRecoilAlpha = RAND(-1, 0, 0.1)
	else
		sideRecoilAlpha = RAND(-1, 1, 0.1)
	end
	local sideRecoil = numLerp(S.recoilSettings.Recoil.Side.Left, S.recoilSettings.Recoil.Side.Right, sideRecoilAlpha / 2 + 0.5) --Get the side recoil
	local tiltRecoil = numLerp(S.recoilSettings.Recoil.Tilt.Left, S.recoilSettings.Recoil.Tilt.Right, sideRecoilAlpha / 2 + 0.5) --Get the tilt recoil
	local recoilPos = V3(
		0,---sideRecoil,
		0,
		-backRecoil
	) * (Aimed and S.recoilSettings.aimedMultiplier or 1)
	local recoilRot = V3(
		(Aimed and 0 or (-RAD(upRecoil * 10) * (firstShot and S.recoilSettings.firstShotMultiplier or 1))),
		RAD(sideRecoil * 10),
		RAD(tiltRecoil * 10)
	) * (Aimed and S.recoilSettings.aimedMultiplier or 1)
	local camRecoilRot = V3(
		-RAD(sideRecoil * 10),
		RAD(upRecoil * 10) * (firstShot and S.recoilSettings.firstShotMultiplier or 1) * S.recoilSettings.camMultiplier,
		0
	) * (Aimed and S.recoilSettings.aimedMultiplier or 1) * stanceSway
	tweenRecoil(recoilPos, recoilRot, Sine, 0.2)
	tweenCam("Recoil", camRecoilRot, Sine, 0.15 * (firstShot and S.recoilSettings.firstShotMultiplier or 1))
	
	for _, v in pairs(Main:GetChildren()) do
		if v.Name:sub(1, 7) == "FlashFX" then
			v.Enabled = true
		end
	end
			local shell = Instance.new("Part")
	shell.CFrame = Gun.Chamber.CFrame * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
	shell.Size = Vector3.new(0.2,0.5,0.2)
	shell.CanCollide = true	
	shell.Name = "Shell"
	shell.Velocity = Gun.Chamber.CFrame.lookVector * 30 + Vector3.new(math.random(-10,10),20,math.random(-10,10))
	shell.RotVelocity = Vector3.new(0,200,0)
	shell.Parent = game.Workspace
	game:GetService("Debris"):addItem(shell,2)
	local shellmesh = Instance.new("SpecialMesh")
	shellmesh.Scale = Vector3.new(0.5,0.5,0.5)
	shellmesh.MeshId = "http://www.roblox.com/asset/?id=94248124"
	shellmesh.TextureId = "http://www.roblox.com/asset/?id=94219470"
	shellmesh.MeshType = "FileMesh"
	shellmesh.Parent = shell
	delay(1 / 20, function()
		tweenRecoil(V3(), V3(), Sine, 0.2)
		tweenCam("Recoil", V3(), Sine, 0.2)
		for _, v in pairs(Main:GetChildren()) do
			if v.Name:sub(1, 7) == "FlashFX" then
				v.Enabled = false
			end
		end
	end)
	
	updateClipAmmo()
	firstShot = false
	shotCount = shotCount + 1
	lastSideRecoil[(shotCount % 2) + 1] = sideRecoilAlpha
end

function markHit()
	spawn(function()
		if mainGUI:IsDescendantOf(game) then
			hitMarker.Visible = true
			local startMark = tick()
			hitMarker.lastMark.Value = startMark
			
			wait(0.5)
			
			if hitMarker.lastMark.Value <= startMark then
				hitMarker.Visible = false
			end
		end
	end)
end
