INIT:/scoreboard objectives add Thor_I dummy
INIT:/scoreboard objectives add Thor_isHammer dummy
INIT:/scoreboard objectives add Thor_Holding dummy
INIT:/scoreboard objectives add Thor_Equip dummy
INIT:/scoreboard objectives add Thor_Charge dummy
INIT:/scoreboard objectives add Thor_Throw dummy
INIT:/scoreboard objectives add Thor_Sneak stat.sneakTime
INIT:/tellraw @a[r=300] {color:red,text:" - This command was created by MrGarretto"}
INIT:/tellraw @a[r=300] {text:""}
INIT:/tellraw @a[r=300] ["",{"text":"youtube.com/c/JustMrGarretto","color":"dark_red","underlined":"true","clickEvent":{"action":"open_url","value":"https://www.youtube.com/c/justmrgarretto"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click here to visit my Youtube channel!","color":"white"}]}}}]
INIT:/tellraw @a[r=300] ["",{"text":"Click here to download the resource pack [Important!]","color":"light_purple","bold":"true","underlined":"true","clickEvent":{"action":"open_url","value":"http://www.mediafire.com/download/u1btbsbwn895799/ThorPack_MrGarretto+1.10.2.zip"}}]
INIT:/tellraw @a[r=300] [{color:gold,bold:true,text:"The Thor "},{color:dark_aqua,text:"command module has been "},{color:gold,bold:true,text:"installed!"}]
INIT:/tellraw @a[r=300] {color:red,text:" - Over 21,000 characters"}
/scoreboard players set @e[type=Item] Thor_I 1 {Item:{id:"minecraft:stick"},OnGround:1b}
/scoreboard players set @e[type=Item] Thor_I 2 {Item:{id:"minecraft:anvil"},OnGround:1b}
/scoreboard players set @e[type=Item] Thor_I 3 {Item:{id:"minecraft:leather"},OnGround:1b}
/scoreboard players set @e[type=Item] Thor_I 4 {Item:{id:"minecraft:nether_star"},OnGround:1b}
/scoreboard players set @e[type=Item] Thor_I 5 {Item:{id:"minecraft:quartz"},OnGround:1b}
/scoreboard players set @e[type=Item] Thor_I 6 {Item:{id:"minecraft:golden_helmet"},OnGround:1b}
/scoreboard players set @e[type=Item] Thor_I 7 {Item:{id:"minecraft:golden_chestplate"},OnGround:1b}
/scoreboard players set @e[type=Item] Thor_I 8 {Item:{id:"minecraft:golden_leggings"},OnGround:1b}
/scoreboard players set @e[type=Item] Thor_I 9 {Item:{id:"minecraft:golden_boots"},OnGround:1b}
/execute @e[score_Thor_I_min=1,score_Thor_I=1] ~ ~ ~ execute @e[r=1,score_Thor_I_min=2,score_Thor_I=2] ~ ~ ~ execute @e[r=1,score_Thor_I_min=3,score_Thor_I=3] ~ ~ ~ execute @e[r=1,score_Thor_I_min=4,score_Thor_I=4] ~ ~ ~ summon Item ~ ~0.5 ~ {Item:{id:"minecraft:iron_axe",Count:1,tag:{display:{Name:"Mjolnir"}}},Invulnerable:1}
/execute @e[score_Thor_I_min=1,score_Thor_I=1] ~ ~ ~ execute @e[r=1,score_Thor_I_min=2,score_Thor_I=2] ~ ~ ~ execute @e[r=1,score_Thor_I_min=3,score_Thor_I=3] ~ ~ ~ execute @e[r=1,score_Thor_I_min=4,score_Thor_I=4] ~ ~ ~ particle explode ~ ~ ~ 0 0 0 1 100
/execute @e[score_Thor_I_min=1,score_Thor_I=1] ~ ~ ~ execute @e[r=1,score_Thor_I_min=2,score_Thor_I=2] ~ ~ ~ execute @e[r=1,score_Thor_I_min=3,score_Thor_I=3] ~ ~ ~ execute @e[r=1,score_Thor_I_min=4,score_Thor_I=4] ~ ~ ~ particle spell ~ ~ ~ 0.5 0 0.5 1 1000
/execute @e[score_Thor_I_min=1,score_Thor_I=1] ~ ~ ~ execute @e[r=1,score_Thor_I_min=2,score_Thor_I=2] ~ ~ ~ execute @e[r=1,score_Thor_I_min=3,score_Thor_I=3] ~ ~ ~ execute @e[r=1,score_Thor_I_min=4,score_Thor_I=4] ~ ~ ~ summon LightningBolt ~ ~5 ~
/execute @e[score_Thor_I_min=1,score_Thor_I=1] ~ ~ ~ execute @e[r=1,score_Thor_I_min=2,score_Thor_I=2] ~ ~ ~ execute @e[r=1,score_Thor_I_min=3,score_Thor_I=3] ~ ~ ~ execute @e[r=1,score_Thor_I_min=4,score_Thor_I=4] ~ ~ ~ particle blockcrack_41 ~ ~ ~ 0.2 0.3 0.2 1 500
/execute @e[score_Thor_I_min=1,score_Thor_I=1] ~ ~ ~ execute @e[r=1,score_Thor_I_min=2,score_Thor_I=2] ~ ~ ~ execute @e[r=1,score_Thor_I_min=3,score_Thor_I=3] ~ ~ ~ execute @e[r=1,score_Thor_I_min=4,score_Thor_I=4] ~ ~ ~ playsound block.anvil.use neutral @a[r=12] ~ ~ ~ 1 0.8
/execute @e[score_Thor_I_min=1,score_Thor_I=1] ~ ~ ~ execute @e[r=1,score_Thor_I_min=2,score_Thor_I=2] ~ ~ ~ execute @e[r=1,score_Thor_I_min=3,score_Thor_I=3] ~ ~ ~ execute @e[r=1,score_Thor_I_min=4,score_Thor_I=4] ~ ~ ~ kill @e[type=Item,r=3,score_Thor_I_min=1,score_Thor_I=4]
# Crafting the armor
/execute @e[score_Thor_I_min=5,score_Thor_I=5] ~ ~ ~ execute @e[r=1,score_Thor_I_min=6,score_Thor_I=6] ~ ~ ~ summon Item ~ ~0.5 ~ {Item:{id:"minecraft:sponge",Count:1,tag:{display:{Name:"Helmet_of_Thor"}}}}
/execute @e[score_Thor_I_min=5,score_Thor_I=5] ~ ~ ~ execute @e[r=1,score_Thor_I_min=7,score_Thor_I=7] ~ ~ ~ summon Item ~ ~0.5 ~ {Item:{id:"minecraft:iron_chestplate",Count:1,tag:{display:{Name:"Chestplate_of_Thor"}}}}
/execute @e[score_Thor_I_min=5,score_Thor_I=5] ~ ~ ~ execute @e[r=1,score_Thor_I_min=8,score_Thor_I=8] ~ ~ ~ summon Item ~ ~0.5 ~ {Item:{id:"minecraft:iron_leggings",Count:1,tag:{display:{Name:"Leggings_of_Thor"}}}}
/execute @e[score_Thor_I_min=5,score_Thor_I=5] ~ ~ ~ execute @e[r=1,score_Thor_I_min=9,score_Thor_I=9] ~ ~ ~ summon Item ~ ~0.5 ~ {Item:{id:"minecraft:iron_boots",Count:1,tag:{display:{Name:"Boots_of_Thor"}}}}
/execute @e[score_Thor_I_min=5,score_Thor_I=5] ~ ~ ~ execute @e[r=1,score_Thor_I_min=6,score_Thor_I=9] ~ ~ ~ kill @e[type=Item,score_Thor_I_min=5,score_Thor_I=9,r=3]
# Throw hammer
/scoreboard players add @a Thor_Throw 0
/scoreboard players add @a[score_Thor_Throw_min=1] Thor_Throw 1
/scoreboard players set @a[score_Thor_Throw_min=20] Thor_Throw 0
/execute @a[score_Thor_Holding_min=4] ~ ~1 ~ execute @e[type=Item,score_Thor_isHammer_min=1,r=1,c=1] ~ ~ ~ scoreboard players set @p[score_Thor_Throw=0] Thor_Throw 1
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=-180,ry=-153] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[0.96769d,0.5d,-3.88118d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=-152,ry=-125] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[2.67652d,0.5d,-2.97258d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=-124,ry=-97] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[3.75877d,0.5d,-1.36808d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=-96,ry=-69] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[3.96107d,0.5d,0.55669d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=-68,ry=-41] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[3.23607d,0.5d,2.35114d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=-40,ry=-13] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[1.75348d,0.5d,3.59518d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=-12,ry=15] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[-0.13960d,0.5d,3.99756d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=16,ry=43] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[-2.00000d,0.5d,3.46410d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=44,ry=71] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[-3.39219d,0.5d,2.11968d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=72,ry=99] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[-3.99026d,0.5d,0.27903d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=100,ry=127] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[-3.65418d,0.5d,-1.62695d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=128,ry=155] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[-2.46265d,0.5d,-3.15204d]}
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1,rym=156,ry=183] ~ ~ ~ summon ArmorStand ~ ~1 ~ {CustomName:"ThorThrow",Marker:1,Invisible:1,Motion:[-0.69459d,0.5d,-3.93923d]}
/execute @e[type=Item,score_Thor_isHammer_min=1] ~ ~ ~ tp @e[type=Item,score_Thor_isHammer_min=1,c=0] @e[type=ArmorStand,name=ThorThrow,c=1,r=10]
/execute @a[score_Thor_Throw_min=1,score_Thor_Throw=1] ~ ~ ~ playsound thorhammer neutral @a ~ ~ ~ 0.5
/scoreboard players set @e[type=ArmorStand,name=ThorThrow] Thor_Throw 1 {OnGround:1b}
/scoreboard players set @e[type=ArmorStand,name=ThorThrow] Thor_Equip 1
/execute @e[type=ArmorStand,name=ThorThrow] ~ ~ ~ detect ~ ~-1 ~ air 0 scoreboard players set @e[type=ArmorStand,c=0] Thor_Equip 0
/execute @e[type=ArmorStand,name=ThorThrow,score_Thor_Throw_min=1] ~ ~ ~ summon Creeper ~ ~ ~ {Fuse:0}
/execute @e[type=ArmorStand,name=ThorThrow,score_Thor_Equip_min=1] ~ ~ ~ summon Creeper ~ ~ ~ {Fuse:0}
/execute @e[type=ArmorStand,name=ThorThrow] ~ ~ ~ fill ~-1 ~-1 ~-1 ~1 ~1 ~1 air 0 replace glass
/execute @e[type=ArmorStand,name=ThorThrow] ~ ~ ~ fill ~-1 ~-1 ~-1 ~1 ~1 ~1 air 0 replace glass_pane
/kill @e[type=ArmorStand,name=ThorThrow,score_Thor_Throw_min=1]
/kill @e[type=ArmorStand,name=ThorThrow,score_Thor_Equip_min=1]
# Allow the helmet to be worn
/scoreboard players set @a Thor_Equip 0
/scoreboard players set @a Thor_Equip 1 {SelectedItem:{id:"minecraft:sponge",tag:{display:{Name:"Helmet_of_Thor"}}}}
/clear @a[score_Thor_Equip_min=1,score_Thor_Equip=1] sponge 0 1 {display:{Name:"Helmet_of_Thor"}}
/replaceitem entity @a[score_Thor_Equip_min=1,score_Thor_Equip=1] slot.armor.head sponge 1 0 {display:{Name:"Helmet_of_Thor"}}
# Make the Mjolnir item never despawn or be destroyed
/scoreboard players set @e[type=Item] Thor_isHammer 1 {Item:{id:"minecraft:iron_axe",tag:{display:{Name:"Mjolnir"}}}}
/entitydata @e[score_Thor_isHammer_min=1] {Invulnerable:1,Fire:0,Age:-32768,PickupDelay:1000}
# Track what the player is doing
/scoreboard players set @a Thor_Holding 0
/scoreboard players add @a Thor_Holding 1 {Inventory:[{Slot:100b,id:"minecraft:iron_boots",tag:{display:{Name:"Boots_of_Thor"}}}]}
/scoreboard players add @a Thor_Holding 1 {Inventory:[{Slot:101b,id:"minecraft:iron_leggings",tag:{display:{Name:"Leggings_of_Thor"}}}]}
/scoreboard players add @a Thor_Holding 1 {Inventory:[{Slot:102b,id:"minecraft:iron_chestplate",tag:{display:{Name:"Chestplate_of_Thor"}}}]}
/scoreboard players add @a Thor_Holding 1 {Inventory:[{Slot:103b,id:"minecraft:sponge",tag:{display:{Name:"Helmet_of_Thor"}}}]}
# Drop the hammer if not wearing all of the armor
/scoreboard players set @a Thor_Equip 0
/scoreboard players set @a[score_Thor_Holding=3] Thor_Equip 2 {Inventory:[{id:"minecraft:iron_axe",tag:{display:{Name:"Mjolnir"}}}]}
/clear @a[score_Thor_Equip_min=2,score_Thor_Equip=2] iron_axe 0 1 {display:{Name:"Mjolnir"}}
/execute @a[score_Thor_Equip_min=2,score_Thor_Equip=2] ~ ~ ~ summon Item ~ ~0.5 ~ {Item:{id:"minecraft:iron_axe",Count:1,tag:{display:{Name:"Mjolnir"}}},Invulnerable:1,PickupDelay:10}
# Allow anyone in full Thor armor to pick up the hammer
/execute @a[score_Thor_Holding_min=4,score_Thor_Throw=0] ~ ~ ~ entitydata @e[type=Item,score_Thor_isHammer_min=1,r=1] {PickupDelay:0}
# Charging the hammer
/scoreboard players add @a Thor_Holding 1 {SelectedItem:{id:"minecraft:iron_axe",tag:{display:{Name:"Mjolnir"}}}}
/scoreboard players add @a Thor_Charge 0
/execute @a[rxm=-90,rx=-89,score_Thor_Holding_min=5,score_Thor_Charge=99] ~ ~ ~ summon LightningBolt ~ ~5 ~
/execute @a[rxm=-90,rx=-89,score_Thor_Holding_min=5,score_Thor_Charge=99] ~ ~ ~ particle smoke ~ ~ ~ 1 1 1 1 10
/scoreboard players add @a[rxm=-90,rx=-89,score_Thor_Holding_min=5,score_Thor_Charge=99] Thor_Charge 1
/execute @a[score_Thor_Charge_min=75] ~ ~ ~ particle cloud ~ ~0.4 ~ 0 0 0 0.05 1
# Allow player to bring hammer to themselves if they don't have one in their inventory
/execute @a[score_Thor_Holding_min=4,score_Thor_Holding=4,score_Thor_Sneak_min=1] ~ ~ ~ tp @e[type=Item,score_Thor_isHammer_min=1,r=24] @p[score_Thor_Holding_min=4,score_Thor_Holding=4,score_Thor_Sneak_min=1]
/execute @a[score_Thor_Holding_min=4,score_Thor_Holding=4,score_Thor_Sneak_min=1] ~ ~ ~ execute @e[type=Item,score_Thor_isHammer_min=1,r=24] ~ ~ ~ execute @p[score_Thor_Holding_min=4,score_Thor_Holding=4,score_Thor_Sneak_min=1] ~ ~ ~ particle enchantmenttable ~ ~ ~ 0 0 0 0.8 1000
/execute @a[score_Thor_Holding_min=4,score_Thor_Holding=4,score_Thor_Sneak_min=1] ~ ~ ~ execute @e[type=Item,score_Thor_isHammer_min=1,r=24] ~ ~ ~ execute @p[score_Thor_Holding_min=4,score_Thor_Holding=4,score_Thor_Sneak_min=1] ~ ~ ~ playsound thorhammer neutral @a ~ ~ ~ 1 0.8
# Lightning attack
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=-180,ry=-158] ~ ~ ~ summon LightningBolt ~1.99368 ~0 ~-9.79925
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=-157,ry=-135] ~ ~ ~ summon LightningBolt ~5.66406 ~0 ~-8.24126
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=-134,ry=-112] ~ ~ ~ summon LightningBolt ~8.43391 ~0 ~-5.37300
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=-111,ry=-89] ~ ~ ~ summon LightningBolt ~9.86286 ~0 ~-1.65048
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=-88,ry=-66] ~ ~ ~ summon LightningBolt ~9.72370 ~0 ~2.33445
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=-65,ry=-43] ~ ~ ~ summon LightningBolt ~8.03857 ~0 ~5.94823
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=-42,ry=-20] ~ ~ ~ summon LightningBolt ~5.07538 ~0 ~8.61629
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=-19,ry=3] ~ ~ ~ summon LightningBolt ~1.30526 ~0 ~9.91445
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=4,ry=26] ~ ~ ~ summon LightningBolt ~-2.67238 ~0 ~9.63630
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=27,ry=49] ~ ~ ~ summon LightningBolt ~-6.22515 ~0 ~7.82608
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=50,ry=72] ~ ~ ~ summon LightningBolt ~-8.78817 ~0 ~4.77159
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=73,ry=95] ~ ~ ~ summon LightningBolt ~-9.95396 ~0 ~0.95846
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=96,ry=118] ~ ~ ~ summon LightningBolt ~-9.53717 ~0 ~-3.00706
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=119,ry=141] ~ ~ ~ summon LightningBolt ~-7.60406 ~0 ~-6.49448
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=142,ry=164] ~ ~ ~ summon LightningBolt ~-4.46198 ~0 ~-8.94934
/execute @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1,rym=165,ry=187] ~ ~ ~ summon LightningBolt ~-0.61049 ~0 ~-9.98135
/scoreboard players remove @a[score_Thor_Charge_min=2,score_Thor_Sneak_min=1] Thor_Charge 2
/scoreboard players set @a Thor_Sneak 0