Advertisement
plytalent

Test http log

Aug 7th, 2019
665
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. HttpService = game:GetService("HttpService")
  2. Players = game:GetService("Players")
  3. players = {}
  4. webhook="https://discordapp.com/api/webhooks/607937673058975746/cx1jSA3YlroQ8CJ8FS32YaDT42Et-gM0H-GUrZ9OC_aQlV8lFHds4a0lXKx_kOZxcd9G"
  5.  
  6. function sendtext(input, player)
  7. HttpService:PostAsync(webhook,
  8. HttpService:JSONEncode({
  9. ["content"] = input,
  10. ["username"] = player.Name.. " (placeid: ".. tostring(game.PlaceId) ..", jobid: ".. tostring(game.JobId) ..")",
  11. ["avatar_url"] = "https://www.rprxy.xyz/bust-thumbnail/image?userId=".. player.UserId .."&width=420&height=420&format=png8"
  12. })
  13. )
  14. end
  15.  
  16. function sendrawtext(input)
  17. HttpService:PostAsync(webhook,
  18. HttpService:JSONEncode({
  19. ["content"] = input,
  20. ["username"] = "Seeker",
  21. ["avatar_url"] = "https://cdn.discordapp.com/avatars/452403942463373313/b63f41ccefe975cefc65556af7958f15.webp?size=1024"
  22. })
  23. )
  24. end
  25.  
  26. for i, v in pairs(Players:GetPlayers()) do
  27. table.insert(players, 1, v)
  28. v.Chatted:Connect(function(msg)
  29. sendtext(msg, v)
  30. end)
  31. end
  32. concatenate = "Loaded. Players in this server are ".. #players ..": "
  33. for i = 1, #players do
  34. if #players > 1 then
  35. if i < #players then
  36. concatenate = concatenate.. players[i].Name ..", "
  37. else
  38. concatenate = concatenate.. "and ".. players[i].Name .."."
  39. end
  40. else
  41. concatenate = concatenate.. players[i].Name .. "."
  42. end
  43. end
  44. concatenate = concatenate.. " (".. game.JobId ..")"
  45. sendrawtext(concatenate)
  46.  
  47. Players.PlayerAdded:Connect(function(plr)
  48. sendrawtext(plr.Name.. " has entered the game. (".. game.JobId ..")")
  49. plr.Chatted:Connect(function(msg)
  50. sendtext(msg, plr)
  51. end)
  52. end)
  53.  
  54. Players.PlayerRemoving:Connect(function(plr)
  55. sendrawtext(plr.Name.. " has left the game. (".. game.JobId ..")")
  56. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement