local Q=false local Y=0 local G=false local L=false local H=false local j=false local i=false local s=0 local q=0 local d=1 local E=0 local r=false local O=false local z=false local D=false local I=false local v=false local t=0 local a=VEC2(COS(RAD(90)-S.aimSettings.headTilt)*.5,1+SIN(RAD(90)-S.aimSettings.headTilt)*.5)local F=false local h=false local f=true local Z=false local T=false local n=false local w=false local o=true local m=nil local K=false local g=0 local c={0,0}local X={Pos=V3();Rot=V3();Code=nil}local M=0 local k=1 local l=true local V=0 local x={}local R=true local e=0 local U={Pos=0,Rot=0;Code=0}local A=true local C=false local u=false local W=false local y=false local N=S.sprintTime*60 local B=S.scopeSettings.steadyTime*60 local p=false local J=false local P=false local b=nil local Qn=nil local Yn="\117\110\065\105\109\101\100"local Gn="\083\116\097\110\100"local Ln="\073\100\108\105\110\103"local Hn=S.spreadSettings.unAimed.Stand.Idling local jn=0 local sn=false local qn=S.sensitivitySettings.Default local dn=S.sensitivitySettings.Aim local En=0 local rn=0 local On=0 local zn=1 local Sn=1 local Dn=VEC2()local In=0 local vn=0 local tn=0 local an=0 local Fn=0 local hn=0 local fn=0 local Zn=0 local Tn=1 local nn=1 local wn=7 local on=S.momentumSettings.Amplitude.unAimed local mn=1 local Kn=false local gn=0 local cn={guiScope={Rot=V3()},Reload={Rot=V3();Code=nil},Recoil={Rot=V3(),Code=nil}}local Xn={Pos=V3(),Rot=V3(),Ang=0,Code=0}local Mn=0 local kn={}local ln={}local Vn={}
--------------------------------------------------------------------------------------
--------------------[ VARIABLES ]-----------------------------------------------------
--------------------------------------------------------------------------------------

local Selected = false

local playerMass = 0

local Forward = false
local Backward = false

local Idling = false
local Walking = false
local Running = false

local crawlCamRot = 0
local crawlAlpha = 0
local idleAlpha = 1
local walkAlpha = 0
local isCrawling = false
local isIdling = false
local isWalking = false
local isRunning = false

local Aimed = false
local Aiming = false
local aimAlpha = 0
local headOffset = VEC2(COS(RAD(90) - S.aimSettings.headTilt) * 0.5, 1 + SIN(RAD(90) - S.aimSettings.headTilt) * 0.5)

local Reloading = false
local breakReload = false
local magVisible = true
local newMag = false

local Knifing = false

local MB1Down = false
local Firing = false
local canFire = true
local fireFunction = nil
local firstShot = false
local shotCount = 0
local lastSideRecoil = { 0, 0 }
local recoilAnim = {
	Pos = V3(),
	Rot = V3(),
	Code = nil,
}

local numModes = 0
local rawFireMode = 1
local canSelectFire = true
local guiAngOffset = 0
local Modes = {}

local onGround = true
local startFallHeight = 0
local jumpAnim = {
	Pos = 0,
	Rot = 0,
	Code = 0,
}

local runReady = true
local runKeyPressed = false
local chargingStamina = false

local AimingIn = false
local AimingOut = false

local Stamina = S.sprintTime * 60
local currentSteadyTime = S.scopeSettings.steadyTime * 60

local camSteady = false
local takingBreath = false
local steadyKeyPressed = false

local Grip = nil
local aimedGripCF = nil

local spreadZoom = "unAimed"
local spreadStance = "Stand"
local spreadMotion = "Idling"
local baseSpread = S.spreadSettings.unAimed.Stand.Idling
local currentSpread = 0
local loweringSpread = false

local mouseSensitivity = S.sensitivitySettings.Default
local aimSensitivity = S.sensitivitySettings.Aim
local lastSensUpdate = 0

local ammoInClip = 0

local Stance = 0
local stanceSway = 1
local camSway = 1

local camAng = VEC2()

local armTilt = 0
local moveAng = 0
local animCode = 0

local desiredXOffset = 0
local desiredYOffset = 0
local currentXOffset = 0
local currentYOffset = 0
local aimHeadOffset = 0
local recoilAnimMultiplier = 1
local jumpAnimMultiplier = 1
local translationDivisor = 7
local rotationMultiplier = S.momentumSettings.Amplitude.unAimed
local armTiltMultiplier = 1

local equipAnimPlaying = false

local crossOffset = 0

local camOffsets = {
	guiScope = {
		Rot = V3(),
	},
	Reload = {
		Rot = V3(),
		Code = nil,
	},
	Recoil = {
		Rot = V3(),
		Code = nil,
	},
}

local Anim = {
	Pos = V3(),
	Rot = V3(),
	Ang = 0,
	Code = 0,
}

local lastBeat = 0

local gunParts = {}

local Connections = {}

local Keys = {}
