local w=script.Parent local f=w:WaitForChild("\115\101\114\118\101\114\077\097\105\110")local Q=w:WaitForChild("\072\097\110\100\108\101")local I=w:WaitForChild("\083\105\103\104\116\077\097\114\107")local n=w:WaitForChild("\070\108\097\109\101")local s=w:WaitForChild("\065\109\109\111")local O=w:WaitForChild("\067\108\105\112\083\105\122\101")local B=w:WaitForChild("\083\116\111\114\101\100\065\109\109\111")local v=f:WaitForChild("\099\114\101\097\116\101\084\119\101\101\110\073\110\100\105\099\097\116\111\114")local e=f:WaitForChild("\100\101\108\101\116\101\084\119\101\101\110\073\110\100\105\099\097\116\111\114")local F=f:WaitForChild("\103\101\116\087\101\108\100\067\070")local D=f:WaitForChild("\103\117\110\083\101\116\117\112")local g=f:WaitForChild("\108\101\114\112\067\070")local P=f:WaitForChild("\099\114\101\097\116\101\066\108\111\111\100")local X=f:WaitForChild("\099\114\101\097\116\101\066\117\108\108\101\116\073\109\112\097\099\116")local q=f:WaitForChild("\099\114\101\097\116\101\083\104\111\099\107\119\097\118\101")local K=f:WaitForChild("\099\114\101\097\116\101\084\114\097\105\108")local E=require(script:WaitForChild("\080\097\114\116\105\099\108\101"))local h=require(script:WaitForChild("\083\112\114\105\110\103"))local Z=require(w:WaitForChild("\065\078\073\077\065\084\073\079\078\083"))local V=require(w:WaitForChild("\080\076\085\071\073\078\083"))local d=require(w:WaitForChild("\083\069\084\084\073\078\071\083"))local Y=game.Players.LocalPlayer local G=Y.Character local A=G:WaitForChild("\072\117\109\097\110\111\105\100")local j=G:WaitForChild("\084\111\114\115\111")local p=G:WaitForChild("\072\101\097\100")local S=G:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local i=S:WaitForChild("\082\111\111\116\074\111\105\110\116")local H=j:WaitForChild("\078\101\099\107")local W=G:WaitForChild("\076\101\102\116 \065\114\109")local r=G:WaitForChild("\082\105\103\104\116 \065\114\109")local x=G:WaitForChild("\076\101\102\116 \076\101\103")local y=G:WaitForChild("\082\105\103\104\116 \076\101\103")local L=Y:GetMouse()local u=script:WaitForChild("\109\097\105\110\071\085\073")local J=u:WaitForChild("\099\114\111\115\115\072\097\105\114")local c=u:WaitForChild("\072\085\068")local z=u:WaitForChild("\083\099\111\112\101")local t=u:WaitForChild("\102\105\114\101\083\101\108\101\099\116")local N=u:WaitForChild("\104\105\116\077\097\114\107\101\114")local R=u:WaitForChild("\083\101\110\115")local a=(J:WaitForChild("\065")):WaitForChild("\076\105\110\101")local M=(J:WaitForChild("\066")):WaitForChild("\076\105\110\101")local T=(J:WaitForChild("\067")):WaitForChild("\076\105\110\101")local b=(J:WaitForChild("\068")):WaitForChild("\076\105\110\101")local l=c:WaitForChild("\067\111\110\116\114\111\108\115")local k=(c:WaitForChild("\103\117\110\078\097\109\101")):WaitForChild("\084\105\116\108\101")local o=z:WaitForChild("\077\097\105\110")local m=z:WaitForChild("\083\116\101\097\100\121")local U=t:WaitForChild("\077\111\100\101\115")local C=(c:WaitForChild("\077\111\100\101")):WaitForChild("\077\097\105\110")local wO=(c:WaitForChild("\065\109\109\111")):WaitForChild("\067\108\105\112")local fO=(c:WaitForChild("\065\109\109\111")):WaitForChild("\083\116\111\114\101\100")local QO=game:GetService("\068\101\098\114\105\115")local IO=game:GetService("\067\111\110\116\101\110\116\080\114\111\118\105\100\101\114")local nO=game:GetService("\082\117\110\083\101\114\118\105\099\101")local sO=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local OO=game.Workspace.CurrentCamera local BO,vO,eO,FO=math.abs,math.huge,math.floor,math.ceil local DO,gO,PO,XO=math.rad,math.sin,math.cos,math.tan local qO,KO=Vector2.new,Vector3.new local EO,hO=CFrame.new,CFrame.Angles local ZO=table.insert local VO=d.sprintTime*60 local dO=d.scopeSettings.steadyTime*60 local YO={"\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 GO={"\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 AO={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 jO={G,ignoreModel}local pO={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 SO={EO(-1.5,0,0)*hO(DO(90),0,0),EO(1.5,0,0)*hO(DO(90),0,0)}local iO={Stand={EO(-0.5,-2,0);EO(.5,-2,0)},Crouch={EO(-0.5,-1.5,.5)*hO(-DO(90),0,0);EO(.5,-1,-0.75)},Prone={EO(-0.5,-2,0);EO(.5,-2,0)}}local HO=function(w)return gO(DO(w))end local WO=function(w)return w/90 end
--------------------------------------------------------------------------------------
--------------------[ CONSTANTS ]-----------------------------------------------------
--------------------------------------------------------------------------------------

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

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
