Minecraft lightning sword command?

ya
7

Can someone tell me how to make a lightning sword in minecraft? (So if I hit with a left click that lightning bolt shoots straight ahead)

Ma
1

This is a little difficult but here is an explanation:

You need 2 command blocks, placed as shown in the picture.
On the left block you press "Impulse" twice on it so that it says "Repeat" and on the right one press on it so that it says "Chain"
You go into the left and enter the command:

/ execute if score @a [limit = 1] useDiamondSword matches 1 if entity @a [nbt = {SelectedItem: {id: "minecraft: diamond_sword", tag: {display: {Lore: ["{\" text \ ": \ "\\ u00a77LightningSword \"} "]}}}}] at @a [nbt = {SelectedItem: {id:" minecraft: diamond_sword ", tag: {display: {Lore: [" {\ "text \": \ "\\ u00a77LightningSword \"} "]}}}}] run summon minecraft: lightning_bolt ^

4. You go to the right and enter the command:

/ scoreboard players set @a useDiamondSword 0

5. Then you power the two blocks with Redstone

6. Now enter the following commands in your chat:

/ scoreboard objectives add useDiamondSword minecraft.used: minecraft.diamond_sword

/ give @s diamond_sword {display: {Lore: ["{\" text \ ": \" \\ u00a77LightningSword \ "}"]}, Enchantments: [{id: 99, lvl: 1}]}

7. Now your chat should be spammed with many commands. To do this, go to settings → Chat settings → Chat: Hidden

LG

Minecraft lightning sword command
Gu
2

It's so cool

Gu
2

java or bedrock

Gu

you clickbater!

Gu
1

you clickbater!

Gu
2

Not working! Fack!

Gu

Um how?