Jump to content

In need of a teleport to spawn if the player is below y level Skript


Recommended Posts

I'm in need of a skript that teleports the player to spawn when they go below a certain y level.


If you are ok with making it for me, I would like it to send a message to the player that says "A swift wind caught you from the void", the y level should be 40 to teleport the player and there should be a setspawn command to set the teleport point.

Link to comment
Share on other sites

I made this on my phone so excuse any indent errors lol


 title: &5VoidTP &8|

on load:
 if {voidteleport::message} is no set:
  set {voidteleport::message} to "&8&oA swift wind caught you from the void"

on join:
 while player is online:
  if y-coordinate of player < 40:
   teleport player to {voidteleport::spawn}
   send "%{voidteleport::message}%" to player
  wait 2.5 seconds
command /voidteleport [<text>] [<text>]:
 aliases: voidtp, vtp
  player has permission "voidtp.use":
   if arg 1 is "spawn":
    set {voidteleport::spawn} to location of player
    send "{@title} &7Spawn was set to your location!"
   else if arg 1 is "message":
    if arg 2 is set:
     send "{@title} &7Teleport message is now:"
     send "%arg 2%"
     set {voidteleport::message} to "%arg 2%"
     send "{@title} &7Please choose a message."
    send "{@title} &7Please choose if you want to set a message or the spawn."
   send "{@title} &cYou don't have the required permission!"


Edited by Starshinex3


Feel free to add me on discord if you:

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with plugins

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with skripts

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need to vent about something


>[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]<

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...