#VIP name and title
1 messages · Page 1 of 1 (latest)
For the chat tags, have a look at the VIP demo here
in that thing it need to be pressed to be vip and i got shop and when someone buy vip i want to let have vip thing in chat immediately
then change it to use :UserOwnsGamepassAsync
--!strict
local TextChatService = game:GetService("TextChatService")
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local gamepassId = 1234 -- Replace with your gamepass!
TextChatService.OnIncomingMessage = function(message: TextChatMessage)
local props = Instance.new("TextChatMessageProperties")
if message.TextSource then
local player = Players:GetPlayerByUserId(message.TextSource.UserId)
local hasGamepass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamepassId) -- Check if user owns the gamepass
if hasGamepass then
props.PrefixText = "<font color='#F5CD30'>[VIP]</font> " .. message.PrefixText
end
end
return props
end
idk why but still dont working