Command block machine: special lightning book

Command block machine rainbow parrot, command-block.com

Description:
Enchanted book, special lightning edition.

Compiled:

 summon falling_block ~ ~1 ~ { "Time":1, "BlockState":{ "Name":"redstone_block" }, "Passengers":[ { "id":"falling_block", "Passengers":[ { "id":"falling_block", "Time":1, "BlockState":{ "Name":"activator_rail" }, "Passengers":[ { "id":"command_block_minecart", "Command":"gamerule commandBlockOutput false" }, { "id":"command_block_minecart", "Command":"data merge block ~ ~-2 ~ {auto:0}" }, { "id":"command_block_minecart", "Command":"fill ~1 ~ ~2 ~3 ~2 ~6 yellow_stained_glass" }, { "id":"command_block_minecart", "Command":"fill ~1 ~ ~2 ~3 ~ ~6 yellow_concrete" }, { "id":"command_block_minecart", "Command":"fill ~1 ~2 ~2 ~3 ~2 ~6 yellow_concrete" }, { "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~2 lever replace"  }, { "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~3 red_concrete replace"  }, { "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~4 repeating_command_block{Command: \"execute if entity @p[nbt={SelectedItem:{tag:{title:'LightBook'}}}] run execute as @e[nbt={HurtTime:10s}] at @s run summon minecraft:lightning_bolt\"} replace"  }, { "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~5 command_block{Command: \"give @p written_book{pages:[],title:LightBook,author:'command-block.com',generation:3}\"} replace"  }, { "id":"command_block_minecart", "Command":"summon minecraft:item_frame ~1 ~1 ~6 {Fixed:1b,Facing:3,Item:{id:\"minecraft:written_book\",Damage:5,Count:1}}"  }, { "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~6 blue_concrete replace"  }, { "id":"command_block_minecart", "Command":"summon minecraft:item_frame ~3 ~1 ~6 {Fixed:1b,Facing:3,Item:{id:\"minecraft:written_book\",Damage:5,Count:1}}"  }, { "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~7 stone_button[facing=south] replace"  }, { "id":"command_block_minecart", "Command":"setblock ~ ~1 ~ command_block{auto:1,Command:\"fill ~ ~ ~ ~ ~-2 ~ air\"}" }, { "id":"command_block_minecart", "Command":"kill @e[type=command_block_minecart,distance=..1]" } ] } ] } ] }
summon falling_block ~ ~1 ~ { "Time":1, "BlockState":{ "Name":"redstone_block" }, "Passengers":[
{ "id":"falling_block", "Passengers":[ { "id":"falling_block", "Time":1, "BlockState":{ "Name":"activator_rail" },
"Passengers":[ { "id":"command_block_minecart", "Command":"gamerule commandBlockOutput false" }, { "id":"command_block_minecart", "Command":"data merge block ~ ~-2 ~ {auto:0}" },

{ "id":"command_block_minecart", "Command":"fill ~1 ~ ~2 ~3 ~2 ~6 yellow_stained_glass" },
{ "id":"command_block_minecart", "Command":"fill ~1 ~ ~2 ~3 ~ ~6 yellow_concrete" },
{ "id":"command_block_minecart", "Command":"fill ~1 ~2 ~2 ~3 ~2 ~6 yellow_concrete" },


{ "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~2 lever replace"  },
{ "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~3 red_concrete replace"  },
{ "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~4 repeating_command_block{Command:\"execute if entity @p[nbt={SelectedItem:{tag:{title:'LightBook'}}}] run execute as @e[nbt={HurtTime:10s}] at @s run summon minecraft:lightning_bolt\"} replace"  },

{ "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~5 command_block{Command:\"give @p written_book{pages:[],title:LightBook,author:'command-block.com',generation:3}\"} replace"  },
{ "id":"command_block_minecart", "Command":"summon minecraft:item_frame ~1 ~1 ~6 {Fixed:1b,Facing:3,Item:{id:\"minecraft:written_book\",Damage:5,Count:1}}"  },
{ "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~6 blue_concrete replace"  },
{ "id":"command_block_minecart", "Command":"summon minecraft:item_frame ~3 ~1 ~6 {Fixed:1b,Facing:3,Item:{id:\"minecraft:written_book\",Damage:5,Count:1}}"  },
{ "id":"command_block_minecart", "Command":"setblock ~2 ~1 ~7 stone_button[facing=south] replace"  },

{ "id":"command_block_minecart", "Command":"setblock ~ ~1 ~ command_block{auto:1,Command:\"fill ~ ~ ~ ~ ~-2 ~ air\"}"},
{ "id":"command_block_minecart", "Command":"kill @e[type=command_block_minecart,distance=..1]" }
] } ] } ] }