if not game:IsLoaded()then game.Loaded:Wait()end local v=script:FindFirstAncestor("\077\097\105\110\085\073")local B=require(script.Parent)local Q=require(v.Modules.Spring)local I=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local u=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local U=game.Players.LocalPlayer local L=B.char:WaitForChild("\072\117\109\097\110\111\105\100")local Y=B.char:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local V=CFrame.new(0,0,0)local R=Vector3.new(0,0,0)local m=Vector3.new(0,0,0)local T=Q.new(Vector3.new(0,-2.7,-0.25))T:__newindex("\068\097\109\112\101\114",1)T:__newindex("\083\112\101\101\100",20)B.cam.CameraType=Enum.CameraType.Scriptable local f={Acog=25,HoloSight=15;[""]=0}local O=Instance.new("\080\111\105\110\116\076\105\103\104\116")O.Color=Color3.fromRGB(120,122,138)O.Range=10 O.Brightness=.55 if B.platform=="\099\111\110\115\111\108\101"then O.Brightness=.7 pcall(function()game.Lighting.XBoxColor.Enabled=true end)end O.Shadows=false O.Parent=B.char:WaitForChild("\072\101\097\100")delay(5,function()O.Parent=B.char:WaitForChild("\072\101\097\100")end)local G=RaycastParams.new()G.CollisionGroup="\078\111\080\108\097\121\101\114"G.FilterDescendantsInstances={B.viewmodel;B.char}I.MouseIconEnabled=false local x=Vector2.new(0,0)B.update()local b=.016666666666667 local o=V local d=x local function k(v)if v~=v then return end local Q=v.Magnitude/b if Q>=1000 then v=v*(1000/Q)end B.ay_t=math.clamp(B.ay_t-v.y,-65,65)B.ax_t=(B.ax_t-v.x)%360 if B.camlock~=nil then B.camlockedoffset[2]=math.clamp(B.camlockedoffset[2]-v.y/2,-25,25)B.camlockedoffset[1]=math.clamp(B.camlockedoffset[1]-v.x/2,-65,65)else B.camlockedoffset={0;0}end o=o*(CFrame.Angles(0,math.rad(-v.x),0)*CFrame.Angles(math.rad(-v.y),0,0))B.bobspring:Impulse(Vector3.new(-v.x/1,-v.y/1,0))end I.InputChanged:connect(function(v,Q)if(v.UserInputType==Enum.UserInputType.MouseMovement or v.UserInputType==Enum.UserInputType.Touch or v.KeyCode==Enum.KeyCode.Thumbstick2)and(Q==false and B.dead==false or(B.hrc==true or v.KeyCode==Enum.KeyCode.Thumbstick2)and B.dead==true)then local Q=B.cam.FieldOfView/90 local I=(Vector2.new(v.Delta.x*.5,v.Delta.y*.5)*.8)*Q if v.UserInputType==Enum.UserInputType.Touch then I=(Vector2.new(v.Delta.x*.5,v.Delta.y*.5)*1.6)*Q B.hrc=true end if v.KeyCode==Enum.KeyCode.Thumbstick2 then local B=(Vector2.new(v.Position.x*.5,(v.Position.y*-1)*.5)*12)*Q if v.Position.Magnitude<.3 then B=Vector2.new(0,0)end d=(B.Unit*math.max(B.Magnitude-.3,0))*1.5 return else k(I)end end end)v.Event_RepositionViewmodel.Event:Connect(function()T:__newindex("\080\111\115\105\116\105\111\110",Vector3.new(0,-3,-0.35))end)local A=nil local l=R local a=m B.cam.CameraType=Enum.CameraType.Scriptable game["\082\117\110 \083\101\114\118\105\099\101"]:BindToRenderStep("\099\097\109\105\110\105\116",95,function(v)if workspace.CurrentCamera.CameraType~=Enum.CameraType.Attach or script.Parent.Parent.Parent.Parent.lol.Initiator.Main_Game.stopscriptablecam.Value==false then B.cam.CameraType=Enum.CameraType.Scriptable end if B.freemouse==true or B.dead==true and B.hrc==false then I.MouseBehavior=Enum.MouseBehavior.Default I.MouseIconEnabled=true else I.MouseBehavior=Enum.MouseBehavior.LockCenter I.MouseIconEnabled=false end if A~=nil then local Q=(Vector2.new(A.Position.x*.5,(A.Position.y*-1)*.5)*12)*(B.cam.FieldOfView/90)k((((Q.Unit*math.max(Q.Magnitude-.25,0))*1.1)*v)*60)end if B.camlock~=nil and((tick()<=B.camlock.last or L.MoveDirection.Magnitude<.75)and B.camlockHead==false)then B.ax_t=B.camlock.x B.ay_t=B.camlock.y B.ax=B.camlock.x B.ay=B.camlock.y elseif B.camlock==nil or not B.camlockHead then if B.camlock~=nil then(game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")).Bricks.CamLock:FireServer()end local Q=B.ax_t-B.ax B.ax=(B.ax+(math.abs(Q)>180 and Q-(Q/math.abs(Q))*360 or Q)*math.clamp(v*25,.01,1))%360 B.ay=B.ay+(B.ay_t-B.ay)*math.clamp(v*25,.01,1)end local Q=Vector3.new(0,.2,0)local u=Vector3.new(0,0,-0.25)if B.crouching==true then Q=Vector3.new(0,-0.2,0)end b=v l=l+(Q-l)*math.clamp(v*10,.01,1)a=a+(u-a)*math.clamp(v*10,.01,1)B.fovspring=B.fovspring+(B.fovtarget-B.fovspring)*math.clamp(v*5,.01,1)B.az=B.az+(B.az_t-B.az)*math.clamp(v*12,.01,1)local U=Vector3.new(0,0,0)if B.dead==true then local v=workspace.CurrentRooms:FindFirstChild((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")).GameData.LatestRoom.Value)if v and B.spectarget==nil then B.basecamcf=(v.RoomStart.CFrame*CFrame.new(0,5,-9))*CFrame.Angles(0,math.rad((tick()-B.deathtick)*15),0)elseif B.spectarget and((B.spectarget:IsA("\080\108\097\121\101\114")and B.spectarget.Character)and(B.spectarget.Character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")and(B.spectarget.Character:FindFirstChild("\072\117\109\097\110\111\105\100")and(B.spectarget.Character:FindFirstChild("\072\117\109\097\110\111\105\100")).Health>.01)))then B.basecamcf=(((CFrame.new((B.spectarget.Character:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")).Position)*CFrame.new(0,1,0))*CFrame.Angles(0,math.rad(B.ax),0))*CFrame.Angles(-0.26179938779915,0,0))*CFrame.new(0,0,6)end elseif B.stunned==true then local v=(Y.CFrame*CFrame.new(0,1.45,0)).p local Q=RaycastParams.new()Q.CollisionGroup="\078\111\080\108\097\121\101\114"Q.FilterDescendantsInstances={B.viewmodel;B.char}local I=workspace:Raycast(v,Y.CFrame.LookVector*.75,Q)if I and I.Position then local Q=I.Position local u=I.Instance if Q then B.basecamcf=(Y.CFrame*CFrame.new(0,1.45,-(v-Q)))*CFrame.Angles(math.rad(math.clamp(B.bobspring.p.Y,-80,80)),math.rad(math.clamp(B.bobspring.p.X,-80,80)),math.rad(math.clamp(B.bobspring.p.Z,-40,40)))end else B.basecamcf=(Y.CFrame*CFrame.new(0,1.45,-0.75))*CFrame.Angles(math.rad(math.clamp(B.bobspring.p.Y,-80,80)),math.rad(math.clamp(B.bobspring.p.X,-80,80)),math.rad(math.clamp(B.bobspring.p.Z,-40,40)))end B.bobspring:__newindex("\083\112\101\101\100",3)elseif B.camlock~=nil then B.basecamcf=((((B.char.Head.CFrame+Vector3.new(0,.5,0))*CFrame.new(0,.15,-0.25))*CFrame.Angles(math.rad(math.clamp(B.bobspring.p.Y,-80,80)),math.rad(math.clamp(B.bobspring.p.X,-80,80)),math.rad(math.clamp(B.bobspring.p.Z,-40,40))))*CFrame.Angles(0,math.rad(B.camlockedoffset[1]),0))*CFrame.Angles(math.rad(B.camlockedoffset[2]),0,0)B.bobspring:__newindex("\083\112\101\101\100",5)else B.bobspring:__newindex("\083\112\101\101\100",12)local v=(B.char.Head.Position-B.char.LowerTorso.Position)*Vector3.new(1,0,1)B.basecamcf=((((((CFrame.new(B.char.Head.Position+B.char.Head.CFrame.UpVector*.2)*CFrame.new(l))*CFrame.Angles(0,math.rad(B.ax),0))*CFrame.new(-B.az/40,0,-0.2))*CFrame.Angles(math.rad(math.clamp(((B.ay+B.bobspring.Position.Y)+B.spring.p.Y)+B.recoil_spring.Position.Y,-88,88)),0,0))*CFrame.new(a))*CFrame.Angles(0,0,math.rad(B.az/2)))*CFrame.Angles(0,math.rad(math.clamp(-B.bobspring.p.X,-20,20)),math.rad(math.clamp(-B.bobspring.Position.X,-20,20)))end if B.stopcam==false then B.finalCamCFrame=B.basecamcf*B.csgo+U B.cam.FieldOfView=B.fovspring end end)local function p()local v={}for B,Q in pairs(I:GetGamepadState(Enum.UserInputType.Gamepad1))do v[Q.KeyCode]=Q end A=v[Enum.KeyCode.Thumbstick2]print(A)end I.GamepadConnected:Connect(p)if I.GamepadEnabled then p()end

if not game:IsLoaded() then
	game.Loaded:Wait()
end
local v1 = script:FindFirstAncestor("MainUI");
local v2 = require(script.Parent);
local v3 = require(v1.Modules.Spring);
local l__UserInputService__4 = game:GetService("UserInputService");
local l__TweenService__5 = game:GetService("TweenService");
local l__LocalPlayer__6 = game.Players.LocalPlayer;
local l__Humanoid__7 = v2.char:WaitForChild("Humanoid");
local l__HumanoidRootPart__8 = v2.char:WaitForChild("HumanoidRootPart");
local v9 = CFrame.new(0, 0, 0);
local v10 = Vector3.new(0, 0, 0);
local v11 = Vector3.new(0, 0, 0);
local v12 = v3.new(Vector3.new(0, -2.7, -0.25));
v12:__newindex("Damper", 1);
v12:__newindex("Speed", 20);
v2.cam.CameraType = Enum.CameraType.Scriptable;
local v13 = {
	Acog = 25, 
	HoloSight = 15, 
	[""] = 0
};
local v14 = Instance.new("PointLight");
v14.Color = Color3.fromRGB(120, 122, 138);
v14.Range = 10;
v14.Brightness = 0.55;
if v2.platform == "console" then
	v14.Brightness = 0.7;
	pcall(function()
		game.Lighting.XBoxColor.Enabled = true;
	end);
end;
v14.Shadows = false;
v14.Parent = v2.char:WaitForChild("Head");
delay(5, function()
	v14.Parent = v2.char:WaitForChild("Head");
end);
local v15 = RaycastParams.new();
v15.CollisionGroup = "NoPlayer";
v15.FilterDescendantsInstances = { v2.viewmodel, v2.char };
l__UserInputService__4.MouseIconEnabled = false;
local v16 = Vector2.new(0, 0);
v2.update();
local u1 = 0.016666666666666666;
local u2 = v9;
local u3 = v16;
local function u4(p1)
	if p1 ~= p1 then
		return;
	end;
	local v17 = p1.Magnitude / u1;
	if v17 >= 1000 then
		p1 = p1 * (1000 / v17);
	end;
	v2.ay_t = math.clamp(v2.ay_t - p1.y, -65, 65);
	v2.ax_t = (v2.ax_t - p1.x) % 360;
	if v2.camlock ~= nil then
		v2.camlockedoffset[2] = math.clamp(v2.camlockedoffset[2] - p1.y / 2, -25, 25);
		v2.camlockedoffset[1] = math.clamp(v2.camlockedoffset[1] - p1.x / 2, -65, 65);
	else
		v2.camlockedoffset = { 0, 0 };
	end;
	u2 = u2 * (CFrame.Angles(0, math.rad(-p1.x), 0) * CFrame.Angles(math.rad(-p1.y), 0, 0));
	v2.bobspring:Impulse(Vector3.new(-p1.x / 1, -p1.y / 1, 0));
end;
l__UserInputService__4.InputChanged:connect(function(p2, p3)
	if (p2.UserInputType == Enum.UserInputType.MouseMovement or p2.UserInputType == Enum.UserInputType.Touch or p2.KeyCode == Enum.KeyCode.Thumbstick2) and (p3 == false and v2.dead == false or (v2.hrc == true or p2.KeyCode == Enum.KeyCode.Thumbstick2) and v2.dead == true) then
		local v18 = v2.cam.FieldOfView / 90;
		local v19 = Vector2.new(p2.Delta.x * 0.5, p2.Delta.y * 0.5) * 0.8 * v18;
		if p2.UserInputType == Enum.UserInputType.Touch then
			v19 = Vector2.new(p2.Delta.x * 0.5, p2.Delta.y * 0.5) * 1.6 * v18;
			v2.hrc = true;
		end;
		if p2.KeyCode == Enum.KeyCode.Thumbstick2 then
			local v20 = Vector2.new(p2.Position.x * 0.5, p2.Position.y * -1 * 0.5) * 12 * v18;
			if p2.Position.Magnitude < 0.3 then
				v20 = Vector2.new(0, 0);
			end;
			u3 = v20.Unit * math.max(v20.Magnitude - 0.3, 0) * 1.5;
			return;
		else
			u4(v19);
		end;
	end;
end);
v1.Event_RepositionViewmodel.Event:Connect(function()
	v12:__newindex("Position", Vector3.new(0, -3, -0.35));
end);
local u5 = nil;
local u6 = v10;
local u7 = v11;
v2.cam.CameraType = Enum.CameraType.Scriptable;

game["Run Service"]:BindToRenderStep("caminit", 95, function(p4)
	if workspace.CurrentCamera.CameraType ~= Enum.CameraType.Attach or script.Parent.Parent.Parent.Parent.lol.Initiator.Main_Game.stopscriptablecam.Value == false then
		v2.cam.CameraType = Enum.CameraType.Scriptable;

	end
	if v2.freemouse == true or v2.dead == true and v2.hrc == false then
		l__UserInputService__4.MouseBehavior = Enum.MouseBehavior.Default;
		l__UserInputService__4.MouseIconEnabled = true;
	else
		l__UserInputService__4.MouseBehavior = Enum.MouseBehavior.LockCenter;
		l__UserInputService__4.MouseIconEnabled = false;
	end;
	if u5 ~= nil then
		local v21 = Vector2.new(u5.Position.x * 0.5, u5.Position.y * -1 * 0.5) * 12 * (v2.cam.FieldOfView / 90);
		u4(v21.Unit * math.max(v21.Magnitude - 0.25, 0) * 1.1 * p4 * 60);
	end;
	if v2.camlock ~= nil and ((tick() <= v2.camlock.last or l__Humanoid__7.MoveDirection.Magnitude < 0.75) and v2.camlockHead == false) then
		v2.ax_t = v2.camlock.x;
		v2.ay_t = v2.camlock.y;
		v2.ax = v2.camlock.x;
		v2.ay = v2.camlock.y;
	elseif v2.camlock == nil or not v2.camlockHead then
		if v2.camlock ~= nil then
			game:GetService("ReplicatedStorage").Bricks.CamLock:FireServer();
		end;
		local v22 = v2.ax_t - v2.ax;
		v2.ax = (v2.ax + (math.abs(v22) > 180 and v22 - v22 / math.abs(v22) * 360 or v22) * math.clamp(p4 * 25, 0.01, 1)) % 360;
		v2.ay = v2.ay + (v2.ay_t - v2.ay) * math.clamp(p4 * 25, 0.01, 1);
	end;
	local v23 = Vector3.new(0, 0.2, 0);
	local v24 = Vector3.new(0, 0, -0.25);
	if v2.crouching == true then
		v23 = Vector3.new(0, -0.2, 0);
	end;
	u1 = p4;
	u6 = u6 + (v23 - u6) * math.clamp(p4 * 10, 0.01, 1);
	u7 = u7 + (v24 - u7) * math.clamp(p4 * 10, 0.01, 1);
	v2.fovspring = v2.fovspring + (v2.fovtarget - v2.fovspring) * math.clamp(p4 * 5, 0.01, 1);
	v2.az = v2.az + (v2.az_t - v2.az) * math.clamp(p4 * 12, 0.01, 1);
	local v25 = Vector3.new(0, 0, 0);
	if v2.dead == true then
		local v26 = workspace.CurrentRooms:FindFirstChild(game:GetService("ReplicatedStorage").GameData.LatestRoom.Value);
		if v26 and v2.spectarget == nil then
			v2.basecamcf = v26.RoomStart.CFrame * CFrame.new(0, 5, -9) * CFrame.Angles(0, math.rad((tick() - v2.deathtick) * 15), 0);
		elseif v2.spectarget and (v2.spectarget:IsA("Player") and v2.spectarget.Character) and v2.spectarget.Character:FindFirstChild("HumanoidRootPart") and v2.spectarget.Character:FindFirstChild("Humanoid") and v2.spectarget.Character:FindFirstChild("Humanoid").Health > 0.01 then
			v2.basecamcf = CFrame.new(v2.spectarget.Character:FindFirstChild("HumanoidRootPart").Position) * CFrame.new(0, 1, 0) * CFrame.Angles(0, math.rad(v2.ax), 0) * CFrame.Angles(-0.2617993877991494, 0, 0) * CFrame.new(0, 0, 6);
		end;
	elseif v2.stunned == true then
		local l__p__27 = (l__HumanoidRootPart__8.CFrame * CFrame.new(0, 1.45, 0)).p;
		local v28 = RaycastParams.new();
		v28.CollisionGroup = "NoPlayer";
		v28.FilterDescendantsInstances = { v2.viewmodel, v2.char };
		local v29 = workspace:Raycast(l__p__27, l__HumanoidRootPart__8.CFrame.LookVector * 0.75, v28);
		if v29 and v29.Position then
			local l__Position__30 = v29.Position;
			local l__Instance__31 = v29.Instance;
			if l__Position__30 then
				v2.basecamcf = l__HumanoidRootPart__8.CFrame * CFrame.new(0, 1.45, -(l__p__27 - l__Position__30)) * CFrame.Angles(math.rad(math.clamp(v2.bobspring.p.Y, -80, 80)), math.rad(math.clamp(v2.bobspring.p.X, -80, 80)), math.rad(math.clamp(v2.bobspring.p.Z, -40, 40)));
			end;
		else
			v2.basecamcf = l__HumanoidRootPart__8.CFrame * CFrame.new(0, 1.45, -0.75) * CFrame.Angles(math.rad(math.clamp(v2.bobspring.p.Y, -80, 80)), math.rad(math.clamp(v2.bobspring.p.X, -80, 80)), math.rad(math.clamp(v2.bobspring.p.Z, -40, 40)));
		end;
		v2.bobspring:__newindex("Speed", 3);
	elseif v2.camlock ~= nil then
		v2.basecamcf = (v2.char.Head.CFrame + Vector3.new(0, 0.5, 0)) * CFrame.new(0, 0.15, -0.25) * CFrame.Angles(math.rad(math.clamp(v2.bobspring.p.Y, -80, 80)), math.rad(math.clamp(v2.bobspring.p.X, -80, 80)), math.rad(math.clamp(v2.bobspring.p.Z, -40, 40))) * CFrame.Angles(0, math.rad(v2.camlockedoffset[1]), 0) * CFrame.Angles(math.rad(v2.camlockedoffset[2]), 0, 0);
		v2.bobspring:__newindex("Speed", 5);
	else
		v2.bobspring:__newindex("Speed", 12);
		local v32 = (v2.char.Head.Position - v2.char.LowerTorso.Position) * Vector3.new(1, 0, 1);
		v2.basecamcf = CFrame.new(v2.char.Head.Position + v2.char.Head.CFrame.UpVector * 0.2) * CFrame.new(u6) * CFrame.Angles(0, math.rad(v2.ax), 0) * CFrame.new(-v2.az / 40, 0, -0.2) * CFrame.Angles(math.rad(math.clamp(v2.ay + v2.bobspring.Position.Y + v2.spring.p.Y + v2.recoil_spring.Position.Y, -88, 88)), 0, 0) * CFrame.new(u7) * CFrame.Angles(0, 0, math.rad(v2.az / 2)) * CFrame.Angles(0, math.rad(math.clamp(-v2.bobspring.p.X, -20, 20)), math.rad(math.clamp(-v2.bobspring.Position.X, -20, 20)));
	end;
	if v2.stopcam == false then
		v2.finalCamCFrame = v2.basecamcf * v2.csgo + v25;
		v2.cam.FieldOfView = v2.fovspring;
	end;
end);
local function v33()
	local v34 = {};
	for v35, v36 in pairs((l__UserInputService__4:GetGamepadState(Enum.UserInputType.Gamepad1))) do
		v34[v36.KeyCode] = v36;
	end;
	u5 = v34[Enum.KeyCode.Thumbstick2];
	print(u5);
end;
l__UserInputService__4.GamepadConnected:Connect(v33);
if l__UserInputService__4.GamepadEnabled then
	v33();
end;
