Need an easy Script!

  • 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!

RowingLev

Member
Jan 29, 2020
2
0
0
24
Category: Block Event

Suggested name: spawnpoint.sk

Spigot/Skript Version: latest Skript

What I want: Set Spawnpoint on Block like Checkpoint

Ideas for commands: dont need it

Ideas for perm: use.checkpoint

Time: asap

Greetings
 
Last edited:
Code:
on right click:
   player has permission use.checkpoint
   player's tool is cake named "spawn"
   set world spawn to block above targeted block's location
 
Im not sure, but what mean "player's tool is cake named "spawn"?
It's just allowing you to make it a specific item they have to have, if you don't want it just remove that line "player's tool" refers to the item the player is holding
 
Last edited:
Im not sure, but what mean "player's tool is cake named "spawn"?

basically means check if the player's tool is itemstack cake with customName "spawn"

It's just allowing you to make it a specific item they have to have, if you don't want it just remove that line "player's tool" refers to the item the player is holding

If he removes it then every time someone right clicks and they have that permission then they'll set the spawnpoint.
Not recommended.

Alternate code @RowingLev
Code:
on right click with cake:
   player has permission "setspawn"
   player's tool is named "setspawn"
   set world spawn to player's location
Simply:
when a player right clicks with a cake, check if they have permission "setspawn". If they do, check if their tool's name (which is a cake) is called "setspawn". If it is, set the spawnpoint to the player's location