Advertisement
Dfgjfj

Group Chat Tag localScript

Feb 10th, 2025
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1.  
  2. local TextChatService = game:GetService("TextChatService")
  3. local Players = game:GetService("Players")
  4. local LocalPlayer = Players.LocalPlayer
  5. local GroupId = 6974787 --// put ur group id
  6.  
  7. TextChatService.OnIncomingMessage = function(msg)
  8. local Target = Players:FindFirstChild(msg.TextSource.Name)
  9. if Target and Target:IsInGroup(GroupId) then
  10. local role = Target:GetRoleInGroup(GroupId)
  11. msg.PrefixText = "["..role.."] "..msg.PrefixText
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement