Advertisement
4zx16

Chat Tags (V2.2) (Server)

Oct 28th, 2021 (edited)
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. --[[
  2.  || 📜 AUTHOR: @4zx16 || CHAT TAGS || DON'T MESS WITH THIS
  3. ]]
  4. local ServerScriptService = script.Parent
  5. local ChatServiceRunner = ServerScriptService:WaitForChild("ChatServiceRunner")
  6. local ChatService = require(ChatServiceRunner:WaitForChild("ChatService"))
  7. local Tags = require(script.Tags)
  8. --[[
  9.   STILL HAVING TROUBLE MAKING IT WORK? GET THE MODEL INSTEAD.
  10.   https://www.roblox.com/library/9803614049/
  11.  
  12.   MODULE: https://pastebin.com/raw/1fFWVjbC
  13. ]]
  14. local function CheckForTags(Player)
  15.     local Attempt = Tags[Player.UserId] or Tags[Player.Name]
  16.    
  17.     if Attempt then
  18.         local SpeakerObject
  19.         repeat
  20.             wait()
  21.             SpeakerObject = ChatService:GetSpeaker(Player.Name)
  22.         until SpeakerObject ~= nil
  23.         SpeakerObject:SetExtraData("Tags", {Attempt})
  24.     else
  25.         print("No tags found for user "..Player.Name.."!")
  26.     end
  27. end
  28. game.Players.PlayerAdded:Connect(function(Player)
  29.     CheckForTags(Player)
  30. end)
  31. for _, Player in pairs(game.Players:GetPlayers()) do
  32.     CheckForTags(Player)
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement