ScrollBoard (A mouse scrolling scoreboard)

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

LimeGlass

VIP
Supporter ++
Regular Diner
Addon Developer
Jan 24, 2017
633
443
73
26
location of "LimeGlass" parsed as player
Basically this is a snippet that creates a scoreboard that will allow users to scroll and display multiple infomation

Example video:

Addons needed:

- SkellettBae

Raw code:

code_language.skript:
function ScrollBoardDeleteBoard(p: player):
    loop 15 times:
        delete the id based score "%{_p}%Slot%loop-number%" in stylish scoreboard "Scroll-%{_p}%"
    delete stylish scoreboard "Scroll-%{_p}%"
    delete {ScrollBoard::temp::%{_p}%::data}
on quit:
    ScrollBoardDeleteBoard(player)
on join:
    if stylish scoreboard "Scroll-%player%" exists:
        ScrollBoardDeleteBoard(player)
    add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
    create new stylish scoreboard named "Scroll-%player%"
    set title of stylish scoreboard "Scroll-%player%" to "&6&lScrollBoard"
    set stylish scoreboard of player to "Scroll-%player%"
    loop 15 times: #Size of the scroll board
        create a new id based score "%player%Slot%loop-number%" with text "%{_d::%loop-number%}%" slot loop-number for stylish scoreboard "Scroll-%player%"
    set {ScrollBoard::temp::%player%::data} to 0
    while player is online:
        wait a tick #Update time
        if {ScrollBoard::temp::%player%::data} < 0:
            if slot of id "%player%Slot1" < 1:
                set {ScrollBoard::temp::%player%::data} to 1
            else if slot of id "%player%Slot1" = 1:
                set {ScrollBoard::temp::%player%::data} to 0
        loop 15 times: #Size of the scroll board (Same as above)
            set {_size} to slot of id "%player%Slot%loop-number%"
            set the slot of id "%player%Slot%loop-number%" to {_size} + {ScrollBoard::temp::%player%::data}
        set {ScrollBoard::temp::%player%::data} to 0
on hotbar change:
    if new held slot > past held slot:
        if past held slot is 0:
            if new held slot is 8:
                subtract 2 from {ScrollBoard::temp::%player%::data}
        add 1 to {ScrollBoard::temp::%player%::data}
    else:
        if past held slot is 8:
            if new held slot is 0:
                add 2 to {ScrollBoard::temp::%player%::data}
        subtract 1 from {ScrollBoard::temp::%player%::data}