Selection.Changed:Connect(FocusOnLastSelectedPart)function GetCore()return require(script.Parent)end local function Y(Q,a)local J=a or{}for Q,a in pairs(Q:GetChildren())do if IsVisible(a)then J[#J+1]=a else Y(a,J)end end return J end

Selection.Changed:Connect(FocusOnLastSelectedPart);

function GetCore()
	-- Returns the core API
	return require(script.Parent);
end;

local function GetVisibleChildren(Item, Table)
	local Table = Table or {}

	-- Search for visible items recursively
	for _, Item in pairs(Item:GetChildren()) do
		if IsVisible(Item) then
			Table[#Table + 1] = Item
		else
			GetVisibleChildren(Item, Table)
		end
	end

	-- Return visible items
	return Table
end
