function Fire_Gun()local e=Main:FindFirstChild("\070\105\114\101\083\111\117\110\100")local z=Main:FindFirstChild("\080\097\114\116\105\099\108\101\070\088")local l=Main:FindFirstChild("\070\108\097\115\104\070\088")if e then e:Play()end local E=(not Aimed and(CurrentSpread<=S.Spread.Max and Idleing))and CurrentSpread*S.Spread.Multiplier or CurrentSpread CurrentSpread=E>=S.Spread.Max and S.Spread.Max or E for e=1,S.GunType.Shot and S.ShotAmount or 1,1 do local z=CFANG(RAD(RAND(-CurrentSpread,CurrentSpread)/20),RAD(RAND(-CurrentSpread,CurrentSpread)/20),RAD(RAND(-CurrentSpread,CurrentSpread)/20))local l=Aimed and(S.GuiScope and Head.CFrame or Handle.CFrame)or Head.CFrame local E=Main.CFrame.p local s=(CF(l.p,l.p+l.lookVector)*z).lookVector if S.InstantHit then local e,z=AdvRayCast(Main.CFrame.p,s,S.BulletRange)local l=nil if e then if S.GunType.Explosive then if S.ExplosionSound~=""then local e=Instance.new("\080\097\114\116")e.Transparency=1 e.Anchored=true e.CanCollide=false e.CFrame=CFrame.new(z)e.Parent=game.Workspace local l=Instance.new("\083\111\117\110\100")l.Pitch=S.ExplosionSoundPitch l.SoundId=S.ExplosionSound l.Volume=S.ExplosionSoundVolume l.Parent=e l:Play()delay(.05,function()e:Destroy()end)end CreateBulletHole(z,e)CreateShockwave(z,S.ExplosionRadius)local l=Instance.new("\069\120\112\108\111\115\105\111\110")l.BlastPressure=S.ExplosionPressure l.BlastRadius=S.ExplosionRadius l.DestroyJointRadiusPercent=S.RangeBasedDamage and 0 or 1 l.ExplosionType=S.ExplosionType l.Position=z l.Hit:connect(function(e,l)if e.Name=="\084\111\114\115\111"and not e:IsDescendantOf(Character)then if S.RangeBasedDamage then local E=(e.Position-z).unit local s,B=AdvRayCast(z-E,E,999)local f=s:IsDescendantOf(e.Parent)if S.RayCastExplosions and f or not S.RayCastExplosions then local z=FindFirstClass(e.Parent,"\072\117\109\097\110\111\105\100")if z and(z.Health>0 and IsEnemy(z))then local e=l/S.ExplosionRadius local E=math.max(1-e,0)local s=E*S.Damage local B=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")B.Value=Player B.Name="\099\114\101\097\116\111\114"B.Parent=z z:TakeDamage(s)MarkHit()end end else local S=FindFirstClass(e.Parent,"\072\117\109\097\110\111\105\100")if S and(S.Health>0 and IsEnemy(S))then local e=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")e.Value=Player e.Name="\099\114\101\097\116\111\114"e.Parent=S MarkHit()end end end end)l.Parent=game.Workspace else l=Damage(e,z)end end local B=z if S.Penetration>0 and not S.GunType.Explosive then B=PenetrateWall(z,s,l,E)end if S.BulletTrail and S.TrailTransparency~=1 then local e=Instance.new("\080\097\114\116")e.BrickColor=S.TrailColor e.Transparency=S.TrailTransparency e.Anchored=true e.CanCollide=false e.Size=VEC3(1,1,1)local z=Instance.new("\066\108\111\099\107\077\101\115\104")z.Offset=VEC3(0,0,-(B-E).magnitude/2)z.Scale=VEC3(S.TrailThickness,S.TrailThickness,(B-E).magnitude)z.Parent=e e.Parent=Gun_Ignore e.CFrame=CF(E,B)delay(S.TrailVisibleTime,function()if S.TrailDisappearTime>0 then local z=0 while true do if z==90 then break end if not Selected then break end local l=z+1.5/S.TrailDisappearTime z=l>90 and 90 or l local E=z/90 e.Transparency=NumLerp(S.TrailTransparency,1,E)RS:wait()end e:Destroy()else e:Destroy()end end)end else local e=CreateBullet(s)local z=Main.CFrame.p local l=0 local B=nil spawn(function()while true do RS:wait()if l>=S.BulletRange then e:Destroy()break end local s=(e.Position-z).magnitude local f,m=AdvRayCast(z,(e.Position-z).unit,s)if f then if S.GunType.Explosive then if S.ExplosionSound~=""then local z=Instance.new("\083\111\117\110\100")z.Pitch=S.ExplosionSoundPitch z.SoundId=S.ExplosionSound z.Volume=S.ExplosionSoundVolume z.Parent=e z:Play()end CreateBulletHole(m,f)CreateShockwave(m,S.ExplosionRadius)local z=Instance.new("\069\120\112\108\111\115\105\111\110")z.BlastPressure=S.ExplosionPressure z.BlastRadius=S.ExplosionRadius z.DestroyJointRadiusPercent=S.RangeBasedDamage and 0 or 1 z.ExplosionType=S.ExplosionType z.Position=m z.Hit:connect(function(e,z)if e.Name=="\084\111\114\115\111"and not e:IsDescendantOf(Character)then if S.RangeBasedDamage then local l=(e.Position-m).unit local E,s=AdvRayCast(m-l,l,999)local B=E:IsDescendantOf(e.Parent)if S.RayCastExplosions and B or not S.RayCastExplosions then local l=FindFirstClass(e.Parent,"\072\117\109\097\110\111\105\100")if l and(l.Health>0 and IsEnemy(l))then local e=z/S.ExplosionRadius local E=math.max(1-e,0)local s=E*S.Damage local B=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")B.Value=Player B.Name="\099\114\101\097\116\111\114"B.Parent=l l:TakeDamage(s)MarkHit()end end else local S=FindFirstClass(e.Parent,"\072\117\109\097\110\111\105\100")if S and(S.Health>0 and IsEnemy(S))then local e=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")e.Value=Player e.Name="\099\114\101\097\116\111\114"e.Parent=S MarkHit()end end end end)z.Parent=game.Workspace else B=Damage(f,m)end if S.Penetration>0 and not S.GunType.Explosive then PenetrateWall(m,(e.Position-z).unit,B,E,e)else e:Destroy()end break else z=e.Position l=l+s end end end)if S.BulletTrail and S.TrailTransparency~=1 then spawn(function()local z=nil while true do if z then if not e:IsDescendantOf(game)then break end e.CFrame=CFrame.new(e.CFrame.p,e.CFrame.p+e.Velocity)local l=Instance.new("\080\097\114\116")l.BrickColor=S.TrailColor l.Transparency=S.TrailTransparency l.Anchored=true l.CanCollide=false l.Size=VEC3(1,1,1)local E=Instance.new("\066\108\111\099\107\077\101\115\104")E.Offset=VEC3(0,0,-(e.Position-z).magnitude/2)E.Scale=VEC3(S.TrailThickness,S.TrailThickness,(e.Position-z).magnitude)E.Parent=l l.Parent=Gun_Ignore l.CFrame=CF(z,e.Position)delay(S.TrailVisibleTime,function()if S.TrailDisappearTime>0 then local e=0 while true do if e==90 then break end if not Selected then break end local z=e+1.5/S.TrailDisappearTime e=z>90 and 90 or z local E=e/90 l.Transparency=NumLerp(S.TrailTransparency,1,E)RS:wait()end l:Destroy()else l:Destroy()end end)z=e.Position else z=Main.CFrame.p end RS:wait()end end)end end end local s=RAD(CurrentRecoil*RAND(1,1.5,.1))*StanceSway local B=RAD(CurrentRecoil*RAND(-2,2,.1))*StanceSway RotCamera(s,B,true,.06)delay(.05,function()RotCamera(-s/5,-B/5,true,.1)end)if Idleing and(not Walking and not Aimed)then local e=(CurrentSpread/S.Spread.Max)*50 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(UDim2.new(0,70+2*e,0,70+2*e),UDim2.new(0,-35-e,0,-35-e),"\079\117\116","\076\105\110\101\097\114",.1,true)end local f=({CurrentRecoil*(RAND(1,5,1)/150);CurrentRecoil*(RAND(1,5,1)/-150)})[math.random(1,2)]*StanceSway local m=(CurrentRecoil*StanceSway)*.3 local y=RAD(90+(CurrentRecoil*RAND(1.3,1.4,.01))*StanceSway)TweenJoint(AnimWeld,CF(f,1,-m),CFANG(y-RAD(90),0,0),Linear,.083333333333333)if l then l.Enabled=true Gun.A1.Mesh.Offset=Vector3.new(0,-0.4,0)Gun.A2.Mesh.Offset=Vector3.new(0,0,-0.4)Gun.Bolt.Transparency=1 Gun.BoltBack.Transparency=0 Gun.Main.FX.Enabled=true end if z then z.Enabled=true z.Label.Rotation=RAND(0,360)end delay(.033333333333333,function()if Idleing and(not Walking and not Aimed)then Gui_Clone.CrossHair.Box:TweenSizeAndPosition(UDim2.new(0,70,0,70),UDim2.new(0,-35,0,-35),"\079\117\116","\076\105\110\101\097\114",S.AimSpeed,not Aimed)end if not Aiming and not RunTween then TweenJoint(AnimWeld,CF(0,1,0),CF(),Linear,.15)end if l then l.Enabled=false end if z then z.Enabled=false end Gun.A1.Mesh.Offset=Vector3.new(0,0,0)Gun.A2.Mesh.Offset=Vector3.new(0,0,0)Gun.Bolt.Transparency=0 Gun.BoltBack.Transparency=1 Gun.Main.FX.Enabled=false local e=Instance.new("\080\097\114\116")e.CFrame=Gun.Chamber.CFrame*CFrame.fromEulerAnglesXYZ(-1.5,0,0)e.Size=Vector3.new(1,1,1)e.BrickColor=BrickColor.new(24)e.Reflectance=.5 e.CanCollide=false e.BottomSurface=0 e.TopSurface=0 e.Name="\083\104\101\108\108"e.Velocity=Gun.Chamber.CFrame.lookVector*30+Vector3.new(math.random(-10,10),20,math.random(-10,10))e.RotVelocity=Vector3.new(0,200,0)local E=Instance.new("\067\121\108\105\110\100\101\114\077\101\115\104")E.Scale=Vector3.new(.1,.8,.1)E.Parent=e e.Parent=game.Workspace;(game:GetService("\068\101\098\114\105\115")):addItem(e,2)local s=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")s.Scale=Vector3.new(.9,.9,3)s.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"s.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"s.MeshType="\070\105\108\101\077\101\115\104"s.Parent=e end)end function MarkHit()spawn(function()if Gui_Clone:IsDescendantOf(game)then Gui_Clone.HitMarker.Visible=true local S=tick()LastMark=S wait(.5)if LastMark<=S then Gui_Clone.HitMarker.Visible=false end end end)end


function Fire_Gun()
	local FireSound = Main:FindFirstChild("FireSound")
	local FlashGui = Main:FindFirstChild("ParticleFX")
	local FlashFX = Main:FindFirstChild("FlashFX")
				
	if FireSound then FireSound:Play() end
	
	local MockSpread = (
		((not Aimed) and CurrentSpread <= S.Spread.Max and Idleing)
		and CurrentSpread * S.Spread.Multiplier or CurrentSpread
	)
	CurrentSpread = (MockSpread >= S.Spread.Max and S.Spread.Max or MockSpread)
	
	----------------------------------------------------------------------------------
	for _ = 1, (S.GunType.Shot and S.ShotAmount or 1) do
		local BSpread = CFANG(
			RAD(RAND(-CurrentSpread, CurrentSpread) / 20),
			RAD(RAND(-CurrentSpread, CurrentSpread) / 20),
			RAD(RAND(-CurrentSpread, CurrentSpread) / 20)
		)
		local OriginCF = (Aimed and (S.GuiScope and Head.CFrame or Handle.CFrame) or Head.CFrame)
		local OriginPos = Main.CFrame.p
		local Direction = (CF(OriginCF.p, OriginCF.p + OriginCF.lookVector) * BSpread).lookVector
		
		if S.InstantHit then
			local HitObj, HitPos = AdvRayCast(Main.CFrame.p, Direction, S.BulletRange)
			local HitHumanoid = nil
			if HitObj then
				if S.GunType.Explosive then
					if S.ExplosionSound ~= "" then
						local SoundPart = Instance.new("Part")
						SoundPart.Transparency = 1
						SoundPart.Anchored = true
						SoundPart.CanCollide = false
						SoundPart.CFrame = CFrame.new(HitPos)
						SoundPart.Parent = game.Workspace
						
						local Sound = Instance.new("Sound")
						Sound.Pitch = S.ExplosionSoundPitch
						Sound.SoundId = S.ExplosionSound
						Sound.Volume = S.ExplosionSoundVolume
						Sound.Parent = SoundPart
						Sound:Play()
						
						delay(1 / 20, function()
							SoundPart:Destroy()
						end)
					end
					CreateBulletHole(HitPos, HitObj)
					CreateShockwave(HitPos, S.ExplosionRadius)
					local E = Instance.new("Explosion")
					E.BlastPressure = S.ExplosionPressure
					E.BlastRadius = S.ExplosionRadius
					E.DestroyJointRadiusPercent = (S.RangeBasedDamage and 0 or 1)
					E.ExplosionType = S.ExplosionType
					E.Position = HitPos
					E.Hit:connect(function(HObj, HDist)
						if HObj.Name == "Torso" and (not HObj:IsDescendantOf(Character)) then
							if S.RangeBasedDamage then
								local Dir = (HObj.Position - HitPos).unit
								local H, P = AdvRayCast(HitPos - Dir, Dir, 999)
								local RayHitHuman = H:IsDescendantOf(HObj.Parent)
								if (S.RayCastExplosions and RayHitHuman) or (not S.RayCastExplosions) then
									local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
									if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
										local DistFactor = HDist / S.ExplosionRadius
										local DistInvert = math.max(1 - DistFactor,0)
										local NewDamage = DistInvert * S.Damage
										
										local CreatorTag = Instance.new("ObjectValue")
										CreatorTag.Value = Player
										CreatorTag.Name = "creator"
										CreatorTag.Parent = HitHumanoid
										HitHumanoid:TakeDamage(NewDamage)
										MarkHit()
									end
								end
							else
								local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
								if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
									local CreatorTag = Instance.new("ObjectValue")
									CreatorTag.Value = Player
									CreatorTag.Name = "creator"
									CreatorTag.Parent = HitHumanoid
									MarkHit()
								end
							end
						end
					end)
					E.Parent = game.Workspace
				else
					HitHumanoid = Damage(HitObj, HitPos)
				end
			end
			local FinalHitPos = HitPos
			if S.Penetration > 0 and (not S.GunType.Explosive) then
				FinalHitPos = PenetrateWall(HitPos, Direction, HitHumanoid, OriginPos)
			end
			if S.BulletTrail and S.TrailTransparency ~= 1 then
				local Trail = Instance.new("Part")
				Trail.BrickColor = S.TrailColor
				Trail.Transparency = S.TrailTransparency
				Trail.Anchored = true
				Trail.CanCollide = false
				Trail.Size = VEC3(1, 1, 1)
				local Mesh = Instance.new("BlockMesh")
				Mesh.Offset = VEC3(0, 0, -(FinalHitPos - OriginPos).magnitude / 2)
				Mesh.Scale = VEC3(S.TrailThickness, S.TrailThickness, (FinalHitPos - OriginPos).magnitude)
				Mesh.Parent = Trail
				Trail.Parent = Gun_Ignore
				Trail.CFrame = CF(OriginPos, FinalHitPos)
				delay(S.TrailVisibleTime, function()
					if S.TrailDisappearTime > 0 then
						local X = 0
						while true do
							if X == 90 then break end
							if (not Selected) then break end
							local NewX = X + (1.5 / S.TrailDisappearTime)
							X = (NewX > 90 and 90 or NewX)
							local Alpha = X / 90
							Trail.Transparency = NumLerp(S.TrailTransparency, 1, Alpha)
							RS:wait()
						end
						Trail:Destroy()
					else
						Trail:Destroy()
					end
				end)
			end
		else
			local Bullet = CreateBullet(Direction)
			local LastPos = Main.CFrame.p
			local TotalDistTraveled = 0
			local HitHumanoid = nil
			spawn(function()
				while true do
					RS:wait()
					if TotalDistTraveled >= S.BulletRange then
						Bullet:Destroy()
						break
					end
					local DistTraveled = (Bullet.Position - LastPos).magnitude
					local HitObj, HitPos = AdvRayCast(LastPos, (Bullet.Position - LastPos).unit, DistTraveled)
					if HitObj then
						if S.GunType.Explosive then
							if S.ExplosionSound ~= "" then
								local Sound = Instance.new("Sound")
								Sound.Pitch = S.ExplosionSoundPitch
								Sound.SoundId = S.ExplosionSound
								Sound.Volume = S.ExplosionSoundVolume
								Sound.Parent = Bullet
								Sound:Play()
							end
							CreateBulletHole(HitPos, HitObj)
							CreateShockwave(HitPos, S.ExplosionRadius)
							local E = Instance.new("Explosion")
							E.BlastPressure = S.ExplosionPressure
							E.BlastRadius = S.ExplosionRadius
							E.DestroyJointRadiusPercent = (S.RangeBasedDamage and 0 or 1)
							E.ExplosionType = S.ExplosionType
							E.Position = HitPos
							E.Hit:connect(function(HObj, HDist)
								if HObj.Name == "Torso" and (not HObj:IsDescendantOf(Character)) then
									if S.RangeBasedDamage then
										local Dir = (HObj.Position - HitPos).unit
										local H, P = AdvRayCast(HitPos - Dir, Dir, 999)
										local RayHitHuman = H:IsDescendantOf(HObj.Parent)
										if (S.RayCastExplosions and RayHitHuman) or (not S.RayCastExplosions) then
											local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
											if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
												local DistFactor = HDist / S.ExplosionRadius
												local DistInvert = math.max(1 - DistFactor,0)
												local NewDamage = DistInvert * S.Damage
												
												local CreatorTag = Instance.new("ObjectValue")
												CreatorTag.Value = Player
												CreatorTag.Name = "creator"
												CreatorTag.Parent = HitHumanoid
												HitHumanoid:TakeDamage(NewDamage)
												MarkHit()
											end
										end
									else
										local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
										if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
											local CreatorTag = Instance.new("ObjectValue")
											CreatorTag.Value = Player
											CreatorTag.Name = "creator"
											CreatorTag.Parent = HitHumanoid
											MarkHit()
										end
									end
								end
							end)
							E.Parent = game.Workspace
						else
							HitHumanoid = Damage(HitObj, HitPos)
						end
						if S.Penetration > 0 and (not S.GunType.Explosive) then
							PenetrateWall(HitPos, (Bullet.Position - LastPos).unit, HitHumanoid, OriginPos, Bullet)
						else
							Bullet:Destroy()
						end
						break
					else
						LastPos = Bullet.Position
						TotalDistTraveled = TotalDistTraveled + DistTraveled
					end
				end
			end)
			
			if S.BulletTrail and S.TrailTransparency ~= 1 then
				spawn(function()
					local LastPos2 = nil
					while true do
						if LastPos2 then
							if (not Bullet:IsDescendantOf(game)) then break end
							Bullet.CFrame = CFrame.new(Bullet.CFrame.p, Bullet.CFrame.p + Bullet.Velocity)
							local Trail = Instance.new("Part")
							Trail.BrickColor = S.TrailColor
							Trail.Transparency = S.TrailTransparency
							Trail.Anchored = true
							Trail.CanCollide = false
							Trail.Size = VEC3(1, 1, 1)
							local Mesh = Instance.new("BlockMesh")
							Mesh.Offset = VEC3(0, 0, -(Bullet.Position - LastPos2).magnitude / 2)
							Mesh.Scale = VEC3(S.TrailThickness, S.TrailThickness, (Bullet.Position - LastPos2).magnitude)
							Mesh.Parent = Trail
							Trail.Parent = Gun_Ignore
							Trail.CFrame = CF(LastPos2, Bullet.Position)
							delay(S.TrailVisibleTime, function()
								if S.TrailDisappearTime > 0 then
									local X = 0
									while true do
										if X == 90 then break end
										if (not Selected) then break end
										local NewX = X + (1.5 / S.TrailDisappearTime)
										X = (NewX > 90 and 90 or NewX)
										local Alpha = X / 90
										Trail.Transparency = NumLerp(S.TrailTransparency, 1, Alpha)
										RS:wait()
									end
									Trail:Destroy()
								else
									Trail:Destroy()
								end
							end)
							LastPos2 = Bullet.Position
						else
							LastPos2 = Main.CFrame.p
						end
						RS:wait()
					end
				end)
			end
		end
	end
	
	----------------------------------------------------------------------------------
	
	local RecoilX = RAD(CurrentRecoil * RAND(1, 1.5, 0.1)) * StanceSway
	local RecoilY = RAD(CurrentRecoil * RAND(-2, 2, 0.1)) * StanceSway
	RotCamera(RecoilX, RecoilY, true, 0.06)
	delay(0.05, function()
		RotCamera(-RecoilX / 5, -RecoilY / 5, true, 0.1)
	end)
	if Idleing and (not Walking) and (not Aimed) then
		local SpreadScale = (CurrentSpread / S.Spread.Max) * 50
		Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
			UDim2.new(0, 70 + 2 * SpreadScale, 0, 70 + 2 * SpreadScale),
			UDim2.new(0, -35 - SpreadScale, 0, -35 - SpreadScale),
			"Out", "Linear", 0.1, true
		)
	end
	
	local KickSide = (
		(
			{
				CurrentRecoil * (RAND(1, 5, 1) / 150);
				CurrentRecoil * (RAND(1, 5, 1) / -150)
			}
		)[math.random(1, 2)]
	) * StanceSway
	local KickBack = CurrentRecoil * StanceSway * 0.3
	local KickUp = RAD(90 + (CurrentRecoil * RAND(1.3, 1.4, 0.01) * StanceSway))
	TweenJoint(AnimWeld, CF(KickSide, 1, -KickBack), CFANG(KickUp - RAD(90), 0, 0), Linear, 1 / 12)
	
	if FlashFX then FlashFX.Enabled = true
			Gun.A1.Mesh.Offset = Vector3.new(0, -.4, 0)
	Gun.A2.Mesh.Offset = Vector3.new(0, 0, -.4) 
	Gun.Bolt.Transparency = 1
Gun.BoltBack.Transparency = 0
Gun.Main.FX.Enabled = true
 end
	if FlashGui then
		FlashGui.Enabled = true
		FlashGui.Label.Rotation = RAND(0, 360)
	end
	
	delay(1 / 30, function()
		if Idleing and (not Walking) and (not Aimed) then
			Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
				UDim2.new(0, 70, 0, 70),
				UDim2.new(0, -35, 0, -35),
				"Out", "Linear", S.AimSpeed, (not Aimed)
			)
		end
		if (not Aiming) and (not RunTween) then
			TweenJoint(AnimWeld, CF(0, 1, 0), CF(), Linear, 0.15)
		end
		if FlashFX then FlashFX.Enabled = false end
		if FlashGui then FlashGui.Enabled = false end
    Gun.A1.Mesh.Offset = Vector3.new(0, 0, 0)
    Gun.A2.Mesh.Offset = Vector3.new(0, 0, 0)
Gun.Bolt.Transparency = 0
Gun.BoltBack.Transparency = 1
Gun.Main.FX.Enabled = false

	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
