Basically, you need a switch that you can turn on or off so the game can keep track of whether the player's already right clicked and is holding down the button, or if they're not currently holding down the button.
To do this, you'll want to make a player-persistent logic variable. (You can find variables in the right hand side of the main workspace; a player persistent variable is a variable specific to each player that doesn't reset on death.) When the player right clicks with your item, run the procedure, and then set the variable to true. When they're no longer using the item, set the variable back to false. Then, only run the procedure if the variable equals false. This way, once the procedure has run once, the variable will change, and it will then have to reset before it can run again.
Basically, you need a switch that you can turn on or off so the game can keep track of whether the player's already right clicked and is holding down the button, or if they're not currently holding down the button.
To do this, you'll want to make a player-persistent logic variable. (You can find variables in the right hand side of the main workspace; a player persistent variable is a variable specific to each player that doesn't reset on death.) When the player right clicks with your item, run the procedure, and then set the variable to true. When they're no longer using the item, set the variable back to false. Then, only run the procedure if the variable equals false. This way, once the procedure has run once, the variable will change, and it will then have to reset before it can run again.
Sorry, I'm new to MCreator, how do I determine that an item is not being used?
What's wrong here? https://imgur.com/a/xTA7ENv
What's wrong here? Eng. command: https://imgur.com/a/YwOoJ7m