--simplux's chat logger
--toggle with HOME
--files save to workspace/simplux-logger/
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")
local Player = Players.LocalPlayer
local function cleanup()
local name = "SimpluxLoggerGui"
local old1 = Player:WaitForChild("PlayerGui"):FindFirstChild(name)
local old2 = (gethui and gethui() or game:GetService("CoreGui")):FindFirstChild(name)
if old1 then old1:Destroy() end
if old2 then old2:Destroy() end
end
cleanup()
local chatData = {Logs = {}, ChatterCounts = {}, TaggedCount = 0}
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "SimpluxLoggerGui"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = Player:WaitForChild("PlayerGui")
local chatLogs = Instance.new("Frame")
chatLogs.Name = "SimpluxLogger"
chatLogs.Size = UDim2.new(0, 400, 0, 300)
chatLogs.Position = UDim2.new(0.5, -200, 0.5, -150)
chatLogs.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
chatLogs.BorderSizePixel = 0
chatLogs.Active = true
chatLogs.ClipsDescendants = true
chatLogs.Parent = ScreenGui
local function addLog(sender, message)
local scrollFrame = chatLogs:FindFirstChild("ScrollingFrame")
if not scrollFrame then return end
local currentPos = scrollFrame.CanvasPosition.Y
local frameHeight = scrollFrame.AbsoluteSize.Y
local canvasHeight = scrollFrame.AbsoluteCanvasSize.Y
local isAtBottom = currentPos >= (canvasHeight - frameHeight) - 15
local timestamp = os.date("%H:%M:%S")
local displayEntry = string.format("[%s] - (%s): %s", timestamp, sender, message)
table.insert(chatData.Logs, displayEntry)
chatData.ChatterCounts[sender] = (chatData.ChatterCounts[sender] or 0) + 1
local _, tags = message:gsub("#", "")
if tags >= 2 then chatData.TaggedCount = chatData.TaggedCount + 1 end
local logEntry = Instance.new("TextLabel")
logEntry.Size = UDim2.new(1, -10, 0, 20)
logEntry.BackgroundTransparency = 1
logEntry.Text = displayEntry
logEntry.TextColor3 = Color3.fromRGB(255, 255, 255)
logEntry.TextSize = 16
logEntry.Font = Enum.Font.SourceSans
logEntry.TextXAlignment = Enum.TextXAlignment.Left
logEntry.TextWrapped = true
logEntry.Parent = scrollFrame
if isAtBottom then
task.defer(function()
scrollFrame.CanvasPosition = Vector2.new(0, 999999)
end)
end
end
local titleBar = Instance.new("Frame")
titleBar.Size = UDim2.new(1, 0, 0, 35)
titleBar.BackgroundColor3 = Color3.fromRGB(24, 24, 24)
titleBar.BorderSizePixel = 0
titleBar.Parent = chatLogs
local versionTitle = Instance.new("TextLabel")
versionTitle.Size = UDim2.new(1, -70, 1, 0)
versionTitle.Position = UDim2.new(0, 10, 0, 0)
versionTitle.BackgroundTransparency = 1
versionTitle.Text = "Simplux's Logger v1.8.3"
versionTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
versionTitle.TextXAlignment = Enum.TextXAlignment.Left
versionTitle.Font = Enum.Font.SourceSans
versionTitle.TextSize = 14
versionTitle.Parent = titleBar
local CloseBtn = Instance.new("TextButton")
CloseBtn.Size = UDim2.new(0, 35, 0, 35)
CloseBtn.Position = UDim2.new(1, -35, 0, 0)
CloseBtn.BackgroundTransparency = 1
CloseBtn.Text = "X"
CloseBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
CloseBtn.Font = Enum.Font.SourceSans
CloseBtn.TextSize = 18
CloseBtn.Parent = titleBar
CloseBtn.MouseButton1Click:Connect(function() ScreenGui:Destroy() end)
local scrollFrame = Instance.new("ScrollingFrame")
scrollFrame.Name = "ScrollingFrame"
scrollFrame.Size = UDim2.new(1, -20, 1, -95)
scrollFrame.Position = UDim2.new(0, 10, 0, 45)
scrollFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
scrollFrame.BorderSizePixel = 0
scrollFrame.ScrollBarThickness = 4
scrollFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
scrollFrame.Parent = chatLogs
local logList = Instance.new("UIListLayout")
logList.Parent = scrollFrame
logList.Padding = UDim.new(0, 2)
local saveFile = Instance.new("TextButton")
saveFile.Size = UDim2.new(1, -30, 0, 30)
saveFile.Position = UDim2.new(0, 15, 1, -40)
saveFile.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
saveFile.Text = "Save to File"
saveFile.TextColor3 = Color3.fromRGB(255, 255, 255)
saveFile.Font = Enum.Font.SourceSans
saveFile.TextSize = 16
saveFile.Parent = chatLogs
local function createResizeHandle(name, pos, anchor)
local handle = Instance.new("TextButton")
handle.Name = name
handle.Size = UDim2.new(0, 20, 0, 20)
handle.Position = pos
handle.AnchorPoint = anchor
handle.BackgroundTransparency = 1
handle.Text = ""
handle.ZIndex = 10
handle.Parent = chatLogs
local resizing = false
handle.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then resizing = true end
end)
UserInputService.InputChanged:Connect(function(input)
if resizing and input.UserInputType == Enum.UserInputType.MouseMovement then
local mouse = UserInputService:GetMouseLocation()
local absPos = chatLogs.AbsolutePosition
local absSize = chatLogs.AbsoluteSize
if name == "RB" then
chatLogs.Size = UDim2.new(0, math.max(200, mouse.X - absPos.X), 0, math.max(150, (mouse.Y - 36) - absPos.Y))
elseif name == "LB" then
local newX = mouse.X
local newWidth = (absPos.X + absSize.X) - newX
if newWidth > 200 then
chatLogs.Position = UDim2.new(0, newX, 0, absPos.Y + 36)
chatLogs.Size = UDim2.new(0, newWidth, 0, absSize.Y)
end
elseif name == "RT" then
local newY = mouse.Y - 36
local newHeight = (absPos.Y + absSize.Y) - newY
if newHeight > 150 then
chatLogs.Position = UDim2.new(0, absPos.X, 0, newY + 36)
chatLogs.Size = UDim2.new(0, absSize.X, 0, newHeight)
end
elseif name == "LT" then
local newX = mouse.X
local newY = mouse.Y - 36
local newWidth = (absPos.X + absSize.X) - newX
local newHeight = (absPos.Y + absSize.Y) - newY
if newWidth > 200 and newHeight > 150 then
chatLogs.Position = UDim2.new(0, newX, 0, newY + 36)
chatLogs.Size = UDim2.new(0, newWidth, 0, newHeight)
end
end
end
end)
UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then resizing = false end end)
end
createResizeHandle("RB", UDim2.new(1, 0, 1, 0), Vector2.new(1, 1))
createResizeHandle("LB", UDim2.new(0, 0, 1, 0), Vector2.new(0, 1))
createResizeHandle("RT", UDim2.new(1, 0, 0, 0), Vector2.new(1, 0))
createResizeHandle("LT", UDim2.new(0, 0, 0, 0), Vector2.new(0, 0))
saveFile.MouseButton1Click:Connect(function()
local success, info = pcall(function() return MarketPlaceService:GetProductInfo(game.PlaceId) end)
local gameName = success and info.Name or "Unknown"
local mostFreq, leastFreq, totalC, max, min = "N/A", "N/A", 0, 0, math.huge
for u, c in pairs(chatData.ChatterCounts) do
totalC = totalC + 1
if c > max then max = c; mostFreq = u end
if c < min then min = c; leastFreq = u end
end
local header = string.format("-- %s (%d)\n-- %d messages, %d unique chatters, %d filtered\n-- most active: %s | least active: %s\n\n",
gameName, game.PlaceId, #chatData.Logs, totalC, chatData.TaggedCount, mostFreq, leastFreq)
local fullContent = header .. table.concat(chatData.Logs, "\n")
local writeSuccess = pcall(function()
if makefolder then makefolder("simplux-logger") end
writefile("simplux-logger/log_"..os.time()..".txt", fullContent)
end)
saveFile.Text = writeSuccess and "Saved Stats!" or "Failed!"
task.wait(2)
saveFile.Text = "Save to File"
end)
local dragging, dragStart, startPos
titleBar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true dragStart = input.Position startPos = chatLogs.Position
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
local delta = input.Position - dragStart
chatLogs.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end)
UserInputService.InputBegan:Connect(function(input, gp)
if not gp and input.KeyCode == Enum.KeyCode.Home then ScreenGui.Enabled = not ScreenGui.Enabled end
end)
for _, p in pairs(Players:GetPlayers()) do p.Chatted:Connect(function(m) addLog(p.Name, m) end) end
Players.PlayerAdded:Connect(function(p) p.Chatted:Connect(function(m) addLog(p.Name, m) end) end)
print("[SLogger] Loaded successfully")
print("[SLogger] Toggle with HOME")
print("[SLogger] Resize from bottom right")
Comments
No comments yet
Be the first to share your thoughts!