Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- title: <##00c7ab>Moving<##76eec6>Border &8|
- c1: <##00c7ab>
- c2: <##76eec6>
- every 1 minute:
- if {movingborder::start} is set:
- set {_movbo::rdm} to a random integer between 0 and 2
- if {_movbo::rdm} = 0:
- set {_movebo::distance} to a random number between -50 and 50
- loop 100 times:
- if {movingborder::start} is set:
- add {_movebo::distance}/100 to x-coordinate of {movingborder::start}
- set the center of "world"'s world border to {movingborder::start}
- wait 1 tick
- else:
- stop
- else if {_movbo::rdm} = 1:
- set {_movebo::distance} to a random number between -50 and 50
- loop 100 times:
- if {movingborder::start} is set:
- add {_movebo::distance}/100 to z-coordinate of {movingborder::start}
- set the center of "world"'s world border to {movingborder::start}
- wait 1 tick
- else:
- stop
- else if {_movbo::rdm} = 2:
- set {_movebo::distance} to a random number between -50 and 50
- loop 100 times:
- if {movingborder::start} is set:
- add {_movebo::distance}/100 to z-coordinate of {movingborder::start}
- add {_movebo::distance}/100 to x-coordinate of {movingborder::start}
- set the center of "world"'s world border to {movingborder::start}
- wait 1 tick
- else:
- stop
- if {movingborder::size} is not set:
- set world border size of "world" to 100 #over 10 seconds
- else:
- set world border size of "world" to {movingborder::size}
- command /movingborder [<text>] [<integer>]:
- aliases: movbo
- trigger:
- player has permission "movingborder.use":
- if arg 1 is "setstart":
- set the center of player's world's world border to player's location
- set {movingborder::start} to player's location
- send "{@title} &7The start of the world border has been set to your location!"
- else if arg 1 is "reset":
- reset the world border of player's world
- delete {movingborder::*}
- send "{@title} &7The world border has been reset!"
- else if arg 1 is "size":
- if arg 2 is set:
- set {movingborder::size} to arg 2
- send "{@title} &7The world border size has been set to {@c1}%arg 2%&7!"
- else:
- send "{@title} &7Please write a number for the size!"
- else if arg 1 is "info":
- if {movingborder::start} is set:
- set the center of player's world's world border to {movingborder::start}
- send "{@title} &7Current border center: {@c1}X: &7%x-coordinate of {movingborder::start}% {@c1}Y: &7%y-coordinate of {movingborder::start}% {@c1}Z: &7%z-coordinate of {movingborder::start}% <ttp:&7Click to teleport to the center.><cmd:/movingborder tp>{@c2}[TP]<reset>"
- else:
- send "{@title} &7There is no info on the border because the start hasn't been set yet!"
- else if arg 1 is "tp":
- if {movingborder::start} is set:
- teleport player to location of block at block above highest block at location of {movingborder::start}
- send "{@title} &7You have been teleported to the current center of the border."
- else:
- send "{@title} &7You can't be teleported because the start hasn't been set yet!"
- else:
- send "{@title} &7Please choose a command: {@c1}tp&7, {@c1}info&7, {@c1}size&7, {@c1}reset &7or {@c1}setstart"
- else:
- send "{@title} &cYou don't have the required permissions!"
- on respawn:
- if player's location is not inside the world border:
- teleport player to location of block at block above highest block at location of {movingborder::start}
- send "{@title} &7You respawned at the center because your previous location is not safe!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement