Chat Tags - Open Source For Gamepass/Group Ranks

Hello DevForum,

I spent a little while today making a script easily customisable for chat tags, this could potentially be useful to some of you guys as a way to learn scripting and add something cool to your game at the same time. This script allows you to add custom chat tags and colours for gamepasses and group ranks.

I have tried to comment as much of it as possible to explain the purpose and to try and show you how to format it to add a new gamepass/rank etc. If this is not clear enough I will attempt to explain below.

Grab the model:
(23) Chat Tags - Can Ungroup - Roblox

Add a new gamepass tag

Adding a new gamepass tag is pretty simple, firstly navigate to the main script.

Now we are going to want to find the table called “gamepassTags”

We can delete the example if needed.

The green commented off example shows the format of the needed gamepass table, by using that format open some curly brackets “{}” and inside type what the format tells you. So that is as follows {Tag Text, Gamepass ID, Colour, Weight (Weight is whether the tag will override basically, say we have owner at 3 and head admin at 2 owner will be picked as the tag because it has a higher weight)}.

If we exit now and play test we should see that if you own the inputted gamepass and it has a higher weight than any of the other tags, that when you send a message, you should have a tag in front of your name.

image

Something like above.

Adding multiple new gamepass behind the old ones

Firstly, we are going to want to find where the last entry in the table is.

We can see the green is commented out so it is not included in out table, so before the two “–” we should put a comma, this shows a new entry. Then we are going to want to open a pair of curly brackets “{}” and inside these, follow the template of {Tag Text, Gamepass ID, Colour, Weight}

Then we can playtest, if the gamepass is owned and the weight is higher than any other tag the user is capable off then it should show up in the chat.

image

Add a new group rank tag

To add a new group rank tag it is very similar to adding a new gamepass tag except it is a different format as we have to include the group rank needed.

The new group ranks format is as follows {Tag Text, Group ID, Colour, Weight, Group rank number (for example 255 would be the groups owner)}

As you can see the only two differences are the “Group ID” which is self explanatory and the “Group rank number field” which is extra at the end (after weight).

Troubleshooting

Tags aren’t being given? / Wrong tag

Make sure you have no two ranks/gamepass with the same weight as this will cause which ever ones listed first in the table to be chosen.

Make sure there is no mistakes in the format of the added tables

Make sure you haven’t forgot commas after each new entry,

Make sure that you ACTUALLY have the gamepass or rank in group!

If you can still not get it working, I understand my explanations are very poor! Please leave a comment below and I will try help you out!

Thank you for reading, I know it’s nothing major but really wanted to post a community tutorial and look forward to doing so again in the future.

19 Likes

This is useful for my game!
its great.

1 Like

Glad I’ve helped you out! If you need any support please feel free to let me know!

I appreciate trying to make it easier for others to do their own chat tags, but this is pretty much just checking MarketplaceService and IsInGroup to apply ExtraData for Roblox’s default chat which is already commonly known and easy to set up. Plenty of Devforum posts on this topic, as well as youtube tutorials. Anyone could also go to the developer page for it here:

I came to this thread thinking you had your own system in place when in fact its just putting A + B together when most devs do this already but in their own way.

1 Like

Sorry to disappoint you… I just thought some people may find it useful as it’s offering a free model with no viruses at all which is commented out to try and explain each bit.

You didn’t necessarily disappoint me as I welcome all who make resources for other developers, its just a simple devforum search for “Chat Tags” will provide all of what you have provided, and more! (Rainbow gradient text for example)

1 Like

Oh, okay sorry. I didn’t realise I will withdraw the post.

@Pyxrien Where do i put it? I am new to scripting and have tried literally 4 other on scripts on this :sob:

Must go in ServerScriptService