code_language.skript:
command /repair [<text>]:
trigger:
if arg-1 is not set:
if {tokens::%UUID of player%} is greater than 9:
send "test"
repair tool of player
remove 9 from {tokens::%UUID of player%}
else:
send "test2"
else:
make player execute command "repair"
How do you do, so if the item is already FULLY repaired, it doesn't repair the tool or take the tokens from the player?