Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on click with red carpet:
- cancel event
- if {perk.flyingcarpet.%player%} is true:
- if {fly.%player%} is true:
- delete {fly.%player%}
- loop {loc.%player%::*}:
- set block at {loc.%player%::%loop-index%} to air
- delete {loc.%player%::*}
- send "&6Fly status: &cOFF"
- stop
- send "&6Fly status: &aON"
- set {fly.%player%} to true
- while player is alive:
- wait 1 tick
- if {fly.%player%} is true:
- set {_loc} to location 1 under block at player
- if player is sneaking:
- set {_loc} to location 2 under block at player
- loop {loc.%player%::*}:
- set block at {loc.%player%::%loop-index%} to air
- delete {loc.%player%::*}
- set {_y} to y-coordinate of {_loc}
- loop blocks in radius 2 around {_loc}:
- if y-coordinate of loop-block is {_y}:
- if loop-block is air:
- set loop-block to glass
- add location of loop-block to {loc.%player%::*}
- loop {loc.%player%::*}:
- if distance between {loc.%player%::%loop-index%} and {_loc} is more than 2:
- set block at {loc.%player%::%loop-index%} to air
- delete {loc.%player%::%loop-index%}
- if {fly.%player%} is true:
- delete {fly.%player%}
- loop {loc.%player%::*}:
- set block at {loc.%player%::%loop-index%} to air
- delete {loc.%player%::*}
Advertisement
Add Comment
Please, Sign In to add comment