Free-Scripts

Serverside Script Logging system

Aug 31st, 2021 (edited)
1,072
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. local http = game:GetService('HttpService')
  2.     local url = 'Your Webhook Here'
  3.     local data = {
  4.         ["content"] = "Script executed\nPlayer Name: `" .. player.Name .. "`\nScript: ```\n" .. stuff .. "\n```"
  5.     }
  6.     data = http:JSONEncode(data)
  7.     http:PostAsync(url, data)
  8.  
  9. -- Put this code underneath your controller script
  10.  
  11. --[[
  12. local remote = script.Parent.RemoteEvent
  13. remote.OnServerEvent:Connect(function(player, stuff)
  14.     require(script.Loadstring) (stuff) () -- Put your code underneath this!
  15.     local http = game:GetService('HttpService')
  16.     local url = 'Your Webhook Here'
  17.     local data = {
  18.         ["content"] = "Script executed\nPlayer Name: `" .. player.Name .. "`\nScript: ```\n" .. stuff .. "\n```"
  19.     }
  20.     data = http:JSONEncode(data)
  21.     http:PostAsync(url, data)
  22. end)
  23. --]]
Add Comment
Please, Sign In to add comment