I amended a version for you, @FizzyColas I would suggest following this one instead because of the benefits.
- Make a LocalScript in StarterPlayerScripts and paste this inside:
--//Services
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
--//Tables
local developerIds = {
295954212,
84694314,
84398600,
1655354023
}
--//Functions
TextChatService.OnIncomingMessage = function(message: TextChatMessage)
local props = Instance.new("TextChatMessageProperties")
if message.TextSource then
local player = Players:GetPlayerByUserId(message.TextSource.UserId)
if table.find(developerIds, player.UserId) then
props.PrefixText = "<font color='#e5d415'>[🔨] [Developer]</font> ".. message.PrefixText
end
if player:GetAttribute("VIP") then
props.PrefixText = "<font color='#d4af37'>[👑] [VIP]</font> ".. message.PrefixText
end
end
return props
end
- Add a new script into ServerScriptService and paste this inside:
--//Services
local Players = game:GetService("Players")
local MarketplaceService = game:GetService("MarketplaceService")
--//Controls
local vipGamepassId = 25949990
--//Functions
Players.PlayerAdded:Connect(function(player)
player:SetAttribute("VIP", MarketplaceService:UserOwnsGamePassAsync(player.UserId, vipGamepassId))
end)
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, gamepassId, wasPurchased)
if not wasPurchased or gamepassId ~= vipGamepassId then
return
end
player:SetAttribute("VIP", true)
end)
- It should work now, if there are any errors, please tell me and I will fix it.