there's an issue with the isMouseInPosition function where it doesn't return false when the conditions aren't met. It's recommended to add a return false statement outside the if block to cover the case when the cursor isn't in the specified area:
function isMouseInPosition(x, y, w, h)
if isCursorShowing() then
local sx, sy = guiGetScreenSize()
local cx, cy = getCursorPosition()
local cx, cy = (cx * sx), (cy * sy)
if (cx >= x and cx <= x + w) and (cy >= y and cy <= y + h) then
return true
end
end
return false -- Add this line to return false if conditions aren't met
end