local function j(j)local I=j.Name local O=appManager:FindFirstChild(I)if O then if O.Visible==false then for j,I in ipairs(appManager:GetChildren())do if I:IsA("\070\114\097\109\101")and I.Visible then I.Visible=false end end dockShelf.Visible=false wallShelf.Visible=false O.Position=UDim2.new(.319,0,.331,0)O.Size=UDim2.new(0,100,0,100)O.Visible=true local j=ClipSettings.settings.uiSpeedSetting and uiSpeedUser.Value or ClipSettings.uiSpeed local I=TweenInfo.new(j,Enum.EasingStyle.Quad,Enum.EasingDirection.Out);(TweenService:Create(O,I,{Position=UDim2.new(-0.007,0,0,0);Size=UDim2.new(1.007,0,1,0)})):Play()end end end

local function toggleWindow(icon)
	local windowName = icon.Name

	-- Find the corresponding frame in the AppManager using the window name
	local window = appManager:FindFirstChild(windowName)
	if window then
		if window.Visible == false then
			-- Close other windows
			for _, child in ipairs(appManager:GetChildren()) do
				if child:IsA("Frame") and child.Visible then
					child.Visible = false
				end
			end

			dockShelf.Visible = false
			wallShelf.Visible = false

			-- Set the initial position of the window to be relative to the button
			window.Position = UDim2.new(0.319, 0, 0.331, 0)

			-- Set the initial size of the window to be zero
			window.Size = UDim2.new(0, 100, 0, 100)

			-- Show the window and tween its position and size
			window.Visible = true

			-- Determine the tween speed based on the uiSpeedSetting
			local tweenSpeed = ClipSettings.settings.uiSpeedSetting and uiSpeedUser.Value or ClipSettings.uiSpeed

			-- Create a new tween with the appropriate tweenSpeed
			local tweenInfo = TweenInfo.new(tweenSpeed, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
			TweenService:Create(window, tweenInfo, {Position = UDim2.new(-0.007, 0, 0, 0), Size = UDim2.new(1.007, 0, 1, 0)}):Play()
		end
	end
end
