I want to make a premium player chat tag but we i joined the game it does not work
P.S I have premium
local serverScriptService = game:GetService("ServerScriptService")
local chatService = require(serverScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local players = game:GetService("Players")
local Premium = game.Workspace:WaitForChild(player.Name).Head
--Chat Settings
chatService.SpeakerAdded:Connect(function(PlrName)
local Speaker = chatService:GetSpeaker(PlrName)
for _, v in pairs(Premium) do
if Players[PlrName].Name == v then
Speaker:SetExtraData('Tags', {{TagText = "Premium", TagColor = Color3.fromRGB(255, 255, 127)}})
end
end
end)
local serverScriptService = game:GetService("ServerScriptService")
local chatService = require(serverScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local players = game:GetService("Players")
local Premium = game.Workspace:WaitForChild(player.Name).Head
--Chat Settings
chatService.SpeakerAdded:Connect(function(PlrName)
local Speaker = chatService:GetSpeaker(PlrName)
for i, v in pairs(Premium:GetChildren()) do
if Players[PlrName].Name == v then
Speaker:SetExtraData('Tags', {{TagText = "Premium", TagColor = Color3.fromRGB(255, 255, 127)}})
end
end
end)
local Players = game:GetService("Players")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
if player.MembershipType == Enum.MembershipType.Premium then
local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillboardGui") --
local clonedgui = billboardgui:Clone()
clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
clonedgui.TextLabel.Text = "Premium"
clonedgui.TextLabel.TextColor3 = Color3.fromRGB(231,206,12)-- Pick a fromRBG or Color3
local serverScriptService = game:GetService("ServerScriptService")
local chatService = require(serverScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local players = game:GetService("Players")
local Premium = {'RedDevED'}
--Chat Settings
chatService.SpeakerAdded:Connect(function(PlrName)
local Speaker = chatService:GetSpeaker(PlrName)
if Players[PlrName].Name == v then
Speaker:SetExtraData('Tags', {{TagText = "Premium", TagColor = Color3.fromRGB(255, 255, 127)}})
end
end)
end
end
end)
end)