local l=script.Parent local u=l:WaitForChild("\115\101\114\118\101\114\077\097\105\110")local V=l:WaitForChild("\072\097\110\100\108\101")local p=l:WaitForChild("\065\105\109\080\097\114\116")local n=l:WaitForChild("\077\097\105\110")local h=l:WaitForChild("\065\109\109\111")local T=l:WaitForChild("\067\108\105\112\083\105\122\101")local N=l:WaitForChild("\083\116\111\114\101\100\065\109\109\111")local Y=u:WaitForChild("\099\114\101\097\116\101\084\119\101\101\110\073\110\100\105\099\097\116\111\114")local d=u:WaitForChild("\100\101\108\101\116\101\084\119\101\101\110\073\110\100\105\099\097\116\111\114")local J=u:WaitForChild("\103\101\116\087\101\108\100\067\070")local F=u:WaitForChild("\103\117\110\083\101\116\117\112")local o=u:WaitForChild("\108\101\114\112\067\070")local A=u:WaitForChild("\099\114\101\097\116\101\066\108\111\111\100")local S=u:WaitForChild("\099\114\101\097\116\101\066\117\108\108\101\116\073\109\112\097\099\116")local t=u:WaitForChild("\099\114\101\097\116\101\083\104\111\099\107\119\097\118\101")local Q=u:WaitForChild("\099\114\101\097\116\101\084\114\097\105\108")local I=require(script:WaitForChild("\080\097\114\116\105\099\108\101"))local Z=require(script:WaitForChild("\083\112\114\105\110\103"))local M=require(l:WaitForChild("\065\078\073\077\065\084\073\079\078\083"))local b=require(l:WaitForChild("\080\076\085\071\073\078\083"))local K=require(l:WaitForChild("\083\069\084\084\073\078\071\083"))local c=game.Players.LocalPlayer local U=c.Character local z=U:WaitForChild("\072\117\109\097\110\111\105\100")local j=U:WaitForChild("\084\111\114\115\111")local s=U:WaitForChild("\072\101\097\100")local O=U:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local x=O:WaitForChild("\082\111\111\116\074\111\105\110\116")local a=j:WaitForChild("\078\101\099\107")local v=U:WaitForChild("\076\101\102\116 \065\114\109")local q=U:WaitForChild("\082\105\103\104\116 \065\114\109")local C=U:WaitForChild("\076\101\102\116 \076\101\103")local H=U:WaitForChild("\082\105\103\104\116 \076\101\103")local w=c:GetMouse()local y=script:WaitForChild("\109\097\105\110\071\085\073")local W=y:WaitForChild("\099\114\111\115\115\072\097\105\114")local k=y:WaitForChild("\072\085\068")local f=y:WaitForChild("\083\099\111\112\101")local R=y:WaitForChild("\102\105\114\101\083\101\108\101\099\116")local m=y:WaitForChild("\104\105\116\077\097\114\107\101\114")local g=y:WaitForChild("\083\101\110\115")local X=(W:WaitForChild("\065")):WaitForChild("\076\105\110\101")local D=(W:WaitForChild("\066")):WaitForChild("\076\105\110\101")local B=(W:WaitForChild("\067")):WaitForChild("\076\105\110\101")local E=(W:WaitForChild("\068")):WaitForChild("\076\105\110\101")local L=k:WaitForChild("\067\111\110\116\114\111\108\115")local P=(k:WaitForChild("\103\117\110\078\097\109\101")):WaitForChild("\084\105\116\108\101")local e=f:WaitForChild("\077\097\105\110")local r=f:WaitForChild("\083\116\101\097\100\121")local i=R:WaitForChild("\077\111\100\101\115")local G=(k:WaitForChild("\077\111\100\101")):WaitForChild("\077\097\105\110")local lj=(k:WaitForChild("\065\109\109\111")):WaitForChild("\067\108\105\112")local uj=(k:WaitForChild("\065\109\109\111")):WaitForChild("\083\116\111\114\101\100")local Vj=game:GetService("\068\101\098\114\105\115")local pj=game:GetService("\067\111\110\116\101\110\116\080\114\111\118\105\100\101\114")local nj=game:GetService("\082\117\110\083\101\114\118\105\099\101")local hj=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local Tj=game.Workspace.CurrentCamera local Nj,Yj,dj,Jj=math.abs,math.huge,math.floor,math.ceil local Fj,oj,Aj,Sj=math.rad,math.sin,math.cos,math.tan local tj,Qj=Vector2.new,Vector3.new local Ij,Zj=CFrame.new,CFrame.Angles local Mj=table.insert local bj=K.sprintTime*60 local Kj=K.scopeSettings.steadyTime*60 local cj={"\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\049\057\052\056\052\057\056\056\048";"\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\049\057\053\055\050\055\055\057\049";"\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\049\057\053\055\050\056\049\051\055";"\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\050\049\056\049\053\049\056\051\048"}local Uj={"\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\049\057\053\055\050\056\052\055\051","\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\049\057\053\055\050\056\054\057\051"}local zj={71;117;110,32;75;105,116,32;115,99;114;105,112;116,101,100;32,98,121;32,84;117;114,98,111,70;117;115,105,111,110;0}local jj={U;ignoreModel}local sj={Right=j:WaitForChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114");Left=j:WaitForChild("\076\101\102\116 \083\104\111\117\108\100\101\114")}local Oj={Ij(-1.5,0,0)*Zj(Fj(90),0,0),Ij(1.5,0,0)*Zj(Fj(90),0,0)}local xj={Stand={Ij(-0.5,-2,0);Ij(.5,-2,0)};Crouch={Ij(-0.5,-1.5,.5)*Zj(-Fj(90),0,0);Ij(.5,-1,-0.75)},Prone={Ij(-0.5,-2,0);Ij(.5,-2,0)}}local aj=function(l)return oj(Fj(l))end local vj=function(l)return l/90 end
--------------------------------------------------------------------------------------
--------------------[ CONSTANTS ]-----------------------------------------------------
--------------------------------------------------------------------------------------

local Gun = script.Parent
local serverMain = Gun:WaitForChild("serverMain")
local Handle = Gun:WaitForChild("Handle")
local AimPart = Gun:WaitForChild("AimPart")
local Main = Gun:WaitForChild("Main")

local Ammo = Gun:WaitForChild("Ammo")
local ClipSize = Gun:WaitForChild("ClipSize")
local StoredAmmo = Gun:WaitForChild("StoredAmmo")

local createTweenIndicator = serverMain:WaitForChild("createTweenIndicator")
local deleteTweenIndicator = serverMain:WaitForChild("deleteTweenIndicator")
local getWeldCF = serverMain:WaitForChild("getWeldCF")
local gunSetup = serverMain:WaitForChild("gunSetup")
local lerpCF = serverMain:WaitForChild("lerpCF")
local createBlood = serverMain:WaitForChild("createBlood")
local createBulletImpact = serverMain:WaitForChild("createBulletImpact")
local createShockwave = serverMain:WaitForChild("createShockwave")
local createTrail = serverMain:WaitForChild("createTrail")

local Particle = require(script:WaitForChild("Particle"))
local Spring = require(script:WaitForChild("Spring"))
local Anims = require(Gun:WaitForChild("ANIMATIONS"))
local Plugins = require(Gun:WaitForChild("PLUGINS"))
local S = require(Gun:WaitForChild("SETTINGS"))

local Player = game.Players.LocalPlayer
local Char = Player.Character
local Humanoid = Char:WaitForChild("Humanoid")
local Torso = Char:WaitForChild("Torso")
local Head = Char:WaitForChild("Head")
local HRP = Char:WaitForChild("HumanoidRootPart")
local Root = HRP:WaitForChild("RootJoint")

local Neck = Torso:WaitForChild("Neck")

local LArm = Char:WaitForChild("Left Arm")
local RArm = Char:WaitForChild("Right Arm")
local LLeg = Char:WaitForChild("Left Leg")
local RLeg = Char:WaitForChild("Right Leg")

local M2 = Player:GetMouse()

local mainGUI = script:WaitForChild("mainGUI")

local crossHair = mainGUI:WaitForChild("crossHair")
local HUD = mainGUI:WaitForChild("HUD")
local Scope = mainGUI:WaitForChild("Scope")
local fireSelect = mainGUI:WaitForChild("fireSelect")
local hitMarker = mainGUI:WaitForChild("hitMarker")
local Sens = mainGUI:WaitForChild("Sens")

local crossA = crossHair:WaitForChild("A"):WaitForChild("Line")
local crossB = crossHair:WaitForChild("B"):WaitForChild("Line")
local crossC = crossHair:WaitForChild("C"):WaitForChild("Line")
local crossD = crossHair:WaitForChild("D"):WaitForChild("Line")

local Controls = HUD:WaitForChild("Controls")

local gunNameTitle = HUD:WaitForChild("gunName"):WaitForChild("Title")

local scopeMain = Scope:WaitForChild("Main")
local scopeSteady = Scope:WaitForChild("Steady")

local fireModes = fireSelect:WaitForChild("Modes")

local modeGUI = HUD:WaitForChild("Mode"):WaitForChild("Main")
local clipAmmoGUI = HUD:WaitForChild("Ammo"):WaitForChild("Clip")
local storedAmmoGUI = HUD:WaitForChild("Ammo"):WaitForChild("Stored")

local DS = game:GetService("Debris")
local CP = game:GetService("ContentProvider")
local RS = game:GetService("RunService")
local UIS = game:GetService("UserInputService")

local Cam = game.Workspace.CurrentCamera

local ABS, HUGE, FLOOR, CEIL = math.abs, math.huge, math.floor, math.ceil
local RAD, SIN, COS, TAN = math.rad, math.sin, math.cos, math.tan
local VEC2, V3 = Vector2.new, Vector3.new
local CF, CFANG = CFrame.new, CFrame.Angles
local INSERT = table.insert

local maxStamina = S.sprintTime * 60
local maxSteadyTime = S.scopeSettings.steadyTime * 60

local LethalIcons = {
	"http://www.roblox.com/asset/?id=194849880",
	"http://www.roblox.com/asset/?id=195727791",
	"http://www.roblox.com/asset/?id=195728137",
	"http://www.roblox.com/asset/?id=218151830",
}

local TacticalIcons = {
	"http://www.roblox.com/asset/?id=195728473",
	"http://www.roblox.com/asset/?id=195728693",
}

local ASCII = {
	071,
	117,
	110,
	032,
	075,
	105,
	116,
	032,
	115,
	099,
	114,
	105,
	112,
	116,
	101,
	100,
	032,
	098,
	121,
	032,
	084,
	117,
	114,
	098,
	111,
	070,
	117,
	115,
	105,
	111,
	110,
	000,
}

local Ignore = {
	Char,
	ignoreModel,
}

local Shoulders = {
	Right = Torso:WaitForChild("Right Shoulder"),
	Left = Torso:WaitForChild("Left Shoulder"),
}

local armC0 = {
	CF(-1.5, 0, 0) * CFANG(RAD(90), 0, 0),
	CF(1.5, 0, 0) * CFANG(RAD(90), 0, 0),
}

local legC0 = {
	Stand = {
		CF(-0.5, -2, 0),
		CF(0.5, -2, 0),
	},
	Crouch = {
		CF(-0.5, -1.5, 0.5) * CFANG(-RAD(90), 0, 0),
		CF(0.5, -1, -0.75),
	},
	Prone = {
		CF(-0.5, -2, 0),
		CF(0.5, -2, 0),
	},
}

local Sine = function(X)
	return SIN(RAD(X))
end

local Linear = function(X)
	return (X / 90)
end
