Advertisement
Guest User

Snowball wand script

a guest
Dec 14th, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. variables:
  2. itemname = "&6&lBite Wand" #The name of the item the player has to be holding (INCLUDING COLOR CODES).
  3. damage = 3.5 #The damage you want it to deal to the player.
  4.  
  5. command /givewand: #---To give me the wand for testing. Delete this command if you don't want it!---#
  6. trigger:
  7. give a blaze rod with name "%{itemname}%" to player
  8.  
  9. on right click: #---To shoot snowball for testing. Delete this command if you don't want it!---#
  10. player is holding a blaze rod named "%{itemname}%":
  11. shoot a snowball from the player at speed 1.5
  12.  
  13. on damage:
  14. if attacker is a player:
  15. attacker is holding a blaze rod named "%{itemname}%":
  16. if victim is a player:
  17. #if true is true:
  18. damage the victim by {damage}
  19. set {_vy} to victim's y-coordinate
  20. set {_ay} to attacker's y-coordinate
  21. set {_ydif1} to {_ay} - {_vy}
  22. set {_ydif2} to {_vy} - {_ay}
  23. if {ay} is bigger than {vy}:
  24. set {_value} to the location {_ydif1} meters below the attacker
  25. push victim (direction from {_value} to victim) at speed 0.5
  26. push victim upwards at speed 0.5
  27. else:
  28. set {_value} to the location {_ydif2} meters above the attacker
  29. push victim (direction from {_value} to victim) at speed 0.5
  30. push victim upwards at velocity 0.5
  31.  
  32. #----IMPORTANT----#
  33.  
  34. #if the wand is not a blaze rod then change all the 'blaze rod' to the item that your wand is.
  35. #Change the variables to your needs!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement