/summon MinecartCommandBlock ~ ~1 ~ {Command:kill @e[type=MinecartCommandBlock,r=1],Riding:{id:MinecartCommandBlock,Command:setblock ~ ~-1 ~1 redstone_block,Riding:{id:MinecartCommandBlock,Command:setblock ~ ~ ~1 command_block 0 replace {Command:fill ~ ~-3 ~-1 ~ ~ ~ air},Riding:{id:MinecartCommandBlock,Command:"scoreboard objectives add QRGAi_I dummy",Riding:{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~ redstone_block,Riding:{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~-1 command_block 0 replace {Command:fill ~ ~ ~1 ~4 ~ ~1 stone},Riding:{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~1 command_block 0 replace {Command:fill ~ ~ ~-1 ~4 ~ ~-1 redstone_block},Riding:{id:MinecartCommandBlock,Command:setblock ~4 ~-2 ~-1 command_block 0 replace {Command:"scoreboard players set @e[type=Item] QRGAi_I 1 {Item:{id:\\\"minecraft:dirt\\\"},OnGround:1b}"},Riding:{id:MinecartCommandBlock,Command:setblock ~4 ~-2 ~1 command_block 0 replace {Command:"scoreboard players set @e[type=Item] QRGAi_I 2 {Item:{id:\\\"minecraft:gold_ingot\\\"},OnGround:1b}"},Riding:{id:MinecartCommandBlock,Command:setblock ~5 ~-2 ~-1 command_block 0 replace {Command:"execute @e[score_QRGAi_I_min=1,score_QRGAi_I=1] ~ ~ ~ execute @e[r=0,score_QRGAi_I_min=2,score_QRGAi_I=2] ~ ~ ~ summon Item ~ ~ ~ {Item:{id:\\\"minecraft:diamond_block\\\",Count:1,tag:{display:{Name:\\\"Lol\\\"}}}}"},Riding:{id:MinecartCommandBlock,Command:setblock ~5 ~-2 ~1 command_block 0 replace {Command:"execute @e[score_QRGAi_I_min=1,score_QRGAi_I=1] ~ ~ ~ execute @e[r=0,score_QRGAi_I_min=2,score_QRGAi_I=2] ~ ~ ~ kill @e[type=Item,score_QRGAi_I_min=1,score_QRGAi_I=2,r=3]"},Riding:{id:MinecartCommandBlock,Command:setblock ~6 ~-2 ~-1 command_block 0 replace {Command:"scoreboard players set @e[type=Item] QRGAi_I 3 {Item:{id:\\\"minecraft:dirt\\\"},OnGround:1b}"},Riding:{id:MinecartCommandBlock,Command:setblock ~6 ~-2 ~1 command_block 0 replace {Command:"scoreboard players set @e[type=Item] QRGAi_I 4 {Item:{id:\\\"minecraft:cobblestone\\\"},OnGround:1b}"},Riding:{id:MinecartCommandBlock,Command:setblock ~7 ~-2 ~-1 command_block 0 replace {Command:"execute @e[score_QRGAi_I_min=3,score_QRGAi_I=3] ~ ~ ~ execute @e[r=0,score_QRGAi_I_min=4,score_QRGAi_I=4] ~ ~ ~ summon Item ~ ~ ~ {Item:{id:\\\"minecraft:diamond_sword\\\",Count:1,tag:{display:{Name:\\\"Magic Sword\\\"}}}}"},Riding:{id:MinecartCommandBlock,Command:setblock ~7 ~-2 ~1 command_block 0 replace {Command:"execute @e[score_QRGAi_I_min=3,score_QRGAi_I=3] ~ ~ ~ execute @e[r=0,score_QRGAi_I_min=4,score_QRGAi_I=4] ~ ~ ~ kill @e[type=Item,score_QRGAi_I_min=3,score_QRGAi_I=4,r=3]"},Riding:{id:MinecartCommandBlock,Command:setblock ~1 ~-1 ~ wall_sign 4 replace {Text1:"{text:\\\"Crafting diamond_block!\\\",color:gold,clickEvent:{action:\\\"run_command\\\",value:\\\"/give @p skull 1 3 {SkullOwner:\\\\\\\"Crazy_Cake_\\\\\\\"}\\\"},italic:true,bold:true}",Text3:"{text:\\\"by Crazy_Cake_\\\",color:gold,italic:true,bold:true}"},Riding:{id:MinecartCommandBlock,Command:setblock ~1 ~-2 ~ wall_sign 4 replace {Text1:"{text:\\\"Destroy Machine\\\",color:gold,italic:true,bold:true,underlined:true}",Text4:"{text:\\\"\\\",clickEvent:{action:\\\"run_command\\\",value:\\\"fill ~ ~-1 ~-2 ~8 ~2 ~2 air\\\"}}"},Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-2 ~-2 ~8 ~-2 ~2 stained_glass 9 replace stained_hardened_clay 2,Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-3 ~-2 ~8 ~-1 ~2 stained_hardened_clay 2 hollow,Riding:{id:MinecartCommandBlock,Command:gamerule commandBlockOutput false,Riding:{id:MinecartCommandBlock,Riding:{id:FallingSand,Block:activator_rail,Time:1,Riding:{id:FallingSand,Block:redstone_block,Time:1,Riding:{id:FallingSand,Block:stone,Time:1}}}}}}}}}}}}}}}}}}}}}}}}