local b=require(script.Parent:WaitForChild("\067\097\109\101\114\097\085\116\105\108\115"))local S=game:GetService("\080\108\097\121\101\114\115")local G=game:GetService("\082\117\110\083\101\114\118\105\099\101")local g=Vector3.new(0,0,0)local f=require(script.Parent:WaitForChild("\066\097\115\101\079\099\099\108\117\115\105\111\110"))local r=setmetatable({},f)r.__index=r local d={LIMBS=2;MOVEMENT=3,CORNERS=4;CIRCLE1=5,CIRCLE2=6;LIMBMOVE=7,SMART_CIRCLE=8,CHAR_OUTLINE=9}function r.new()local b=setmetatable(f.new(),r)b.char=nil b.humanoidRootPart=nil b.torsoPart=nil b.headPart=nil b.childAddedConn=nil b.childRemovedConn=nil b.behaviors={}b.behaviors[d.LIMBS]=b.LimbBehavior b.behaviors[d.MOVEMENT]=b.MoveBehavior b.behaviors[d.CORNERS]=b.CornerBehavior b.behaviors[d.CIRCLE1]=b.CircleBehavior b.behaviors[d.CIRCLE2]=b.CircleBehavior b.behaviors[d.LIMBMOVE]=b.LimbMoveBehavior b.behaviors[d.SMART_CIRCLE]=b.SmartCircleBehavior b.behaviors[d.CHAR_OUTLINE]=b.CharacterOutlineBehavior b.mode=d.SMART_CIRCLE b.behaviorFunction=b.SmartCircleBehavior b.savedHits={}b.trackedLimbs={}b.camera=game.Workspace.CurrentCamera b.enabled=false return b end function r.Enable(b,S)b.enabled=S if not S then b:Cleanup()end end function r.GetOcclusionMode(b)return Enum.DevCameraOcclusionMode.Invisicam end function r.LimbBehavior(b,S)for b,G in pairs(b.trackedLimbs)do S[#S+1]=b.Position end end function r.MoveBehavior(b,S)for G=1,3,1 do local g=b.humanoidRootPart.Velocity S[#S+1]=b.humanoidRootPart.Position+((G-1)*b.humanoidRootPart.CFrame.lookVector)*((Vector3.new(g.X,0,g.Z)).Magnitude/2)end end local a={Vector3.new(1,1,-1);Vector3.new(1,-1,-1);Vector3.new(-1,-1,-1),Vector3.new(-1,1,-1)}function r.CornerBehavior(b,S)local G=b.humanoidRootPart.CFrame local g=G.p local f=G-g local r=b.char:GetExtentsSize()/2 S[#S+1]=g for b=1,#a,1 do S[#S+1]=g+f*(r*a[b])end end function r.CircleBehavior(b,S)if b.mode==d.CIRCLE1 then local S=b.humanoidRootPart.CFrame else local S=b.camera.CoordinateFrame v16=(S-S.p)+b.humanoidRootPart.Position end S[#S+1]=v16.p for b=0,9,1 do local G=((2*math.pi)/10)*b S[#S+1]=v16*(3*Vector3.new(math.cos(G),math.sin(G),0))end end function r.LimbMoveBehavior(b,S)b:LimbBehavior(S)b:MoveBehavior(S)end function r.CharacterOutlineBehavior(b,S)local G=b.torsoPart.CFrame.upVector.unit local f=b.torsoPart.CFrame.rightVector.unit S[#S+1]=b.torsoPart.CFrame.p S[#S+1]=b.torsoPart.CFrame.p+G S[#S+1]=b.torsoPart.CFrame.p-G S[#S+1]=b.torsoPart.CFrame.p+f S[#S+1]=b.torsoPart.CFrame.p-f if b.headPart then S[#S+1]=b.headPart.CFrame.p end local r=CFrame.new(g,Vector3.new(b.camera.CoordinateFrame.lookVector.X,0,b.camera.CoordinateFrame.lookVector.Z))local d=b.torsoPart and b.torsoPart.Position or b.humanoidRootPart.Position local a={b.torsoPart}if b.headPart then a[#a+1]=b.headPart end for b=1,24,1 do local G=((2*math.pi)*b)/24 local g=r*(3*Vector3.new(math.cos(G),math.sin(G),0))local f=Vector3.new(g.X,math.max(g.Y,-2.25),g.Z)local K,q=game.Workspace:FindPartOnRayWithWhitelist(Ray.new(d+f,-3*f),a,false,false)if K then S[#S+1]=q+.2*(d-q).unit end end end local K=(2*math.pi)/24 local function q(b,S,G,f)local r=S:Cross(f)local d=G.x-b.x local a=G.y-b.y local K=G.z-b.z local q=S.y local s=-f.y local w=r.y local Q=S.z local u=-f.z local v=r.z local Y=(S.x*(s*v-w*u)-(-f.x*(q*v-w*Q)))+r.x*(q*u-s*Q)if Y==0 then return g end local D=-f.y local A=r.y local i=-f.z local X=r.z local n=S.y local N=r.y local F=S.z local c=r.z local C=b+(((d*(D*X-A*i)-(-f.x*(a*X-A*K)))+r.x*(a*i-D*K))/Y)*S local o=G+(((S.x*(a*c-N*K)-d*(n*c-N*F))+r.x*(n*K-a*F))/Y)*f if(o-C).Magnitude<.25 then return C+.5*(o-C)end return g end function r.SmartCircleBehavior(b,S)local G=b.torsoPart.CFrame.upVector.unit local g=b.torsoPart.CFrame.rightVector.unit S[#S+1]=b.torsoPart.CFrame.p S[#S+1]=b.torsoPart.CFrame.p+G S[#S+1]=b.torsoPart.CFrame.p-G S[#S+1]=b.torsoPart.CFrame.p+g S[#S+1]=b.torsoPart.CFrame.p-g if b.headPart then S[#S+1]=b.headPart.CFrame.p end local f=b.camera.CFrame-b.camera.CFrame.p local r=Vector3.new(0,.5,0)+(b.torsoPart and b.torsoPart.Position or b.humanoidRootPart.Position)for G=1,24,1 do local g=K*G-.5*math.pi local d=r+f*(2.5*Vector3.new(math.cos(g),math.sin(g),0))local a=d-b.camera.CFrame.p local s,w,Q=game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(r,d-r),{b.char},false,false)local u=d if s then local S=w+.1*Q.unit local G=S-r local g=G.magnitude local f=((G:Cross(a)).unit:Cross(Q)).unit if G.unit:Dot(-f)<G.unit:Dot((S-b.camera.CFrame.p).unit)then u=q(S,f,d,a)if u.Magnitude>0 then local G,g,f=game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(S,u-S),{b.char},false,false)if G then u=g+.1*f.unit end else u=S end else u=S end local K,s,v=game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(r,u-r),{b.char},false,false)if K then u=s-.1*(u-r).unit end end S[#S+1]=u end end function r.CheckTorsoReference(b)if b.char then b.torsoPart=b.char:FindFirstChild("\084\111\114\115\111")if not b.torsoPart then b.torsoPart=b.char:FindFirstChild("\085\112\112\101\114\084\111\114\115\111")if not b.torsoPart then b.torsoPart=b.char:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")end end b.headPart=b.char:FindFirstChild("\072\101\097\100")end end local s={Head=true;["\076\101\102\116 \065\114\109"]=true,["\082\105\103\104\116 \065\114\109"]=true,["\076\101\102\116 \076\101\103"]=true;["\082\105\103\104\116 \076\101\103"]=true;LeftLowerArm=true,RightLowerArm=true;LeftUpperLeg=true;RightUpperLeg=true}function r.CharacterAdded(b,G,g)if g~=S.LocalPlayer then return end if b.childAddedConn then b.childAddedConn:Disconnect()b.childAddedConn=nil end if b.childRemovedConn then b.childRemovedConn:Disconnect()b.childRemovedConn=nil end b.char=G b.trackedLimbs={}b.childAddedConn=G.ChildAdded:Connect(function(S)if S:IsA("\066\097\115\101\080\097\114\116")then if s[S.Name]then b.trackedLimbs[S]=true end if S.Name=="\084\111\114\115\111"or S.Name=="\085\112\112\101\114\084\111\114\115\111"then b.torsoPart=S end if S.Name=="\072\101\097\100"then b.headPart=S end end end)b.childRemovedConn=G.ChildRemoved:Connect(function(S)b.trackedLimbs[S]=nil b:CheckTorsoReference()end)for S,G in pairs(b.char:GetChildren())do if G:IsA("\066\097\115\101\080\097\114\116")then if s[G.Name]then b.trackedLimbs[G]=true end if G.Name=="\084\111\114\115\111"or G.Name=="\085\112\112\101\114\084\111\114\115\111"then b.torsoPart=G end if G.Name=="\072\101\097\100"then b.headPart=G end end end end local function w(b,...)local S={}local G=""for b,g in pairs({...})do S[g]=true if G==""then local b=""else v80=" \111\114 "end G=G..(v80 ..g)end local g=type(b)assert(S[g],G..(" \116\121\112\101 \101\120\112\101\099\116\101\100\044 \103\111\116\058 "..g))end function r.SetMode(b,S)w(S,"\110\117\109\098\101\114")for G,g in pairs(d)do if g==S then b.mode=S b.behaviorFunction=b.behaviors[b.mode]return end end error("\073\110\118\097\108\105\100 \109\111\100\101 \110\117\109\098\101\114")end function r.GetObscuredParts(b)return b.savedHits end function r.Cleanup(b)for b,S in pairs(b.savedHits)do b.LocalTransparencyModifier=S end end function r.Update(b,S,G,g)local f=nil if not b.enabled or not b.char then return G,g end b.camera=game.Workspace.CurrentCamera if not b.humanoidRootPart then local S=b.char:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if S and S.RootPart then b.humanoidRootPart=S.RootPart else b.humanoidRootPart=b.char:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")if not b.humanoidRootPart then return G,g end end local f=nil f=b.humanoidRootPart.AncestryChanged:Connect(function(S,G)if S==b.humanoidRootPart and not G then b.humanoidRootPart=nil if f and f.Connected then f:Disconnect()f=nil end end end)end if not b.torsoPart then b:CheckTorsoReference()if not b.torsoPart then return G,g end end local r={}b:behaviorFunction(r)local d={b.char}local a={}local K=0 local q={}local s={}local w=.75 local Q=.75 local u=b.camera:GetPartsObscuringTarget({b.headPart and b.headPart.CFrame.p or r[1],b.torsoPart and b.torsoPart.CFrame.p or r[2]},d)for b=1,#u,1 do local S=u[b]f=K+1 q[S]=true for b,S in pairs(S:GetChildren())do if S:IsA("\068\101\099\097\108")then f=f+1 break end if S:IsA("\084\101\120\116\117\114\101")then f=f+1 break end end end if f>0 then w=math.pow(.375+.375/f,1/f)Q=math.pow(.25+.25/f,1/f)end local v=b.camera:GetPartsObscuringTarget(r,d)local Y={}for S=1,#v,1 do local G=v[S]Y[G]=q[G]and w or Q if G.Transparency<Y[G]then a[G]=true if not b.savedHits[G]then b.savedHits[G]=G.LocalTransparencyModifier end end for S,g in pairs(G:GetChildren())do if(g:IsA("\068\101\099\097\108")or g:IsA("\084\101\120\116\117\114\101"))and g.Transparency<Y[G]then Y[g]=Y[G]a[g]=true if not b.savedHits[g]then b.savedHits[g]=g.LocalTransparencyModifier end end end end for S,G in pairs(b.savedHits)do if a[S]then S.LocalTransparencyModifier=S.Transparency<1 and(Y[S]-S.Transparency)/(1-S.Transparency)or 0 else S.LocalTransparencyModifier=G b.savedHits[S]=nil end end return G,g end return r


local v1 = require(script.Parent:WaitForChild("CameraUtils"));
local l__Players__2 = game:GetService("Players");
local l__RunService__3 = game:GetService("RunService");
local u1 = Vector3.new(0, 0, 0);
local v4 = require(script.Parent:WaitForChild("BaseOcclusion"));
local v5 = setmetatable({}, v4);
v5.__index = v5;
local u2 = {
	LIMBS = 2, 
	MOVEMENT = 3, 
	CORNERS = 4, 
	CIRCLE1 = 5, 
	CIRCLE2 = 6, 
	LIMBMOVE = 7, 
	SMART_CIRCLE = 8, 
	CHAR_OUTLINE = 9
};
function v5.new()
	local v6 = setmetatable(v4.new(), v5);
	v6.char = nil;
	v6.humanoidRootPart = nil;
	v6.torsoPart = nil;
	v6.headPart = nil;
	v6.childAddedConn = nil;
	v6.childRemovedConn = nil;
	v6.behaviors = {};
	v6.behaviors[u2.LIMBS] = v6.LimbBehavior;
	v6.behaviors[u2.MOVEMENT] = v6.MoveBehavior;
	v6.behaviors[u2.CORNERS] = v6.CornerBehavior;
	v6.behaviors[u2.CIRCLE1] = v6.CircleBehavior;
	v6.behaviors[u2.CIRCLE2] = v6.CircleBehavior;
	v6.behaviors[u2.LIMBMOVE] = v6.LimbMoveBehavior;
	v6.behaviors[u2.SMART_CIRCLE] = v6.SmartCircleBehavior;
	v6.behaviors[u2.CHAR_OUTLINE] = v6.CharacterOutlineBehavior;
	v6.mode = u2.SMART_CIRCLE;
	v6.behaviorFunction = v6.SmartCircleBehavior;
	v6.savedHits = {};
	v6.trackedLimbs = {};
	v6.camera = game.Workspace.CurrentCamera;
	v6.enabled = false;
	return v6;
end;
function v5.Enable(p1, p2)
	p1.enabled = p2;
	if not p2 then
		p1:Cleanup();
	end;
end;
function v5.GetOcclusionMode(p3)
	return Enum.DevCameraOcclusionMode.Invisicam;
end;
function v5.LimbBehavior(p4, p5)
	for v7, v8 in pairs(p4.trackedLimbs) do
		p5[#p5 + 1] = v7.Position;
	end;
end;
function v5.MoveBehavior(p6, p7)
	for v9 = 1, 3 do
		local l__Velocity__10 = p6.humanoidRootPart.Velocity;
		p7[#p7 + 1] = p6.humanoidRootPart.Position + (v9 - 1) * p6.humanoidRootPart.CFrame.lookVector * (Vector3.new(l__Velocity__10.X, 0, l__Velocity__10.Z).Magnitude / 2);
	end;
end;
local u3 = { Vector3.new(1, 1, -1), Vector3.new(1, -1, -1), Vector3.new(-1, -1, -1), Vector3.new(-1, 1, -1) };
function v5.CornerBehavior(p8, p9)
	local l__CFrame__11 = p8.humanoidRootPart.CFrame;
	local l__p__12 = l__CFrame__11.p;
	local v13 = l__CFrame__11 - l__p__12;
	local v14 = p8.char:GetExtentsSize() / 2;
	p9[#p9 + 1] = l__p__12;
	for v15 = 1, #u3 do
		p9[#p9 + 1] = l__p__12 + v13 * (v14 * u3[v15]);
	end;
end;
function v5.CircleBehavior(p10, p11)
	if p10.mode == u2.CIRCLE1 then
		local v16 = p10.humanoidRootPart.CFrame;
	else
		local l__CoordinateFrame__17 = p10.camera.CoordinateFrame;
		v16 = l__CoordinateFrame__17 - l__CoordinateFrame__17.p + p10.humanoidRootPart.Position;
	end;
	p11[#p11 + 1] = v16.p;
	for v18 = 0, 9 do
		local v19 = 2 * math.pi / 10 * v18;
		p11[#p11 + 1] = v16 * (3 * Vector3.new(math.cos(v19), math.sin(v19), 0));
	end;
end;
function v5.LimbMoveBehavior(p12, p13)
	p12:LimbBehavior(p13);
	p12:MoveBehavior(p13);
end;
function v5.CharacterOutlineBehavior(p14, p15)
	local l__unit__20 = p14.torsoPart.CFrame.upVector.unit;
	local l__unit__21 = p14.torsoPart.CFrame.rightVector.unit;
	p15[#p15 + 1] = p14.torsoPart.CFrame.p;
	p15[#p15 + 1] = p14.torsoPart.CFrame.p + l__unit__20;
	p15[#p15 + 1] = p14.torsoPart.CFrame.p - l__unit__20;
	p15[#p15 + 1] = p14.torsoPart.CFrame.p + l__unit__21;
	p15[#p15 + 1] = p14.torsoPart.CFrame.p - l__unit__21;
	if p14.headPart then
		p15[#p15 + 1] = p14.headPart.CFrame.p;
	end;
	local v22 = CFrame.new(u1, Vector3.new(p14.camera.CoordinateFrame.lookVector.X, 0, p14.camera.CoordinateFrame.lookVector.Z));
	local v23 = p14.torsoPart and p14.torsoPart.Position or p14.humanoidRootPart.Position;
	local v24 = { p14.torsoPart };
	if p14.headPart then
		v24[#v24 + 1] = p14.headPart;
	end;
	for v25 = 1, 24 do
		local v26 = 2 * math.pi * v25 / 24;
		local v27 = v22 * (3 * Vector3.new(math.cos(v26), math.sin(v26), 0));
		local v28 = Vector3.new(v27.X, math.max(v27.Y, -2.25), v27.Z);
		local v29, v30 = game.Workspace:FindPartOnRayWithWhitelist(Ray.new(v23 + v28, -3 * v28), v24, false, false);
		if v29 then
			p15[#p15 + 1] = v30 + 0.2 * (v23 - v30).unit;
		end;
	end;
end;
local u4 = 2 * math.pi / 24;
local function u5(p16, p17, p18, p19)
	local v31 = p17:Cross(p19);
	local v32 = p18.x - p16.x;
	local v33 = p18.y - p16.y;
	local v34 = p18.z - p16.z;
	local l__y__35 = p17.y;
	local v36 = -p19.y;
	local l__y__37 = v31.y;
	local l__z__38 = p17.z;
	local v39 = -p19.z;
	local l__z__40 = v31.z;
	local v41 = p17.x * (v36 * l__z__40 - l__y__37 * v39) - -p19.x * (l__y__35 * l__z__40 - l__y__37 * l__z__38) + v31.x * (l__y__35 * v39 - v36 * l__z__38);
	if v41 == 0 then
		return u1;
	end;
	local v42 = -p19.y;
	local l__y__43 = v31.y;
	local v44 = -p19.z;
	local l__z__45 = v31.z;
	local l__y__46 = p17.y;
	local l__y__47 = v31.y;
	local l__z__48 = p17.z;
	local l__z__49 = v31.z;
	local v50 = p16 + (v32 * (v42 * l__z__45 - l__y__43 * v44) - -p19.x * (v33 * l__z__45 - l__y__43 * v34) + v31.x * (v33 * v44 - v42 * v34)) / v41 * p17;
	local v51 = p18 + (p17.x * (v33 * l__z__49 - l__y__47 * v34) - v32 * (l__y__46 * l__z__49 - l__y__47 * l__z__48) + v31.x * (l__y__46 * v34 - v33 * l__z__48)) / v41 * p19;
	if (v51 - v50).Magnitude < 0.25 then
		return v50 + 0.5 * (v51 - v50);
	end;
	return u1;
end;
function v5.SmartCircleBehavior(p20, p21)
	local l__unit__52 = p20.torsoPart.CFrame.upVector.unit;
	local l__unit__53 = p20.torsoPart.CFrame.rightVector.unit;
	p21[#p21 + 1] = p20.torsoPart.CFrame.p;
	p21[#p21 + 1] = p20.torsoPart.CFrame.p + l__unit__52;
	p21[#p21 + 1] = p20.torsoPart.CFrame.p - l__unit__52;
	p21[#p21 + 1] = p20.torsoPart.CFrame.p + l__unit__53;
	p21[#p21 + 1] = p20.torsoPart.CFrame.p - l__unit__53;
	if p20.headPart then
		p21[#p21 + 1] = p20.headPart.CFrame.p;
	end;
	local v54 = p20.camera.CFrame - p20.camera.CFrame.p;
	local v55 = Vector3.new(0, 0.5, 0) + (p20.torsoPart and p20.torsoPart.Position or p20.humanoidRootPart.Position);
	for v56 = 1, 24 do
		local v57 = u4 * v56 - 0.5 * math.pi;
		local v58 = v55 + v54 * (2.5 * Vector3.new(math.cos(v57), math.sin(v57), 0));
		local v59 = v58 - p20.camera.CFrame.p;
		local v60, v61, v62 = game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(v55, v58 - v55), { p20.char }, false, false);
		local v63 = v58;
		if v60 then
			local v64 = v61 + 0.1 * v62.unit;
			local v65 = v64 - v55;
			local l__magnitude__66 = v65.magnitude;
			local l__unit__67 = v65:Cross(v59).unit:Cross(v62).unit;
			if v65.unit:Dot(-l__unit__67) < v65.unit:Dot((v64 - p20.camera.CFrame.p).unit) then
				v63 = u5(v64, l__unit__67, v58, v59);
				if v63.Magnitude > 0 then
					local v68, v69, v70 = game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(v64, v63 - v64), { p20.char }, false, false);
					if v68 then
						v63 = v69 + 0.1 * v70.unit;
					end;
				else
					v63 = v64;
				end;
			else
				v63 = v64;
			end;
			local v71, v72, v73 = game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(v55, v63 - v55), { p20.char }, false, false);
			if v71 then
				v63 = v72 - 0.1 * (v63 - v55).unit;
			end;
		end;
		p21[#p21 + 1] = v63;
	end;
end;
function v5.CheckTorsoReference(p22)
	if p22.char then
		p22.torsoPart = p22.char:FindFirstChild("Torso");
		if not p22.torsoPart then
			p22.torsoPart = p22.char:FindFirstChild("UpperTorso");
			if not p22.torsoPart then
				p22.torsoPart = p22.char:FindFirstChild("HumanoidRootPart");
			end;
		end;
		p22.headPart = p22.char:FindFirstChild("Head");
	end;
end;
local u6 = {
	Head = true, 
	["Left Arm"] = true, 
	["Right Arm"] = true, 
	["Left Leg"] = true, 
	["Right Leg"] = true, 
	LeftLowerArm = true, 
	RightLowerArm = true, 
	LeftUpperLeg = true, 
	RightUpperLeg = true
};
function v5.CharacterAdded(p23, p24, p25)
	if p25 ~= l__Players__2.LocalPlayer then
		return;
	end;
	if p23.childAddedConn then
		p23.childAddedConn:Disconnect();
		p23.childAddedConn = nil;
	end;
	if p23.childRemovedConn then
		p23.childRemovedConn:Disconnect();
		p23.childRemovedConn = nil;
	end;
	p23.char = p24;
	p23.trackedLimbs = {};
	p23.childAddedConn = p24.ChildAdded:Connect(function(p26)
		if p26:IsA("BasePart") then
			if u6[p26.Name] then
				p23.trackedLimbs[p26] = true;
			end;
			if p26.Name == "Torso" or p26.Name == "UpperTorso" then
				p23.torsoPart = p26;
			end;
			if p26.Name == "Head" then
				p23.headPart = p26;
			end;
		end;
	end);
	p23.childRemovedConn = p24.ChildRemoved:Connect(function(p27)
		p23.trackedLimbs[p27] = nil;
		p23:CheckTorsoReference();
	end);
	for v74, v75 in pairs(p23.char:GetChildren()) do
		if v75:IsA("BasePart") then
			if u6[v75.Name] then
				p23.trackedLimbs[v75] = true;
			end;
			if v75.Name == "Torso" or v75.Name == "UpperTorso" then
				p23.torsoPart = v75;
			end;
			if v75.Name == "Head" then
				p23.headPart = v75;
			end;
		end;
	end;
end;
local function u7(p28, ...)
	local v76 = {};
	local v77 = "";
	for v78, v79 in pairs({ ... }) do
		v76[v79] = true;
		if v77 == "" then
			local v80 = "";
		else
			v80 = " or ";
		end;
		v77 = v77 .. v80 .. v79;
	end;
	local v81 = type(p28);
	assert(v76[v81], v77 .. " type expected, got: " .. v81);
end;
function v5.SetMode(p29, p30)
	u7(p30, "number");
	for v82, v83 in pairs(u2) do
		if v83 == p30 then
			p29.mode = p30;
			p29.behaviorFunction = p29.behaviors[p29.mode];
			return;
		end;
	end;
	error("Invalid mode number");
end;
function v5.GetObscuredParts(p31)
	return p31.savedHits;
end;
function v5.Cleanup(p32)
	for v84, v85 in pairs(p32.savedHits) do
		v84.LocalTransparencyModifier = v85;
	end;
end;
function v5.Update(p33, p34, p35, p36)
	local v86 = nil;
	if not p33.enabled or not p33.char then
		return p35, p36;
	end;
	p33.camera = game.Workspace.CurrentCamera;
	if not p33.humanoidRootPart then
		local v87 = p33.char:FindFirstChildOfClass("Humanoid");
		if v87 and v87.RootPart then
			p33.humanoidRootPart = v87.RootPart;
		else
			p33.humanoidRootPart = p33.char:FindFirstChild("HumanoidRootPart");
			if not p33.humanoidRootPart then
				return p35, p36;
			end;
		end;
		local u8 = nil;
		u8 = p33.humanoidRootPart.AncestryChanged:Connect(function(p37, p38)
			if p37 == p33.humanoidRootPart and not p38 then
				p33.humanoidRootPart = nil;
				if u8 and u8.Connected then
					u8:Disconnect();
					u8 = nil;
				end;
			end;
		end);
	end;
	if not p33.torsoPart then
		p33:CheckTorsoReference();
		if not p33.torsoPart then
			return p35, p36;
		end;
	end;
	local v88 = {};
	p33:behaviorFunction(v88);
	local v89 = { p33.char };
	local u9 = {};
	local v90 = 0;
	local v91 = {};
	local v92 = {};
	local v93 = 0.75;
	local v94 = 0.75;
	local v95 = p33.camera:GetPartsObscuringTarget({ p33.headPart and p33.headPart.CFrame.p or v88[1], p33.torsoPart and p33.torsoPart.CFrame.p or v88[2] }, v89);
	for v96 = 1, #v95 do
		local v97 = v95[v96];
		v86 = v90 + 1;
		v91[v97] = true;
		for v98, v99 in pairs(v97:GetChildren()) do
			if v99:IsA("Decal") then
				v86 = v86 + 1;
				break;
			end;
			if v99:IsA("Texture") then
				v86 = v86 + 1;
				break;
			end;
		end;
	end;
	if v86 > 0 then
		v93 = math.pow(0.375 + 0.375 / v86, 1 / v86);
		v94 = math.pow(0.25 + 0.25 / v86, 1 / v86);
	end;
	local v100 = p33.camera:GetPartsObscuringTarget(v88, v89);
	local v101 = {};
	for v102 = 1, #v100 do
		local v103 = v100[v102];
		v101[v103] = v91[v103] and v93 or v94;
		if v103.Transparency < v101[v103] then
			u9[v103] = true;
			if not p33.savedHits[v103] then
				p33.savedHits[v103] = v103.LocalTransparencyModifier;
			end;
		end;
		for v104, v105 in pairs(v103:GetChildren()) do
			if (v105:IsA("Decal") or v105:IsA("Texture")) and v105.Transparency < v101[v103] then
				v101[v105] = v101[v103];
				u9[v105] = true;
				if not p33.savedHits[v105] then
					p33.savedHits[v105] = v105.LocalTransparencyModifier;
				end;
			end;
		end;
	end;
	for v106, v107 in pairs(p33.savedHits) do
		if u9[v106] then
			v106.LocalTransparencyModifier = v106.Transparency < 1 and (v101[v106] - v106.Transparency) / (1 - v106.Transparency) or 0;
		else
			v106.LocalTransparencyModifier = v107;
			p33.savedHits[v106] = nil;
		end;
	end;
	return p35, p36;
end;
return v5;

