local F=require(script.Parent:WaitForChild("\067\097\109\101\114\097\085\116\105\108\115"))local Q=game:GetService("\080\108\097\121\101\114\115")local h,q=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 z=require(script.Parent:WaitForChild("\066\097\115\101\079\099\099\108\117\115\105\111\110"))local o=setmetatable({},z)o.__index=o function o.new()local F=setmetatable(z.new(),o)F.camera=nil F.cameraSubjectChangeConn=nil F.subjectPart=nil F.playerCharacters={}F.vehicleParts={}F.lastPopAmount=0 F.lastZoomLevel=0 F.popperEnabled=false return F end function o.GetOcclusionMode(F)return Enum.DevCameraOcclusionMode.Zoom end function o.Enable(F,Q) end function o.CharacterAdded(F,Q,h)F.playerCharacters[h]=Q end function o.CharacterRemoving(F,Q,h)F.playerCharacters[h]=nil end local y=h or q function o.Update(F,Q,h,q)if not F.popperEnabled then return h,q end F.camera=game.Workspace.CurrentCamera local z=h local o=q.p if y and F.subjectPart then o=F.subjectPart.CFrame.p end local E={}for F,Q in pairs(F.playerCharacters)do E[#E+1]=Q end for Q=1,#F.vehicleParts,1 do E[#E+1]=F.vehicleParts[Q]end local Z=F.camera.CFrame F.camera.CFrame=h F.camera.Focus=q local c=(h.p-o).Magnitude if math.abs(c-F.lastZoomLevel)>.001 then F.lastPopAmount=0 end local d=F.camera:GetLargestCutoffDistance(E)if d<F.lastPopAmount then d=F.lastPopAmount end if d>0 then z=h+h.lookVector*d F.lastPopAmount=d-.3 if F.lastPopAmount<0 then F.lastPopAmount=0 end end F.lastZoomLevel=c return z,q end local E={"\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 o.OnCameraSubjectChanged(F,Q)F.vehicleParts={}F.lastPopAmount=0 if Q then F.popperEnabled=false for h,q in pairs(E)do if Q:IsA(q)then F.popperEnabled=true break end end if Q:IsA("\086\101\104\105\099\108\101\083\101\097\116")then F.vehicleParts=Q:GetConnectedParts(true)end if y then if Q:IsA("\066\097\115\101\080\097\114\116")then F.subjectPart=Q return end if Q:IsA("\077\111\100\101\108")then if Q.PrimaryPart then F.subjectPart=Q.PrimaryPart return else for Q,h in pairs(Q:GetChildren())do if h:IsA("\066\097\115\101\080\097\114\116")then F.subjectPart=h return end end return end elseif Q:IsA("\072\117\109\097\110\111\105\100")then F.subjectPart=Q.RootPart end end end end return o


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;

