Hello. Is it possible to when you are clicking an diamond sword with an enchanted unbreaking 1 book, the diamondsword gets enchanted with unbreaking 1 and the book gets removed?
I came up with this, but no luckc:
I came up with this, but no luckc:
code_language.skript:
On inventory click:
set {_item2} to cursor item
if {_item2} is enchanted book:
if clicked item is diamond sword:
set {_item1} to clicked item
enchant {_item1} with unbreaking 1
remove {_item2} from player's inventory