Zeldaboy111

Teleport Signs Af! ]|[ 🎉 Skript #400 🎉

Mar 21st, 2021
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. #©
  2. #- Reselling/Reuploading while claiming that it is yours or made by you is disallowed
  3. #- Do not edit it and upload it as your own
  4. #- While using it in a video, please feature everything under "Video"
  5. #©
  6. #
  7. #Video:
  8. #Skript made by Zeldaboy111
  9. #More content of the creator: https://forums.skunity.com/search/26443679/
  10. options:
  11. logo: &d&lT&5&lS&8:&7
  12.  
  13. command /teleportsign [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>]:
  14. aliases: tpsign
  15. trigger:
  16. if arg-1 is "create":
  17. if target block of player is any sign:
  18. if distance between location of player and location of target block of player <= 5:
  19. if {teleportsign.%location of target block of player%.teleportTo} is not set:
  20. if (arg-2 parsed as a number) and (arg-3 parsed as a number) and (arg-4 parsed as a number) is set:
  21. set {_yaw} to 180
  22. set {_pitch} to 0
  23. set {_world} to world of player
  24. if arg-5 is set:
  25. if arg-5 parsed as an integer is set:
  26. set {_yaw} to arg-5 parsed as an integer
  27. if arg-6 and arg-6 parsed as an integer is set:
  28. set {_pitch} to arg-6 parsed as an integer
  29. if arg-7 is set:
  30. if arg-7 parsed as a world is set:
  31. set {_world} to arg-7 parsed as a world
  32. else:
  33. send "{@logo} The world %arg-7% &7does not exist."
  34. stop
  35. else:
  36. send "{@logo} Invalid Usage!%nl% &8- &7/tpsign delete%nl% &8- &7/tpsign create <x> <y> <z> [yaw] [pitch] [world]"
  37. stop
  38. else:
  39. send "{@logo} Invalid Usage!%nl% &8- &7/tpsign delete%nl% &8- &7/tpsign create <x> <y> <z> [yaw] [pitch] [world]"
  40. stop
  41.  
  42. # Set to variables = inefficient but I have done this to make sure the reloading does not take very long.
  43. set {_x} to x-coordinate of player
  44. set {_y} to y-coordinate of player
  45. set {_z} to z-coordinate of player
  46. set {_location} to location at {_x}, {_y}, {_z} in world {_world}
  47. set yaw of {_location} to {_yaw}
  48. set pitch of {_location} to {_pitch}
  49.  
  50.  
  51. set {teleportsign.%location of target block of player%.teleportTo} to {_location}
  52. send "{@logo} You have created the telport sign."
  53. else:
  54. send "{@logo} Invalid Usage!%nl% &8- &7/tpsign delete%nl% &8- &7/tpsign create <x> <y> <z> [yaw] [pitch] [world]"
  55. else:
  56. send "{@logo} A teleport sign already exists at this location."
  57. else:
  58. send "{@logo} You must be looking at a sign."
  59. else:
  60. send "{@logo} You must be looking at a sign."
  61. else if arg-1 is "delete":
  62. if target block of player is any sign:
  63. if distance between location of player and location of target block of player <= 5:
  64. if {teleportsign.%location of target block of player%.teleportTo} is set:
  65. delete {teleportsign.%location of target block of player%.teleportTo}
  66. loop 4 times:
  67. set line loop-value of target block of player to ""
  68. send "{@logo} You have deleted the teleport sign at the location you were looking at."
  69. else:
  70. send "{@logo} There is no teleport sign found at the location you are looking at."
  71. else:
  72. send "{@logo} You must be looking at a sign."
  73. else:
  74. send "{@logo} You must be looking at a sign."
  75. else:
  76. send "{@logo} Invalid Usage!%nl% &8- &7/tpsign delete%nl% &8- &7/tpsign create <x> <y> <z> [yaw] [pitch] [world]"
  77.  
  78.  
  79. on break of any sign:
  80. if {teleportsign.%location of target block of player%.teleportTo} is set:
  81. cancel event
  82. send "{@logo} You cannot break a teleport sign."
  83.  
  84. on right click on sign:
  85. if {teleportsign.%location of event-block%.teleportTo} is set:
  86. teleport player to {teleportsign.%location of event-block%.teleportTo}
  87.  
Advertisement
Add Comment
Please, Sign In to add comment