local function s(s)local Z=s.Name local A=gui:FindFirstChild(Z)if A then if A.Visible==false then for s,Z in ipairs(gui:GetChildren())do if Z:IsA("\070\114\097\109\101")and Z.Visible then end end local s=UDim2.new(.0,0,.978,0)A.Position=s A.Size=UDim2.new(1,0,.022,0)A.Visible=true A:TweenSizeAndPosition(UDim2.new(1,0,.597,0),UDim2.new(0,0,.403,0),"\079\117\116","\081\117\097\100",.2)end end end

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

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

			local startPos = UDim2.new(0.0, 0, 0.978, 0)
			window.Position = startPos

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

			-- Show the window and tween its position and size from the button position and size to its original position and size
			window.Visible = true
			window:TweenSizeAndPosition(
				UDim2.new(1, 0, 0.597, 0),
				UDim2.new(0, 0, 0.403, 0),
				'Out',
				'Quad',
				0.2
			)
		end
	end
end
