Solved Can you help me with my bossbar? :D

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

Hello everyone,

First of all, thank you for taking the time out of your day to read this! Anyways let me get on with the request :emoji_grinning:

Category: Bossbar / Requests

Suggested name: Bossbar

Spigot/Skript Version: I don't mind, write it on anything you want :emoji_slight_smile:

What I want:
Hello, could you make me a bossbar similar to this: (Found this on the internet)

https://hypixel.net/attachments/upload_2018-6-23_12-56-50-png.937853/
search


It would stay up for around 10 - 30 seconds and change to something like 'Check out our new discord!' and then back and forth, you get the idea.

Thank you very much.

Ideas for commands: I mean, if your feeling REALLY helpful you could make me a command like /bossbar set [<text>] [<number>] that would set a bossbar with the string you inserted on arg-1 and arg-2 in seconds (for how long It stays up or something)

Ideas for permissions: N/A

When I'd like it by: A reasonable time I suppose :emoji_grinning:
 
Give me some time, i will fix it for you.
[doublepost=1589145054,1589143449][/doublepost]
Code:
on join:
    loopBossbar(player)

function loopBossbar(p: player):
    set {_u} to {_p}'s uuid
    create bossbar titled "&e&lPlaying &f&lBEDWARS &eon &a&lMC.MYSERVER.COM" and id "info.%{_p}'s uuid%" for {_p} with progress 100 with colors white
    wait 5 ticks
    loop 100 times:
        set {_Value} to value of bossbar "info.%{_p}'s uuid%"
        remove 1 from {_Value}
        set bossbar "info.%{_p}'s uuid%" value to {_Value}
        wait 2 ticks
    remove bossbar "info.%{_p}'s uuid%"
    loopBossbar2({_p})

function loopBossbar2(p: player):
    set {_u} to {_p}'s uuid
    create bossbar titled "&e&lPlaying &f&lSKYWARS &eon &a&lMC.MYSERVER.COM" and id "info2.%{_p}'s uuid%" for {_p} with progress 100 with colors white
    wait 5 ticks
    loop 100 times:
        set {_Value} to value of bossbar "info2.%{_p}'s uuid%"
        remove 1 from {_Value}
        set bossbar "info2.%{_p}'s uuid%" value to {_Value}
        wait 2 ticks
    remove bossbar "info2.%{_p}'s uuid%"
    loopBossbar({_p})

This should work :emoji_wink: