Skip to content

Instantly share code, notes, and snippets.

-- Module state
obj.isMoving = false
obj.movingTimeout = nil -- Safety timeout timer to auto-reset isMoving
-- Constants
local MOUSE_OFFSET_X = 5
local MOUSE_OFFSET_Y = 18
local RELEASE_DELAY = 0.6
local MOVING_TIMEOUT_DURATION = 2.0 -- Maximum time before force-resetting isMoving