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.

Solved Specified Usernames In Commands

Discussion in 'Skript' started by ElementAstronaut, May 14, 2022.

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

    Joined:
    May 11, 2022
    Messages:
    11
    Likes Received:
    1
    I'm trying to make it so that anytime that anybody on the server clicks it, it will affect me. I can't figure out how to specify this though. The line of code that says, "set ElementAstronaut's max health to 10" is the one that I want to specify, but ElementAstronaut doesn't get recognized


    Code (Text):
    1. on inventory click:
    2.     if inventory name of player's current inventory is "&b&lRevive Menu":
    3.         cancel event
    4.         clicked slot is 9:
    5.             set ElementAstronaut's max health to 10
    6.             close player's inventory
    7.             loop all players:
    8.             send title "&4&lElementAstronaut &e&lHas" with subtitle "&e&lBeen &b&lRevived!" to player for 5 seconds
    9.             play sound "block.note_block.chime" at volume 10 at pitch 1 to player
    10.             play sound "block.note_block.chime" at volume 10 at pitch 1 to player
    11.             play sound "block.note_block.chime" at volume 10 at pitch 2 to player
    12.             play sound "block.note_block.chime" at volume 10 at pitch 3 to player
     
Thread Status:
Not open for further replies.

Share This Page

Loading...