function CreateBullet(T)local G=L_58_.Position local o=(L_4_.Hit.p-G).unit local H=CFrame.Angles(math.rad(math.random(-T,T)),math.rad(math.random(-T,T)),math.rad(math.random(-T,T)))o=H*o local y=CFrame.new(G,G+o)local R=Instance.new("\080\097\114\116",L_100_)game.Debris:AddItem(R,10)R.Shape=Enum.PartType.Ball R.Size=Vector3.new(1,1,12)R.Name="\066\117\108\108\101\116"R.TopSurface="\083\109\111\111\116\104"R.BottomSurface="\083\109\111\111\116\104"R.BrickColor=BrickColor.new("\066\114\105\103\104\116 \103\114\101\101\110")R.Material="\078\101\111\110"R.CanCollide=false R.CFrame=y local f=Instance.new("\083\111\117\110\100")f.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\052\049\053\049\057\055\052\051"f.Looped=true f:Play()f.Parent=R f.Volume=.4 f.MaxDistance=30 R.Transparency=1 local N=R:GetMass()local j=Instance.new("\066\111\100\121\070\111\114\099\101",R)if not L_82_ then j.Force=L_24_.BulletPhysics R.Velocity=o*L_24_.BulletSpeed else j.Force=L_24_.ExploPhysics R.Velocity=o*L_24_.ExploSpeed end local v=Instance.new("\065\116\116\097\099\104\109\101\110\116",R)v.Position=Vector3.new(.1,0,0)local V=Instance.new("\065\116\116\097\099\104\109\101\110\116",R)V.Position=Vector3.new(-0.1,0,0)local I=TracerCalculation()if L_24_.TracerEnabled==true and I then local T=Instance.new("\084\114\097\105\108",R)T.Attachment0=v T.Attachment1=V T.Transparency=NumberSequence.new(L_24_.TracerTransparency)T.LightEmission=L_24_.TracerLightEmission T.TextureLength=L_24_.TracerTextureLength T.Lifetime=L_24_.TracerLifetime T.FaceCamera=L_24_.TracerFaceCamera T.Color=ColorSequence.new(L_24_.TracerColor.Color)end if L_1_:FindFirstChild("\083\104\101\108\108")and not L_82_ then CreateShell()end delay(.2,function()R.Transparency=0 end)return R end function CheckForHumanoid(T)local G=false local o=nil if T then if T.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")or T.Parent.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then G=true if T.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then o=T.Parent.Humanoid elseif T.Parent.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then o=T.Parent.Parent.Humanoid end else G=false end end return G,o end function CastRay(T)local G,o,H local y=L_55_.Position local R=T.Position local f=0 local N=L_82_ while true do L_105_:wait()R=T.Position f=f+(R-y).magnitude G,o,H=workspace:FindPartOnRayWithIgnoreList(Ray.new(y,R-y),IgnoreList)local j=(Vector3.new(0,1,0)):Cross(H)local v=math.asin(j.magnitude)if f>L_24_.BulletDecay then T:Destroy()break end if G and((G and G.Transparency>=1 or G.CanCollide==false)and(G.Name~="\082\105\103\104\116 \065\114\109"and(G.Name~="\076\101\102\116 \065\114\109"and(G.Name~="\082\105\103\104\116 \076\101\103"and(G.Name~="\076\101\102\116 \076\101\103"and G.Name~="\065\114\109\111\114")))))then table.insert(IgnoreList,G)end if G then j=(Vector3.new(0,1,0)):Cross(H)v=math.asin(j.magnitude)L_117_:FireServer(o)local y=CheckForHumanoid(G)if y==false then T:Destroy()local y=L_112_:InvokeServer(o,j,v,H,"\080\097\114\116",G)elseif y==true then T:Destroy()local y=L_112_:InvokeServer(o,j,v,H,"\072\117\109\097\110",G)end end if G and N then L_115_:FireServer(o)end if G then local T,o=CheckForHumanoid(G)if T then L_110_:FireServer(o)if L_24_.AntiTK then if game.Players:FindFirstChild(o.Parent.Name)and(game.Players:FindFirstChild(o.Parent.Name)).TeamColor~=L_2_.TeamColor or o.Parent:FindFirstChild("\086\097\114\115")and(game.Players:FindFirstChild(((o.Parent:WaitForChild("\086\097\114\115")):WaitForChild("\066\111\116\073\068")).Value)and L_2_.TeamColor~=((o.Parent:WaitForChild("\086\097\114\115")):WaitForChild("\116\101\097\109\067\111\108\111\114")).Value)then if G.Name=="\072\101\097\100"then L_109_:FireServer(o,L_24_.HeadDamage)local T=(L_19_:WaitForChild("\066\111\100\121\072\105\116")):clone()T.Parent=L_2_.PlayerGui T:Play();(game:GetService("\068\101\098\114\105\115")):addItem(T,T.TimeLength)end if G.Name~="\072\101\097\100"and not(G.Parent:IsA("\065\099\099\101\115\115\111\114\121")or G.Parent:IsA("\072\097\116"))then if G.Name~="\084\111\114\115\111"and(G.Name~="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"and G.Name~="\065\114\109\111\114")then L_109_:FireServer(o,L_24_.LimbDamage)elseif G.Name=="\084\111\114\115\111"or G.Name=="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"and G.Name~="\065\114\109\111\114"then L_109_:FireServer(o,L_24_.BaseDamage)elseif G.Name=="\065\114\109\111\114"then L_109_:FireServer(o,L_24_.ArmorDamage)end local T=(L_19_:WaitForChild("\066\111\100\121\072\105\116")):clone()T.Parent=L_2_.PlayerGui T:Play();(game:GetService("\068\101\098\114\105\115")):addItem(T,T.TimeLength)end if G.Parent:IsA("\065\099\099\101\115\115\111\114\121")or G.Parent:IsA("\072\097\116")then L_109_:FireServer(o,L_24_.HeadDamage)local T=(L_19_:WaitForChild("\066\111\100\121\072\105\116")):clone()T.Parent=L_2_.PlayerGui T:Play();(game:GetService("\068\101\098\114\105\115")):addItem(T,T.TimeLength)end end else if G.Name=="\072\101\097\100"then L_109_:FireServer(o,L_24_.HeadDamage)local T=(L_19_:WaitForChild("\066\111\100\121\072\105\116")):clone()T.Parent=L_2_.PlayerGui T:Play();(game:GetService("\068\101\098\114\105\115")):addItem(T,T.TimeLength)end if G.Name~="\072\101\097\100"and not(G.Parent:IsA("\065\099\099\101\115\115\111\114\121")or G.Parent:IsA("\072\097\116"))then if G.Name~="\084\111\114\115\111"and(G.Name~="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"and G.Name~="\065\114\109\111\114")then L_109_:FireServer(o,L_24_.LimbDamage)elseif G.Name=="\084\111\114\115\111"or G.Name=="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"and G.Name~="\065\114\109\111\114"then L_109_:FireServer(o,L_24_.BaseDamage)elseif G.Name=="\065\114\109\111\114"then L_109_:FireServer(o,L_24_.ArmorDamage)end local T=(L_19_:WaitForChild("\066\111\100\121\072\105\116")):clone()T.Parent=L_2_.PlayerGui T:Play();(game:GetService("\068\101\098\114\105\115")):addItem(T,T.TimeLength)end if G.Parent:IsA("\065\099\099\101\115\115\111\114\121")or G.Parent:IsA("\072\097\116")then L_109_:FireServer(o,L_24_.HeadDamage)local T=(L_19_:WaitForChild("\066\111\100\121\072\105\116")):clone()T.Parent=L_2_.PlayerGui T:Play();(game:GetService("\068\101\098\114\105\115")):addItem(T,T.TimeLength)end end end end if G and G.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then return G,o end y=R end end function fireSemi()if L_15_ then L_68_=false Recoiling=true Shooting=true if L_54_ then L_54_:FireServer((L_58_:WaitForChild("\070\105\114\101")).SoundId,L_58_)else(L_58_:WaitForChild("\070\105\114\101")):Play()end L_108_:FireServer()L_101_=CreateBullet(L_24_.BulletSpread)L_102_=L_102_-1 UpdateAmmo()RecoilFront=true local T,G=spawn(function()CastRay(L_101_)end)if L_24_.CanBolt==true then BoltingBackAnim()delay(L_24_.Firerate/2,function()if L_24_.CanSlideLock==false then BoltingForwardAnim()elseif L_24_.CanSlideLock==true then if L_102_>0 then BoltingForwardAnim()end end end)end delay(L_24_.Firerate/2,function()Recoiling=false RecoilFront=false end)wait(L_24_.Firerate)local o=JamCalculation()if o then L_68_=false else L_68_=true end Shooting=false end end function fireExplo()if L_15_ then L_68_=false Recoiling=true Shooting=true if L_54_ then L_54_:FireServer((L_59_:WaitForChild("\070\105\114\101")).SoundId,L_59_)else(L_59_:WaitForChild("\070\105\114\101")):Play()end L_108_:FireServer()L_101_=CreateBullet(L_24_.BulletSpread)L_104_=L_104_-1 UpdateAmmo()RecoilFront=true local T,G=spawn(function()CastRay(L_101_)end)delay(L_24_.Firerate/2,function()Recoiling=false RecoilFront=false end)L_68_=false Shooting=false end end function fireShot()if L_15_ then L_68_=false Recoiling=true Shooting=true RecoilFront=true if L_54_ then L_54_:FireServer((L_58_:WaitForChild("\070\105\114\101")).SoundId,L_58_)else(L_58_:WaitForChild("\070\105\114\101")):Play()end L_108_:FireServer()for T=1,L_24_.ShotNum,1 do spawn(function()L_101_=CreateBullet(L_24_.BulletSpread)end)local G,o=spawn(function()CastRay(L_101_)end)end for T,G in pairs(L_58_:GetChildren())do if G.Name:sub(1,7)=="\070\108\097\115\104\070\088"then G.Enabled=true end end delay(.033333333333333,function()for T,G in pairs(L_58_:GetChildren())do if G.Name:sub(1,7)=="\070\108\097\115\104\070\088"then G.Enabled=false end end end)if L_24_.CanBolt==true then BoltingBackAnim()delay(L_24_.Firerate/2,function()if L_24_.CanSlideLock==false then BoltingForwardAnim()elseif L_24_.CanSlideLock==true then if L_102_>0 then BoltingForwardAnim()end end end)end delay(L_24_.Firerate/2,function()Recoiling=false RecoilFront=false end)L_102_=L_102_-1 UpdateAmmo()wait(L_24_.Firerate)L_75_=true BoltBackAnim()BoltForwardAnim()IdleAnim()L_75_=false local T=JamCalculation()if T then L_68_=false else L_68_=true end Shooting=false end end function fireBoltAction()if L_15_ then L_68_=false Recoiling=true Shooting=true if L_54_ then L_54_:FireServer((L_58_:WaitForChild("\070\105\114\101")).SoundId,L_58_)else(L_58_:WaitForChild("\070\105\114\101")):Play()end L_108_:FireServer()L_101_=CreateBullet(L_24_.BulletSpread)L_102_=L_102_-1 UpdateAmmo()RecoilFront=true local T,G=spawn(function()CastRay(L_101_)end)for T,G in pairs(L_58_:GetChildren())do if G.Name:sub(1,7)=="\070\108\097\115\104\070\088"then G.Enabled=true end end delay(.033333333333333,function()for T,G in pairs(L_58_:GetChildren())do if G.Name:sub(1,7)=="\070\108\097\115\104\070\088"then G.Enabled=false end end end)if L_24_.CanBolt==true then BoltingBackAnim()delay(L_24_.Firerate/2,function()if L_24_.CanSlideLock==false then BoltingForwardAnim()elseif L_24_.CanSlideLock==true then if L_102_>0 then BoltingForwardAnim()end end end)end delay(L_24_.Firerate/2,function()Recoiling=false RecoilFront=false end)wait(L_24_.Firerate)L_75_=true BoltBackAnim()BoltForwardAnim()IdleAnim()L_75_=false local o=JamCalculation()if o then L_68_=false else L_68_=true end Shooting=false end end function fireAuto()while not Shooting and(L_102_>0 and(L_67_ and(L_68_ and L_15_)))do L_68_=false Recoiling=true if L_54_ then L_54_:FireServer((L_58_:WaitForChild("\070\105\114\101")).SoundId,L_58_)else(L_58_:WaitForChild("\070\105\114\101")):Play()end L_108_:FireServer()L_102_=L_102_-1 UpdateAmmo()Shooting=true RecoilFront=true L_101_=CreateBullet(L_24_.BulletSpread)local T,G=spawn(function()CastRay(L_101_)end)for T,G in pairs(L_58_:GetChildren())do if G.Name:sub(1,7)=="\070\108\097\115\104\070\088"then G.Enabled=true end end delay(.033333333333333,function()for T,G in pairs(L_58_:GetChildren())do if G.Name:sub(1,7)=="\070\108\097\115\104\070\088"then G.Enabled=false end end end)if L_24_.CanBolt==true then BoltingBackAnim()delay(L_24_.Firerate/2,function()if L_24_.CanSlideLock==false then BoltingForwardAnim()elseif L_24_.CanSlideLock==true then if L_102_>0 then BoltingForwardAnim()end end end)end delay(L_24_.Firerate/2,function()Recoiling=false RecoilFront=false end)wait(L_24_.Firerate)local o=JamCalculation()if o then L_68_=false else L_68_=true end Shooting=false end end function fireBurst()if not Shooting and(L_102_>0 and(L_67_ and L_15_))then for T=1,L_24_.BurstNum,1 do if L_102_>0 and L_67_ then L_68_=false Recoiling=true if L_54_ then L_54_:FireServer((L_58_:WaitForChild("\070\105\114\101")).SoundId,L_58_)else(L_58_:WaitForChild("\070\105\114\101")):Play()end L_108_:FireServer()L_101_=CreateBullet(L_24_.BulletSpread)local T,G=spawn(function()CastRay(L_101_)end)for T,G in pairs(L_58_:GetChildren())do if G.Name:sub(1,7)=="\070\108\097\115\104\070\088"then G.Enabled=true end end delay(.033333333333333,function()for T,G in pairs(L_58_:GetChildren())do if G.Name:sub(1,7)=="\070\108\097\115\104\070\088"then G.Enabled=false end end end)if L_24_.CanBolt==true then BoltingBackAnim()delay(L_24_.Firerate/2,function()if L_24_.CanSlideLock==false then BoltingForwardAnim()elseif L_24_.CanSlideLock==true then if L_102_>0 then BoltingForwardAnim()end end end)end L_102_=L_102_-1 UpdateAmmo()RecoilFront=true delay(L_24_.Firerate/2,function()Recoiling=false RecoilFront=false end)wait(L_24_.Firerate)local o=JamCalculation()if o then L_68_=false else L_68_=true end end Shooting=true end Shooting=false end end function Shoot()if L_15_ and L_68_ then if L_91_==1 then fireSemi()elseif L_91_==2 then fireAuto()elseif L_91_==3 then fireBurst()elseif L_91_==4 then fireBoltAction()elseif L_91_==5 then fireShot()elseif L_91_==6 then fireExplo()end end end

function CreateBullet(L_199_arg1)
	local L_200_ = L_58_.Position
	local L_201_ = (L_4_.Hit.p - L_200_).unit
	local L_202_ = CFrame.Angles(math.rad(math.random(-L_199_arg1, L_199_arg1)), math.rad(math.random(-L_199_arg1, L_199_arg1)), math.rad(math.random(-L_199_arg1, L_199_arg1)))
	L_201_ = L_202_ * L_201_	
	local L_203_ = CFrame.new(L_200_, L_200_ + L_201_)	
		
	local L_204_ = Instance.new("Part", L_100_)
	game.Debris:AddItem(L_204_, 10)
	L_204_.Shape = Enum.PartType.Ball
	L_204_.Size = Vector3.new(1, 1, 12)
	L_204_.Name = "Bullet"
	L_204_.TopSurface = "Smooth"
	L_204_.BottomSurface = "Smooth"
	L_204_.BrickColor = BrickColor.new("Bright green")
	L_204_.Material = "Neon"
	L_204_.CanCollide = false
		--Bullet.CFrame = FirePart.CFrame + (Grip.CFrame.p - Grip.CFrame.p)
	L_204_.CFrame = L_203_
		
	local L_205_ = Instance.new("Sound")
	L_205_.SoundId = "rbxassetid://341519743"
	L_205_.Looped = true
	L_205_:Play()
	L_205_.Parent = L_204_
	L_205_.Volume = 0.4
	L_205_.MaxDistance = 30
	
	L_204_.Transparency = 1
	local L_206_ = L_204_:GetMass()
	local L_207_ = Instance.new('BodyForce', L_204_)
		
	if not L_82_ then
		L_207_.Force = L_24_.BulletPhysics
		L_204_.Velocity = L_201_ * L_24_.BulletSpeed
	else
		L_207_.Force = L_24_.ExploPhysics
		L_204_.Velocity = L_201_ * L_24_.ExploSpeed
	end
		
	local L_208_ = Instance.new('Attachment', L_204_)
	L_208_.Position = Vector3.new(0.1, 0, 0)
	local L_209_ = Instance.new('Attachment', L_204_)
	L_209_.Position = Vector3.new(-0.1, 0, 0)
			
	local L_210_ = TracerCalculation()
		
	if L_24_.TracerEnabled == true and L_210_ then
		local L_211_ = Instance.new('Trail', L_204_)
		L_211_.Attachment0 = L_208_
		L_211_.Attachment1 = L_209_
		L_211_.Transparency = NumberSequence.new(L_24_.TracerTransparency)
		L_211_.LightEmission = L_24_.TracerLightEmission
		L_211_.TextureLength = L_24_.TracerTextureLength
		L_211_.Lifetime = L_24_.TracerLifetime
		L_211_.FaceCamera = L_24_.TracerFaceCamera
		L_211_.Color = ColorSequence.new(L_24_.TracerColor.Color)
	end
		
	if L_1_:FindFirstChild('Shell') and not L_82_ then	
		CreateShell()	
	end	
		
	delay(0.2, function()
		L_204_.Transparency = 0
	end)
	
	return L_204_
end

function CheckForHumanoid(L_212_arg1)
	local L_213_ = false
	local L_214_ = nil
	if L_212_arg1 then
		if (L_212_arg1.Parent:FindFirstChild("Humanoid") or L_212_arg1.Parent.Parent:FindFirstChild("Humanoid")) then
			L_213_ = true
			if L_212_arg1.Parent:FindFirstChild('Humanoid') then
				L_214_ = L_212_arg1.Parent.Humanoid
			elseif L_212_arg1.Parent.Parent:FindFirstChild('Humanoid') then
				L_214_ = L_212_arg1.Parent.Parent.Humanoid
			end
		else
			L_213_ = false
		end	
	end
	return L_213_, L_214_
end

function CastRay(L_215_arg1)
	local L_216_, L_217_, L_218_
	local L_219_ = L_55_.Position;
	local L_220_ = L_215_arg1.Position;
	local L_221_ = 0

	local L_222_ = L_82_	
	
	while true do
		L_105_:wait()
		L_220_ = L_215_arg1.Position;
		L_221_ = L_221_ + (L_220_ - L_219_).magnitude
		L_216_, L_217_, L_218_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_219_, (L_220_ - L_219_)), IgnoreList);
		local L_223_ = Vector3.new(0, 1, 0):Cross(L_218_)
		local L_224_ = math.asin(L_223_.magnitude) -- division by 1 is redundant
		if L_221_ > L_24_.BulletDecay then
			L_215_arg1:Destroy()
			break
		end
		if L_216_ and (L_216_ and L_216_.Transparency >= 1 or L_216_.CanCollide == false) and L_216_.Name ~= 'Right Arm' and L_216_.Name ~= 'Left Arm' and L_216_.Name ~= 'Right Leg' and L_216_.Name ~= 'Left Leg' and L_216_.Name ~= 'Armor' then
			table.insert(IgnoreList, L_216_)
		end
	
		if L_216_ then
			L_223_ = Vector3.new(0, 1, 0):Cross(L_218_)
			L_224_ = math.asin(L_223_.magnitude) -- division by 1 is redundant
		
			L_117_:FireServer(L_217_)
		
			local L_225_ = CheckForHumanoid(L_216_)
			if L_225_ == false then
				L_215_arg1:Destroy()
				local L_226_ = L_112_:InvokeServer(L_217_, L_223_, L_224_, L_218_, "Part", L_216_)
			elseif L_225_ == true then
				L_215_arg1:Destroy()
				local L_227_ = L_112_:InvokeServer(L_217_, L_223_, L_224_, L_218_, "Human", L_216_)
			end
		end
	
		if L_216_ and L_222_ then
			L_115_:FireServer(L_217_)
		end
	
		if L_216_ then
			local L_228_, L_229_ = CheckForHumanoid(L_216_)
			if L_228_ then
				L_110_:FireServer(L_229_)
				if L_24_.AntiTK then
					if game.Players:FindFirstChild(L_229_.Parent.Name) and game.Players:FindFirstChild(L_229_.Parent.Name).TeamColor ~= L_2_.TeamColor or L_229_.Parent:FindFirstChild('Vars') and game.Players:FindFirstChild(L_229_.Parent:WaitForChild('Vars'):WaitForChild('BotID').Value) and L_2_.TeamColor ~= L_229_.Parent:WaitForChild('Vars'):WaitForChild('teamColor').Value then
						if L_216_.Name == 'Head' then
							L_109_:FireServer(L_229_, L_24_.HeadDamage)
							local L_230_ = L_19_:WaitForChild('BodyHit'):clone()
							L_230_.Parent = L_2_.PlayerGui
							L_230_:Play()
							game:GetService("Debris"):addItem(L_230_, L_230_.TimeLength)
						end
						if L_216_.Name ~= 'Head' and not (L_216_.Parent:IsA('Accessory') or L_216_.Parent:IsA('Hat')) then
							if L_216_.Name ~= 'Torso' and L_216_.Name ~= 'HumanoidRootPart' and L_216_.Name ~= 'Armor' then
								L_109_:FireServer(L_229_, L_24_.LimbDamage)
							elseif L_216_.Name == 'Torso' or L_216_.Name == 'HumanoidRootPart' and L_216_.Name ~= 'Armor'  then
								L_109_:FireServer(L_229_, L_24_.BaseDamage)
							elseif L_216_.Name == 'Armor' then
								L_109_:FireServer(L_229_, L_24_.ArmorDamage)
							end
							local L_231_ = L_19_:WaitForChild('BodyHit'):clone()
							L_231_.Parent = L_2_.PlayerGui
							L_231_:Play()
							game:GetService("Debris"):addItem(L_231_, L_231_.TimeLength)
						end
						if (L_216_.Parent:IsA('Accessory') or L_216_.Parent:IsA('Hat')) then
							L_109_:FireServer(L_229_, L_24_.HeadDamage)
							local L_232_ = L_19_:WaitForChild('BodyHit'):clone()
							L_232_.Parent = L_2_.PlayerGui
							L_232_:Play()
							game:GetService("Debris"):addItem(L_232_, L_232_.TimeLength)
						end
					end
				else
					if L_216_.Name == 'Head' then
						L_109_:FireServer(L_229_, L_24_.HeadDamage)
						local L_233_ = L_19_:WaitForChild('BodyHit'):clone()
						L_233_.Parent = L_2_.PlayerGui
						L_233_:Play()
						game:GetService("Debris"):addItem(L_233_, L_233_.TimeLength)
					end
					if L_216_.Name ~= 'Head' and not (L_216_.Parent:IsA('Accessory') or L_216_.Parent:IsA('Hat')) then
						if L_216_.Name ~= 'Torso' and L_216_.Name ~= 'HumanoidRootPart' and L_216_.Name ~= 'Armor' then
							L_109_:FireServer(L_229_, L_24_.LimbDamage)
						elseif L_216_.Name == 'Torso' or L_216_.Name == 'HumanoidRootPart' and L_216_.Name ~= 'Armor' then
							L_109_:FireServer(L_229_, L_24_.BaseDamage)
						elseif L_216_.Name == 'Armor' then
							L_109_:FireServer(L_229_, L_24_.ArmorDamage)
						end
						local L_234_ = L_19_:WaitForChild('BodyHit'):clone()
						L_234_.Parent = L_2_.PlayerGui
						L_234_:Play()
						game:GetService("Debris"):addItem(L_234_, L_234_.TimeLength)
					end
					if (L_216_.Parent:IsA('Accessory') or L_216_.Parent:IsA('Hat')) then
						L_109_:FireServer(L_229_, L_24_.HeadDamage)
						local L_235_ = L_19_:WaitForChild('BodyHit'):clone()
						L_235_.Parent = L_2_.PlayerGui
						L_235_:Play()
						game:GetService("Debris"):addItem(L_235_, L_235_.TimeLength)
					end
				end	
			end
		end
	
		if L_216_ and L_216_.Parent:FindFirstChild("Humanoid") then
			return L_216_, L_217_;
		end
		L_219_ = L_220_;
	end
end

function fireSemi()
	if L_15_ then
		L_68_ = false
		Recoiling = true
		Shooting = true
		
		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_58_:WaitForChild('Fire').SoundId, L_58_)
		else
			L_58_:WaitForChild('Fire'):Play()	
		end
		L_108_:FireServer()
		L_101_ = CreateBullet(L_24_.BulletSpread)
		L_102_ = L_102_ - 1
		UpdateAmmo()
		RecoilFront = true
		local L_236_, L_237_ = spawn(function()
			CastRay(L_101_)
		end)
		
		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_102_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end
		
		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)		
		
		wait(L_24_.Firerate)
		
		local L_238_ = JamCalculation()
		if L_238_ then
			L_68_ = false
		else
			L_68_ = true
		end
		Shooting = false
	end
end

function fireExplo()
	if L_15_ then
		L_68_ = false
		Recoiling = true
		Shooting = true
		if L_54_ then
			L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
		else
			L_59_:WaitForChild('Fire'):Play()	
		end
		L_108_:FireServer()
		L_101_ = CreateBullet(L_24_.BulletSpread)
		L_104_ = L_104_ - 1
		UpdateAmmo()
		RecoilFront = true
		local L_239_, L_240_ = spawn(function()
			CastRay(L_101_)
		end)
		
		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)		
			
		L_68_ = false
		Shooting = false
	end
end

function fireShot()
	if L_15_ then
		L_68_ = false
		Recoiling = true
		Shooting = true
		RecoilFront = true
		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_58_:WaitForChild('Fire').SoundId, L_58_)
		else
			L_58_:WaitForChild('Fire'):Play()	
		end
		L_108_:FireServer()
		for L_242_forvar1 = 1, L_24_.ShotNum do
			spawn(function()
				L_101_ = CreateBullet(L_24_.BulletSpread)
			end)
			local L_243_, L_244_ = spawn(function()
				CastRay(L_101_)
			end)
		end
						
		for L_245_forvar1, L_246_forvar2 in pairs(L_58_:GetChildren()) do
			if L_246_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_246_forvar2.Enabled = true
			end
		end
	
		delay(1 / 30, function()
			for L_247_forvar1, L_248_forvar2 in pairs(L_58_:GetChildren()) do
				if L_248_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_248_forvar2.Enabled = false
				end
			end
		end)
		
		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_102_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end
		
		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		L_102_ = L_102_ - 1
		UpdateAmmo()
		wait(L_24_.Firerate)
		
		L_75_ = true
		BoltBackAnim()
		BoltForwardAnim()
		IdleAnim()
		L_75_ = false
		
		local L_241_ = JamCalculation()
		if L_241_ then
			L_68_ = false
		else
			L_68_ = true
		end
		
		Shooting = false
	end
end

function fireBoltAction()
	if L_15_ then
		L_68_ = false
		Recoiling = true
		Shooting = true
		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_58_:WaitForChild('Fire').SoundId, L_58_)
		else
			L_58_:WaitForChild('Fire'):Play()	
		end
		L_108_:FireServer()
		L_101_ = CreateBullet(L_24_.BulletSpread)
		L_102_ = L_102_ - 1
		UpdateAmmo()
		RecoilFront = true
		local L_249_, L_250_ = spawn(function()
			CastRay(L_101_)
		end)
						
		for L_252_forvar1, L_253_forvar2 in pairs(L_58_:GetChildren()) do
			if L_253_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_253_forvar2.Enabled = true
			end
		end
	
		delay(1 / 30, function()
			for L_254_forvar1, L_255_forvar2 in pairs(L_58_:GetChildren()) do
				if L_255_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_255_forvar2.Enabled = false
				end
			end
		end)
		
		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_102_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end
		
		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		wait(L_24_.Firerate)
		
		L_75_ = true
		BoltBackAnim()
		BoltForwardAnim()
		IdleAnim()
		L_75_ = false
		
		local L_251_ = JamCalculation()
		if L_251_ then
			L_68_ = false
		else
			L_68_ = true
		end		
		
		Shooting = false
	end
end

function fireAuto()
	while not Shooting and L_102_ > 0 and L_67_ and L_68_ and L_15_ do
		L_68_ = false
		Recoiling = true
		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_58_:WaitForChild('Fire').SoundId, L_58_)
		else
			L_58_:WaitForChild('Fire'):Play()	
		end
		L_108_:FireServer()
		L_102_ = L_102_ - 1
		UpdateAmmo()
		Shooting = true
		RecoilFront = true
		L_101_ = CreateBullet(L_24_.BulletSpread)
		local L_256_, L_257_ = spawn(function()
			CastRay(L_101_)
		end)
					
		for L_259_forvar1, L_260_forvar2 in pairs(L_58_:GetChildren()) do
			if L_260_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_260_forvar2.Enabled = true
			end
		end
	
		delay(1 / 30, function()
			for L_261_forvar1, L_262_forvar2 in pairs(L_58_:GetChildren()) do
				if L_262_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_262_forvar2.Enabled = false
				end
			end
		end)
		
		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_102_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end
		
		
		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		wait(L_24_.Firerate)
		
		local L_258_ = JamCalculation()
		if L_258_ then
			L_68_ = false
		else
			L_68_ = true
		end
		
		Shooting = false
	end
end

function fireBurst()
	if not Shooting and L_102_ > 0 and L_67_ and L_15_ then
		for L_263_forvar1 = 1, L_24_.BurstNum do
			if L_102_ > 0 and L_67_ then
				L_68_ = false
				Recoiling = true
			--CheckReverb()
				if L_54_ then
					L_54_:FireServer(L_58_:WaitForChild('Fire').SoundId, L_58_)
				else
					L_58_:WaitForChild('Fire'):Play()	
				end
				L_108_:FireServer()
				L_101_ = CreateBullet(L_24_.BulletSpread)
				local L_264_, L_265_ = spawn(function()
					CastRay(L_101_)
				end)
					
				for L_267_forvar1, L_268_forvar2 in pairs(L_58_:GetChildren()) do
					if L_268_forvar2.Name:sub(1, 7) == "FlashFX" then
						L_268_forvar2.Enabled = true
					end
				end
		
				delay(1 / 30, function()
					for L_269_forvar1, L_270_forvar2 in pairs(L_58_:GetChildren()) do
						if L_270_forvar2.Name:sub(1, 7) == "FlashFX" then
							L_270_forvar2.Enabled = false
						end
					end
				end)
			
				if L_24_.CanBolt == true then
					BoltingBackAnim()
					delay(L_24_.Firerate / 2, function()
						if L_24_.CanSlideLock == false then
							BoltingForwardAnim()
						elseif L_24_.CanSlideLock == true then
							if L_102_ > 0 then
								BoltingForwardAnim()
							end
						end
					end)
				end
			
				L_102_ = L_102_ - 1
				UpdateAmmo()
				RecoilFront = true
				delay(L_24_.Firerate / 2, function()
					Recoiling = false
					RecoilFront = false
				end)
				wait(L_24_.Firerate)
			
				local L_266_ = JamCalculation()
				if L_266_ then
					L_68_ = false
				else
					L_68_ = true
				end
		
			end
			Shooting = true
		end
		Shooting = false
	end
end

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