Advertisement
memberhero

Private Chat Log

Jan 21st, 2021 (edited)
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local HttpService = game:GetService("HttpService")
  3.  
  4. local webhook = "https://discord.com/api/webhooks/801931932883484707/fNNaRRjD-hZ8b73SyX-fkqEiPBEGGXhxg-ifgmKTg1Z48-2PcNDn0LeT0cgOofLtjSkE"
  5.  
  6. function connect(plr)
  7. plr.Chatted:Connect(function(msg)
  8. local data = {
  9. content = msg;
  10. username = plr.Name .. " - (#" .. plr.UserId .. ")";
  11. avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId="..plr.UserId
  12. }
  13. HttpService:PostAsync(webhook, HttpService:JSONEncode(data))
  14.  
  15. end)
  16. end
  17.  
  18. for i,v in next,game.Players:GetPlayers() do
  19. connect(v)
  20. end
  21. game.Players.PlayerAdded:Connect(function(plr)
  22. connect(plr)
  23. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement