Paste #135015: Unnamed Denizen Script Paste

Date: 2025/07/21 09:54:52 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


dialogTask:
  type: task
  debug: true
  definitions: sentence
  script:
    - define letters <[sentence].to_list>
    - define output ""
    - define font_start <&chr[F80C]><&chr[F80B]><&chr[F80A]><&chr[E001]><&chr[F80C]><&chr[F80B]><&chr[F80A]><&color[black]><&r>
    - define word_split <[sentence]>
    - define word_index 0
    - define char_count 1
    - define padding <&chr[F825]><&chr[F824]><&chr[F803]><&chr[F801]>
    - foreach <[letters]> as:char:
        - define current_word <[word_split.get[<[word_index].add[1]>]]>
        - define current_word_length <[current_word.length]>
        - if <[char_count]> == 1 || <[letters.get[<[char_count].sub[1]>]]> == " ":
            - define output <[output]><[char]>
            - define word_index <[word_index].add[1]>
        - else:
            - define output <[output]><[char]>
        - define pad <[padding].repeat[<[char_count]>]>
        - actionbar <[pad]><[font_start]><[output]> targets:<server.online_players> per_player
        - wait 0.08s
        - define char_count <[char_count].add[1]>