Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on right click holding a glass block:
- cancel the event
- set {_color} to data value of player's tool
- "%name of player's tool%" is "&eMagical Carpet"
- if sql var "cooldown::carpets::%player%" exists is true:
- set {_time} to value of sql var "cooldown::carpets::%player%"
- set {_time} to convert unix ({_time} parsed as number) to date
- difference between {_time} and now is less than 3 minutes
- set {_cooldown} to difference between {_time} and now
- set {_cooldown} to "%difference between {_cooldown} and 3 minute%"
- set {_cooldown::*} to {_cooldown} split at " "
- if {_cooldown::4} is not set:
- set {_cooldown} to "%{_cooldown::1}%&es"
- else:
- set {_cooldown} to "%{_cooldown::1}%m %{_cooldown::4}%&es"
- if {_cooldown} contains ".":
- set {_cooldown::*} to {_cooldown} split at "."
- set {_cooldown} to "%{_cooldown::1}%&es"
- send "&7You can't use &eMagical Carpet&7 for another &e%{_cooldown}%"
- stop trigger
- set sql var "cooldown::carpets::%player%" to "%unix time%"
- set {_amt} to value of sql var "gadgets::carpets::%player%" parsed as integer
- set sql var "gadgets::carpets::%player%" to "%{_amt} - 1%"
- remove 1 of player's tool from player's tool
- loop 300 times:
- if player is sneaking:
- set {_below} to 2
- else:
- set {_below} to 1
- set {_block1} to block at location {_below} below player
- set {_block2} to block at location {_below} below 1 north player
- set {_block3} to block at location {_below} below 1 west player
- set {_block4} to block at location {_below} below 1 east player
- set {_block5} to block at location {_below} below 1 south player
- set {_block6} to block at location {_below} below 1 north east player
- set {_block7} to block at location {_below} below 1 north west player
- set {_block8} to block at location {_below} below 1 south east player
- set {_block9} to block at location {_below} below 1 south west player
- loop 9 times:
- block at {_block%loop-number-2%} is air
- if y-coordinate of {_block%loop-number-2%} is greater than 115:
- set y-coordinate of {_block%loop-number-2%} to 115
- set block at {_block%loop-number-2%} to "95:%{_color}%" parsed as item
- set metadata "Painted" of block at {_block%loop-number-2%} to "true"
- wait 2 ticks
- loop 9 times:
- set block at {_block%loop-number-2%} to {_block%loop-number-2%}
- if block at {_block%loop-number-2%} is a glass block:
- set block at {_block%loop-number-2%} to air
- delete metadata "Painted" of block at {_block%loop-number-2%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement