Advertisement
Guest User

Untitled

a guest
Jun 9th, 2021
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. options:
  2. title: <##00c7ab>Moving<##76eec6>Border &8|
  3. c1: <##00c7ab>
  4. c2: <##76eec6>
  5.  
  6. every 1 minute:
  7. if {movingborder::start} is set:
  8. set {_movbo::rdm} to a random integer between 0 and 2
  9. if {_movbo::rdm} = 0:
  10. set {_movebo::distance} to a random number between -50 and 50
  11. loop 100 times:
  12. if {movingborder::start} is set:
  13. add {_movebo::distance}/100 to x-coordinate of {movingborder::start}
  14. set the center of "world"'s world border to {movingborder::start}
  15. wait 1 tick
  16. else:
  17. stop
  18. else if {_movbo::rdm} = 1:
  19. set {_movebo::distance} to a random number between -50 and 50
  20. loop 100 times:
  21. if {movingborder::start} is set:
  22. add {_movebo::distance}/100 to z-coordinate of {movingborder::start}
  23. set the center of "world"'s world border to {movingborder::start}
  24. wait 1 tick
  25. else:
  26. stop
  27. else if {_movbo::rdm} = 2:
  28. set {_movebo::distance} to a random number between -50 and 50
  29. loop 100 times:
  30. if {movingborder::start} is set:
  31. add {_movebo::distance}/100 to z-coordinate of {movingborder::start}
  32. add {_movebo::distance}/100 to x-coordinate of {movingborder::start}
  33. set the center of "world"'s world border to {movingborder::start}
  34. wait 1 tick
  35. else:
  36. stop
  37. if {movingborder::size} is not set:
  38. set world border size of "world" to 100 #over 10 seconds
  39. else:
  40. set world border size of "world" to {movingborder::size}
  41.  
  42. command /movingborder [<text>] [<integer>]:
  43. aliases: movbo
  44. trigger:
  45. player has permission "movingborder.use":
  46. if arg 1 is "setstart":
  47. set the center of player's world's world border to player's location
  48. set {movingborder::start} to player's location
  49. send "{@title} &7The start of the world border has been set to your location!"
  50. else if arg 1 is "reset":
  51. reset the world border of player's world
  52. delete {movingborder::*}
  53. send "{@title} &7The world border has been reset!"
  54. else if arg 1 is "size":
  55. if arg 2 is set:
  56. set {movingborder::size} to arg 2
  57. send "{@title} &7The world border size has been set to {@c1}%arg 2%&7!"
  58. else:
  59. send "{@title} &7Please write a number for the size!"
  60. else if arg 1 is "info":
  61. if {movingborder::start} is set:
  62. set the center of player's world's world border to {movingborder::start}
  63. 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>"
  64. else:
  65. send "{@title} &7There is no info on the border because the start hasn't been set yet!"
  66. else if arg 1 is "tp":
  67. if {movingborder::start} is set:
  68. teleport player to location of block at block above highest block at location of {movingborder::start}
  69. send "{@title} &7You have been teleported to the current center of the border."
  70. else:
  71. send "{@title} &7You can't be teleported because the start hasn't been set yet!"
  72. else:
  73. send "{@title} &7Please choose a command: {@c1}tp&7, {@c1}info&7, {@c1}size&7, {@c1}reset &7or {@c1}setstart"
  74. else:
  75. send "{@title} &cYou don't have the required permissions!"
  76.  
  77. on respawn:
  78. if player's location is not inside the world border:
  79. teleport player to location of block at block above highest block at location of {movingborder::start}
  80. send "{@title} &7You respawned at the center because your previous location is not safe!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement