local ChatService = game:GetService("TextChatService")
local PlayerService = game:GetService("Players")
local MarketService = game:GetService("MarketplaceService")
local GAMEPASS_VIP = 1511199989-- your gamepassids
local GROUP_ID = 517579167 -- your group id
local verifiedUserIds = {
1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890,-- Add
verified UserIDs
}
local patrolUserIds = {
1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890,
-- Add more patrol UserIDs
}
local function isUserVerified(userId)
for _, id in ipairs(verifiedUserIds) do
if id == userId then return true end
end
return false
end
local function isUserPatrol(userId)
for _, id in ipairs(patrolUserIds) do
if id == userId then return true end
end
return false
end
local function checkUserRole(player)
local rank = player:GetRankInGroup(GROUP_ID)
local roles = {
[255] = "<font color ='#ff0000'>[???]</font> ",
[254] = "<font color ='#ff0000'>[??]</font> ",
[200] = "<font color ='#55007f'>[??]</font> ",
[100] = "<font color ='#ffff00'>[?]</font> ",
[80] = "<font color ='#ffff00'>[?][RZ]</font> ",
[70] = "<font color ='#4b7bff'></font> ",
[60] = "<font color ='#ff66cc'>[??][HK]</font> ",
[50] = "<font color ='#ff66cc'>[??] [SK]</font> ",
[40] = "<font color ='#4b7bff'>[TOUR GUIDE]</font> ",
[1] = "<font color ='#55ff7f'></font> "
}
return roles[rank] or ""
end
local function ownsGamePass(player, passId)
local success, result = pcall(function()
return MarketService:UserOwnsGamePassAsync([Link], passId)
end)
return success and result
end
[Link] = function(msg)
local msgProps = [Link]("TextChatMessageProperties")
if [Link] then
local player = PlayerService:GetPlayerByUserId([Link])
if player then
local tagText = checkUserRole(player)
if ownsGamePass(player, GAMEPASS_VIP) then
tagText = "??[VIP]" .. tagText
end
if isUserVerified([Link]) then
tagText = "[? ]" .. tagText
end
if isUserPatrol([Link]) then
tagText = "[SECURITY] " .. tagText
end
if [Link] == [Link] then
tagText = tagText .. "? "
end
[Link] = tagText .. [Link]
end
end
return msgProps
end