local function l(l,s,L)local Q=blockVerts(l.CFrame,l.Size/2)if L:Dot(POSITIVEDIR)<0 then L=-L end local H={}for l=1,#Q,1 do H[#H+1]=(Q[l]-s):Dot(L)end local t=math.min(unpack(H))local h=math.max(unpack(H))local b=l.Position-s local k=(b-b:Dot(L)*L)+s local z=l.Size-l.Size*L local P,v if h>=.05 then P=k+(L*h)/2 v=z+h*L end local V,S if t<=-0.05 then V=k+(L*t)/2 S=z-t*L end return P,v,V,S end

local function slicePart(part, origin, normal)
	local verts = blockVerts(part.CFrame, part.Size/2);

	if (normal:Dot(POSITIVEDIR) < 0) then
		normal = -normal;
	end

	local distances = {};
	for i = 1, #verts do
		distances[#distances+1] = (verts[i] - origin):Dot(normal);
	end

	local min = math.min(unpack(distances));
	local max = math.max(unpack(distances));

	local v = part.Position - origin;
	local center = (v - v:Dot(normal)*normal) + origin;
	local size = part.Size - part.Size*normal;

	local pos1, size1;
	if (max >= 0.05) then
		pos1 = center + normal*max/2;
		size1 = size + max*normal;
	end

	local pos2, size2;
	if (min <= -0.05) then
		pos2 = center + normal*min/2;
		size2 = size - min*normal;
	end

	return pos1, size1, pos2, size2;
end
