local a=Vector3.new(1,0,0)local T=Vector3.new(0,1,0)local X=Vector3.new(0,0,1)local F=Vector3.new(0,-3,0)local J={InitialDistance=25;MinDistance=10;MaxDistance=100,InitialElevation=35,MinElevation=35;MaxElevation=35,ReferenceAzimuth=-45,CWAzimuthTravel=90;CCWAzimuthTravel=90;UseAzimuthLimits=false}local r=require(script.Parent:WaitForChild("\066\097\115\101\067\097\109\101\114\097"))local N=setmetatable({},r)N.__index=N function N.new()local a=setmetatable(r.new(),N)a.lastUpdate=tick()a.changedSignalConnections={}a.refAzimuthRad=nil a.curAzimuthRad=nil a.minAzimuthAbsoluteRad=nil a.maxAzimuthAbsoluteRad=nil a.useAzimuthLimits=nil a.curElevationRad=nil a.minElevationRad=nil a.maxElevationRad=nil a.curDistance=nil a.minDistance=nil a.maxDistance=nil a.r3ButtonDown=false a.l3ButtonDown=false a.gamepadDollySpeedMultiplier=1 a.lastUserPanCamera=tick()a.externalProperties={}a.externalProperties.InitialDistance=25 a.externalProperties.MinDistance=10 a.externalProperties.MaxDistance=100 a.externalProperties.InitialElevation=35 a.externalProperties.MinElevation=35 a.externalProperties.MaxElevation=35 a.externalProperties.ReferenceAzimuth=-45 a.externalProperties.CWAzimuthTravel=90 a.externalProperties.CCWAzimuthTravel=90 a.externalProperties.UseAzimuthLimits=false a:LoadNumberValueParameters()return a end function N.LoadOrCreateNumberValueParameter(a,T,X,F)local J=script:FindFirstChild(T)if J and J:isA(X)then a.externalProperties[T]=J.Value else if a.externalProperties[T]==nil then print("\101\120\116\101\114\110\097\108\080\114\111\112\101\114\116\105\101\115 \116\097\098\108\101 \104\097\115 \110\111 \101\110\116\114\121 \102\111\114 ",T)return end J=Instance.new(X)J.Name=T J.Parent=script J.Value=a.externalProperties[T]end if F then if a.changedSignalConnections[T]then a.changedSignalConnections[T]:Disconnect()end a.changedSignalConnections[T]=J.Changed:Connect(function(X)a.externalProperties[T]=X F(a)end)end end function N.SetAndBoundsCheckAzimuthValues(a)a.minAzimuthAbsoluteRad=math.rad(a.externalProperties.ReferenceAzimuth)-math.abs(math.rad(a.externalProperties.CWAzimuthTravel))a.maxAzimuthAbsoluteRad=math.rad(a.externalProperties.ReferenceAzimuth)+math.abs(math.rad(a.externalProperties.CCWAzimuthTravel))a.useAzimuthLimits=a.externalProperties.UseAzimuthLimits if a.useAzimuthLimits then a.curAzimuthRad=math.max(a.curAzimuthRad,a.minAzimuthAbsoluteRad)a.curAzimuthRad=math.min(a.curAzimuthRad,a.maxAzimuthAbsoluteRad)end end function N.SetAndBoundsCheckElevationValues(a)local T=math.max(a.externalProperties.MinElevation,-80)local X=math.min(a.externalProperties.MaxElevation,80)a.minElevationRad=math.rad(math.min(T,X))a.maxElevationRad=math.rad(math.max(T,X))a.curElevationRad=math.max(a.curElevationRad,a.minElevationRad)a.curElevationRad=math.min(a.curElevationRad,a.maxElevationRad)end function N.SetAndBoundsCheckDistanceValues(a)a.minDistance=a.externalProperties.MinDistance a.maxDistance=a.externalProperties.MaxDistance a.curDistance=math.max(a.curDistance,a.minDistance)a.curDistance=math.min(a.curDistance,a.maxDistance)end function N.LoadNumberValueParameters(a)a:LoadOrCreateNumberValueParameter("\073\110\105\116\105\097\108\069\108\101\118\097\116\105\111\110","\078\117\109\098\101\114\086\097\108\117\101",nil)a:LoadOrCreateNumberValueParameter("\073\110\105\116\105\097\108\068\105\115\116\097\110\099\101","\078\117\109\098\101\114\086\097\108\117\101",nil)a:LoadOrCreateNumberValueParameter("\082\101\102\101\114\101\110\099\101\065\122\105\109\117\116\104","\078\117\109\098\101\114\086\097\108\117\101",a.SetAndBoundsCheckAzimuthValue)a:LoadOrCreateNumberValueParameter("\067\087\065\122\105\109\117\116\104\084\114\097\118\101\108","\078\117\109\098\101\114\086\097\108\117\101",a.SetAndBoundsCheckAzimuthValues)a:LoadOrCreateNumberValueParameter("\067\067\087\065\122\105\109\117\116\104\084\114\097\118\101\108","\078\117\109\098\101\114\086\097\108\117\101",a.SetAndBoundsCheckAzimuthValues)a:LoadOrCreateNumberValueParameter("\077\105\110\069\108\101\118\097\116\105\111\110","\078\117\109\098\101\114\086\097\108\117\101",a.SetAndBoundsCheckElevationValues)a:LoadOrCreateNumberValueParameter("\077\097\120\069\108\101\118\097\116\105\111\110","\078\117\109\098\101\114\086\097\108\117\101",a.SetAndBoundsCheckElevationValues)a:LoadOrCreateNumberValueParameter("\077\105\110\068\105\115\116\097\110\099\101","\078\117\109\098\101\114\086\097\108\117\101",a.SetAndBoundsCheckDistanceValues)a:LoadOrCreateNumberValueParameter("\077\097\120\068\105\115\116\097\110\099\101","\078\117\109\098\101\114\086\097\108\117\101",a.SetAndBoundsCheckDistanceValues)a:LoadOrCreateNumberValueParameter("\085\115\101\065\122\105\109\117\116\104\076\105\109\105\116\115","\066\111\111\108\086\097\108\117\101",a.SetAndBoundsCheckAzimuthValues)a.curAzimuthRad=math.rad(a.externalProperties.ReferenceAzimuth)a.curElevationRad=math.rad(a.externalProperties.InitialElevation)a.curDistance=a.externalProperties.InitialDistance a:SetAndBoundsCheckAzimuthValues()a:SetAndBoundsCheckElevationValues()a:SetAndBoundsCheckDistanceValues()end function N.GetModuleName(a)return"\079\114\098\105\116\097\108\067\097\109\101\114\097"end local g=require(script.Parent:WaitForChild("\067\097\109\101\114\097\085\116\105\108\115"))function N.SetInitialOrientation(a,T)if not T or not T.RootPart then warn("\079\114\098\105\116\097\108\067\097\109\101\114\097 \099\111\117\108\100 \110\111\116 \115\101\116 \105\110\105\116\105\097\108 \111\114\105\101\110\116\097\116\105\111\110 \100\117\101 \116\111 \109\105\115\115\105\110\103 \104\117\109\097\110\111\105\100")return end local X=(T.RootPart.CFrame.lookVector-Vector3.new(0,.23,0)).unit local F=g.GetAngleBetweenXZVectors(X,a:GetCameraLookVector())local J=math.asin((a:GetCameraLookVector()).y)-math.asin(X.y)if not g.IsFinite(F)then F=0 end if not g.IsFinite(J)then J=0 end a.rotateInput=Vector2.new(F,J)end function N.GetCameraToSubjectDistance(a)return a.curDistance end local s=game:GetService("\080\108\097\121\101\114\115")function N.SetCameraToSubjectDistance(a,T)print("\079\114\098\105\116\097\108\067\097\109\101\114\097 \083\101\116\067\097\109\101\114\097\084\111\083\117\098\106\101\099\116\068\105\115\116\097\110\099\101 ",T)if s.LocalPlayer then a.currentSubjectDistance=g.Clamp(a.minDistance,a.maxDistance,T)a.currentSubjectDistance=math.max(a.currentSubjectDistance,a.FIRST_PERSON_DISTANCE_THRESHOLD)end a.inFirstPerson=false a:UpdateMouseBehavior()return a.currentSubjectDistance end local e=Vector3.new(0,0,0)function N.CalculateNewLookVector(a,T,X)local F=T or a:GetCameraLookVector()local J=math.asin(F.y)local r=Vector2.new(X.x,g.Clamp(J-1.3962634015955,J-(-1.3962634015955),X.y))return((CFrame.Angles(0,-r.x,0)*CFrame.new(e,F))*CFrame.Angles(-r.y,0,0)).lookVector end local k=Vector2.new(0,0)function N.GetGamepadPan(a,T,X,F)if F.UserInputType==a.activeGamepad and F.KeyCode==Enum.KeyCode.Thumbstick2 then if not a.r3ButtonDown and not a.l3ButtonDown then if X==Enum.UserInputState.Cancel then a.gamepadPanningCamera=k return elseif(Vector2.new(F.Position.X,-F.Position.Y)).magnitude>.2 then a.gamepadPanningCamera=Vector2.new(F.Position.X,-F.Position.Y)return else a.gamepadPanningCamera=k return end end else return end if F.Position.Y>.2 then a.gamepadDollySpeedMultiplier=.96 return end if F.Position.Y<-0.2 then a.gamepadDollySpeedMultiplier=1.04 return end a.gamepadDollySpeedMultiplier=1 end function N.DoGamepadZoom(a,T,X,F)if F.UserInputType==a.activeGamepad and(F.KeyCode==Enum.KeyCode.ButtonR3 or F.KeyCode==Enum.KeyCode.ButtonL3)then if X==Enum.UserInputState.Begin then a.r3ButtonDown=F.KeyCode==Enum.KeyCode.ButtonR3 a.l3ButtonDown=F.KeyCode==Enum.KeyCode.ButtonL3 return end if X==Enum.UserInputState.End then if F.KeyCode==Enum.KeyCode.ButtonR3 then a.r3ButtonDown=false elseif F.KeyCode==Enum.KeyCode.ButtonL3 then a.l3ButtonDown=false end if not a.r3ButtonDown and not a.l3ButtonDown then a.gamepadDollySpeedMultiplier=1 end end end end function N.BindGamepadInputActions(a)local T=game:GetService("\067\111\110\116\101\120\116\065\099\116\105\111\110\083\101\114\118\105\099\101")T:BindAction("\079\114\098\105\116\097\108\067\097\109\071\097\109\101\112\097\100\080\097\110",function(T,X,F)a:GetGamepadPan(T,X,F)end,false,Enum.KeyCode.Thumbstick2)T:BindAction("\079\114\098\105\116\097\108\067\097\109\071\097\109\101\112\097\100\090\111\111\109",function(T,X,F)a:DoGamepadZoom(T,X,F)end,false,Enum.KeyCode.ButtonR3)T:BindAction("\079\114\098\105\116\097\108\067\097\109\071\097\109\101\112\097\100\090\111\111\109\065\108\116",function(T,X,F)a:DoGamepadZoom(T,X,F)end,false,Enum.KeyCode.ButtonL3)end local u=0 local I=game:GetService("\086\082\083\101\114\118\105\099\101")local y=Vector3.new(1,0,1)local v=2*math.pi function N.Update(a,T)local F=tick()local J=F-a.lastUpdate local r=a.UserPanningTheCamera==true local N=workspace.CurrentCamera local e=N.CFrame local o=N.Focus local l=a:GetHumanoid()local Y=N and N.CameraSubject local f=Y and Y:IsA("\086\101\104\105\099\108\101\083\101\097\116")local H=Y and Y:IsA("\083\107\097\116\101\098\111\097\114\100\080\108\097\116\102\111\114\109")if a.lastUpdate==nil or J>1 then a.lastCameraTransform=nil end if a.lastUpdate then local T=a:UpdateGamepad()if a:ShouldUseVRRotation()then a.RotateInput=a.RotateInput+a:GetVRRotationInput()else local X=math.min(.1,J)if T~=k then r=true a.rotateInput=a.rotateInput+T*X end local F=0 if not f and not H then if a.TurningLeft then local a=-120 else v32=0 end if a.TurningRight then local a=120 else v33=0 end F=(F+v32)+v33 end if F~=0 then a.rotateInput=a.rotateInput+Vector2.new(math.rad(F*X),0)r=true end end end if r then u=0 a.lastUserPanCamera=tick()end if not(F-a.lastUserPanCamera<2)then end local R=a:GetSubjectPosition()if R and(s.LocalPlayer and N)then if a.gamepadDollySpeedMultiplier~=1 then a:SetCameraToSubjectDistance(a.currentSubjectDistance*a.gamepadDollySpeedMultiplier)end local T=I.VREnabled local F=T and a:GetVRFocus(R,J)or CFrame.new(R)if T and not a:IsInFirstPerson()then local T=a:GetCameraHeight()local X=R-N.CFrame.p local J=X.magnitude if a.currentSubjectDistance<J or a.rotateInput.x~=0 then local r=a:CalculateNewLookVector(X.unit*y,Vector2.new(a.rotateInput.x,0))*math.min(J,a.currentSubjectDistance)local g=F.p-r local s=N.CFrame.lookVector if a.rotateInput.x~=0 then s=r end a.RotateInput=k e=CFrame.new(g,Vector3.new(g.x+s.x,g.y,g.z+s.z))+Vector3.new(0,T,0)end else a.curAzimuthRad=a.curAzimuthRad-a.rotateInput.x if a.useAzimuthLimits then a.curAzimuthRad=g.Clamp(a.minAzimuthAbsoluteRad,a.maxAzimuthAbsoluteRad,a.curAzimuthRad)else a.curAzimuthRad=a.curAzimuthRad~=0 and math.sign(a.curAzimuthRad)*(math.abs(a.curAzimuthRad)%v)or 0 end a.curElevationRad=g.Clamp(a.minElevationRad,a.maxElevationRad,a.curElevationRad+a.rotateInput.y)e=CFrame.new(R+a.currentSubjectDistance*(CFrame.fromEulerAnglesYXZ(-a.curElevationRad,a.curAzimuthRad,0)*X),R)a.rotateInput=k end a.lastCameraTransform=e a.lastCameraFocus=o if(f or H)and Y:IsA("\066\097\115\101\080\097\114\116")then a.lastSubjectCFrame=Y.CFrame else a.lastSubjectCFrame=nil end end a.lastUpdate=F return e,o end return N


local v1 = Vector3.new(1, 0, 0);
local v2 = Vector3.new(0, 1, 0);
local v3 = Vector3.new(0, 0, 1);
local v4 = Vector3.new(0, -3, 0);
local v5 = {
	InitialDistance = 25, 
	MinDistance = 10, 
	MaxDistance = 100, 
	InitialElevation = 35, 
	MinElevation = 35, 
	MaxElevation = 35, 
	ReferenceAzimuth = -45, 
	CWAzimuthTravel = 90, 
	CCWAzimuthTravel = 90, 
	UseAzimuthLimits = false
};
local v6 = require(script.Parent:WaitForChild("BaseCamera"));
local v7 = setmetatable({}, v6);
v7.__index = v7;
function v7.new()
	local v8 = setmetatable(v6.new(), v7);
	v8.lastUpdate = tick();
	v8.changedSignalConnections = {};
	v8.refAzimuthRad = nil;
	v8.curAzimuthRad = nil;
	v8.minAzimuthAbsoluteRad = nil;
	v8.maxAzimuthAbsoluteRad = nil;
	v8.useAzimuthLimits = nil;
	v8.curElevationRad = nil;
	v8.minElevationRad = nil;
	v8.maxElevationRad = nil;
	v8.curDistance = nil;
	v8.minDistance = nil;
	v8.maxDistance = nil;
	v8.r3ButtonDown = false;
	v8.l3ButtonDown = false;
	v8.gamepadDollySpeedMultiplier = 1;
	v8.lastUserPanCamera = tick();
	v8.externalProperties = {};
	v8.externalProperties.InitialDistance = 25;
	v8.externalProperties.MinDistance = 10;
	v8.externalProperties.MaxDistance = 100;
	v8.externalProperties.InitialElevation = 35;
	v8.externalProperties.MinElevation = 35;
	v8.externalProperties.MaxElevation = 35;
	v8.externalProperties.ReferenceAzimuth = -45;
	v8.externalProperties.CWAzimuthTravel = 90;
	v8.externalProperties.CCWAzimuthTravel = 90;
	v8.externalProperties.UseAzimuthLimits = false;
	v8:LoadNumberValueParameters();
	return v8;
end;
function v7.LoadOrCreateNumberValueParameter(p1, p2, p3, p4)
	local v9 = script:FindFirstChild(p2);
	if v9 and v9:isA(p3) then
		p1.externalProperties[p2] = v9.Value;
	else
		if p1.externalProperties[p2] == nil then
			print("externalProperties table has no entry for ", p2);
			return;
		end;
		v9 = Instance.new(p3);
		v9.Name = p2;
		v9.Parent = script;
		v9.Value = p1.externalProperties[p2];
	end;
	if p4 then
		if p1.changedSignalConnections[p2] then
			p1.changedSignalConnections[p2]:Disconnect();
		end;
		p1.changedSignalConnections[p2] = v9.Changed:Connect(function(p5)
			p1.externalProperties[p2] = p5;
			p4(p1);
		end);
	end;
end;
function v7.SetAndBoundsCheckAzimuthValues(p6)
	p6.minAzimuthAbsoluteRad = math.rad(p6.externalProperties.ReferenceAzimuth) - math.abs(math.rad(p6.externalProperties.CWAzimuthTravel));
	p6.maxAzimuthAbsoluteRad = math.rad(p6.externalProperties.ReferenceAzimuth) + math.abs(math.rad(p6.externalProperties.CCWAzimuthTravel));
	p6.useAzimuthLimits = p6.externalProperties.UseAzimuthLimits;
	if p6.useAzimuthLimits then
		p6.curAzimuthRad = math.max(p6.curAzimuthRad, p6.minAzimuthAbsoluteRad);
		p6.curAzimuthRad = math.min(p6.curAzimuthRad, p6.maxAzimuthAbsoluteRad);
	end;
end;
function v7.SetAndBoundsCheckElevationValues(p7)
	local v10 = math.max(p7.externalProperties.MinElevation, -80);
	local v11 = math.min(p7.externalProperties.MaxElevation, 80);
	p7.minElevationRad = math.rad(math.min(v10, v11));
	p7.maxElevationRad = math.rad(math.max(v10, v11));
	p7.curElevationRad = math.max(p7.curElevationRad, p7.minElevationRad);
	p7.curElevationRad = math.min(p7.curElevationRad, p7.maxElevationRad);
end;
function v7.SetAndBoundsCheckDistanceValues(p8)
	p8.minDistance = p8.externalProperties.MinDistance;
	p8.maxDistance = p8.externalProperties.MaxDistance;
	p8.curDistance = math.max(p8.curDistance, p8.minDistance);
	p8.curDistance = math.min(p8.curDistance, p8.maxDistance);
end;
function v7.LoadNumberValueParameters(p9)
	p9:LoadOrCreateNumberValueParameter("InitialElevation", "NumberValue", nil);
	p9:LoadOrCreateNumberValueParameter("InitialDistance", "NumberValue", nil);
	p9:LoadOrCreateNumberValueParameter("ReferenceAzimuth", "NumberValue", p9.SetAndBoundsCheckAzimuthValue);
	p9:LoadOrCreateNumberValueParameter("CWAzimuthTravel", "NumberValue", p9.SetAndBoundsCheckAzimuthValues);
	p9:LoadOrCreateNumberValueParameter("CCWAzimuthTravel", "NumberValue", p9.SetAndBoundsCheckAzimuthValues);
	p9:LoadOrCreateNumberValueParameter("MinElevation", "NumberValue", p9.SetAndBoundsCheckElevationValues);
	p9:LoadOrCreateNumberValueParameter("MaxElevation", "NumberValue", p9.SetAndBoundsCheckElevationValues);
	p9:LoadOrCreateNumberValueParameter("MinDistance", "NumberValue", p9.SetAndBoundsCheckDistanceValues);
	p9:LoadOrCreateNumberValueParameter("MaxDistance", "NumberValue", p9.SetAndBoundsCheckDistanceValues);
	p9:LoadOrCreateNumberValueParameter("UseAzimuthLimits", "BoolValue", p9.SetAndBoundsCheckAzimuthValues);
	p9.curAzimuthRad = math.rad(p9.externalProperties.ReferenceAzimuth);
	p9.curElevationRad = math.rad(p9.externalProperties.InitialElevation);
	p9.curDistance = p9.externalProperties.InitialDistance;
	p9:SetAndBoundsCheckAzimuthValues();
	p9:SetAndBoundsCheckElevationValues();
	p9:SetAndBoundsCheckDistanceValues();
end;
function v7.GetModuleName(p10)
	return "OrbitalCamera";
end;
local u1 = require(script.Parent:WaitForChild("CameraUtils"));
function v7.SetInitialOrientation(p11, p12)
	if not p12 or not p12.RootPart then
		warn("OrbitalCamera could not set initial orientation due to missing humanoid");
		return;
	end;
	local l__unit__12 = (p12.RootPart.CFrame.lookVector - Vector3.new(0, 0.23, 0)).unit;
	local v13 = u1.GetAngleBetweenXZVectors(l__unit__12, p11:GetCameraLookVector());
	local v14 = math.asin(p11:GetCameraLookVector().y) - math.asin(l__unit__12.y);
	if not u1.IsFinite(v13) then
		v13 = 0;
	end;
	if not u1.IsFinite(v14) then
		v14 = 0;
	end;
	p11.rotateInput = Vector2.new(v13, v14);
end;
function v7.GetCameraToSubjectDistance(p13)
	return p13.curDistance;
end;
local l__Players__2 = game:GetService("Players");
function v7.SetCameraToSubjectDistance(p14, p15)
	print("OrbitalCamera SetCameraToSubjectDistance ", p15);
	if l__Players__2.LocalPlayer then
		p14.currentSubjectDistance = u1.Clamp(p14.minDistance, p14.maxDistance, p15);
		p14.currentSubjectDistance = math.max(p14.currentSubjectDistance, p14.FIRST_PERSON_DISTANCE_THRESHOLD);
	end;
	p14.inFirstPerson = false;
	p14:UpdateMouseBehavior();
	return p14.currentSubjectDistance;
end;
local u3 = Vector3.new(0, 0, 0);
function v7.CalculateNewLookVector(p16, p17, p18)
	local v15 = p17 or p16:GetCameraLookVector();
	local v16 = math.asin(v15.y);
	local v17 = Vector2.new(p18.x, (u1.Clamp(v16 - 1.3962634015954636, v16 - -1.3962634015954636, p18.y)));
	return (CFrame.Angles(0, -v17.x, 0) * CFrame.new(u3, v15) * CFrame.Angles(-v17.y, 0, 0)).lookVector;
end;
local u4 = Vector2.new(0, 0);
function v7.GetGamepadPan(p19, p20, p21, p22)
	if p22.UserInputType == p19.activeGamepad and p22.KeyCode == Enum.KeyCode.Thumbstick2 then
		if not p19.r3ButtonDown and not p19.l3ButtonDown then
			if p21 == Enum.UserInputState.Cancel then
				p19.gamepadPanningCamera = u4;
				return;
			elseif Vector2.new(p22.Position.X, -p22.Position.Y).magnitude > 0.2 then
				p19.gamepadPanningCamera = Vector2.new(p22.Position.X, -p22.Position.Y);
				return;
			else
				p19.gamepadPanningCamera = u4;
				return;
			end;
		end;
	else
		return;
	end;
	if p22.Position.Y > 0.2 then
		p19.gamepadDollySpeedMultiplier = 0.96;
		return;
	end;
	if p22.Position.Y < -0.2 then
		p19.gamepadDollySpeedMultiplier = 1.04;
		return;
	end;
	p19.gamepadDollySpeedMultiplier = 1;
end;
function v7.DoGamepadZoom(p23, p24, p25, p26)
	if p26.UserInputType == p23.activeGamepad and (p26.KeyCode == Enum.KeyCode.ButtonR3 or p26.KeyCode == Enum.KeyCode.ButtonL3) then
		if p25 == Enum.UserInputState.Begin then
			p23.r3ButtonDown = p26.KeyCode == Enum.KeyCode.ButtonR3;
			p23.l3ButtonDown = p26.KeyCode == Enum.KeyCode.ButtonL3;
			return;
		end;
		if p25 == Enum.UserInputState.End then
			if p26.KeyCode == Enum.KeyCode.ButtonR3 then
				p23.r3ButtonDown = false;
			elseif p26.KeyCode == Enum.KeyCode.ButtonL3 then
				p23.l3ButtonDown = false;
			end;
			if not p23.r3ButtonDown and not p23.l3ButtonDown then
				p23.gamepadDollySpeedMultiplier = 1;
			end;
		end;
	end;
end;
function v7.BindGamepadInputActions(p27)
	local l__ContextActionService__18 = game:GetService("ContextActionService");
	l__ContextActionService__18:BindAction("OrbitalCamGamepadPan", function(p28, p29, p30)
		p27:GetGamepadPan(p28, p29, p30);
	end, false, Enum.KeyCode.Thumbstick2);
	l__ContextActionService__18:BindAction("OrbitalCamGamepadZoom", function(p31, p32, p33)
		p27:DoGamepadZoom(p31, p32, p33);
	end, false, Enum.KeyCode.ButtonR3);
	l__ContextActionService__18:BindAction("OrbitalCamGamepadZoomAlt", function(p34, p35, p36)
		p27:DoGamepadZoom(p34, p35, p36);
	end, false, Enum.KeyCode.ButtonL3);
end;
local u5 = 0;
local l__VRService__6 = game:GetService("VRService");
local u7 = Vector3.new(1, 0, 1);
local u8 = 2 * math.pi;
function v7.Update(p37, p38)
	local v19 = tick();
	local v20 = v19 - p37.lastUpdate;
	local v21 = p37.UserPanningTheCamera == true;
	local l__CurrentCamera__22 = workspace.CurrentCamera;
	local v23 = l__CurrentCamera__22.CFrame;
	local l__Focus__24 = l__CurrentCamera__22.Focus;
	local v25 = p37:GetHumanoid();
	local v26 = l__CurrentCamera__22 and l__CurrentCamera__22.CameraSubject;
	local v27 = v26 and v26:IsA("VehicleSeat");
	local v28 = v26 and v26:IsA("SkateboardPlatform");
	if p37.lastUpdate == nil or v20 > 1 then
		p37.lastCameraTransform = nil;
	end;
	if p37.lastUpdate then
		local v29 = p37:UpdateGamepad();
		if p37:ShouldUseVRRotation() then
			p37.RotateInput = p37.RotateInput + p37:GetVRRotationInput();
		else
			local v30 = math.min(0.1, v20);
			if v29 ~= u4 then
				v21 = true;
				p37.rotateInput = p37.rotateInput + v29 * v30;
			end;
			local v31 = 0;
			if not v27 and not v28 then
				if p37.TurningLeft then
					local v32 = -120;
				else
					v32 = 0;
				end;
				if p37.TurningRight then
					local v33 = 120;
				else
					v33 = 0;
				end;
				v31 = v31 + v32 + v33;
			end;
			if v31 ~= 0 then
				p37.rotateInput = p37.rotateInput + Vector2.new(math.rad(v31 * v30), 0);
				v21 = true;
			end;
		end;
	end;
	if v21 then
		u5 = 0;
		p37.lastUserPanCamera = tick();
	end;
	if not (v19 - p37.lastUserPanCamera < 2) then

	end;
	local v34 = p37:GetSubjectPosition();
	if v34 and l__Players__2.LocalPlayer and l__CurrentCamera__22 then
		if p37.gamepadDollySpeedMultiplier ~= 1 then
			p37:SetCameraToSubjectDistance(p37.currentSubjectDistance * p37.gamepadDollySpeedMultiplier);
		end;
		local l__VREnabled__35 = l__VRService__6.VREnabled;
		local v36 = l__VREnabled__35 and p37:GetVRFocus(v34, v20) or CFrame.new(v34);
		if l__VREnabled__35 and not p37:IsInFirstPerson() then
			local v37 = p37:GetCameraHeight();
			local v38 = v34 - l__CurrentCamera__22.CFrame.p;
			local l__magnitude__39 = v38.magnitude;
			if p37.currentSubjectDistance < l__magnitude__39 or p37.rotateInput.x ~= 0 then
				local v40 = p37:CalculateNewLookVector(v38.unit * u7, Vector2.new(p37.rotateInput.x, 0)) * math.min(l__magnitude__39, p37.currentSubjectDistance);
				local v41 = v36.p - v40;
				local v42 = l__CurrentCamera__22.CFrame.lookVector;
				if p37.rotateInput.x ~= 0 then
					v42 = v40;
				end;
				p37.RotateInput = u4;
				v23 = CFrame.new(v41, (Vector3.new(v41.x + v42.x, v41.y, v41.z + v42.z))) + Vector3.new(0, v37, 0);
			end;
		else
			p37.curAzimuthRad = p37.curAzimuthRad - p37.rotateInput.x;
			if p37.useAzimuthLimits then
				p37.curAzimuthRad = u1.Clamp(p37.minAzimuthAbsoluteRad, p37.maxAzimuthAbsoluteRad, p37.curAzimuthRad);
			else
				p37.curAzimuthRad = p37.curAzimuthRad ~= 0 and math.sign(p37.curAzimuthRad) * (math.abs(p37.curAzimuthRad) % u8) or 0;
			end;
			p37.curElevationRad = u1.Clamp(p37.minElevationRad, p37.maxElevationRad, p37.curElevationRad + p37.rotateInput.y);
			v23 = CFrame.new(v34 + p37.currentSubjectDistance * (CFrame.fromEulerAnglesYXZ(-p37.curElevationRad, p37.curAzimuthRad, 0) * v3), v34);
			p37.rotateInput = u4;
		end;
		p37.lastCameraTransform = v23;
		p37.lastCameraFocus = l__Focus__24;
		if (v27 or v28) and v26:IsA("BasePart") then
			p37.lastSubjectCFrame = v26.CFrame;
		else
			p37.lastSubjectCFrame = nil;
		end;
	end;
	p37.lastUpdate = v19;
	return v23, l__Focus__24;
end;
return v7;

