Attack animation

Does anyone know how to make me press the attack button three times so that the animation continues and when I press the button once I only attack once and do another animation, also that when I do the animation I can’t walk until the animation ends.