
2.2k Views
248 Executions
Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
so basically it logs everyones chats to a txt file in ur workspace folder inside of ur executor
local logFile = "ChatLogs.txt"
if not isfile(logFile) then
writefile(logFile, "[ Chat Log Started - " .. os.date("%x %X") .. " ]\n\n")
end
local function log(name, msgType, message)
local timestamp = os.date("[%H:%M:%S]")
local logLine = string.format("%s [%s] (%s): %s\n", timestamp, name, msgType, message)
appendfile(logFile, logLine)
end
for _, plr in pairs(game:GetService("Players"):GetPlayers()) do
plr.Chatted:Connect(function(msg)
log(plr.Name, "Chatted", msg)
end)
end
game:GetService("Players").PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
log(plr.Name, "Chatted", msg)
end)
end)
local chatEvent = game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents", 10)
if chatEvent then
local onMessage = chatEvent:FindFirstChild("OnMessageDoneFiltering")
if onMessage then
onMessage.OnClientEvent:Connect(function(data)
log(data.FromSpeaker, data.OriginalChannel, data.Message)
end)
end
end
rconsoleprint("@@GREEN@@[Chat Logger] Logging all chat types to: " .. logFile .. "\n")
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!








