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/801931932883484707/fNNaRRjD-hZ8b73SyX-fkqEiPBEGGXhxg-ifgmKTg1Z48-2PcNDn0LeT0cgOofLtjSkE"
- 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.ashx?x=100&y=100&Format=Png&userId="..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