summon FallingSand ~ ~1 ~ {Block:stone,Time:1,Passengers:[{id:FallingSand,Block:redstone_block,Time:1,Passengers:[{id:FallingSand,Block:activator_rail,Time:1,Passengers:[{id:MinecartCommandBlock,Command:gamerule commandBlockOutput false},{id:MinecartCommandBlock,Command:"fill ~2 ~-3 ~-2 ~8 ~ ~2 stained_hardened_clay 12 hollow"},{id:MinecartCommandBlock,Command:"fill ~2 ~-2 ~-2 ~8 ~-1 ~2 stained_glass 12 replace stained_hardened_clay"},{id:MinecartCommandBlock,Command:"/scoreboard objectives add place stat.useItem.minecraft.spawn_egg"},{id:MinecartCommandBlock,Command:setblock ~1 ~-2 ~ wall_sign 4 replace {Text2:"{\\\"text\\\":\\\"Backpacks\\\",\\\"color\\\":\\\"gold\\\"}",Text3:"{\\\"text\\\":\\\"By Code202\\\",\\\"color\\\":\\\"dark_blue\\\"}"}},{id:MinecartCommandBlock,Command:setblock ~1 ~-1 ~ wall_sign 4 replace {Text2:"{\\\"text\\\":\\\"Destroy\\\",\\\"color\\\":\\\"red\\\"}",Text3:"{\\\"text\\\":\\\"Machine\\\",\\\"color\\\":\\\"red\\\"}",Text4:"{\\\"text\\\":\\\"\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"fill ~ ~-2 ~-2 ~7 ~1 ~2 air\\\"}}"}},{id:MinecartCommandBlock,Command:"scoreboard objectives add kqtgtQ_I dummy"},{id:MinecartCommandBlock,Command:setblock ~5 ~-1 ~1 chain_command_block 4 replace {auto:1,Command:"/scoreboard players set @a place 0"}},{id:MinecartCommandBlock,Command:setblock ~6 ~-1 ~1 chain_command_block 4 replace {auto:1,Command:"execute @e[score_kqtgtQ_I_min=21,score_kqtgtQ_I=21] ~ ~ ~ execute @e[score_kqtgtQ_I_min=22,score_kqtgtQ_I=22,r=1] ~ ~ ~ kill @e[type=Item,r=3,score_kqtgtQ_I_min=21,score_kqtgtQ_I=23]"}},{id:MinecartCommandBlock,Command:setblock ~7 ~-1 ~1 chain_command_block 4 replace {auto:1,Command:"execute @e[score_kqtgtQ_I_min=21,score_kqtgtQ_I=21] ~ ~ ~ execute @e[score_kqtgtQ_I_min=22,score_kqtgtQ_I=22,r=1] ~ ~ ~ summon Item ~ ~0.5 ~ {Item:{id:minecraft:spawn_egg,tag:{display:{Name:\\\"Backpack\\\"},ench:[{id:0,lvl:1}],HideFlags:7,EntityTag:{id:\\\"Villager\\\"}},Count:1}}"}},{id:MinecartCommandBlock,Command:setblock ~7 ~-2 ~1 chain_command_block 1 replace {auto:1,Command:"scoreboard players set @e kqtgtQ_I 22 {Item:{id:minecraft:leather},OnGround:1b}"}},{id:MinecartCommandBlock,Command:setblock ~6 ~-2 ~1 chain_command_block 5 replace {auto:1,Command:"scoreboard players set @e kqtgtQ_I 21 {Item:{id:minecraft:chest},OnGround:1b}"}},{id:MinecartCommandBlock,Command:setblock ~5 ~-2 ~1 chain_command_block 5 replace {auto:1,Command:"/execute @e[name=GetBackpack] ~ ~ ~ /kill @e[name=GetBackpack,r=0]"}},{id:MinecartCommandBlock,Command:setblock ~4 ~-2 ~1 chain_command_block 5 replace {auto:1,Command:"/execute @e[name=GetBackpack] ~ ~ ~ /give @a[score_place_min=1,r=5] spawn_egg 1 0 {display:{Name:\\\"Backpack\\\"},ench:[{id:0,lvl:1}],HideFlags:7,EntityTag:{id:\\\"Villager\\\"}}"}},{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~1 chain_command_block 5 replace {auto:1,Command:"/execute @e[name=GetBackpack] ~ ~ ~ /clear @a[score_place_min=1,r=5] spawn_egg 0 1 {display:{Name:\\\"GetBackpack\\\"}}"}},{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~ chain_command_block 3 replace {auto:1,Command:"/execute @e[name=GetBackpack] ~ ~ ~ /kill @e[name=backpack,r=5]"}},{id:MinecartCommandBlock,Command:setblock ~4 ~-2 ~ chain_command_block 4 replace {auto:1,Command:"/execute @e[name=GetBackpack] ~ ~ ~ /execute @e[name=backpack,r=5] ~ ~ ~ /setblock ~ ~1 ~ air 0 replace crafting_table"}},{id:MinecartCommandBlock,Command:setblock ~5 ~-2 ~ chain_command_block 4 replace {auto:1,Command:"/execute @e[name=GetBackpack] ~ ~ ~ /execute @e[name=backpack,r=5] ~ ~ ~ /setblock ~ ~ ~ air 0 replace ender_chest"}},{id:MinecartCommandBlock,Command:setblock ~6 ~-2 ~ chain_command_block 4 replace {auto:1,Command:"/execute @e[name=backpack] ~ ~ ~ /execute @a[rxm=-90,rx=89,r=3] ~ ~ ~ /execute @e[name=backpack,r=3] ~ ~ ~ /setblock ~ ~1 ~ air 0 replace crafting_table"}},{id:MinecartCommandBlock,Command:setblock ~7 ~-2 ~ chain_command_block 4 replace {auto:1,Command:"/execute @e[name=backpack] ~ ~ ~ /execute @a[rxm=90,rx=90,r=1] ~ ~ ~ /execute @e[name=backpack,r=1] ~ ~ ~ /setblock ~ ~1 ~ crafting_table"}},{id:MinecartCommandBlock,Command:setblock ~7 ~-2 ~-1 chain_command_block 3 replace {auto:1,Command:"/execute @e[name=backpack] ~ ~ ~ /kill @e[name=Backpack,r=1]"}},{id:MinecartCommandBlock,Command:setblock ~6 ~-2 ~-1 chain_command_block 5 replace {auto:1,Command:"/execute @e[name=Backpack] ~ ~ ~ /give @a[score_place_min=1,r=5] spawn_egg 1 0 {display:{Name:\\\"GetBackpack\\\"},ench:[{id:0,lvl:1}],HideFlags:7,EntityTag:{id:\\\"Villager\\\"}}"}},{id:MinecartCommandBlock,Command:setblock ~5 ~-2 ~-1 chain_command_block 5 replace {auto:1,Command:"/execute @e[name=Backpack] ~ ~ ~ /clear @a[score_place_min=1,r=5] spawn_egg 0 1 {display:{Name:\\\"Backpack\\\"}}"}},{id:MinecartCommandBlock,Command:setblock ~4 ~-2 ~-1 chain_command_block 5 replace {auto:1,Command:"/execute @e[name=Backpack] ~ ~ ~ /summon ArmorStand ~ ~ ~ {CustomName:backpack,Invisible:1,NoGravity:1,Small:1}"}},{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~-1 repeating_command_block 5 replace {auto:1,Command:"/execute @e[name=Backpack] ~ ~ ~ /setblock ~ ~ ~ ender_chest"}},{id:MinecartCommandBlock,Command:setblock ~ ~ ~1 command_block 0 replace {Command:fill ~ ~-3 ~-1 ~ ~ ~ air}},{id:MinecartCommandBlock,Command:setblock ~ ~-1 ~1 redstone_block},{id:MinecartCommandBlock,Command:kill @e[type=MinecartCommandBlock,r=1]}]}]}]}