I'm assuming 'Fans' tag is still working but not for 'VIP' tag this is because I tested your script. I think the reason is this line ( line 8-14 in your post ):
if plrs[plr]:IsInGroup(groupId) then
speaker:SetExtraData('NameColor', Color3.fromRGB(0, 255, 178))
speaker:SetExtraData('Tags', {{TagText = plrs[plr]:GetRoleInGroup(groupId), TagColor = Color3.fromRGB(255, 37, 37)}})
elseif game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plrs[plr].UserId,11925428) then
speaker:SetExtraData('NameColor', Color3.fromRGB(253, 255, 79))
speaker:SetExtraData('Tags', {{TagText = "VIP", TagColor = Color3.fromRGB(255, 255, 0)}})
end
First if statement checks if you are in the group and second if statement checks if you own VIP gamepass.
Problem: First if statement checks if you are in the group, if so then your 'elseif statement' won't run.
What you need to do is to change it to an if statement.
Example Code: ( I organize the code a little bit so it's easier to read with your actual groupId )
local plrs = game.Players
local sss = game.ServerScriptService
local CSR = sss:WaitForChild("ChatServiceRunner")
local groupId = 7870490
local chatService = require(CSR:WaitForChild('ChatService'))
chatService.SpeakerAdded:Connect(function(plr)
local player = plrs[plr]
local Tags = {
{{
TagText = player:GetRoleInGroup(groupId),
TagColor = Color3.fromRGB(255, 37, 37)
}},
{{
TagText = "VIP",
TagColor = Color3.fromRGB(255, 255, 0)
}}
}
local speaker = chatService:GetSpeaker(plr)
if player:IsInGroup(groupId) then
speaker:SetExtraData('NameColor', Color3.fromRGB(0, 255, 178))
speaker:SetExtraData('Tags', Tags[1])
end
local MPS = game:GetService("MarketplaceService")
local ownGamepass = MPS:UserOwnsGamePassAsync(player.UserId, 11925428)
if ownGamepass then
speaker:SetExtraData('NameColor', Color3.fromRGB(253, 255, 79))
speaker:SetExtraData('Tags', Tags[2])
end
end)
2 comments
Both tags don't work?
Wait I just reazlied your groupId is invalid