How do I make an item use a certain amount of durability depending on what I do with it?

Hi, I would like to make an item which takes a variable amount of durability to use. I want to know what item I should use, as well as how I can implement the durability feature. Let's say I wanted to make my item do multiple things, each happening on a right click. It would work like this:

If my score is 0: do nothing, durability stays the same. If my score is 1 + my durability > 1: do thing 1, remove 1 durability If my score is 2 + my durability > 10: do thing 2, remove 10 durability etc. If my durability is too low for current score level: say "you can't do this"

Context: The durability is just meant to display the amount of power the item has, so rather than break when it is empty it will just be unusable until you recharge it.

Continue to help post