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.