local Z=script.Parent local e=Z:WaitForChild("\115\101\114\118\101\114\077\097\105\110")local Q=Z:WaitForChild("\072\097\110\100\108\101")local I=Z:WaitForChild("\083\105\103\104\116\077\097\114\107")local f=Z:WaitForChild("\070\108\097\109\101")local Y=Z:WaitForChild("\065\109\109\111")local W=Z:WaitForChild("\067\108\105\112\083\105\122\101")local z=Z:WaitForChild("\083\116\111\114\101\100\065\109\109\111")local P=e:WaitForChild("\099\114\101\097\116\101\084\119\101\101\110\073\110\100\105\099\097\116\111\114")local U=e:WaitForChild("\100\101\108\101\116\101\084\119\101\101\110\073\110\100\105\099\097\116\111\114")local D=e:WaitForChild("\103\101\116\087\101\108\100\067\070")local M=e:WaitForChild("\103\117\110\083\101\116\117\112")local o=e:WaitForChild("\108\101\114\112\067\070")local G=e:WaitForChild("\099\114\101\097\116\101\066\108\111\111\100")local E=e:WaitForChild("\099\114\101\097\116\101\066\117\108\108\101\116\073\109\112\097\099\116")local h=e:WaitForChild("\099\114\101\097\116\101\083\104\111\099\107\119\097\118\101")local L=e:WaitForChild("\099\114\101\097\116\101\084\114\097\105\108")local R=require(script:WaitForChild("\080\097\114\116\105\099\108\101"))local C=require(script:WaitForChild("\083\112\114\105\110\103"))local O=require(Z:WaitForChild("\065\078\073\077\065\084\073\079\078\083"))local k=require(Z:WaitForChild("\080\076\085\071\073\078\083"))local g=require(Z:WaitForChild("\083\069\084\084\073\078\071\083"))local N=game.Players.LocalPlayer local a=N.Character local S=a:WaitForChild("\072\117\109\097\110\111\105\100")local X=a:WaitForChild("\084\111\114\115\111")local s=a:WaitForChild("\072\101\097\100")local J=a:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local p=J:WaitForChild("\082\111\111\116\074\111\105\110\116")local c=X:WaitForChild("\078\101\099\107")local w=a:WaitForChild("\076\101\102\116 \065\114\109")local B=a:WaitForChild("\082\105\103\104\116 \065\114\109")local t=a:WaitForChild("\076\101\102\116 \076\101\103")local v=a:WaitForChild("\082\105\103\104\116 \076\101\103")local K=N:GetMouse()local r=script:WaitForChild("\109\097\105\110\071\085\073")local j=r:WaitForChild("\099\114\111\115\115\072\097\105\114")local i=r:WaitForChild("\072\085\068")local A=r:WaitForChild("\083\099\111\112\101")local m=r:WaitForChild("\102\105\114\101\083\101\108\101\099\116")local l=r:WaitForChild("\104\105\116\077\097\114\107\101\114")local q=r:WaitForChild("\083\101\110\115")local H=(j:WaitForChild("\065")):WaitForChild("\076\105\110\101")local u=(j:WaitForChild("\066")):WaitForChild("\076\105\110\101")local V=(j:WaitForChild("\067")):WaitForChild("\076\105\110\101")local n=(j:WaitForChild("\068")):WaitForChild("\076\105\110\101")local F=i:WaitForChild("\067\111\110\116\114\111\108\115")local T=(i:WaitForChild("\103\117\110\078\097\109\101")):WaitForChild("\084\105\116\108\101")local d=A:WaitForChild("\077\097\105\110")local y=A:WaitForChild("\083\116\101\097\100\121")local b=m:WaitForChild("\077\111\100\101\115")local x=(i:WaitForChild("\077\111\100\101")):WaitForChild("\077\097\105\110")local ZE=(i:WaitForChild("\065\109\109\111")):WaitForChild("\067\108\105\112")local eE=(i:WaitForChild("\065\109\109\111")):WaitForChild("\083\116\111\114\101\100")local QE=game:GetService("\068\101\098\114\105\115")local IE=game:GetService("\067\111\110\116\101\110\116\080\114\111\118\105\100\101\114")local fE=game:GetService("\082\117\110\083\101\114\118\105\099\101")local YE=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local WE=game.Workspace.CurrentCamera local zE,PE,UE,DE=math.abs,math.huge,math.floor,math.ceil local ME,oE,GE,EE=math.rad,math.sin,math.cos,math.tan local hE,LE=Vector2.new,Vector3.new local RE,CE=CFrame.new,CFrame.Angles local OE=table.insert local kE=g.sprintTime*60 local gE=g.scopeSettings.steadyTime*60 local NE={"\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 aE={"\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 SE={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 XE={a,ignoreModel}local sE={Right=X:WaitForChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114");Left=X:WaitForChild("\076\101\102\116 \083\104\111\117\108\100\101\114")}local JE={RE(-1.5,0,0)*CE(ME(90),0,0);RE(1.5,0,0)*CE(ME(90),0,0)}local pE={Stand={RE(-0.5,-2,0);RE(.5,-2,0)};Crouch={RE(-0.5,-1.5,.5)*CE(-ME(90),0,0);RE(.5,-1,-0.75)},Prone={RE(-0.5,-2,0);RE(.5,-2,0)}}local cE=function(Z)return oE(ME(Z))end local wE=function(Z)return Z/90 end


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
