Issue with an item with ability

So yesterday someone helped me <@720770065611358309> and I was finally able to solve the problem I had. While I was adding other things because the item is like a syringe and the idea is that when I have it in my hand and I right click, a certain amount of time passes and it gives me a boost effect and other stuff, but if I stop holding the item, the timer resets, I get a message that the action was cancelled, and another features. I realized later that when I let the time pass until the end, it gave me the boost effect, but it still showed me the message that the action was canceled. So between desperation and everything to be able to solve it, I made a mess and had to rewrite the entire command more like I had it and to make matters worse now when I hold the item and I right click, the timer does not start and practically does not work. If anyone can help me solve this problem and be able to resolve the problems that this item has. ​
Continue to help post