VIP Chat for certain players

VIP chat for certain players

Recently I worked with over devs on making a VIP chat, sometimes we will give this away for free and I would like to give this to the chairman and other high ranks. How would I go about adding their names to the script whilst ensuring people who own the gamepass still get it.

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

--//Gamepass ID

local GamePassIDs = {
VIP = 9721593, -- your gamepassid

}

--//Events

ChatService.SpeakerAdded:Connect(function(PlayerName)
local Speaker = ChatService:GetSpeaker(PlayerName)
local ActualPlayer = Players:FindFirstChild(PlayerName)
if MarketPlaceService:UserOwnsGamePassAsync(ActualPlayer.UserId , GamePassIDs.VIP) then
    Speaker:SetExtraData("ChatColor", Color3.fromRGB(255, 215, 0)) --changes textcolor, if you need this.
    Speaker:SetExtraData("Tags", {{
        TagText = "VIP", --As it says, the tagtext
        TagColor = Color3.fromRGB(255, 215, 0) --the tagcolor
    }})
end
end)

Hope to get some help.

If all you are wanting to do is add them in the code, I suggest making a table and checking if the players UserId is in the table like this.

local UserIds = {
	0000, 1111
}

if MarketPlaceService:UserOwnsGamePassAsync(ActualPlayer.UserId , GamePassIDs.VIP) or table.find(UserIds, ActualPlayer.UserId) then
	-- Do stuff
end

Thanks. Marked as solution (30 characters)