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!

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

Solved Scoreboard / Sidebar

Discussion in 'Requests' started by DankAlzein_BOII, Jun 18, 2020.

  1. DankAlzein_BOII

    DankAlzein_BOII New Member

    Joined:
    Apr 23, 2020
    Messages:
    7
    Likes Received:
    0
    Category: Scoreboards / Sidebars

    Suggested name: doesn't matter.

    Spigot/Skript Version:

    What I want:
    so i have an OP prisons server, and i want a scoreboard for it. i searched on here & found some older requests with scoreboard skripts, tho i couldn't really get them to work, i always met some random issues which i couldn't really fix, so i'm kindly asking if anyone can get me this skript.
    What i basically want it to do, is, Show a scoreboard with 9 lines(+title)
    title would be "titletext" so i can edit it later to whatever i want.
    line 9 = "&dTokens: &3 %{Tokens.%player's uuid%}%"
    line 8 = "" # blank
    line 7 = "&cLevel tokens: &3%{LTokens.%player's uuid%}%"
    line 6 = "" # blank
    line 5 = "&5Blocks mined: &3{Mined.%player's uuid%}%"
    line 4 = "" # blank
    line 3 = "&eLevel: &3%{Level.%player's uuid%}%"
    line 2 = "" # blank
    line 1 = "&6Rebirth: &3%{Rebirth.%player's uuid%}%"

    the scoreboard should normally update every 30 ticks (1.5 seconds)
    Ideas for commands:
    n o n e
    Ideas for permissions:
    n o n e
    When I'd like it by: doesn't really matter.
     
  2. Best Answer:
    Post #2 by Dave, Jun 19, 2020
  3. Dave

    Dave Active Member

    Joined:
    Jul 20, 2018
    Messages:
    228
    Likes Received:
    9
    The scoreboard starts from 0 = 1 to 8 = 9
    Addon: SkRayFall https://forums.skunity.com/resources/skrayfall.259/
    Code (Text):
    1. on join:
    2.     wipe player's sidebar
    3.     wait 1 tick
    4.     set name of sidebar of player to "&6&lOP Prison"
    5.     create id score "&dTokens: &3%{Tokens.%player's uuid%}%" in sidebar of player to 8 with id "line8-%player%"
    6.     create id score "&1" in sidebar of player to 7 with id "line7-%player%"
    7.     create id score "&cLevel tokens: &3%{LTokens.%player's uuid%}%" in sidebar of player to 6 with id "line6-%player%"
    8.     create id score "&2" in sidebar of player to 5 with id "line5-%player%"
    9.     create id score "&5Blocks mined: &3%{Mined.%player's uuid%}%" in sidebar of player to 4 with id "line4-%player%"
    10.     create id score "&3" in sidebar of player to 3 with id "line3-%player%"
    11.     create id score "&eLevel: &3%{Level.%player's uuid%}%" in sidebar of player to 2 with id "line2-%player%"
    12.     create id score "&4" in sidebar of player to 1 with id "line1-%player%"
    13.     create id score "&6Rebirth: &3%{Rebirth.%player's uuid%}%" in sidebar of player to 0 with id "line0-%player%"
    14.     wait 1.5 seconds
    15.     while player is online:
    16.         update score with id "line8-%player%" to "&dTokens: &3%{Tokens.%player's uuid%}%" and 8
    17.         update score with id "line6-%player%" to "&cLevel tokens: &3%{LTokens.%player's uuid%}%" and 6
    18.         update score with id "line4-%player%" to "&5Blocks mined: &3%{Mined.%player's uuid%}%" and 4
    19.         update score with id "line2-%player%" to "&eLevel: &3%{Level.%player's uuid%}%" and 2
    20.         update score with id "line0-%player%" to "&6Rebirth: &3%{Rebirth.%player's uuid%}%" and 0
    21.         wait 1.5 seconds
    22.  
    23. on quit:
    24.     wipe player's sidebar
    25.     loop 9 times:
    26.         remove score with id "line%loop-number -1%-%player%"
     
  4. DankAlzein_BOII

    DankAlzein_BOII New Member

    Joined:
    Apr 23, 2020
    Messages:
    7
    Likes Received:
    0
    thanks alot mate, really helped.
     
  5. Dave

    Dave Active Member

    Joined:
    Jul 20, 2018
    Messages:
    228
    Likes Received:
    9
    you're welcome1!!
     

Share This Page

Loading...