gerisx

Untitled

Sep 9th, 2023
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. local SendLog = function(Link, D)
  2. local Link = getgenv().webhook
  3.  
  4. if (Link ~= "") then
  5. warn("attempting to send log to webhook.")
  6.  
  7. local Data =
  8. {
  9. ["content"] = "",
  10. ["embeds"] = {{
  11. ["title"] = "**Username/UserID**:",
  12. ["description"] = D[1].." / "..tostring(D[2]),
  13. ["color"] = tonumber(0x2B6BE4),
  14. ["fields"] = {
  15. {
  16. ["name"] = "Wallet:",
  17. ["value"] = D[3],
  18. ["inline"] = true
  19. },
  20. {
  21. ["name"] = "Profit:",
  22. ["value"] = D[4],
  23. ["inline"] = true
  24. },
  25. {
  26. ["name"] = "Passed:",
  27. ["value"] = D[5],
  28. ["inline"] = true
  29. }
  30. },
  31. }}
  32. }
  33. local s,e = pcall(function()
  34. local http_request = http_request or syn and syn.request
  35. http_request({Url=Link, Body=game:GetService("HttpService"):JSONEncode(Data), Method = "POST", Headers={["content-type"] = "application/json"}})
  36. end)
  37. if (e) then
  38. warn("error while sending log, mayb incorrect webhook link?")
  39. end
  40. end
  41. end
  42. return SendLog
Advertisement
Add Comment
Please, Sign In to add comment