changing an items durability on use

I'm using a carrot on a stick for a custom item I'm working on. and wanting it so it lowers durability when used anyone got any tips on how to do that?

Continue to help post