Custom Spawn Pads Skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Shayph

Member
May 4, 2022
1
0
1
19
I'm looking for a skript that allows a player to crouch/sneak on a beacon and after doing so their spawnpoint is set there. So if they respawn, they will be teleported back to there or if they rejoin they are teleported back to there.
 
Code:
on sneak toggle:
  player is sneaking
  block below player is a beacon
  set {spawnpoint::%player's uuid%} to player's location
  send title " " with subtitle "&b&lCheckpoint set!" to player

on respawn:
  teleport player to {spawnpoint::%player's uuid%} if {spawnpoint::%player's uuid%} is set

Let me know if anything here doesn't work as intended!

If this helped you consider marking this comment as "Best Answer" and marking the thread as "Solved"!
 
when someone breaks the beacon, the person who placed the beacon can still spawn at the beacon, is there a way to make it so that when the beacon is broken, the person who placed it cant teleport there anymore?