ChatLogger
Key RequiredUniversal

ChatLogger

Universal Script100OTD100OTD 2.1K views 243 executesUpdated Jun 18, 2025
2.5/ 5(2 votes)
1150% Positive
Lua Script•36 lines (1130 chars)
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")

Features & Information

so basically it logs everyones chats to a txt file in ur workspace folder inside of ur executor
#log#chat#script#xeno

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts