On area enter item

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

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

Matixo55

Member
Jun 17, 2018
4
0
1
Can somebody make code so if somebody enters an area he gets book and if he lives it gets taken away
 
now when you say enters an area.... im not sure if you are using world guard or not, but i wrote this in the mindset that you are.
So here you go.

In the options change the name of the region (i preset it to spawn) and the name of the book, to your liking

code_language.skript:
options:
    region: spawn
    book: &aSpawn &2Book

on region enter:
    if "%event-region%" contains "{@region}":
        set {_book} to 1 book named "{@book}"
        give player 1 of {_book}

on region exit:
    if "%event-region%" contains "{@region}":
        set {_book} to 1 book named "{@book}"
        remove 1 of {_book} from player
 
It’s possible to write a region skript.... but it would be a hell of a lot of work. Something I’m not willing to do. And consider MOST servers use world guard to protect areas from player damage I would highly recommend getting that.
 
  • Like
Reactions: Galacticstar123