Using a simple script Scratch will detect if the mouse is still on and down on a certain item imitating minecraft mining! If you take off the mouse too soon it will restart the script!
Graphics from griffpatch rest by Me/Us!!