“AllUserFriends” is if you want to give similar tags to all that user’s friends
Accepts ‘User ID’ in the value:
“Gamepasses” is if any user has that gamepass they will get the same tags
Accepts ‘Gamepass ID’ in the value:
“Groups” is if any user joined the specified group they will get the same tags
Accepts ‘Group ID’ in the value:
“UserIds” is for the specified user and only they will get the tags (even if they changed their name)
Accepts ‘User ID’ in the value:
“UserNames” is also for the specified user, but if they changed their name they will lose their tags
Accepts ‘User Name’ in the value:
How to use it?
You will have these files in each folder:
Every User has their own file that can be renamed to any name (Ex: their name) to have another user simply duplicate the user file, its this file in each folder:
To apply the tags to them you need to enter their details in the value from the properties:
The ‘Tags’ folder contains all the user/gamepass/group ‘tags’ that can be duplicated to give the users multiple tags:
To change the tag name just change the name from the properties or by renaming the file of each tag (I intended to make the tags work by their names instead of value to make it easier for developers to know each user tags by their names):
Each tag has inside it a color value to change the tag color as needed (Don’t change the name!):
.
(things that are not available in the new chat system):
You can also change the text of the user message color (Don’t change the name!):
Lastly, you can change the user name color in the chat (Don’t change the name!): ---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
Custom Chat Tags (for New Chat Service):
Put the script in here: ---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
If you have any questions ask me I will try to help.
Don’t wanna be rude, but nobody’s gonna get a model if they dont know how it works. you should at least put a few photos or just a video of how it works, nobody knows if its safe to use or not.
It’s fine now! I am not sure if I was doing anything wrong but I could not get the New Chat System to work with the newer chat. I swapped to the Legacy Chat Version and it was fine!
Hey Qudo, I took a look at your code and have some feedback for you to help you improve your system. First let me say, I think it’s awesome that you created this using the Roblox ChatService and are willing to allow others to use it.
You’ve got a lot of repeated code blocks for different types of checks (friends, game passes, groups, user IDs, and usernames). You could make this code cleaner and more efficient by creating a function to handle these checks. This would also make it easier to maintain in the future.
For Example:
local function applyUserExtras(Speaker, user)
local tags = {}
if user:FindFirstChild("NameColor") then
Speaker:SetExtraData("NameColor", user.NameColor.Value)
end
if user:FindFirstChild("ChatColor") then
Speaker:SetExtraData("ChatColor", user.ChatColor.Value)
end
if user:FindFirstChild("Tags") then
for _, tag in pairs(user.Tags:GetChildren()) do
table.insert(tags, {TagText = tag.Name, TagColor = tag.Color.Value})
end
Speaker:SetExtraData("Tags", tags)
end
end
You’re also using loops with breaks inside, which might not be the most efficient way to achieve your goals. You could optimize this by using functions like pairs to iterate over tables and use early returns instead of breaks to exit the loop when the desired condition is met.
For use in larger games, your code may be a little slow since it’s so linear. You could look into ways to optimize this for performance using data structures like dictionaries might help.
I hope these suggestions prove valuable in improving your system. Keep up the great work, and don’t hesitate to reach out if you have any questions.
Thank you Blaze for the suggestion, I know my code isn’t the best and always can be improved, but that was my level at that time.
Also, this code meant to run once when you join, so I don’t think it will make big difference to optimize it, but I will take your consideration in mind and if I was empty I’ll change it and take your help
Since model reviews insisted that it doesn’t work (and it’s not my mistake they didn’t read that there are two versions) I added warning in each model that notify you if your chat service is in the wrong version.