local W=game:GetService("\080\108\097\121\101\114\115")local y=game.Workspace.CurrentCamera local d=math.rad local r=nil local b=math.tan local S=nil local function M()local W=y.ViewportSize r=2*b(d(y.FieldOfView)/2)S=(W.X/W.Y)*r end;(y:GetPropertyChangedSignal("\070\105\101\108\100\079\102\086\105\101\119")):Connect(M);(y:GetPropertyChangedSignal("\086\105\101\119\112\111\114\116\083\105\122\101")):Connect(M)M()local U=y.NearPlaneZ;(y:GetPropertyChangedSignal("\078\101\097\114\080\108\097\110\101\090")):Connect(function()U=y.NearPlaneZ end)local g={}local l={}local q=function()local W=1 g={}for y,d in pairs(l)do g[W]=d W=W+1 end end local function a(W)local function y(y)l[W]=y q()end W.CharacterAdded:Connect(y)W.CharacterRemoving:Connect(function()l[W]=nil q()end)if W.Character then y(W.Character)end end W.PlayerAdded:Connect(a)W.PlayerRemoving:Connect(function(W)l[W]=nil q()end)for W,y in ipairs(W:GetPlayers())do a(y)end q()l=nil q=nil;(y:GetPropertyChangedSignal("\067\097\109\101\114\097\083\117\098\106\101\099\116")):Connect(function()local W=y.CameraSubject if W:IsA("\072\117\109\097\110\111\105\100")then q=W.RootPart return end if W:IsA("\066\097\115\101\080\097\114\116")then q=W return end q=nil end)local function Q(W)return 1-(1-W.Transparency)*(1-W.LocalTransparencyModifier)end local c=Ray.new local function X(W,y)for y=#W,y+1,-1 do W[y]=nil end end local s=math.huge local function j(W)local y=false if Q(W)<.25 then y=W.CanCollide if y then y=false if l~=(W:GetRootPart()and W)then y=not W:IsA("\084\114\117\115\115\080\097\114\116")end end end return y end local function F(W,y,d,r)debug.profilebegin("\113\117\101\114\121\080\111\105\110\116")d=d+U local b=W+y*d local S=s local M=s local l=W local q=0 while true do local U,a=workspace:FindPartOnRayWithIgnoreList(c(l,b-l),g,false,true)q=q+1 if U then local Q=q>=64 if j(U)or Q then local y={U}local g=(a-W).Magnitude if workspace:FindPartOnRayWithWhitelist(c(b,a-b),y,true)and not Q then local W=false if r then W=workspace:FindPartOnRayWithWhitelist(c(r,b-r),y,true)or workspace:FindPartOnRayWithWhitelist(c(b,r-b),y,true)end if W then M=g elseif d<S then S=g end else M=g end end g[#g+1]=U l=a-y*.001 end if M<s then break end if not U then break end end X(g,#g)debug.profileend()return S-U,M-U end local function i(W,y)local d=#g while true do local r,b=workspace:FindPartOnRayWithIgnoreList(c(W,y),g,false,true)if r then if r.CanCollide then X(g,d)return b,true end g[#g+1]=r end if not r then break end end X(g,d)return W+y,false end local p=math.min local u={Vector2.new(.4,0),Vector2.new(-0.4,0);Vector2.new(0,-0.4),Vector2.new(0,.4);Vector2.new(0,.2)}local function O(W,d)debug.profilebegin("\113\117\101\114\121\086\105\101\119\112\111\114\116")local b=W.p local M=W.rightVector local g=W.upVector local l=-W.lookVector local q=y.ViewportSize local a=s local Q=s for W=0,1,1 do local c=M*((W-.5)*S)for S=0,1,1 do local M,X=F(b+U*(c+g*((S-.5)*r)),l,d,(y:ViewportPointToRay(q.x*W,q.y*S)).Origin)if X<a then a=X end if M<Q then Q=M end end end debug.profileend()return Q,a end local function V(W,y,d)debug.profilebegin("\116\101\115\116\080\114\111\109\111\116\105\111\110")local r=W.p local b=W.rightVector local S=W.upVector local M=-W.lookVector debug.profilebegin("\101\120\116\114\097\112\111\108\097\116\101")for W=0,p(1.25,d.rotVelocity.magnitude+(i(r,d.posVelocity*1.25)-r).Magnitude/d.posVelocity.magnitude),.0625 do local r=d.extrapolate(W)if y<=F(r.p,-r.lookVector,y)then return false end end debug.profileend()debug.profilebegin("\116\101\115\116\079\102\102\115\101\116\115")for W,d in ipairs(u)do local U=i(r,b*d.x+S*d.y)if F(U,((r+M*y)-U).Unit,y)==s then return false end end debug.profileend()debug.profileend()return true end return function(W,y,d)debug.profilebegin("\112\111\112\112\101\114")l=q and q:GetRootPart()or q local r=y local b,S=O(W,y)if S<r then r=S end if b<r and V(W,y,d)then r=b end l=nil debug.profileend()return r end


local l__Players__1 = game:GetService("Players");
local l__CurrentCamera__1 = game.Workspace.CurrentCamera;
local l__math_rad__2 = math.rad;
local u3 = nil;
local l__math_tan__4 = math.tan;
local u5 = nil;
local function v2()
	local l__ViewportSize__3 = l__CurrentCamera__1.ViewportSize;
	u3 = 2 * l__math_tan__4(l__math_rad__2(l__CurrentCamera__1.FieldOfView) / 2);
	u5 = l__ViewportSize__3.X / l__ViewportSize__3.Y * u3;
end;
l__CurrentCamera__1:GetPropertyChangedSignal("FieldOfView"):Connect(v2);
l__CurrentCamera__1:GetPropertyChangedSignal("ViewportSize"):Connect(v2);
v2();
local u6 = l__CurrentCamera__1.NearPlaneZ;
l__CurrentCamera__1:GetPropertyChangedSignal("NearPlaneZ"):Connect(function()
	u6 = l__CurrentCamera__1.NearPlaneZ;
end);
local u7 = {};
local u8 = {};
local u9 = function()
	local v4 = 1;
	u7 = {};
	for v5, v6 in pairs(u8) do
		u7[v4] = v6;
		v4 = v4 + 1;
	end;
end;
local function v7(p1)
	local function v8(p2)
		u8[p1] = p2;
		u9();
	end;
	p1.CharacterAdded:Connect(v8);
	p1.CharacterRemoving:Connect(function()
		u8[p1] = nil;
		u9();
	end);
	if p1.Character then
		v8(p1.Character);
	end;
end;
l__Players__1.PlayerAdded:Connect(v7);
l__Players__1.PlayerRemoving:Connect(function(p3)
	u8[p3] = nil;
	u9();
end);
for v9, v10 in ipairs(l__Players__1:GetPlayers()) do
	v7(v10);
end;
u9();
u8 = nil;
u9 = nil;
l__CurrentCamera__1:GetPropertyChangedSignal("CameraSubject"):Connect(function()
	local l__CameraSubject__11 = l__CurrentCamera__1.CameraSubject;
	if l__CameraSubject__11:IsA("Humanoid") then
		u9 = l__CameraSubject__11.RootPart;
		return;
	end;
	if l__CameraSubject__11:IsA("BasePart") then
		u9 = l__CameraSubject__11;
		return;
	end;
	u9 = nil;
end);
local function u10(p4)
	return 1 - (1 - p4.Transparency) * (1 - p4.LocalTransparencyModifier);
end;
local l__Ray_new__11 = Ray.new;
local function u12(p5, p6)
	for v12 = #p5, p6 + 1, -1 do
		p5[v12] = nil;
	end;
end;
local l__math_huge__13 = math.huge;
local function u14(p7)
	local v13 = false;
	if u10(p7) < 0.25 then
		v13 = p7.CanCollide;
		if v13 then
			v13 = false;
			if u8 ~= (p7:GetRootPart() and p7) then
				v13 = not p7:IsA("TrussPart");
			end;
		end;
	end;
	return v13;
end;
local function u15(p8, p9, p10, p11)
	debug.profilebegin("queryPoint");
	p10 = p10 + u6;
	local v14 = p8 + p9 * p10;
	local v15 = l__math_huge__13;
	local v16 = l__math_huge__13;
	local v17 = p8;
	local v18 = 0;
	while true do
		local v19, v20 = workspace:FindPartOnRayWithIgnoreList(l__Ray_new__11(v17, v14 - v17), u7, false, true);
		v18 = v18 + 1;
		if v19 then
			local v21 = v18 >= 64;
			if u14(v19) or v21 then
				local v22 = { v19 };
				local l__Magnitude__23 = (v20 - p8).Magnitude;
				if workspace:FindPartOnRayWithWhitelist(l__Ray_new__11(v14, v20 - v14), v22, true) and not v21 then
					local v24 = false;
					if p11 then
						v24 = workspace:FindPartOnRayWithWhitelist(l__Ray_new__11(p11, v14 - p11), v22, true) or workspace:FindPartOnRayWithWhitelist(l__Ray_new__11(v14, p11 - v14), v22, true);
					end;
					if v24 then
						v16 = l__Magnitude__23;
					elseif p10 < v15 then
						v15 = l__Magnitude__23;
					end;
				else
					v16 = l__Magnitude__23;
				end;
			end;
			u7[#u7 + 1] = v19;
			v17 = v20 - p9 * 0.001;
		end;
		if v16 < l__math_huge__13 then
			break;
		end;
		if not v19 then
			break;
		end;	
	end;
	u12(u7, #u7);
	debug.profileend();
	return v15 - u6, v16 - u6;
end;
local function u16(p12, p13)
	local v25 = #u7;
	while true do
		local v26, v27 = workspace:FindPartOnRayWithIgnoreList(l__Ray_new__11(p12, p13), u7, false, true);
		if v26 then
			if v26.CanCollide then
				u12(u7, v25);
				return v27, true;
			end;
			u7[#u7 + 1] = v26;
		end;
		if not v26 then
			break;
		end;	
	end;
	u12(u7, v25);
	return p12 + p13, false;
end;
local l__math_min__17 = math.min;
local u18 = { Vector2.new(0.4, 0), Vector2.new(-0.4, 0), Vector2.new(0, -0.4), Vector2.new(0, 0.4), Vector2.new(0, 0.2) };
local function u19(p14, p15)
	debug.profilebegin("queryViewport");
	local l__p__28 = p14.p;
	local l__rightVector__29 = p14.rightVector;
	local l__upVector__30 = p14.upVector;
	local v31 = -p14.lookVector;
	local l__ViewportSize__32 = l__CurrentCamera__1.ViewportSize;
	local v33 = l__math_huge__13;
	local v34 = l__math_huge__13;
	for v35 = 0, 1 do
		local v36 = l__rightVector__29 * ((v35 - 0.5) * u5);
		for v37 = 0, 1 do
			local v38, v39 = u15(l__p__28 + u6 * (v36 + l__upVector__30 * ((v37 - 0.5) * u3)), v31, p15, l__CurrentCamera__1:ViewportPointToRay(l__ViewportSize__32.x * v35, l__ViewportSize__32.y * v37).Origin);
			if v39 < v33 then
				v33 = v39;
			end;
			if v38 < v34 then
				v34 = v38;
			end;
		end;
	end;
	debug.profileend();
	return v34, v33;
end;
local function u20(p16, p17, p18)
	debug.profilebegin("testPromotion");
	local l__p__40 = p16.p;
	local l__rightVector__41 = p16.rightVector;
	local l__upVector__42 = p16.upVector;
	local v43 = -p16.lookVector;
	debug.profilebegin("extrapolate");
	for v44 = 0, l__math_min__17(1.25, p18.rotVelocity.magnitude + (u16(l__p__40, p18.posVelocity * 1.25) - l__p__40).Magnitude / p18.posVelocity.magnitude), 0.0625 do
		local v45 = p18.extrapolate(v44);
		if p17 <= u15(v45.p, -v45.lookVector, p17) then
			return false;
		end;
	end;
	debug.profileend();
	debug.profilebegin("testOffsets");
	for v46, v47 in ipairs(u18) do
		local v48 = u16(l__p__40, l__rightVector__41 * v47.x + l__upVector__42 * v47.y);
		if u15(v48, (l__p__40 + v43 * p17 - v48).Unit, p17) == l__math_huge__13 then
			return false;
		end;
	end;
	debug.profileend();
	debug.profileend();
	return true;
end;
return function(p19, p20, p21)
	debug.profilebegin("popper");
	u8 = u9 and u9:GetRootPart() or u9;
	local v49 = p20;
	local v50, v51 = u19(p19, p20);
	if v51 < v49 then
		v49 = v51;
	end;
	if v50 < v49 and u20(p19, p20, p21) then
		v49 = v50;
	end;
	u8 = nil;
	debug.profileend();
	return v49;
end;
