Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on inventory click:
- clicked inventory is player's inventory
- if click type is right mouse button with shift or left mouse button with shift:
- clicked item is shield
- slot 40 of player's inventory is air
- cancel event
- clicked slot is 40
- cancel event
- on swap hand item:
- cancel event
- on eat:
- name of event-item is "&8[&bGolden-GOHAN&8]"
- player's tool is event-item
- wait 1 tick
- set player's tool to event-item
- on shoot:
- shooter is a player
- projectile is an arrow
- name of shooter's tool is "&8[&4HomingBow&8]"
- set metadata value "HomingArrow" of projectile to true
- set metadata value "InitialSpeed" of projectile to vector length of velocity of projectile
- on rightclick with firework rocket:
- name of player's tool is "&8[&bInfinityFireworks&8]"
- if clicked block is set:
- cancel event
- stop
- set {_item} to player's tool
- wait 1 tick
- player's tool is not {_item}
- set player's tool to {_item}
- every tick:
- loop all players:
- loop-player's chestplate is elytra
- name of loop-player's chestplate is "&8[&bInfinityElytra&8]"
- gliding state of loop-player is true
- push loop-player in direction of loop-player with speed 0.02
- loop all projectiles:
- loop-entity is an arrow
- loop-entity is not on ground
- metadata value "HomingArrow" of loop-entity is true
- if loop-entity has metadata value "HomingTargetUUID":
- set {_uuid} to metadata value "HomingTargetUUID" of loop-entity
- if entity from uuid {_uuid} is not set:
- delete metadata value "HomingTargetUUID" of loop-entity
- else:
- set {_target} to entity from uuid {_uuid}
- set {_v} to vector from loop-entity to head of {_target}
- set {_newveclength} to metadata value "InitialSpeed" of loop-entity
- set vector length of {_v} to {_newveclength}
- set velocity of loop-entity to {_v}
- delete {_target}
- delete {_v}
- delete {_newveclength}
- if loop-entity do not have metadata value "HomingTargetUUID":
- loop entities in radius 30 around loop-entity:
- loop-entity-2 is not shooter of loop-entity-1
- loop-entity-2 is a living entity
- loop-entity-2 is not armor stand
- if loop-entity-2 is a player:
- loop-entity-2's gamemode is survival or adventure
- set {_flag} to true
- else:
- set {_flag} to true
- {_flag} is true
- delete {_flag}
- if {_short} is not set:
- set {_target} to loop-entity-2
- set {_short} to distance between loop-entity-1 and loop-entity-2
- else:
- distance between loop-entity-1 and loop-entity-2 < {_short}
- set {_target} to loop-entity-2
- set {_short} to distance between loop-entity-1 and loop-entity-2
- delete {_short}
- {_target} is set
- set metadata value "HomingTargetUUID" of loop-entity to UUID of {_target}
- delete {_target}
- 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