Basically, I want to give an item to the player with like an id "gen" and later on when the player right-clicks with that item, it checks if it has the id "gen" and if it does it will do stuff but if it doesn't, it will just ignore it.
Code:
command /gen:
trigger:
give wooden axe with id "gen" to player
on right click with wooden axe:
if player's tool's id is "gen":
cancel event
# do stuff