On region enter player gets permissions

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

ritana5

Member
Feb 27, 2024
2
0
1
48
I am trying to make a Skript where when a player enters a certain region, they get a certain permission through luckperms and when they leave, the permission gets removed. I have something, but it doesn't seem to work. Here's what I have

Code:
on region enter:
    wait 2 ticks
    if "%event-region%" contains "red_aetius":
        make console execute command "lp user %player% permission set bw.shop true"
        make console execute command "lp user %player% permission set bw.upgrades true"
    else if "%event-region%" contains "blue_aetius":
        make console execute command "lp user %player% permission set bw.shop true"
        make console execute command "lp user %player% permission set bw.upgrades true"
    else if "%event-region%" contains "__global__":
        make console execute command "lp user %player% permission set bw.shop false"
        make console execute command "lp user %player% permission set bw.upgrades true"
 
Using PermSk:

Code:
on region enter:
    wait tick
    if player is in region "red_aetius" or "blue_aetius":
        add "bw.shop" and "bw.upgrades" to permissions of player
    else:
        remove "bw.shop" and "bw.upgrades" from permissions of player
 
Using PermSk:

Code:
on region enter:
    wait tick
    if player is in region "red_aetius" or "blue_aetius":
        add "bw.shop" and "bw.upgrades" to permissions of player
    else:
        remove "bw.shop" and "bw.upgrades" from permissions of player

Your skript dont work, any way to fix?

1711149498020.png