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

local function toggleWindow()
	if window.Visible then

		window.Visible = false
		opened.Visible = false
		-- Close the window by tweening back to the button position and size
		window:TweenSizeAndPosition(
			UDim2.new(0, 0, 0, 0),
			UDim2.new(0, aFinderButton.AbsolutePosition.X, 0, aFinderButton.AbsolutePosition.Y),
			'Out',
			'Quad',
			0.5,
			false,
			function()
				window.Visible = false
			end
		)
	end
end
