local function p(p,A)local l=UDim2.new(A.X.Scale*MOUSE_ENTER_SIZE,0,A.Y.Scale*MOUSE_ENTER_SIZE,0)p:TweenSize(l,"\079\117\116","\083\105\110\101",MOUSE_ENTER_DURATION,true)end local function A(p,A)p:TweenSize(A,"\079\117\116","\083\105\110\101",MOUSE_ENTER_DURATION,true)end local function l(p,A)local l=UDim2.new(A.X.Scale/CLICK_SIZE,0,A.Y.Scale/CLICK_SIZE,0)p:TweenSize(l,"\079\117\116","\083\105\110\101",MOUSE_CLICK_DURATION,true)end function module.SetUp(G)if not table.find(OriginalSizes,G)then OriginalSizes[G]=G.Size end local c=OriginalSizes[G]G.MouseEnter:Connect(function()p(G,c)end)G.MouseLeave:Connect(function()A(G,c)end)G.MouseButton1Down:Connect(function()l(G,c)end)G.MouseButton1Up:Connect(function()A(G,c)end)end return module
----functions

local function On_Mouse_Enter(button, original_Size)
	local Hover_Size =
		UDim2.new(original_Size.X.Scale * MOUSE_ENTER_SIZE, 0, original_Size.Y.Scale * MOUSE_ENTER_SIZE, 0)
	button:TweenSize(Hover_Size, "Out", "Sine", MOUSE_ENTER_DURATION, true)
end

local function On_Mouse_Leave(button, original_Size)
	button:TweenSize(original_Size, "Out", "Sine", MOUSE_ENTER_DURATION, true)
end

local function On_Mouse_Click(button, original_Size)
	local ClickSize = UDim2.new(original_Size.X.Scale / CLICK_SIZE, 0, original_Size.Y.Scale / CLICK_SIZE, 0)
	button:TweenSize(ClickSize, "Out", "Sine", MOUSE_CLICK_DURATION, true)
end

function module.SetUp(button)
	if not table.find(OriginalSizes, button) then
		OriginalSizes[button] = button.Size
	end

	local Main_Size = OriginalSizes[button]

	button.MouseEnter:Connect(function()
		On_Mouse_Enter(button, Main_Size)
	end)

	button.MouseLeave:Connect(function()
		On_Mouse_Leave(button, Main_Size)
	end)

	button.MouseButton1Down:Connect(function()
		On_Mouse_Click(button, Main_Size)
	end)

	button.MouseButton1Up:Connect(function()
		On_Mouse_Leave(button, Main_Size)
	end)
end

return module
