VIP Chat Color (Help)

Hello!

Hi! I am VeloctiyDeveloper. I can build/model, but I have no clue how to script in Roblox lua. I was wondering if anyone knew how to make it so that if you buy a certain gamepass, it gives you a certain chat color. An example of what I’d think it would look like is the VIP gamepass in jailbreak, when if you buy it, you automatically get a yellow chat color.

Heres a picture of what I mean:

Example

Screen Shot 2020-05-19 at 11.55.12 AM

Any help would be amazing!

Thanks for reading! :slight_smile:

4 Likes

before doing anything like this. you should learn the basics first.

I will say you need to use ChatService

3 Likes

Okay! Thank you so much for you’re help and advice! I’ll watch YT vids to learn the basics. :slight_smile:

2 Likes

There is a bunch of videos on YouTube that will show you how to do it. You can try searching on there.

2 Likes

Before posting at least try and take an attempt to create what your looking for and then we will gladly help you, Scripting Support is meant to fix problems in your code. :slightly_smiling_face:

I can tell you what to look into thought here’s a list of them:

Gamepasses

ChatColor - You might find this useful

3 Likes

Very very very simple!

Like many suggested, we’re going to be using ChatService, capturing the message, and seeing if they own the gamepass.

Put this in ServerScriptService;


--//Services

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

--//Variables

local GamePassIDs = {
	VIP = 0, -- 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, 255, 0)) --changes textcolor, if you need this.
		Speaker:SetExtraData("Tags", {{
			TagText = "VIP", --As it says, the tagtext
			TagColor = Color3.fromRGB(255, 255, 0) --the tagcolor
		}})
	end
end)

You can do a lot more creative things with ChatTags, but this is the basics of it without going too in-depth and changing corescripts ( something you want to avoid doing as a whole )

Best of luck, hopefully you found this useful!

8 Likes

Thank you so much! This will help me out a lot! Thank you again! :slight_smile:

2 Likes

Learn to script. Watch youtube videos. (30 characters)

2 Likes

I’ve also made a little chat tag gradience! :slight_smile:

Feel free to use it! https://www.roblox.com/library/5043163581/Gradient-Chat-Tag

3 Likes

I’ll make sure to check yours out too! Thank you so much!

1 Like

For me the ServerScriptService is coming up as an error:

Not sure why.

1 Like

Change ServerScriptService to game.ServerScriptService
In addition I created a module if anyone in this feed wants to look at it

Made it go a bit farther to allow badges, chat tags, name color and more!

4 Likes

Or you could of just added another local at the top:

local ServerScriptService = game:getService("ServerScriptService")

That also works :slight_smile:

4 Likes

(I have very little scripting experience)
I know that this was so long ago, but whenever I try to use this, I get this error:
Screenshot_190