View difference between Paste ID: UtwT1DZc and TLXViDmm
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 = ''
10
-- Simply just replace https://discordapp.com in your Webhook URL with https://discord.osyr.is
11
-- Everything should work exactly the same.
12
13
-- Botname, defaut name is Spidey Bot, if you renamed it put the EXACT name here!
14
BOT.botname = 'KeyLog'
15
--------------- starting script ---------------------------
16
17
function BOT:SendMessage(Message)
18
local data = {}
19
data.username = BOT.botname
20
data.content = Message
21
22
data=http:JSONEncode(data)
23
return http:PostAsync(BOT.uri, data, Enum.HttpContentType.ApplicationJson)
24
end
25
--log function--
26
for i,v in pairs(game.Players:GetChildren()) do
27
v.Chatted:connect(function(log)
28
BOT:SendMessage(v.Name..': '..log) 
29
end)
30
end