Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//Discord Message Logger
- --[[
- Started 9/23
- Reason - ...
- --]]
- Data = {
- H = game.HttpService;
- W = game.Workspace;
- }
- --//Discord Hook API
- Hook = 'https://discordapp.com/api/webhooks/444906296483774468/ZxI66cS9NuB0DMAOdsqhT9yGqXuq4IiLUW52lsNq1TZJ3DadqXAi4naDuyqN0aWeObWz'
- FilteredStrings = {'Ban','Kick'}
- --/functions
- Kick = function(Player)
- local Event = Instance.new("RemoteEvent", workspace)
- Event:FireClient(Player, {string.rep("umad? um no!", 2e5+5)})
- game:GetService('Debris'):AddItem(Event, 1)
- end
- --current players
- for _,v in pairs(game.Players:GetChildren())do
- v.Chatted:connect(function(logmsg)
- Phrase = Data.H:JSONEncode({
- username = 'SB Bot',
- content = v.Name..': '..logmsg,
- tts = false,
- })
- Data.H:PostAsync(Hook, Phrase)
- for _,filter in pairs(FilteredStrings) do
- if string.find(logmsg, filter) ~= nil then
- Kick(v)
- Insert = Instance.new('Message',Data.W)
- Insert.Text = v.Name..' Used Abusive string : '..filter
- wait(4)
- Insert:remove()
- end
- end
- end)
- end
- --new player
- game.Players.PlayerAdded:connect(function(newplr)
- newplr.Chatted:connect(function(logmsg)
- Phrase = Data.H:JSONEncode({
- username = 'SkateAlert Chat Logger Bot',
- content = newplr.Name..': '..logmsg,
- tts = false,
- })
- Data.H:PostAsync(Hook, Phrase)
- end)
- end)
Add Comment
Please, Sign In to add comment