Advertisement
SuzukazeK

Untitled

Sep 21st, 2019
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. on right click with wooden sword:
  2. player's tool is wooden sword
  3. set {_item} to player's tool
  4. remove 1 of player's tool from player
  5. set {num} to {num} + 1
  6. set {_num} to {num}
  7. set {_loc} to location of player
  8. add 0.7 to y-coordinate of {_loc}
  9. set {_a1} to yaw of location of player - 270
  10. set {_a2} to pitch of location of player * -1
  11. set {_x} to sin(90-{_a2}) * cos({_a1}) * 1.5
  12. set {_z} to sin(90-{_a2}) * sin({_a1}) * 1.5
  13. set {_y} to cos(90-{_a2}) * 1.5
  14. 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]}}"
  15. play sound "entity.player.attack.sweep" with volume 1 and pitch 1.5 at player
  16. loop 50 times:
  17. add {_x} to x-coordinate of {_loc}
  18. add {_y} to y-coordinate of {_loc}
  19. add {_z} to z-coordinate of {_loc}
  20. if block at {_loc} is not air:
  21. exit 2 sections
  22. loop living entities in radius 1.5 of {_loc}:
  23. loop-entity is not player
  24. loop-entity is not armor stand
  25. damage loop-entity by 2.5 hearts
  26. push loop-entity upwards at speed 0.5
  27. 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"
  28. exit 2 sections
  29. command "/execute @e[tag=magic%{_num}%] ~ ~ ~ /tp @e[tag=magic%{_num}%] %x-coordinate of {_loc}% %y-coordinate of {_loc}% %z-coordinate of {_loc}%"
  30. wait a tick
  31. 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"
  32. command "/execute @e[tag=magic%{_num}%] ~ ~ ~ /kill @e[tag=magic%{_num}%]"
  33. drop 1 of {_item} at {_loc}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement