So, I have the script that makes a chat, but I don't know how to make it where you can make custom messages when you're name is right (I've got this) but also randomly generated ones every 60 seconds...
To make the chat :/
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = "Matter maketh man"; Color = Color3.new(0,0,0); Font = Enum.Font.SourceSansBold; FontSize = Enum.FontSize.Size24; })
Random messages -- Color
local messages = { ["Remember to thumbs up and favorite!"] = true, --255, 255, 224 ["Don't spam or be banned!"] = true, --0,0,0 ["Want mod or admin privileges, join the group!"] = true, --135, 206, 235 ["Remember, we drive on the LEFT of the road!"] = true, --255, 255, 224 ["Remember to enjoy yourself."] = true -- 135, 206, 235 }
To get a random entry from an array, use math.random
with the length of the table.
local randomMessage = messages[math.random(#messages)]
To put that into a message, it's the same thing.
Text = messages[math.random(#messages)]
To do it every 60 seconds, just put it in an infinite while loop with a wait(60) following your SetCore
Edit:
To do it with the color, you'll need to put the colors in an array too, or put the stuff in arrays of arrays.
Example:
messages = { {"One little piggy went to market", Color3.new(0,0.5,1)}, {"Give the dog a bone", Color3.new(1,0.5,0)}, {"etc etc", Color3.new(0,0,0)} }
Then, to get the random message and accompanying color, just choose a random entry
local random = messages[math.random(#messages)]
And then plug that into your code
Text = random[1], Color = random[2]