local toggle = false
local savedCursorX, savedCursorY
local function restoreCursorPos()
if savedCursorX and savedCursorY then
local screenX, screenY = guiGetScreenSize()
setCursorPosition(savedCursorX * screenX, savedCursorY * screenY)
end
end
local function togglePanel()
toggle = not toggle
if toggle then
showCursor(true)
for i = 1, 5 do
setTimer(restoreCursorPos, i * 50, 1)
end
else
savedCursorX, savedCursorY = getCursorPosition()
showCursor(false)
end
end
bindKey("k", "down", togglePanel)
Can you just try this? ı added a timer for it.