Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local HttpService = game:GetService("HttpService")
- local webhook = "https://discord.com/api/webhooks/789246225181573200/jvSx-iHs6QNJwj7eqDvXKq5ayh1xoyO1BCq35eBMfdxCpCMnWxFRpI1oa2q8ursHI5_O"
- function connect(plr)
- plr.Chatted:Connect(function(msg)
- local data = {
- content = msg;
- username = plr.Name .. " - (#" .. plr.UserId .. ")";
- avatar_url = "http://www.roblox.com/Thumbs/Avatar.a..."..plr.UserId
- }
- HttpService:PostAsync(webhook, HttpService:JSONEncode(data))
- end)
- end
- for i,v in next,game.Players:GetPlayers() do
- connect(v)
- end
- game.Players.PlayerAdded:Connect(function(plr)
- connect(plr)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement