if else

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

  1. H

    'Else if' glitch

    I'm trying to make code that when you spawn in for the first time, you get an item. But it keeps on saying that "'else' has to be placed just after an 'if' or 'else if' section" on first join: set {_Number} to a random integer between 1 and 6 if {_Number} is 1: give player...
  2. G

    Execute skript the entire time that more than 15 players are online.

    This is for a random item drop skript. I want to make sure that it only works while the server is active, with more than 15 players online, I've looked for a while but can't seem to find anything that works properly. every 3 minutes: execute console command "consolecommand" stop...
  3. V

    Cant figure out where to put "else"

    I want to put else: send "&cYou cannot afford this item!" for both ifs in this code but i cannot figure out how to do it (im using TuSke although it might not matter bcuz its just if and else) if {balance::%uuid of player%} > 149: remove unbreakable shears of efficiency 3 named "&7Shears...
  4. L

    Freez skript not working :(

    Hello, I want to make a "freeze" skript for my server. So if {sch} is true it should freez all players. Does anyone know why it is not working? options: version: 1.0 variables: {freez} = "true" on any movement: if {freez} is "true": play sound...
  5. mmaalex22112

    Solved Region name not being recognized properly.

    Hey all. For some reason, for the life of me I can't get this to work. I'm only ever getting the message one triggered. It seems like it is only reading the pk1 part of the name. on region enter: if "%region at player%" is "%{pk1_mine}%": if {pk1_mine.%player%} is true...
  6. J

    Solved Vanilla GUI If player has item

    Im trying to make it so when a player clicks on the gui item, it "upgrades" the current item. Im using vanilla GUIS. Nothing happens when the item is clicked. on inventory click: if event-slot is wooden pickaxe named "&8Wooden &7Pickaxe &8[&e2&8]": if player has 128 coal: give...
  7. ItsMCB

    > 1001 Not working?

    Why is my code allowing the user's pickaxe level to go over 1000? I have looked this up and it seems like I'm doing the right thing. on mine: if player's tool is a pickaxe: if {_exp} > 1001: message "&cTOOL POWERUP OVERLOADED! &fYou should use your powerup (RIGHT CLICK)."...