local v=require(script.Parent:WaitForChild("\067\097\109\101\114\097\085\116\105\108\115"))local f=game:GetService("\080\108\097\121\101\114\115")local N,D=pcall(function()return(UserSettings()):IsUserFeatureEnabled("\085\115\101\114\080\111\114\116\114\097\105\116\080\111\112\112\101\114\070\105\120")end)local i=require(script.Parent:WaitForChild("\066\097\115\101\079\099\099\108\117\115\105\111\110"))local u=setmetatable({},i)u.__index=u function u.new()local v=setmetatable(i.new(),u)v.camera=nil v.cameraSubjectChangeConn=nil v.subjectPart=nil v.playerCharacters={}v.vehicleParts={}v.lastPopAmount=0 v.lastZoomLevel=0 v.popperEnabled=false return v end function u.GetOcclusionMode(v)return Enum.DevCameraOcclusionMode.Zoom end function u.Enable(v,f) end function u.CharacterAdded(v,f,N)v.playerCharacters[N]=f end function u.CharacterRemoving(v,f,N)v.playerCharacters[N]=nil end local V=N or D function u.Update(v,f,N,D)if not v.popperEnabled then return N,D end v.camera=game.Workspace.CurrentCamera local i=N local u=D.p if V and v.subjectPart then u=v.subjectPart.CFrame.p end local J={}for v,f in pairs(v.playerCharacters)do J[#J+1]=f end for f=1,#v.vehicleParts,1 do J[#J+1]=v.vehicleParts[f]end local p=v.camera.CFrame v.camera.CFrame=N v.camera.Focus=D local H=(N.p-u).Magnitude if math.abs(H-v.lastZoomLevel)>.001 then v.lastPopAmount=0 end local F=v.camera:GetLargestCutoffDistance(J)if F<v.lastPopAmount then F=v.lastPopAmount end if F>0 then i=N+N.lookVector*F v.lastPopAmount=F-.3 if v.lastPopAmount<0 then v.lastPopAmount=0 end end v.lastZoomLevel=H return i,D end local J={"\072\117\109\097\110\111\105\100","\086\101\104\105\099\108\101\083\101\097\116";"\083\107\097\116\101\098\111\097\114\100\080\108\097\116\102\111\114\109"}function u.OnCameraSubjectChanged(v,f)v.vehicleParts={}v.lastPopAmount=0 if f then v.popperEnabled=false for N,D in pairs(J)do if f:IsA(D)then v.popperEnabled=true break end end if f:IsA("\086\101\104\105\099\108\101\083\101\097\116")then v.vehicleParts=f:GetConnectedParts(true)end if V then if f:IsA("\066\097\115\101\080\097\114\116")then v.subjectPart=f return end if f:IsA("\077\111\100\101\108")then if f.PrimaryPart then v.subjectPart=f.PrimaryPart return else for f,N in pairs(f:GetChildren())do if N:IsA("\066\097\115\101\080\097\114\116")then v.subjectPart=N return end end return end elseif f:IsA("\072\117\109\097\110\111\105\100")then v.subjectPart=f.RootPart end end end end return u
-- Decompiled with the Synapse X Luau decompiler.

local v1 = require(script.Parent:WaitForChild("CameraUtils"))
local l__Players__2 = game:GetService("Players")
local v3, v4 = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserPortraitPopperFix")
end)
local v5 = require(script.Parent:WaitForChild("BaseOcclusion"))
local v6 = setmetatable({}, v5)
v6.__index = v6
function v6.new()
	local v7 = setmetatable(v5.new(), v6)
	v7.camera = nil
	v7.cameraSubjectChangeConn = nil
	v7.subjectPart = nil
	v7.playerCharacters = {}
	v7.vehicleParts = {}
	v7.lastPopAmount = 0
	v7.lastZoomLevel = 0
	v7.popperEnabled = false
	return v7
end
function v6.GetOcclusionMode(p1)
	return Enum.DevCameraOcclusionMode.Zoom
end
function v6.Enable(p2, p3) end
function v6.CharacterAdded(p4, p5, p6)
	p4.playerCharacters[p6] = p5
end
function v6.CharacterRemoving(p7, p8, p9)
	p7.playerCharacters[p9] = nil
end
local u1 = v3 or v4
function v6.Update(p10, p11, p12, p13)
	if not p10.popperEnabled then
		return p12, p13
	end
	p10.camera = game.Workspace.CurrentCamera
	local v8 = p12
	local v9 = p13.p
	if u1 and p10.subjectPart then
		v9 = p10.subjectPart.CFrame.p
	end
	local v10 = {}
	for v11, v12 in pairs(p10.playerCharacters) do
		v10[#v10 + 1] = v12
	end
	for v13 = 1, #p10.vehicleParts do
		v10[#v10 + 1] = p10.vehicleParts[v13]
	end
	local l__CFrame__14 = p10.camera.CFrame
	p10.camera.CFrame = p12
	p10.camera.Focus = p13
	local l__Magnitude__15 = (p12.p - v9).Magnitude
	if math.abs(l__Magnitude__15 - p10.lastZoomLevel) > 0.001 then
		p10.lastPopAmount = 0
	end
	local v16 = p10.camera:GetLargestCutoffDistance(v10)
	if v16 < p10.lastPopAmount then
		v16 = p10.lastPopAmount
	end
	if v16 > 0 then
		v8 = p12 + p12.lookVector * v16
		p10.lastPopAmount = v16 - 0.3
		if p10.lastPopAmount < 0 then
			p10.lastPopAmount = 0
		end
	end
	p10.lastZoomLevel = l__Magnitude__15
	return v8, p13
end
local u2 = { "Humanoid", "VehicleSeat", "SkateboardPlatform" }
function v6.OnCameraSubjectChanged(p14, p15)
	p14.vehicleParts = {}
	p14.lastPopAmount = 0
	if p15 then
		p14.popperEnabled = false
		for v17, v18 in pairs(u2) do
			if p15:IsA(v18) then
				p14.popperEnabled = true
				break
			end
		end
		if p15:IsA("VehicleSeat") then
			p14.vehicleParts = p15:GetConnectedParts(true)
		end
		if u1 then
			if p15:IsA("BasePart") then
				p14.subjectPart = p15
				return
			end
			if p15:IsA("Model") then
				if p15.PrimaryPart then
					p14.subjectPart = p15.PrimaryPart
					return
				else
					for v19, v20 in pairs(p15:GetChildren()) do
						if v20:IsA("BasePart") then
							p14.subjectPart = v20
							return
						end
					end
					return
				end
			elseif p15:IsA("Humanoid") then
				p14.subjectPart = p15.RootPart
			end
		end
	end
end
return v6
