I am currently working on a custom chat module. It’s gonna have custom commands, and a whole lot of other things.
Current commands I have in mind:
/chatcolor
/chatnamecolor
/charactername
/chatname
/globalname
Explanation:
/chatcolor changes your chat color
/chatnamecolor changes your name color in the chat, for example:
“[Player]: sampleText”
it would change the color of Player
/charactername changes the name of your character, puts a name above your character
/chatname changes your name in the chat
/globalname changes your name in the chat and above your character.
How they would be used:
/chatcolor blue
/chatnamecolor red
/charactername noob
/chatname guest
/globalname bacon
Current script:
local function Run(ChatService)
local Channel = ChatService:AddChannel("Main Chat")
local Util = require(script.Parent:WaitForChild("Util"))
Channel.AutoJoin = true
Channel.WelcomeMessage = "Welcome to "..game.Name.."! For custom chat commands, type /chatCommands"
local function onSpeakerJoined(speakerName)
Channel:SendSystemMessage(speakerName.." has joined the game.")
end
local function onSpeakerLeave(speakerName)
Channel:SendSystemMessage(speakerName.." has left the game.")
end
local function chatColor(speakerName, message, channelName)
if string.sub(message, 1, 14) == "/chatcolor red" then
speakerName:SetExtraData("ChatColor",Color3.fromRGB(255, 0, 0))
return true
elseif string.sub(message, 1, 15) == "/chatcolor blue" then
speakerName:SetExtraData("ChatColor",Color3.fromRGB(0, 0, 255))
return true
elseif string.sub(message, 1, 16) == "/chatcolor white" or string.sub(message, 1, 17) ==
"/chatcolor normal" then
speakerName:SetExtraData("ChatColor",Color3.fromRGB(255, 255, 255))
return true
elseif string.sub(message, 1, 17) == "/chatcolor yellow" then
speakerName:SetExtraData("ChatColor",Color3.fromRGB(255, 255, 0))
return true
elseif string.sub(message, 1, 16) == "/chatcolor green" then
speakerName:SetExtraData("ChatColor",Color3.fromRGB(0, 255, 0))
return true
elseif string.sub(message, 1, 17) == "/chatcolor purple" then
speakerName:SetExtraData("ChatColor",Color3.fromRGB(61, 21, 133))
return true
end
return false
end
ChatService:RegisterProcessCommandsFunction("chatColor", chatColor)
game.Players.PlayerAdded:Connect(onSpeakerJoined)
game.Players.PlayerRemoving:Connect(onSpeakerLeave)
end
return Run
Reply with more commands or if I could change the format of a few commands or the script.
Edit: I’ve made a typing notice and a custom chat bubble. Here are both of those things:
robloxapp-20201011-1338007.wmv (3.5 MB)