I was wondering how to add multiple chat colors for multiple game passes, example: if somebody owns the Orange game pass, then they get a Orange tag. and if the same person buys Blue tag, then the Orange tag is deleted and replaced with Blue tag. here is my script:
local gamepassId = 8560723
admins = (player.UserId, gamepassId))
admins2 = (player.UserId, gamepassId2)
ChatTextColor = 'New Yeller'
NameColor = 'New Yeller'
for i,who in pairs (admins) do
game.DescendantAdded:Connect()(function(a)
pcall(function()
if a.ClassName=='TextButton' then
local b = a
if string.find(b.Text,who..']') then
if ChatTextColor ~= '' then
b.Parent.TextColor=BrickColor.new'New Yeller'
end
end)
end)
end)
end)
end
Other gamepass id: 9001929

1 comment
Nevermind, i fixed it. here is the fixed script