on load: set {testList::*} to unbreaking function guiBlocks(P: player, t: text, item: item): if {_t} = "disenchant": open chest with 3 rows named "test" to {_p} wait 1 tick set {_p}'s current inventory's slot 4 to {_item} set {_inv} to 10 set {_n} to 1 if {_item} is any helmet: if {_item} is enchanted with {testList::%{_n}%}: loop 5 times: set {_var} to 5 if {_item} is enchanted with {testList::%{_n}%} {_var}: set {_p}'s current inventory's slot {_inv} to enchanted book named "%{testList::%{_n}%}% %{_var}%" add 1 to {_n} add 1 to {_inv} exit loop else: remove 1 from {_var} else: add 1 to {_n}