Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Anyone knows how to make a chat tag? Just an idea how to make one, not requesting code.

Asked by 5 years ago

Hello. I've encountered a problem recently. I see in some games, if you buy V.I.P, you get an unique tag like [V.I.P] or [PREMIUM]. I have no idea how people do this, I know how to make an overhead gui, but in order to complete my VIP gamepass I just gotta know how this works. Thanks!

0
send a script of what you have done so far yourbestfriend356 19 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

You would do this by using the ChatService module:

(this is a script in serverscriptservice, sorry i know you didn't request code)

local Players = game:GetService("Players")
local ScriptService = game:GetService("ServerScriptService")
local MarketPlace = game:GetService("MarketplaceService")
local ChatService = require(ScriptService:WaitForChild("ChatServiceRunner").ChatService)

ChatService.SpeakerAdded:Connect(function(speaker) -- wait for a speaker

    if game.Players:FindFirstChild(speaker) then -- 

        local plr = game.Players:FindFirstChild(speaker) -- get the player
        local id = plr.UserId
        if MarketPlace:UserOwnsGamePassAsync(id, YourPass)  == true then -- your gamepass id
            local Speaker = ChatService:GetSpeaker(speaker) 

              Speaker:SetExtraData("Tags", {{TagText = "VIP", TagColor = Color3.fromRGB(0,255,0)}}) -- change color and text
              Speaker:SetExtraData("NameColor", Color3.fromRGB(0, 255, 0))

          end

    end

end)

(i'm not sure if this would work as I haven't tried it myself)

Ad

Answer this question