Dr_Kousek

Untitled

Sep 2nd, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. on click with red carpet:
  2. cancel event
  3. if {perk.flyingcarpet.%player%} is true:
  4. if {fly.%player%} is true:
  5. delete {fly.%player%}
  6. loop {loc.%player%::*}:
  7. set block at {loc.%player%::%loop-index%} to air
  8. delete {loc.%player%::*}
  9. send "&6Fly status: &cOFF"
  10. stop
  11. send "&6Fly status: &aON"
  12. set {fly.%player%} to true
  13. while player is alive:
  14. wait 1 tick
  15. if {fly.%player%} is true:
  16. set {_loc} to location 1 under block at player
  17. if player is sneaking:
  18. set {_loc} to location 2 under block at player
  19. loop {loc.%player%::*}:
  20. set block at {loc.%player%::%loop-index%} to air
  21. delete {loc.%player%::*}
  22. set {_y} to y-coordinate of {_loc}
  23. loop blocks in radius 2 around {_loc}:
  24. if y-coordinate of loop-block is {_y}:
  25. if loop-block is air:
  26. set loop-block to glass
  27. add location of loop-block to {loc.%player%::*}
  28. loop {loc.%player%::*}:
  29. if distance between {loc.%player%::%loop-index%} and {_loc} is more than 2:
  30. set block at {loc.%player%::%loop-index%} to air
  31. delete {loc.%player%::%loop-index%}
  32. if {fly.%player%} is true:
  33. delete {fly.%player%}
  34. loop {loc.%player%::*}:
  35. set block at {loc.%player%::%loop-index%} to air
  36. delete {loc.%player%::*}
Advertisement
Add Comment
Please, Sign In to add comment