function toggleButton()local function d()if debounce then return end debounce=true frame:SetAttribute("\101\110\097\098\108\101\100",true);(TweenService:Create(button,TweenInfo.new(waitTime,Enum.EasingStyle.Cubic,Enum.EasingDirection.InOut),{Position=onPosition})):Play();(TweenService:Create(button,TweenInfo.new(waitTime,Enum.EasingStyle.Cubic,Enum.EasingDirection.InOut),{BackgroundColor3=onColor})):Play()task.wait(waitTime)debounce=false end local function C()if debounce then return end debounce=true frame:SetAttribute("\101\110\097\098\108\101\100",false);(TweenService:Create(button,TweenInfo.new(waitTime,Enum.EasingStyle.Cubic,Enum.EasingDirection.InOut),{Position=offPosition})):Play();(TweenService:Create(button,TweenInfo.new(waitTime,Enum.EasingStyle.Cubic,Enum.EasingDirection.InOut),{BackgroundColor3=offColor})):Play()task.wait(waitTime)debounce=false end if frame:GetAttribute("\101\110\097\098\108\101\100")then C()else d()end end
-- // Funtions

function toggleButton()
	local function toggleOn()
		if debounce then
			return
		end

		debounce = true

		frame:SetAttribute("enabled", true)

		TweenService:Create(
			button,
			TweenInfo.new(waitTime, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut),
			{ Position = onPosition }
		):Play()
		TweenService:Create(
			button,
			TweenInfo.new(waitTime, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut),
			{ BackgroundColor3 = onColor }
		):Play()

		task.wait(waitTime)

		debounce = false
	end

	local function toggleOff()
		if debounce then
			return
		end

		debounce = true

		frame:SetAttribute("enabled", false)

		TweenService:Create(
			button,
			TweenInfo.new(waitTime, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut),
			{ Position = offPosition }
		):Play()
		TweenService:Create(
			button,
			TweenInfo.new(waitTime, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut),
			{ BackgroundColor3 = offColor }
		):Play()

		task.wait(waitTime)

		debounce = false
	end

	if frame:GetAttribute("enabled") then
		toggleOff()
	else
		toggleOn()
	end
end
