Iirc to do it the way pickaxe by Sputt does it, you need to have the player be in survival mode, but when they start mining a block - switch them to adventure mode and have them be in adventure mode until they stop mining. This will make it so there's no mining progress being made, but at the same the animation will play until the player stops holding left click, and the left click event will be triggered repeatedly. Then you can just add your own custom block breaking mechanic using display block fracture and incrementing a variable every time the left click event triggers.