Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on right click with wooden sword:
- player's tool is wooden sword
- set {_item} to player's tool
- remove 1 of player's tool from player
- set {num} to {num} + 1
- set {_num} to {num}
- set {_loc} to location of player
- add 0.7 to y-coordinate of {_loc}
- set {_a1} to yaw of location of player - 270
- set {_a2} to pitch of location of player * -1
- set {_x} to sin(90-{_a2}) * cos({_a1}) * 1.5
- set {_z} to sin(90-{_a2}) * sin({_a1}) * 1.5
- set {_y} to cos(90-{_a2}) * 1.5
- command "/execute @p ~ ~ ~ /summon armor_stand %x-coordinate of {_loc}% %y-coordinate of {_loc}% %z-coordinate of {_loc}% {Tags:[""magic%{_num}%""],Rotation:[%{_a1} + 270%f,0f],NoGravity:1b,ShowArms:1,Marker:1b,Invisible:1,Invulnerable:1,HandItems:[{id:""minecraft:wooden_sword"",Count:1b},{}],Pose:{RightArm:[%{_a2} * -1%f,0f,0f]}}"
- play sound "entity.player.attack.sweep" with volume 1 and pitch 1.5 at player
- loop 50 times:
- add {_x} to x-coordinate of {_loc}
- add {_y} to y-coordinate of {_loc}
- add {_z} to z-coordinate of {_loc}
- if block at {_loc} is not air:
- exit 2 sections
- loop living entities in radius 1.5 of {_loc}:
- loop-entity is not player
- loop-entity is not armor stand
- damage loop-entity by 2.5 hearts
- push loop-entity upwards at speed 0.5
- command "/execute @e[tag=magic%{_num}%] ~ ~ ~ /particle sweepAttack %x-coordinate of {_loc}% %y-coordinate of {_loc}% %z-coordinate of {_loc}% 0.5 0.1 0.5 0.1 30"
- exit 2 sections
- command "/execute @e[tag=magic%{_num}%] ~ ~ ~ /tp @e[tag=magic%{_num}%] %x-coordinate of {_loc}% %y-coordinate of {_loc}% %z-coordinate of {_loc}%"
- wait a tick
- command "/execute @e[tag=magic%{_num}%] ~ ~ ~ /particle cloud %x-coordinate of {_loc}% %y-coordinate of {_loc}% %z-coordinate of {_loc}% 0 0 0 0.1 10"
- command "/execute @e[tag=magic%{_num}%] ~ ~ ~ /kill @e[tag=magic%{_num}%]"
- drop 1 of {_item} at {_loc}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement