on drop:
if name of player's tool is "":
if player doesn't have permission "recycleredits":
cancel event
else:
stop
on inventory click:
if name of player's tool is "":
if player doesn't have permission "recycleredits":
cancel event
else:
stop
on right click:
if right clicked block is yellow_shulker_box:
set {_recyclerid} to location of event-block
cancel event
open virtual chest inventory with size 3 named "&2 recycler" to player
loop 9 times:
set slot (loop-value - 1) of player's current inventory to light gray stained glass pane named ""
loop 9 times:
set slot (loop-value + 17) of player's current inventory to light gray stained glass pane named ""
set slot 22 of player's current inventory to red stained glass pane named "&4off"
set slot 10 of player's current inventory to {data::%{_recyclerid}%::slot10}
set slot 11 of player's current inventory to {data::%{_recyclerid}%::slot11}
set slot 12 of player's current inventory to {data::%{_recyclerid}%::slot12}
set slot 14 of player's current inventory to {data::%{_recyclerid}%::slot14}
set slot 15 of player's current inventory to {data::%{_recyclerid}%::slot15}
set slot 16 of player's current inventory to {data::%{_recyclerid}%::slot16}
on inventory close:
if name of event-inventory is "&2 recycler":
set {_recyclerid} to location of event-block
set {data::%{_recyclerid}%::slot10} to slot 10 of event-inventory
set {data::%{_recyclerid}%::slot11} to slot 11 of event-inventory
set {data::%{_recyclerid}%::slot12} to slot 12 of event-inventory
set {data::%{_recyclerid}%::slot14} to slot 14 of event-inventory
set {data::%{_recyclerid}%::slot15} to slot 15 of event-inventory
set {data::%{_recyclerid}%::slot16} to slot 16 of event-inventory
on inventory click:
if clicked slot is 22:
if name of event-inventory is "&2 recycler":
if clicked item is red stained glass pane named "&4off":
cancel event
set slot 22 of event-inventory to lime stained glass pane named "&2on"
if slot 10 of event-inventory is not air or slot 11 of event-inventory is not air or slot 12 of event-inventory is not air:
loop all items in event-inventory:
if loop-item is "insert item here": #copy that for more item
while amount of loop-item > 0:
if slot 14 of event-inventory is air:
set slot 14 of event-inventory to 1 of loop-item
remove 1 "insert item here" from loop item
else if slot 15 of event-inventory is air:
set slot 15 of event-inventory to 1 of loop-item
remove 1 "insert item here" from loop-item
else if slot 16 of event-inventory is air:
set slot 16 of event-inventory to 1 of loop-item
remove 1 "insert item here" from loop-item
else:
drop loop-item at location of player
remove 1 iron_chestplate from loop-item
play sound "random.anvil_use" at player with volume 1 and pitch 1
wait 3 second
if slot 10 of event-inventory is air and slot 11 of event-inventory is air and slot 12 of event-inventory is air:
set slot 22 of player's current inventory to red stained glass pane named "&4off"
if name of player's tool is "":
if player doesn't have permission "recycleredits":
cancel event
else:
stop
on inventory click:
if name of player's tool is "":
if player doesn't have permission "recycleredits":
cancel event
else:
stop
on right click:
if right clicked block is yellow_shulker_box:
set {_recyclerid} to location of event-block
cancel event
open virtual chest inventory with size 3 named "&2 recycler" to player
loop 9 times:
set slot (loop-value - 1) of player's current inventory to light gray stained glass pane named ""
loop 9 times:
set slot (loop-value + 17) of player's current inventory to light gray stained glass pane named ""
set slot 22 of player's current inventory to red stained glass pane named "&4off"
set slot 10 of player's current inventory to {data::%{_recyclerid}%::slot10}
set slot 11 of player's current inventory to {data::%{_recyclerid}%::slot11}
set slot 12 of player's current inventory to {data::%{_recyclerid}%::slot12}
set slot 14 of player's current inventory to {data::%{_recyclerid}%::slot14}
set slot 15 of player's current inventory to {data::%{_recyclerid}%::slot15}
set slot 16 of player's current inventory to {data::%{_recyclerid}%::slot16}
on inventory close:
if name of event-inventory is "&2 recycler":
set {_recyclerid} to location of event-block
set {data::%{_recyclerid}%::slot10} to slot 10 of event-inventory
set {data::%{_recyclerid}%::slot11} to slot 11 of event-inventory
set {data::%{_recyclerid}%::slot12} to slot 12 of event-inventory
set {data::%{_recyclerid}%::slot14} to slot 14 of event-inventory
set {data::%{_recyclerid}%::slot15} to slot 15 of event-inventory
set {data::%{_recyclerid}%::slot16} to slot 16 of event-inventory
on inventory click:
if clicked slot is 22:
if name of event-inventory is "&2 recycler":
if clicked item is red stained glass pane named "&4off":
cancel event
set slot 22 of event-inventory to lime stained glass pane named "&2on"
if slot 10 of event-inventory is not air or slot 11 of event-inventory is not air or slot 12 of event-inventory is not air:
loop all items in event-inventory:
if loop-item is "insert item here": #copy that for more item
while amount of loop-item > 0:
if slot 14 of event-inventory is air:
set slot 14 of event-inventory to 1 of loop-item
remove 1 "insert item here" from loop item
else if slot 15 of event-inventory is air:
set slot 15 of event-inventory to 1 of loop-item
remove 1 "insert item here" from loop-item
else if slot 16 of event-inventory is air:
set slot 16 of event-inventory to 1 of loop-item
remove 1 "insert item here" from loop-item
else:
drop loop-item at location of player
remove 1 iron_chestplate from loop-item
play sound "random.anvil_use" at player with volume 1 and pitch 1
wait 3 second
if slot 10 of event-inventory is air and slot 11 of event-inventory is air and slot 12 of event-inventory is air:
set slot 22 of player's current inventory to red stained glass pane named "&4off"