Mining Progress Bar

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Mattllama987

Active Member
Aug 5, 2018
225
7
18
24
Hello everyone! I have a question. How can i get this to level up my pick after i mined 100 blocks? But each time it levels up the pick, the amount of blocks to mine would go up by x5 or something. Im a little confused on how i can do this. If anyone know how to do this, please let me know asap!

Thanks!
~Matt

Code:

Code:
on break:
    set {_bar} to progressBar(10, 50, "|", 50)
    set line 8 of lore of player's held item to "&c%{_bar}%"
function progressBar(currentValue: number, total: number, barChar: string = "|", barLength: integer = 20) :: string:
    loop {_barLength} times:
        set {_r} to "%{_r} ? """"%%{_barChar}%"
    return ("&a%subtext of {_r} from indices 1 to (({_currentValue} / {_total}) * {_barLength} * (length of {_barChar}))%&c%(subtext of {_r} from indices (({_currentValue} / {_total}) * {_barLength} * (length of {_barChar}))+1 to (length of {_r})) ? """"%")
 
This method you need to update, i'd suggest storing a variable to go into currentValue and increase that
Yeah, i could do that. But im having a level system for every pick. Each pick would have their own level ups. I would have to use local variables. Im just a little confused on how i could get this to work
 
Status
Not open for further replies.