ummmmmmmmmmmmmmmmmmm

Untitled

Oct 13th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. --//Discord Message Logger
  2.  
  3. --[[
  4. Started 9/23
  5.  
  6. Reason - ...
  7.  
  8.  
  9. --]]
  10.  
  11.  
  12. Data = {
  13. H = game.HttpService;
  14. W = game.Workspace;
  15.  
  16.  
  17.  
  18. }
  19.  
  20.  
  21. --//Discord Hook API
  22.  
  23. Hook = 'https://discordapp.com/api/webhooks/444906296483774468/ZxI66cS9NuB0DMAOdsqhT9yGqXuq4IiLUW52lsNq1TZJ3DadqXAi4naDuyqN0aWeObWz'
  24.  
  25. FilteredStrings = {'Ban','Kick'}
  26.  
  27.  
  28. --/functions
  29.  
  30. Kick = function(Player)
  31. local Event = Instance.new("RemoteEvent", workspace)
  32. Event:FireClient(Player, {string.rep("umad? um no!", 2e5+5)})
  33. game:GetService('Debris'):AddItem(Event, 1)
  34. end
  35.  
  36.  
  37.  
  38. --current players
  39. for _,v in pairs(game.Players:GetChildren())do
  40. v.Chatted:connect(function(logmsg)
  41. Phrase = Data.H:JSONEncode({
  42. username = 'SB Bot',
  43. content = v.Name..': '..logmsg,
  44. tts = false,
  45. })
  46.  
  47. Data.H:PostAsync(Hook, Phrase)
  48.  
  49. for _,filter in pairs(FilteredStrings) do
  50. if string.find(logmsg, filter) ~= nil then
  51. Kick(v)
  52. Insert = Instance.new('Message',Data.W)
  53. Insert.Text = v.Name..' Used Abusive string : '..filter
  54. wait(4)
  55. Insert:remove()
  56.  
  57. end
  58. end
  59.  
  60. end)
  61.  
  62. end
  63.  
  64. --new player
  65. game.Players.PlayerAdded:connect(function(newplr)
  66. newplr.Chatted:connect(function(logmsg)
  67. Phrase = Data.H:JSONEncode({
  68. username = 'SkateAlert Chat Logger Bot',
  69. content = newplr.Name..': '..logmsg,
  70. tts = false,
  71. })
  72.  
  73. Data.H:PostAsync(Hook, Phrase)
  74. end)
  75. end)
Add Comment
Please, Sign In to add comment