Solved ColorRandomizer

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

glowgrew

Active Member
Jan 26, 2017
99
7
0
Perm, Russia
Category: ChatDesign
Suggested name: ColorRandomizer

What I want: I would like a chat script, which making chat more colourful and simple. On every message it randomize the main color. It can be a function.

Ideas for commands: -
Ideas for permissions: -
When I'd like it by: -

@BrettPlayMC thanks for the form...
 
Like this?

code_language.skript:
function randomColor(x: int = 0) :: text:
    set {_} to "1|2|3|4|5|6|7|8|9|0|a|b|c|d|e|f"
    set {_x::*} to {_} split at "|"
    return "&%random element out of {_x::*}%"

on chat:
    cancel event
    broadcast colored "[%player%] %randomColor()%%message%"
 
  • Like
Reactions: glowgrew
Like this?

code_language.skript:
function randomColor(x: int = 0) :: text:
    set {_} to "1|2|3|4|5|6|7|8|9|0|a|b|c|d|e|f"
    set {_x::*} to {_} split at "|"
    return "&%random element out of {_x::*}%"

on chat:
    cancel event
    broadcast colored "[%player%] %randomColor()%%message%"
Thanks for idea! <3