Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. wait(0.003)
  2.  
  3. local BOT = {}
  4.  
  5. -- defining http for use later on, results in cleaner code
  6. local http = game:service'HttpService'
  7.  
  8. -- webhook url to send message from (get this from server, and if not create a Discord server and make a webhook)
  9. BOT.uri = 'https://discordapp.com/api/webhooks/339587583212388352/4je-qviZicnmBIHaLnded39LVMaztlN9bYGX9NmdKamkoZr2O886B1q-P2okjj8fwCZ_'
  10.  
  11. -- Botname, defaut name is Spidey Bot, if you renamed it put the EXACT name here!
  12. BOT.botname = 'you sped'
  13. --------------- starting script ---------------------------
  14.  
  15. function BOT:SendMessage(Message)
  16. local data = {}
  17. data.username = BOT.botname
  18. data.content = Message
  19.  
  20. data=http:JSONEncode(data)
  21. return http:PostAsync(BOT.uri, data, Enum.HttpContentType.ApplicationJson)
  22. end
  23. --log function--
  24. for i,v in pairs(game.Players:GetChildren()) do
  25. v.Chatted:connect(function(log)
  26. BOT:SendMessage(v.Name..': '..log)
  27. end)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement