durability 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 community!

    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.
You can't do the same durability bar, but you can put it in the lore with this function (which requires skquery and bensku fork)
code_language.skript:
function dura(d: number, l: integer = 16, b: boolean = true) :: string:
  set {_c} to round(({_l} / 100) * round({_d}))
  set {_r} to ""
  loop {_c} times:
    set {_r} to "%{_r}%<green>|<reset>"
  set {_l::*} to split {_r} at ""
  loop {_l::*}:
    if loop-value is not "|":
      delete {_l::%loop-index%}
  loop {_l} - size of {_l::*} times:
    set {_r} to "%{_r}%<red>|<reset>"
  return (check [{_b} is true] ? "<dark grey>[<reset>%{_r}%<dark grey>]" : {_r})
 
Status
Not open for further replies.