Advertisement
TheFlamingBlaster

Upload chats to modernpaste

Aug 22nd, 2016
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. --[[
  2. Alright, so player is your player object
  3. and chats is the logs
  4. With these, when you leave, the chats will be logged and uploaded.
  5. Be warned, that if you use /e hl/ to run scripts, your scripts will be logged.
  6. --]]
  7. game:GetService('Players').PlayerRemoving:connect(function(p)
  8. if p == player then
  9. -- https://demo.modernpaste.com/api/paste/submit
  10. local hs = game:GetService("HttpService")
  11. local myContent = "Hello"
  12.  
  13. local logs = ("")
  14. for index, value in pairs(chats) do
  15. logs = (logs..index.." "..value..string.char(13))
  16. end
  17.  
  18. local content = {
  19. contents = logs
  20. }
  21.  
  22. local r = hs:PostAsync("https://demo.modernpaste.com/api/paste/submit", hs:JSONEncode(content))
  23. wait(1)
  24. local logs = (hs:JSONDecode(r).url.."/raw")
  25. local hint = Instance.new("Hint",workspace)
  26. hint.Text = ([[ChatLogs at: ]]..logs)
  27. hint.Name = hint.Text
  28. local m = Instance.new("Message",workspace)
  29. m.Text = hint.Text
  30. m.Name = m.Text
  31. print(logs)
  32. end
  33. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement