local a=script.Parent.Parent.SelEmoji local R=script.Parent local function y()if a.Visible then a:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(.822,0,.874,0),"\079\117\116","\081\117\097\100",.2,false,function()a.Visible=false end)else local R=UDim2.new(.822,0,.874,0)a.Position=R a.Size=UDim2.new(0,0,0,0)a.Visible=true a:TweenSizeAndPosition(UDim2.new(.864,0,.48,0),UDim2.new(.065,0,.259,0),"\079\117\116","\081\117\097\100",.2)end end
-- Get references to the DockShelf and its children
local fldr = script.Parent.Parent.SelEmoji
local btn = script.Parent

local function toggleWindow()
	if fldr.Visible then
		-- Close the window by tweening back to the button position and size
		fldr:TweenSizeAndPosition(
			UDim2.new(0, 0, 0, 0),
			UDim2.new(0.822, 0, 0.874, 0),
			"Out",
			"Quad",
			0.2,
			false,
			function()
				fldr.Visible = false
			end
		)
	else
		-- Set the initial position of the window to be relative to the button
		local startPos = UDim2.new(0.822, 0, 0.874, 0)
		fldr.Position = startPos

		-- Set the initial size of the window to be zero
		fldr.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
		fldr.Visible = true
		fldr:TweenSizeAndPosition(UDim2.new(0.864, 0, 0.48, 0), UDim2.new(0.065, 0, 0.259, 0), "Out", "Quad", 0.2)
	end
end
