2 Chat Tags in different Types

Greetings Developers,

I just started with developing on my game and I would like to ask if there is a way to combine 2 Chat Tags with different Types. 1 Tag is based of a Group and the other Tag is based of a Gamepass. So that it displays both tags for a player even if these are different types of Tags.


Maybe this post could help -

Im actually looking for something else. A script where the Group will automatically give the Name Tag for the Player based on Rank combined with the Gamepass Name Tag.

Are you asking for two tags at once, or just a special tag if you are both in the group and own a gamepass?

If you are asking about a special tag for having both, then I’ve solved a similar problem before. You can find it here:

If you are asking about having two different tags, then you can follow the above solution but instead of the “Ultra VIP” thing that was there, replace the code with Speaker:SetExtraData("Tags", {{TagText = "VIP Owner", TagColor = Color3.fromRGB(26, 129, 255)}, {TagText = "Group Member", TagColor = Color3.fromRGB(255, 0, 0)}}) or something of the similar.

Two Different Tags Example

image

1 Like

Well yea im asking for the special tag. Im a beginner at scripting so I don’t really know what to do with that script because it doesn’t include the group chat tag.

You could do something similar to this:

-- Variables --

local ServerScriptService = game:GetService("ServerScriptService")
local ChatService = require(ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))

local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")

-- Variables --

local GamepassId = 1234567890
local GroupId = 1234567890

-- Tables --

local RankInfo = {
	[1] = {
		Text = "Visitor",
		TextSpecial = "Ultra Visitor",
		Color = Color3.fromRGB(97, 255, 49)
	},
	[5] = {
		Text = "Experienced",
		TextSpecial = "Experienced Supporter",
		Color = Color3.fromRGB(255, 255, 0)
	}
}

-- Scripting --

ChatService.SpeakerAdded:Connect(function(PlayerName)
	local Speaker = ChatService:GetSpeaker(PlayerName)
	local Player = Speaker:GetPlayer()

	local OwnsGamepass = false--MarketplaceService:UserOwnsGamePassAsync(Player.UserId, GamepassId)
	local GroupRank = Player:GetRankInGroup(GroupId)

	if RankInfo[GroupRank] then
		local Info = RankInfo[GroupRank]
		Speaker:SetExtraData("Tags", {{TagText = if OwnsGamepass then Info.TextSpecial else Info.Text, TagColor = Info.Color}})
	elseif OwnsGamepass then
		Speaker:SetExtraData("Tags", {{TagText = "Supporter", TagColor = Color3.fromRGB(35, 255, 255)}})
	end
end)
When owning the gamepass and having rank 5 in group

image

When owning the gamepass and having rank 1 in group

image

When owning the gamepass and doesn't have an appropriate rank (or isn't in the group)

image

When having rank 5 in group

image

When owning the gamepass and having rank 1 in group

image

When you have neither the gamepass nor are you in the group (or have an appropriate rank)

image

I can’t really help you any further. You’ll have to figure how you want to structure it on your own. You could automate the rank names somehow, but the script I showed you is for the customization sake. Text is the normal text without the gamepass and TextSpecial is with the gamepass.

1 Like

Hm, Alright. I will try then to structure it on my own.

The only structure that will probably change is how you determine the names. The rest should look somewhat similar. Also, if that reply solved your problem, make sure to mark it as a solution so future people can find the answer right away.

Well yea thats actually not really what Im looking for. And I can’t really structure it on my own, because im a beginner at scripting. I mainly trying to find something where you will rank tag automatically from the group based on the rank name from the group which will be you’re Chat Tag then. Combined with the Gamepass Chat Tag.

It’s actually the same as from the game “Arsenal” thats what im perfectly looking for. In that game you get a crown emoji if you own the gamepass and automatically you’re name tag based on the rank name or only 1 of the tags if you aren’t in the Group / Own the Gamepass.

My approach utilizes group rank IDs instead of names as it is more efficient. I unfortunately am not home right now so I cannot link you to appropriate sources, but I recommend you look on the documentation for ways to get the group name and co pare that instead.

Could you possibly send some examples of this? I haven’t really seen this in action. Once I’m back, I’ll see if I can help you with it.

Well yea as you can see the images I linked in my message. There is already a script where you can automatically get the rank name of the group. Just not combined with the gamepass chat tag.

Okay thank you. I will send some examples.

Here is a example from my own game:
Automatically received the chat tag based on the rank name on my roblox group.
Other members that are in my group would receive a another chat tag name because of their different rank. As a example: [Moderator] [Inclides]

Well so I just need a script combined with a group chat tag (which will automatically be given based on the rank name) and a gamepass chat tag at once.

Screenshot (122)

I’m pretty sure this solution is the one you’re looking for

1 Like

I kind of get what you mean, but having custom icons isn’t really possible with the default Lua chat. Arsenal uses a custom chat and therefore can manipulate it anyway they like. The best you can do is use emojis in this scenario. Here is a modified code for that:

-- Variables --

local ServerScriptService = game:GetService("ServerScriptService")
local ChatService = require(ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))

local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")

-- Variables --

local GamepassId = 1234567890
local GroupId = 1234567890

-- Scripting --

ChatService.SpeakerAdded:Connect(function(PlayerName)
	local Speaker = ChatService:GetSpeaker(PlayerName)
	local Player:Player = Speaker:GetPlayer()

	local OwnsGamepass = MarketplaceService:UserOwnsGamePassAsync(Player.UserId, GamepassId)
	local GroupRank = Player:GetRoleInGroup(GroupId)
	
	local Text = "???"
	
	if OwnsGamepass and GroupRank ~= "Guest" then
		Text = "👑 "..GroupRank
	elseif GroupRank ~= "Guest" then
		Text = GroupRank
	elseif OwnsGamepass then
		Text = "👑"
	else
		return
	end
	
	Speaker:SetExtraData("Tags", {{TagText = Text, TagColor = Color3.fromRGB(53, 161, 255)}})
end)
Gamepass + Rank

image

Rank

image

Gamepass

image

Default

image

If you want the color to be persistent throughout, then I recommend you change the if-statement section to this:

	local Text = "???"
	
	if OwnsGamepass and GroupRank ~= "Guest" then
		Text = "👑 "..GroupRank
	elseif GroupRank ~= "Guest" then
		Text = GroupRank
	elseif OwnsGamepass then
		Text = "👑"
	else
		return
	end
	
	Speaker:SetExtraData("Tags", {{TagText = Text, TagColor = Color3.fromRGB(53, 161, 255)}})

Thank you, that was the solution I was really looking for! Still thanks to @Batimius who was trying to help for this problem!

2 Likes