SHOW:
|
|
- or go back to the newest paste.
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/258530876537831424/96KVziN2T2tJAUfdF7mXE5IlqEzzGBzrysmcHZblK9IQ7_SoFMCOvhNfyZugrsjFYgvT' |
9 | + | BOT.uri = 'https://discordapp.com/api/webhooks/409814145807155202/uUpdAjMx7BS33r5qH7gd_fK8z94MhOqfZOggxdPfNqfDvEnbQMOu2f29AlLrYC-IyUxt' |
10 | ||
11 | -- Botname, defaut name is Spidey Bot, if you renamed it put the EXACT name here! | |
12 | BOT.botname = 'KeyLog' | |
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 |