local s=Vector3.new(1,0,0)local Z=Vector3.new(0,1,0)local e=Vector3.new(0,0,1)local W=Vector3.new(1,0,1)local X=Vector3.new(0,0,0)local P=Vector3.new(0,-3,0)local c=game:GetService("\086\082\083\101\114\118\105\099\101")local b=require(script.Parent:WaitForChild("\066\097\115\101\067\097\109\101\114\097"))local n=setmetatable({},b)n.__index=n function n.new()local s=setmetatable(b.new(),n)s.cameraType=Enum.CameraType.Fixed s.lastUpdate=tick()s.lastDistanceToSubject=nil return s end function n.GetModuleName(s)return"\076\101\103\097\099\121\067\097\109\101\114\097"end function n.Test(s)print("\076\101\103\097\099\121\067\097\109\101\114\097\058\084\101\115\116\040\041")end function n.SetCameraToSubjectDistance(s,Z)return b.SetCameraToSubjectDistance(s,Z)end local E=game:GetService("\080\108\097\121\101\114\115")local o=Vector2.new(0,0)local r=require(script.Parent:WaitForChild("\067\097\109\101\114\097\085\116\105\108\115"))function n.Update(s,Z)if not s.cameraType then return end local e=tick()local W=workspace.CurrentCamera local X=W.CFrame local P=W.Focus local c=E.LocalPlayer local b=s:GetHumanoid()local n=W and W.CameraSubject if n then local s=n:IsA("\086\101\104\105\099\108\101\083\101\097\116")end if n then local s=n:IsA("\083\107\097\116\101\098\111\097\114\100\080\108\097\116\102\111\114\109")end if b and b:GetState()~=Enum.HumanoidStateType.Climbing then end if s.lastUpdate==nil or e-s.lastUpdate>1 then s.lastDistanceToSubject=nil end local q=s:GetSubjectPosition()if s.cameraType==Enum.CameraType.Fixed then if s.lastUpdate then s.rotateInput=s.rotateInput+s:UpdateGamepad()*math.min(.1,e-s.lastUpdate)end if q and(c and W)then s.rotateInput=o P=W.Focus X=CFrame.new(W.CFrame.p,W.CFrame.p+s:GetCameraToSubjectDistance()*s:CalculateNewLookVector())end elseif s.cameraType==Enum.CameraType.Attach then if q and W then local Z=s:GetHumanoid()if s.lastUpdate and(Z and Z.RootPart)then s.rotateInput=s.rotateInput+s:UpdateGamepad()*math.min(.1,e-s.lastUpdate)local W=r.GetAngleBetweenXZVectors(Z.RootPart.CFrame.lookVector,s:GetCameraLookVector())if r.IsFinite(W)then s.rotateInput=Vector2.new(W,s.rotateInput.Y)end end s.rotateInput=o P=CFrame.new(q)X=CFrame.new(q-s:GetCameraToSubjectDistance()*s:CalculateNewLookVector(),q)end else if s.cameraType~=Enum.CameraType.Watch then return W.CFrame,W.Focus end if q and(c and W)then local Z=nil local e=s:GetHumanoid()if e and e.RootPart then local e=q-W.CFrame.p Z=e.unit if s.lastDistanceToSubject and s.lastDistanceToSubject==s:GetCameraToSubjectDistance()then s:SetCameraToSubjectDistance(e.magnitude)end end local c=s:GetCameraToSubjectDistance()s.rotateInput=o P=CFrame.new(q)X=CFrame.new(q-c*s:CalculateNewLookVector(Z),q)s.lastDistanceToSubject=c end end s.lastUpdate=e return X,P end return n
-- Decompiled with the Synapse X Luau decompiler.

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(1, 0, 1)
local v5 = Vector3.new(0, 0, 0)
local v6 = Vector3.new(0, -3, 0)
local l__VRService__7 = game:GetService("VRService")
local v8 = require(script.Parent:WaitForChild("BaseCamera"))
local v9 = setmetatable({}, v8)
v9.__index = v9
function v9.new()
	local v10 = setmetatable(v8.new(), v9)
	v10.cameraType = Enum.CameraType.Fixed
	v10.lastUpdate = tick()
	v10.lastDistanceToSubject = nil
	return v10
end
function v9.GetModuleName(p1)
	return "LegacyCamera"
end
function v9.Test(p2)
	print("LegacyCamera:Test()")
end
function v9.SetCameraToSubjectDistance(p3, p4)
	return v8.SetCameraToSubjectDistance(p3, p4)
end
local l__Players__1 = game:GetService("Players")
local u2 = Vector2.new(0, 0)
local u3 = require(script.Parent:WaitForChild("CameraUtils"))
function v9.Update(p5, p6)
	if not p5.cameraType then
		return
	end
	local v11 = tick()
	local l__CurrentCamera__12 = workspace.CurrentCamera
	local v13 = l__CurrentCamera__12.CFrame
	local v14 = l__CurrentCamera__12.Focus
	local l__LocalPlayer__15 = l__Players__1.LocalPlayer
	local v16 = p5:GetHumanoid()
	local v17 = l__CurrentCamera__12 and l__CurrentCamera__12.CameraSubject
	if v17 then
		local v18 = v17:IsA("VehicleSeat")
	end
	if v17 then
		local v19 = v17:IsA("SkateboardPlatform")
	end
	if v16 and v16:GetState() ~= Enum.HumanoidStateType.Climbing then
	end
	if p5.lastUpdate == nil or v11 - p5.lastUpdate > 1 then
		p5.lastDistanceToSubject = nil
	end
	local v20 = p5:GetSubjectPosition()
	if p5.cameraType == Enum.CameraType.Fixed then
		if p5.lastUpdate then
			p5.rotateInput = p5.rotateInput + p5:UpdateGamepad() * math.min(0.1, v11 - p5.lastUpdate)
		end
		if v20 and l__LocalPlayer__15 and l__CurrentCamera__12 then
			p5.rotateInput = u2
			v14 = l__CurrentCamera__12.Focus
			v13 = CFrame.new(
				l__CurrentCamera__12.CFrame.p,
				l__CurrentCamera__12.CFrame.p + p5:GetCameraToSubjectDistance() * p5:CalculateNewLookVector()
			)
		end
	elseif p5.cameraType == Enum.CameraType.Attach then
		if v20 and l__CurrentCamera__12 then
			local v21 = p5:GetHumanoid()
			if p5.lastUpdate and v21 and v21.RootPart then
				p5.rotateInput = p5.rotateInput + p5:UpdateGamepad() * math.min(0.1, v11 - p5.lastUpdate)
				local v22 = u3.GetAngleBetweenXZVectors(v21.RootPart.CFrame.lookVector, p5:GetCameraLookVector())
				if u3.IsFinite(v22) then
					p5.rotateInput = Vector2.new(v22, p5.rotateInput.Y)
				end
			end
			p5.rotateInput = u2
			v14 = CFrame.new(v20)
			v13 = CFrame.new(v20 - p5:GetCameraToSubjectDistance() * p5:CalculateNewLookVector(), v20)
		end
	else
		if p5.cameraType ~= Enum.CameraType.Watch then
			return l__CurrentCamera__12.CFrame, l__CurrentCamera__12.Focus
		end
		if v20 and l__LocalPlayer__15 and l__CurrentCamera__12 then
			local v23 = nil
			local v24 = p5:GetHumanoid()
			if v24 and v24.RootPart then
				local v25 = v20 - l__CurrentCamera__12.CFrame.p
				v23 = v25.unit
				if p5.lastDistanceToSubject and p5.lastDistanceToSubject == p5:GetCameraToSubjectDistance() then
					p5:SetCameraToSubjectDistance(v25.magnitude)
				end
			end
			local v26 = p5:GetCameraToSubjectDistance()
			p5.rotateInput = u2
			v14 = CFrame.new(v20)
			v13 = CFrame.new(v20 - v26 * p5:CalculateNewLookVector(v23), v20)
			p5.lastDistanceToSubject = v26
		end
	end
	p5.lastUpdate = v11
	return v13, v14
end
return v9
