Guest User

Untitled

a guest
Aug 25th, 2021
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.59 KB | None | 0 0
  1. variables:
  2. {%player%.laser.shoot} = 0
  3. on rightclick:
  4. if player is holding a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  5. cancel event
  6. if {%player%.laser.shoot} is 0:
  7. show happy villager with speed 0 at player
  8. loop 200 times:
  9. set {_loc} to location (loop-value / 5) meters in front of and 1.3 meters above the player
  10. show happy villager with speed 0 at {_loc}
  11. loop all entities in radius 2.5 around {_loc}:
  12. loop-entity is not player
  13. loop-entity's gamemode is not creative
  14. damage loop-entity by 15 hearts
  15. if block at {_loc} is not air:
  16. set {%player%.laser.shoot} to 3
  17. if player is holding a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  18. send action bar "&aRay Gun &2&l&f&l|||" to player
  19. wait 2 second
  20. set {%player%.laser.shoot} to 2
  21. if player is holding a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  22. send action bar "&aRay Gun &2&l|&f&l||" to player
  23. wait 2 second
  24. set {%player%.laser.shoot} to 1
  25. if player is holding a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  26. send action bar "&aRay Gun &2&l||&f&l|" to player
  27. wait 2 second
  28. set {%player%.laser.shoot} to 0
  29. if player is holding a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  30. send action bar "&aRay Gun &2&l|||&f&l" to player
  31. stop
  32. set {%player%.laser.shoot} to 5
  33. if player is holding a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  34. send action bar "&aRay Gun &2&l&f&l|||||" to player
  35. wait 2 second
  36. set {%player%.laser.shoot} to 4
  37. if player is holding a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  38. send action bar "&aRay Gun &2&l|&f&l||||" to player
  39. wait 2 second
  40. set {%player%.laser.shoot} to 3
  41. if player is holding a bamboo named "&aRayGun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  42. send action bar "&aRay Gun &2&l||&f&l|||" to player
  43. wait 2 second
  44. set {%player%.laser.shoot} to 2
  45. if player is holding a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  46. send action bar "&aRay Gun &2&l|||&f&l||" to player
  47. wait 2 second
  48. set {%player%.laser.shoot} to 1
  49. if player is holding a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  50. send action bar "&aRayGun &2&l||||&f&l|" to player
  51. wait 2 second
  52. set {%player%.laser.shoot} to 0
  53. if player is holding a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks":
  54. send action bar "&aRayGun &2&l|||||&f&l" to player
  55. command /RayGun:
  56. permission: op
  57. trigger:
  58. give player a bamboo named "&aRay Gun" with lore "&eShoots &6Through Armor &eand does &420 &cdamage" and "&4Cant &cshoot through blocks"
Advertisement
Add Comment
Please, Sign In to add comment