1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

World Skripts!

Discussion in 'Skript' started by TheCringleYT, Oct 10, 2019.

Thread Status:
Not open for further replies.
  1. TheCringleYT

    TheCringleYT Well-Known Member

    Joined:
    Sep 29, 2019
    Messages:
    121
    Likes Received:
    3
    Hey,

    How could I only run 'kit.sk' in the world 'KitPvPMap1' for example you get to fly in a lobby... But you can't fly in a survival world!

    Answers greatly appriciated,

    - TheCringleYT
     
  2. ShaneBee

    Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,172
    Likes Received:
    180
    I recommend spending some time reading over the docs before asking questions here.
    The docs have PLENTY of things that will answer most of your questions.
    Ex: You can check the world of the player in commands/events to make sure only to fire effects if the player is in a specific world.
     
  3. TheCringleYT

    TheCringleYT Well-Known Member

    Joined:
    Sep 29, 2019
    Messages:
    121
    Likes Received:
    3
  4. GamingHard

    GamingHard Member

    Joined:
    Oct 5, 2019
    Messages:
    17
    Likes Received:
    0
    I havent really tested it but i hope it works:

    Code (Text):
    1. command /fly:
    2.     trigger:
    3.         if player is in world "hub":
    4.             if {fly.%player%} is true:
    5.                 set {fly.%player%} to false
    6.                 message "&cYou have disabled flight."
    7.                 set player's flight mode to true
    8.                 stop
    9.             if {fly.%player%} is false:
    10.                 set {fly.%player%} to true
    11.                 message "&aYou have enabled flight."
    12.                 set player's flight mode to false
    13.                 stop
    14.        
    15.         if player is in world "survival":
    16.             message "&cSorry, but you are not allowed to fly here!"
    17.            
    18.            
    19. on world change:
    20.     set {fly.%player%} to false
     
  5. TheCringleYT

    TheCringleYT Well-Known Member

    Joined:
    Sep 29, 2019
    Messages:
    121
    Likes Received:
    3
    Thanks! Sorry late reply <3
     
Thread Status:
Not open for further replies.
Loading...