-- Define the function to open or close the windows with gene-alike effect

local function toggleWindows()
	local anyWindowVisible = false

	for _, window in pairs(windows) do
		if window.Visible then
			anyWindowVisible = true
			backShelf.Visible = true
			dockShelf.Visible = true
			window:TweenSizeAndPosition(
				UDim2.new(0.363, 0, 0.019, 0),
				UDim2.new(0.311, 0, 0.978, 0),
				'Out',
				'Quad',
				-- Determine the tween speed based on the uiSpeedSetting
				ClipSettings.settings.uiSpeedSetting and uiSpeedUser.Value or UISpeed,
				false,
				function()
					window.Visible = false
				end
			)
		end
	end

	if not anyWindowVisible then
	end
end
