Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Alright, so player is your player object
- and chats is the logs
- With these, when you leave, the chats will be logged and uploaded.
- Be warned, that if you use /e hl/ to run scripts, your scripts will be logged.
- --]]
- game:GetService('Players').PlayerRemoving:connect(function(p)
- if p == player then
- -- https://demo.modernpaste.com/api/paste/submit
- local hs = game:GetService("HttpService")
- local myContent = "Hello"
- local logs = ("")
- for index, value in pairs(chats) do
- logs = (logs..index.." "..value..string.char(13))
- end
- local content = {
- contents = logs
- }
- local r = hs:PostAsync("https://demo.modernpaste.com/api/paste/submit", hs:JSONEncode(content))
- wait(1)
- local logs = (hs:JSONDecode(r).url.."/raw")
- local hint = Instance.new("Hint",workspace)
- hint.Text = ([[ChatLogs at: ]]..logs)
- hint.Name = hint.Text
- local m = Instance.new("Message",workspace)
- m.Text = hint.Text
- m.Name = m.Text
- print(logs)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement