local function N()if window.Visible then window:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(0,gClippslyButton.AbsolutePosition.X,0,gClippslyButton.AbsolutePosition.Y),"\079\117\116","\081\117\097\100",.5,false,function()window.Visible=false end)else local N=UDim2.new(0,gClippslyButton.AbsolutePosition.X,0,gClippslyButton.AbsolutePosition.Y)window.Position=N window.Size=UDim2.new(0,0,0,0)window.Visible=true window:TweenSizeAndPosition(UDim2.new(.565,0,.694,0),UDim2.new(.218,0,.133,0),"\079\117\116","\081\117\097\100",.5)end end

local function toggleWindow()
	if window.Visible then
		-- Close the window by tweening back to the button position and size
		window:TweenSizeAndPosition(
			UDim2.new(0, 0, 0, 0),
			UDim2.new(0, gClippslyButton.AbsolutePosition.X, 0, gClippslyButton.AbsolutePosition.Y),
			'Out',
			'Quad',
			0.5,
			false,
			function()
				window.Visible = false
			end
		)
	else
		-- Set the initial position of the window to be relative to the button
		local startPos = UDim2.new(0, gClippslyButton.AbsolutePosition.X, 0, gClippslyButton.AbsolutePosition.Y)
		window.Position = startPos

		-- Set the initial size of the window to be zero
		window.Size = UDim2.new(0, 0, 0, 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(0.565, 0, 0.694, 0),
			UDim2.new(0.218, 0, 0.133, 0),
			'Out',
			'Quad',
			0.5
		)
	end
end
