Code:
on right click:
if event-block is ender portal frame:
open virtual chest inventory with size 1 named "Crate" to player
chance of 14%:
add 2 gray dye to {_ccrate::*}
chance of 14%:
add 1 cactus green to {_ccrate::*}
chance of 14%:
add 3 rose red to {_ccrate::*}
chance of 14%:
add 3 magenta dye to {_ccrate::*}
chance of 14%:
add 1 orange dye to {_ccrate::*}
chance of 14%:
add 1 cocoa bean to {_ccrate::*}
chance of 4%:
add golden chestplate named "&fHazmat Suit" to {_ccrate::*}
chance of 1%:
add 1 chainmail helmet to {_ccrate::*}
chance of 1%:
add 1 chainmail helmet of knockback 7 with all flags hidden to {_ccrate::*}
chance of 1%:
add 1 ladder item named "&fWooden Ladder" to {_ccrate::*}
chance of 1%:
add chainmail chestplate to {_ccrate::*}
chance of 1%:
add chainmail leggings to {_ccrate::*}
chance of 1%:
add iron axe to {_ccrate::*}
chance of 1%:
add wood button named "&fSatchel Charge" to {_ccrate::*}
loop {_ccrate::*}:
set slot 1 of player's current inventory to loop-value
chance of 100%:
add 5 feather to {_ccratescrap::*}
loop {_ccratescrap::*}:
set slot 0 of player's current inventory to loop-value
on inventory close:
wait 1 tick
if event-block is ender portal frame:
set event-block to air