local Q=nil local z=nil local Y=nil local J=nil local H=nil local N local t=nil local h local n=nil local r=Tool.TextureId local K=game:GetService("\068\101\098\114\105\115")local v=game:GetService("\080\108\097\121\101\114\115")local M local u=nil local Z=nil local o=false local T=time()local p=script.Parent:WaitForChild("\070\108\097\114\101")local D=nil local l=Workspace.Terrain.WorldToCellPreferSolid local s=Workspace.Terrain.GetCell function RayIgnoreCheck(Q,Y)if Q then if Q.Transparency>=1 or string.lower(Q.Name)=="\119\097\116\101\114"or Q.Name=="\069\102\102\101\099\116"or Q.Name=="\082\111\099\107\101\116"or Q.Name=="\066\117\108\108\101\116"or Q.Name=="\072\097\110\100\108\101"or Q:IsDescendantOf(z)then return true elseif Q:IsA("\084\101\114\114\097\105\110")and Y then local Q=l(Workspace.Terrain,Y)if Q then local z=s(Workspace.Terrain,Q.x,Q.y,Q.z)if z and z==Enum.CellMaterial.Water then return true end end end end return false end
-- Player specific convenience variables
local MyPlayer = nil
local MyCharacter = nil
local MyHumanoid = nil
local MyTorso = nil
local MyMouse = nil

local RecoilAnim
local RecoilTrack = nil

local ReloadAnim
local ReloadTrack = nil

local IconURL = Tool.TextureId
local DebrisService = game:GetService("Debris")
local PlayersService = game:GetService("Players")

local FireSound

local OnFireConnection = nil
local OnReloadConnection = nil

local DecreasedAimLastShot = false
local LastSpreadUpdate = time()

local flare = script.Parent:WaitForChild("Flare")

local FlashHolder = nil

local WorldToCellFunction = Workspace.Terrain.WorldToCellPreferSolid
local GetCellFunction = Workspace.Terrain.GetCell

function RayIgnoreCheck(hit, pos)
	if hit then
		if
			hit.Transparency >= 1
			or string.lower(hit.Name) == "water"
			or hit.Name == "Effect"
			or hit.Name == "Rocket"
			or hit.Name == "Bullet"
			or hit.Name == "Handle"
			or hit:IsDescendantOf(MyCharacter)
		then
			return true
		elseif hit:IsA("Terrain") and pos then
			local cellPos = WorldToCellFunction(Workspace.Terrain, pos)
			if cellPos then
				local cellMat = GetCellFunction(Workspace.Terrain, cellPos.x, cellPos.y, cellPos.z)
				if cellMat and cellMat == Enum.CellMaterial.Water then
					return true
				end
			end
		end
	end
	return false
end
