function CreateBullet(q)local U=L_41_.Position local y=(L_4_.Hit.p-U).unit local M=CFrame.Angles(math.rad(math.random(-q,q)),math.rad(math.random(-q,q)),math.rad(math.random(-q,q)))y=M*y local A=CFrame.new(U,U+y)local g=Instance.new("\080\097\114\116",L_76_)game.Debris:AddItem(g,10)g.Shape=Enum.PartType.Ball g.Size=Vector3.new(1,1,12)g.Name="\066\117\108\108\101\116"g.TopSurface="\083\109\111\111\116\104"g.BottomSurface="\083\109\111\111\116\104"g.BrickColor=BrickColor.new("\066\114\105\103\104\116 \103\114\101\101\110")g.Material="\078\101\111\110"g.CanCollide=false g.CFrame=A local a=Instance.new("\083\111\117\110\100")a.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\052\049\053\049\057\055\052\051"a.Looped=true a:Play()a.Parent=g a.Volume=.4 a.MaxDistance=30 g.Transparency=1 local F=g:GetMass()local J=Instance.new("\066\111\100\121\070\111\114\099\101",g)if not L_60_ then J.Force=L_23_.BulletPhysics g.Velocity=y*L_23_.BulletSpeed else J.Force=L_23_.ExploPhysics g.Velocity=y*L_23_.ExploSpeed end local v=Instance.new("\065\116\116\097\099\104\109\101\110\116",g)v.Position=Vector3.new(.1,0,0)local d=Instance.new("\065\116\116\097\099\104\109\101\110\116",g)d.Position=Vector3.new(-0.1,0,0)local D=TracerCalculation()if L_23_.TracerEnabled==true and D then local q=Instance.new("\084\114\097\105\108",g)q.Attachment0=v q.Attachment1=d q.Transparency=NumberSequence.new(L_23_.TracerTransparency)q.LightEmission=L_23_.TracerLightEmission q.TextureLength=L_23_.TracerTextureLength q.Lifetime=L_23_.TracerLifetime q.FaceCamera=L_23_.TracerFaceCamera q.Color=ColorSequence.new(L_23_.TracerColor.Color)end if L_1_:FindFirstChild("\083\104\101\108\108")and not L_60_ then CreateShell()end delay(.2,function()g.Transparency=0 end)return g end function CheckForHumanoid(q)local U local y if q.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")or q.Parent.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then U=true if q.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then y=q.Parent.Humanoid elseif q.Parent.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then y=q.Parent.Parent.Humanoid end else U=false end return U,y end function CastRay(q)local U,y,M local A=L_38_.Position local g=q.Position local a=0 local F=L_60_ while true do L_81_:wait()g=q.Position a=a+(g-A).magnitude U,y,M=workspace:FindPartOnRayWithIgnoreList(Ray.new(A,g-A),IgnoreList)local J=(Vector3.new(0,1,0)):Cross(M)local v=math.asin(J.magnitude)if a>10000 then break end if U and(U and U.Transparency>=1 or U.CanCollide==false)then table.insert(IgnoreList,U)end if U then J=(Vector3.new(0,1,0)):Cross(M)v=math.asin(J.magnitude)local A=CheckForHumanoid(U)if A==false then q:Destroy()local U=L_88_:InvokeServer(y,J,v,M,"\080\097\114\116")table.insert(IgnoreList,U)elseif A==true then q:Destroy()local U=L_88_:InvokeServer(y,J,v,M,"\072\117\109\097\110")table.insert(IgnoreList,U)end end if U and F then L_91_:FireServer(y)end if U and(U.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")or U.Parent.Parent:FindFirstChild("\072\117\109\097\110\111\105\100"))then local q,y=CheckForHumanoid(U)if q then L_86_:FireServer(y)if L_23_.AntiTK then if game.Players:FindFirstChild(y.Parent.Name)and(game.Players:FindFirstChild(y.Parent.Name)).TeamColor~=L_2_.TeamColor then if U.Name=="\072\101\097\100"then L_85_:FireServer(y,L_23_.HeadDamage)local q=(L_18_:WaitForChild("\066\111\100\121\072\105\116")):clone()q.Parent=L_2_.PlayerGui q:Play();(game:GetService("\068\101\098\114\105\115")):addItem(q,q.TimeLength)elseif U.Name~="\072\101\097\100"and not(U.Parent:IsA("\065\099\099\101\115\115\111\114\121")or U.Parent:IsA("\072\097\116"))then L_85_:FireServer(y,L_23_.Damage)local q=(L_18_:WaitForChild("\066\111\100\121\072\105\116")):clone()q.Parent=L_2_.PlayerGui q:Play();(game:GetService("\068\101\098\114\105\115")):addItem(q,q.TimeLength)elseif U.Parent:IsA("\065\099\099\101\115\115\111\114\121")or U.Parent:IsA("\072\097\116")then L_85_:FireServer(y,L_23_.HeadDamage)local q=(L_18_:WaitForChild("\066\111\100\121\072\105\116")):clone()q.Parent=L_2_.PlayerGui q:Play();(game:GetService("\068\101\098\114\105\115")):addItem(q,q.TimeLength)end end else if U.Name=="\072\101\097\100"then L_85_:FireServer(y,L_23_.HeadDamage)local q=(L_18_:WaitForChild("\066\111\100\121\072\105\116")):clone()q.Parent=L_2_.PlayerGui q:Play();(game:GetService("\068\101\098\114\105\115")):addItem(q,q.TimeLength)elseif U.Name~="\072\101\097\100"and not(U.Parent:IsA("\065\099\099\101\115\115\111\114\121")or U.Parent:IsA("\072\097\116"))then L_85_:FireServer(y,L_23_.Damage)local q=(L_18_:WaitForChild("\066\111\100\121\072\105\116")):clone()q.Parent=L_2_.PlayerGui q:Play();(game:GetService("\068\101\098\114\105\115")):addItem(q,q.TimeLength)elseif U.Parent:IsA("\065\099\099\101\115\115\111\114\121")or U.Parent:IsA("\072\097\116")then L_85_:FireServer(y,L_23_.HeadDamage)local q=(L_18_:WaitForChild("\066\111\100\121\072\105\116")):clone()q.Parent=L_2_.PlayerGui q:Play();(game:GetService("\068\101\098\114\105\115")):addItem(q,q.TimeLength)end end end end if U and U.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then return U,y end A=g end end function fireSemi()if L_15_ then L_51_=false Recoiling=true Shooting=true;(L_41_:WaitForChild("\070\105\114\101")):Play()L_84_:FireServer()L_77_=CreateBullet(0)L_78_=L_78_-1 RecoilFront=true local q,U=spawn(function()CastRay(L_77_)end)if L_23_.CanBolt==true then BoltingBackAnim()delay(L_23_.Firerate/2,function()if L_23_.CanSlideLock==false then BoltingForwardAnim()elseif L_23_.CanSlideLock==true and L_78_<=0 then BoltingBackAnim()end end)end delay(L_23_.Firerate/2,function()Recoiling=false RecoilFront=false end)wait(L_23_.Firerate)local y=JamCalculation()if y then L_51_=false else L_51_=true end Shooting=false end end function fireExplo()if L_15_ then L_51_=false Recoiling=true Shooting=true;(L_42_:WaitForChild("\070\105\114\101")):Play()L_84_:FireServer()L_77_=CreateBullet(0)L_80_=L_80_-1 RecoilFront=true local q,U=spawn(function()CastRay(L_77_)end)delay(L_23_.Firerate/2,function()Recoiling=false RecoilFront=false end)L_51_=false Shooting=false end end function fireShot()if L_15_ then L_51_=false Recoiling=true Shooting=true RecoilFront=true;(L_41_:WaitForChild("\070\105\114\101")):Play()L_84_:FireServer()for q=1,L_23_.ShotNum,1 do L_77_=CreateBullet(2)local U,y=spawn(function()CastRay(L_77_)end)end for q,U in pairs(L_41_:GetChildren())do if U.Name:sub(1,7)=="\070\108\097\115\104\070\088"then U.Enabled=true end end delay(.033333333333333,function()for q,U in pairs(L_41_:GetChildren())do if U.Name:sub(1,7)=="\070\108\097\115\104\070\088"then U.Enabled=false end end end)if L_23_.CanBolt==true then BoltingBackAnim()delay(L_23_.Firerate/2,function()if L_23_.CanSlideLock==false then BoltingForwardAnim()elseif L_23_.CanSlideLock==true and L_78_>0 then BoltingBackAnim()end end)end delay(L_23_.Firerate/2,function()Recoiling=false RecoilFront=false end)L_78_=L_78_-1 wait(L_23_.Firerate)L_58_=true BoltBackAnim()BoltForwardAnim()IdleAnim()L_58_=false local q=JamCalculation()if q then L_51_=false else L_51_=true end Shooting=false end end function fireBoltAction()if L_15_ then L_51_=false Recoiling=true Shooting=true;(L_41_:WaitForChild("\070\105\114\101")):Play()L_84_:FireServer()L_77_=CreateBullet(0)L_78_=L_78_-1 RecoilFront=true local q,U=spawn(function()CastRay(L_77_)end)for q,U in pairs(L_41_:GetChildren())do if U.Name:sub(1,7)=="\070\108\097\115\104\070\088"then U.Enabled=true end end delay(.033333333333333,function()for q,U in pairs(L_41_:GetChildren())do if U.Name:sub(1,7)=="\070\108\097\115\104\070\088"then U.Enabled=false end end end)if L_23_.CanBolt==true then BoltingBackAnim()delay(L_23_.Firerate/2,function()if L_23_.CanSlideLock==false then BoltingForwardAnim()elseif L_23_.CanSlideLock==true and L_78_>0 then BoltingBackAnim()end end)end delay(L_23_.Firerate/2,function()Recoiling=false RecoilFront=false end)wait(L_23_.Firerate)L_58_=true BoltBackAnim()BoltForwardAnim()IdleAnim()L_58_=false local y=JamCalculation()if y then L_51_=false else L_51_=true end Shooting=false end end function fireAuto()while not Shooting and(L_78_>0 and(L_50_ and(L_51_ and L_15_)))do L_51_=false Recoiling=true;(L_41_:WaitForChild("\070\105\114\101")):Play()L_84_:FireServer()L_78_=L_78_-1 Shooting=true RecoilFront=true L_77_=CreateBullet(0)local q,U=spawn(function()CastRay(L_77_)end)for q,U in pairs(L_41_:GetChildren())do if U.Name:sub(1,7)=="\070\108\097\115\104\070\088"then U.Enabled=true end end delay(.033333333333333,function()for q,U in pairs(L_41_:GetChildren())do if U.Name:sub(1,7)=="\070\108\097\115\104\070\088"then U.Enabled=false end end end)if L_23_.CanBolt==true then BoltingBackAnim()delay(L_23_.Firerate/2,function()if L_23_.CanSlideLock==false then BoltingForwardAnim()elseif L_23_.CanSlideLock==true and L_78_>0 then BoltingForwardAnim()end end)end delay(L_23_.Firerate/2,function()Recoiling=false RecoilFront=false end)wait(L_23_.Firerate)local y=JamCalculation()if y then L_51_=false else L_51_=true end Shooting=false end end function fireBurst()if not Shooting and(L_78_>0 and(L_50_ and L_15_))then for q=1,L_23_.BurstNum,1 do if L_78_>0 and L_50_ then L_51_=false Recoiling=true;(L_41_:WaitForChild("\070\105\114\101")):Play()L_84_:FireServer()L_77_=CreateBullet(0)local q,U=spawn(function()CastRay(L_77_)end)for q,U in pairs(L_41_:GetChildren())do if U.Name:sub(1,7)=="\070\108\097\115\104\070\088"then U.Enabled=true end end delay(.033333333333333,function()for q,U in pairs(L_41_:GetChildren())do if U.Name:sub(1,7)=="\070\108\097\115\104\070\088"then U.Enabled=false end end end)if L_23_.CanBolt==true then BoltingBackAnim()delay(L_23_.Firerate/2,function()if L_23_.CanSlideLock==false then BoltingForwardAnim()elseif L_23_.CanSlideLock==true and L_78_>0 then BoltingForwardAnim()end end)end L_78_=L_78_-1 RecoilFront=true delay(L_23_.Firerate/2,function()Recoiling=false RecoilFront=false end)wait(L_23_.Firerate)local y=JamCalculation()if y then L_51_=false else L_51_=true end end Shooting=true end Shooting=false end end function Shoot()if L_15_ and L_51_ then if L_69_==1 then fireSemi()elseif L_69_==2 then fireAuto()elseif L_69_==3 then fireBurst()elseif L_69_==4 then fireBoltAction()elseif L_69_==5 then fireShot()elseif L_69_==6 then fireExplo()end end end

function CreateBullet(L_165_arg1)
	local L_166_ = L_41_.Position
	local L_167_ = (L_4_.Hit.p - L_166_).unit
	local L_168_ = CFrame.Angles(math.rad(math.random(-L_165_arg1, L_165_arg1)), math.rad(math.random(-L_165_arg1, L_165_arg1)), math.rad(math.random(-L_165_arg1, L_165_arg1)))
	L_167_ = L_168_ * L_167_	
	local L_169_ = CFrame.new(L_166_, L_166_ + L_167_)	
		
	local L_170_ = Instance.new("Part", L_76_)
	game.Debris:AddItem(L_170_, 10)
	L_170_.Shape = Enum.PartType.Ball
	L_170_.Size = Vector3.new(1, 1, 12)
	L_170_.Name = "Bullet"
	L_170_.TopSurface = "Smooth"
	L_170_.BottomSurface = "Smooth"
	L_170_.BrickColor = BrickColor.new("Bright green")
	L_170_.Material = "Neon"
	L_170_.CanCollide = false
		--Bullet.CFrame = FirePart.CFrame + (Grip.CFrame.p - Grip.CFrame.p)
	L_170_.CFrame = L_169_
		
	local L_171_ = Instance.new("Sound")
	L_171_.SoundId = "rbxassetid://341519743"
	L_171_.Looped = true
	L_171_:Play()
	L_171_.Parent = L_170_
	L_171_.Volume = 0.4
	L_171_.MaxDistance = 30
	
	L_170_.Transparency = 1
	local L_172_ = L_170_:GetMass()
	local L_173_ = Instance.new('BodyForce', L_170_)
		
	if not L_60_ then
		L_173_.Force = L_23_.BulletPhysics
		L_170_.Velocity = L_167_ * L_23_.BulletSpeed
	else
		L_173_.Force = L_23_.ExploPhysics
		L_170_.Velocity = L_167_ * L_23_.ExploSpeed
	end
		
	local L_174_ = Instance.new('Attachment', L_170_)
	L_174_.Position = Vector3.new(0.1, 0, 0)
	local L_175_ = Instance.new('Attachment', L_170_)
	L_175_.Position = Vector3.new(-0.1, 0, 0)
			
	local L_176_ = TracerCalculation()
		
	if L_23_.TracerEnabled == true and L_176_ then
		local L_177_ = Instance.new('Trail', L_170_)
		L_177_.Attachment0 = L_174_
		L_177_.Attachment1 = L_175_
		L_177_.Transparency = NumberSequence.new(L_23_.TracerTransparency)
		L_177_.LightEmission = L_23_.TracerLightEmission
		L_177_.TextureLength = L_23_.TracerTextureLength
		L_177_.Lifetime = L_23_.TracerLifetime
		L_177_.FaceCamera = L_23_.TracerFaceCamera
		L_177_.Color = ColorSequence.new(L_23_.TracerColor.Color)
	end
		
	if L_1_:FindFirstChild('Shell') and not L_60_ then	
		CreateShell()	
	end	
		
	delay(0.2, function()
		L_170_.Transparency = 0
	end)
	
	return L_170_
end

function CheckForHumanoid(L_178_arg1)
	local L_179_
	local L_180_
	if (L_178_arg1.Parent:FindFirstChild("Humanoid") or L_178_arg1.Parent.Parent:FindFirstChild("Humanoid")) then
		L_179_ = true
		if L_178_arg1.Parent:FindFirstChild('Humanoid') then
			L_180_ = L_178_arg1.Parent.Humanoid
		elseif L_178_arg1.Parent.Parent:FindFirstChild('Humanoid') then
			L_180_ = L_178_arg1.Parent.Parent.Humanoid
		end
	else
		L_179_ = false
	end	
	return L_179_, L_180_
end

function CastRay(L_181_arg1)
	local L_182_, L_183_, L_184_
	local L_185_ = L_38_.Position;
	local L_186_ = L_181_arg1.Position;
	local L_187_ = 0

	local L_188_ = L_60_	
	
	while true do
		L_81_:wait()
		L_186_ = L_181_arg1.Position;
		L_187_ = L_187_ + (L_186_ - L_185_).magnitude
		L_182_, L_183_, L_184_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_185_, (L_186_ - L_185_)), IgnoreList);
		local L_189_ = Vector3.new(0, 1, 0):Cross(L_184_)
		local L_190_ = math.asin(L_189_.magnitude) -- division by 1 is redundant
		if L_187_ > 10000 then
			break
		end
		if L_182_ and (L_182_ and L_182_.Transparency >= 1 or L_182_.CanCollide == false) then
			table.insert(IgnoreList, L_182_)
		end
	
		if L_182_ then
			L_189_ = Vector3.new(0, 1, 0):Cross(L_184_)
			L_190_ = math.asin(L_189_.magnitude) -- division by 1 is redundant
		
			local L_191_ = CheckForHumanoid(L_182_)
			if L_191_ == false then
				L_181_arg1:Destroy()
				local L_192_ = L_88_:InvokeServer(L_183_, L_189_, L_190_, L_184_, "Part")
				table.insert(IgnoreList, L_192_)
			elseif L_191_ == true then
				L_181_arg1:Destroy()
				local L_193_ = L_88_:InvokeServer(L_183_, L_189_, L_190_, L_184_, "Human")
				table.insert(IgnoreList, L_193_)
			end
		end
	
		if L_182_ and L_188_ then
			L_91_:FireServer(L_183_)
		end
	
		if L_182_ and (L_182_.Parent:FindFirstChild("Humanoid") or L_182_.Parent.Parent:FindFirstChild("Humanoid")) then
			local L_194_, L_195_ = CheckForHumanoid(L_182_)
			if L_194_ then
				L_86_:FireServer(L_195_)
				if L_23_.AntiTK then
					if game.Players:FindFirstChild(L_195_.Parent.Name) and game.Players:FindFirstChild(L_195_.Parent.Name).TeamColor ~= L_2_.TeamColor then
						if L_182_.Name == 'Head' then
							L_85_:FireServer(L_195_, L_23_.HeadDamage)
							local L_196_ = L_18_:WaitForChild('BodyHit'):clone()
							L_196_.Parent = L_2_.PlayerGui
							L_196_:Play()
							game:GetService("Debris"):addItem(L_196_, L_196_.TimeLength)
						elseif L_182_.Name ~= 'Head' and not (L_182_.Parent:IsA('Accessory') or L_182_.Parent:IsA('Hat')) then
							L_85_:FireServer(L_195_, L_23_.Damage)
							local L_197_ = L_18_:WaitForChild('BodyHit'):clone()
							L_197_.Parent = L_2_.PlayerGui
							L_197_:Play()
							game:GetService("Debris"):addItem(L_197_, L_197_.TimeLength)
						elseif (L_182_.Parent:IsA('Accessory') or L_182_.Parent:IsA('Hat')) then
							L_85_:FireServer(L_195_, L_23_.HeadDamage)
							local L_198_ = L_18_:WaitForChild('BodyHit'):clone()
							L_198_.Parent = L_2_.PlayerGui
							L_198_:Play()
							game:GetService("Debris"):addItem(L_198_, L_198_.TimeLength)
						end
					end
				else
					if L_182_.Name == 'Head' then
						L_85_:FireServer(L_195_, L_23_.HeadDamage)
						local L_199_ = L_18_:WaitForChild('BodyHit'):clone()
						L_199_.Parent = L_2_.PlayerGui
						L_199_:Play()
						game:GetService("Debris"):addItem(L_199_, L_199_.TimeLength)
					elseif L_182_.Name ~= 'Head' and not (L_182_.Parent:IsA('Accessory') or L_182_.Parent:IsA('Hat')) then
						L_85_:FireServer(L_195_, L_23_.Damage)
						local L_200_ = L_18_:WaitForChild('BodyHit'):clone()
						L_200_.Parent = L_2_.PlayerGui
						L_200_:Play()
						game:GetService("Debris"):addItem(L_200_, L_200_.TimeLength)
					elseif (L_182_.Parent:IsA('Accessory') or L_182_.Parent:IsA('Hat')) then
						L_85_:FireServer(L_195_, L_23_.HeadDamage)
						local L_201_ = L_18_:WaitForChild('BodyHit'):clone()
						L_201_.Parent = L_2_.PlayerGui
						L_201_:Play()
						game:GetService("Debris"):addItem(L_201_, L_201_.TimeLength)
					end
				end	
			end
		end
	
		if L_182_ and L_182_.Parent:FindFirstChild("Humanoid") then
			return L_182_, L_183_;
		end
		L_185_ = L_186_;
	end
end

function fireSemi()
	if L_15_ then
		L_51_ = false
		Recoiling = true
		Shooting = true
		L_41_:WaitForChild('Fire'):Play()
		L_84_:FireServer()
		L_77_ = CreateBullet(0)
		L_78_ = L_78_ - 1
		RecoilFront = true
		local L_202_, L_203_ = spawn(function()
			CastRay(L_77_)
		end)
		
		if L_23_.CanBolt == true then
			BoltingBackAnim()
			delay(L_23_.Firerate / 2, function()
				if L_23_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_23_.CanSlideLock == true and L_78_ <= 0 then
					BoltingBackAnim()
				end
			end)
		end
		
		delay(L_23_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)		
		
		wait(L_23_.Firerate)
		
		local L_204_ = JamCalculation()
		if L_204_ then
			L_51_ = false
		else
			L_51_ = true
		end
		Shooting = false
	end
end

function fireExplo()
	if L_15_ then
		L_51_ = false
		Recoiling = true
		Shooting = true
		L_42_:WaitForChild('Fire'):Play()
		L_84_:FireServer()
		L_77_ = CreateBullet(0)
		L_80_ = L_80_ - 1
		RecoilFront = true
		local L_205_, L_206_ = spawn(function()
			CastRay(L_77_)
		end)
		
		delay(L_23_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)		
			
		L_51_ = false
		Shooting = false
	end
end

function fireShot()
	if L_15_ then
		L_51_ = false
		Recoiling = true
		Shooting = true
		RecoilFront = true
		L_41_:WaitForChild('Fire'):Play()
		L_84_:FireServer()
		for L_208_forvar1 = 1, L_23_.ShotNum do
			L_77_ = CreateBullet(2)
			local L_209_, L_210_ = spawn(function()
				CastRay(L_77_)
			end)
		end
						
		for L_211_forvar1, L_212_forvar2 in pairs(L_41_:GetChildren()) do
			if L_212_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_212_forvar2.Enabled = true
			end
		end
	
		delay(1 / 30, function()
			for L_213_forvar1, L_214_forvar2 in pairs(L_41_:GetChildren()) do
				if L_214_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_214_forvar2.Enabled = false
				end
			end
		end)
		
		if L_23_.CanBolt == true then
			BoltingBackAnim()
			delay(L_23_.Firerate / 2, function()
				if L_23_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_23_.CanSlideLock == true and L_78_ > 0 then
					BoltingBackAnim()
				end
			end)
		end
		
		delay(L_23_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		L_78_ = L_78_ - 1
		wait(L_23_.Firerate)
		
		L_58_ = true
		BoltBackAnim()
		BoltForwardAnim()
		IdleAnim()
		L_58_ = false
		
		local L_207_ = JamCalculation()
		if L_207_ then
			L_51_ = false
		else
			L_51_ = true
		end
		
		Shooting = false
	end
end

function fireBoltAction()
	if L_15_ then
		L_51_ = false
		Recoiling = true
		Shooting = true
		L_41_:WaitForChild('Fire'):Play()
		L_84_:FireServer()
		L_77_ = CreateBullet(0)
		L_78_ = L_78_ - 1
		RecoilFront = true
		local L_215_, L_216_ = spawn(function()
			CastRay(L_77_)
		end)
						
		for L_218_forvar1, L_219_forvar2 in pairs(L_41_:GetChildren()) do
			if L_219_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_219_forvar2.Enabled = true
			end
		end
	
		delay(1 / 30, function()
			for L_220_forvar1, L_221_forvar2 in pairs(L_41_:GetChildren()) do
				if L_221_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_221_forvar2.Enabled = false
				end
			end
		end)
		
		if L_23_.CanBolt == true then
			BoltingBackAnim()
			delay(L_23_.Firerate / 2, function()
				if L_23_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_23_.CanSlideLock == true and L_78_ > 0 then
					BoltingBackAnim()
				end
			end)
		end
		
		delay(L_23_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		wait(L_23_.Firerate)
		
		L_58_ = true
		BoltBackAnim()
		BoltForwardAnim()
		IdleAnim()
		L_58_ = false
		
		local L_217_ = JamCalculation()
		if L_217_ then
			L_51_ = false
		else
			L_51_ = true
		end		
		
		Shooting = false
	end
end

function fireAuto()
	while not Shooting and L_78_ > 0 and L_50_ and L_51_ and L_15_ do
		L_51_ = false
		Recoiling = true
		L_41_:WaitForChild('Fire'):Play()
		L_84_:FireServer()
		L_78_ = L_78_ - 1
		Shooting = true
		RecoilFront = true
		L_77_ = CreateBullet(0)
		local L_222_, L_223_ = spawn(function()
			CastRay(L_77_)
		end)
					
		for L_225_forvar1, L_226_forvar2 in pairs(L_41_:GetChildren()) do
			if L_226_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_226_forvar2.Enabled = true
			end
		end
	
		delay(1 / 30, function()
			for L_227_forvar1, L_228_forvar2 in pairs(L_41_:GetChildren()) do
				if L_228_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_228_forvar2.Enabled = false
				end
			end
		end)
		
		if L_23_.CanBolt == true then
			BoltingBackAnim()
			delay(L_23_.Firerate / 2, function()
				if L_23_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_23_.CanSlideLock == true and L_78_ > 0 then
					BoltingForwardAnim()
				end
			end)
		end
		
		
		delay(L_23_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		wait(L_23_.Firerate)
		
		local L_224_ = JamCalculation()
		if L_224_ then
			L_51_ = false
		else
			L_51_ = true
		end
		
		Shooting = false
	end
end

function fireBurst()
	if not Shooting and L_78_ > 0 and L_50_ and L_15_ then
		for L_229_forvar1 = 1, L_23_.BurstNum do
			if L_78_ > 0 and L_50_ then
				L_51_ = false
				Recoiling = true
				L_41_:WaitForChild('Fire'):Play()
				L_84_:FireServer()
				L_77_ = CreateBullet(0)
				local L_230_, L_231_ = spawn(function()
					CastRay(L_77_)
				end)
					
				for L_233_forvar1, L_234_forvar2 in pairs(L_41_:GetChildren()) do
					if L_234_forvar2.Name:sub(1, 7) == "FlashFX" then
						L_234_forvar2.Enabled = true
					end
				end
		
				delay(1 / 30, function()
					for L_235_forvar1, L_236_forvar2 in pairs(L_41_:GetChildren()) do
						if L_236_forvar2.Name:sub(1, 7) == "FlashFX" then
							L_236_forvar2.Enabled = false
						end
					end
				end)
			
				if L_23_.CanBolt == true then
					BoltingBackAnim()
					delay(L_23_.Firerate / 2, function()
						if L_23_.CanSlideLock == false then
							BoltingForwardAnim()
						elseif L_23_.CanSlideLock == true and L_78_ > 0 then
							BoltingForwardAnim()
						end
					end)
				end
			
				L_78_ = L_78_ - 1
				RecoilFront = true
				delay(L_23_.Firerate / 2, function()
					Recoiling = false
					RecoilFront = false
				end)
				wait(L_23_.Firerate)
			
				local L_232_ = JamCalculation()
				if L_232_ then
					L_51_ = false
				else
					L_51_ = true
				end
		
			end
			Shooting = true
		end
		Shooting = false
	end
end

function Shoot()
	if L_15_ and L_51_ then
		if L_69_ == 1 then
			fireSemi()
		elseif L_69_ == 2 then
			fireAuto()
		elseif L_69_ == 3 then
			fireBurst()	
		elseif L_69_ == 4 then
			fireBoltAction()
		elseif L_69_ == 5 then
			fireShot()
		elseif L_69_ == 6 then
			fireExplo()
		end
	end
end
