akon1248

Untitled

Nov 17th, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. on inventory click:
  2. clicked inventory is player's inventory
  3. if click type is right mouse button with shift or left mouse button with shift:
  4. clicked item is shield
  5. slot 40 of player's inventory is air
  6. cancel event
  7. clicked slot is 40
  8. cancel event
  9. on swap hand item:
  10. cancel event
  11. on eat:
  12. name of event-item is "&8[&bGolden-GOHAN&8]"
  13. player's tool is event-item
  14. wait 1 tick
  15. set player's tool to event-item
  16. on shoot:
  17. shooter is a player
  18. projectile is an arrow
  19. name of shooter's tool is "&8[&4HomingBow&8]"
  20. set metadata value "HomingArrow" of projectile to true
  21. set metadata value "InitialSpeed" of projectile to vector length of velocity of projectile
  22. on rightclick with firework rocket:
  23. name of player's tool is "&8[&bInfinityFireworks&8]"
  24. if clicked block is set:
  25. cancel event
  26. stop
  27. set {_item} to player's tool
  28. wait 1 tick
  29. player's tool is not {_item}
  30. set player's tool to {_item}
  31. every tick:
  32. loop all players:
  33. loop-player's chestplate is elytra
  34. name of loop-player's chestplate is "&8[&bInfinityElytra&8]"
  35. gliding state of loop-player is true
  36. push loop-player in direction of loop-player with speed 0.02
  37. loop all projectiles:
  38. loop-entity is an arrow
  39. loop-entity is not on ground
  40. metadata value "HomingArrow" of loop-entity is true
  41. if loop-entity has metadata value "HomingTargetUUID":
  42. set {_uuid} to metadata value "HomingTargetUUID" of loop-entity
  43. if entity from uuid {_uuid} is not set:
  44. delete metadata value "HomingTargetUUID" of loop-entity
  45. else:
  46. set {_target} to entity from uuid {_uuid}
  47. set {_v} to vector from loop-entity to head of {_target}
  48. set {_newveclength} to metadata value "InitialSpeed" of loop-entity
  49. set vector length of {_v} to {_newveclength}
  50. set velocity of loop-entity to {_v}
  51. delete {_target}
  52. delete {_v}
  53. delete {_newveclength}
  54. if loop-entity do not have metadata value "HomingTargetUUID":
  55. loop entities in radius 30 around loop-entity:
  56. loop-entity-2 is not shooter of loop-entity-1
  57. loop-entity-2 is a living entity
  58. loop-entity-2 is not armor stand
  59. if loop-entity-2 is a player:
  60. loop-entity-2's gamemode is survival or adventure
  61. set {_flag} to true
  62. else:
  63. set {_flag} to true
  64. {_flag} is true
  65. delete {_flag}
  66. if {_short} is not set:
  67. set {_target} to loop-entity-2
  68. set {_short} to distance between loop-entity-1 and loop-entity-2
  69. else:
  70. distance between loop-entity-1 and loop-entity-2 < {_short}
  71. set {_target} to loop-entity-2
  72. set {_short} to distance between loop-entity-1 and loop-entity-2
  73. delete {_short}
  74. {_target} is set
  75. set metadata value "HomingTargetUUID" of loop-entity to UUID of {_target}
  76. delete {_target}
  77. execute console command "execute %UUID of loop-entity% ~ ~ ~ particle reddust ~ ~ ~ 0 0 0 0 1 force"
Advertisement
Add Comment
Please, Sign In to add comment