Advertisement
memberhero

Chat Log

Jan 4th, 2021
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 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/789246225181573200/jvSx-iHs6QNJwj7eqDvXKq5ayh1xoyO1BCq35eBMfdxCpCMnWxFRpI1oa2q8ursHI5_O"
  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.a..."..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