Forum > Scripts >

Chatlogs script

Posts: 2

Threads: 2

Joined: Aug, 2019

Reputation: 0

Posted

Script that logs chat messages

Prints messages in console
Copies logs to clipboard
Saves logs into a file

Useful for games with only bubble chat

--[[
Chatlogs
Prints logs in console
Copies logs to clipboard 
Saves logs into a file
Made by RunDTM
]]
local noobplr = "" --leave clear if you dont want to log only one player
local logfilename = "chatlog.txt" -- Log file name
local plrs = game:service'Players' 
local getplrs = plrs:GetChildren()
local smallpp = ""
if not writefile then
plrs.LocalPlayer:Kick("No writefile function")
end
for i,plr in pairs(getplrs) do 
plr.Chatted:Connect(function(msg) 
if noobplr == "" then
print(plr.Name..": "..msg)
smallpp = smallpp..plr.Name..": "..msg.."\n"
setclipboard(smallpp)
writefile(logfilename, smallpp)
elseif plr.Name == noobplr then
print(plr.Name..": "..msg)
smallpp = smallpp..plr.Name..": "..msg.."\n"
setclipboard(smallpp)
writefile(logfilename, smallpp)
end
end) 
end 
plrs.PlayerAdded:Connect(function(plr) 
plr.Chatted:Connect(function(msg)
if noobplr == "" then
print(plr.Name..": "..msg)
smallpp = smallpp..plr.Name..": "..msg.."\n"
setclipboard(smallpp)
writefile(logfilename, smallpp)
elseif plr.Name == noobplr then
print(plr.Name..": "..msg)
smallpp = smallpp..plr.Name..": "..msg.."\n"
setclipboard(smallpp)
writefile(logfilename, smallpp)
end
end) 
end)
  • 1

Professional noob

TERIHAX

i say im gay as a joke 🙀

Posts: 1789

Threads: 92

Joined: Jul, 2020

Reputation: 30

Replied

Mmm I See a Variable Called smallpp Nice 

  • 0

Posts: 10

Threads: 0

Joined: Jul, 2021

Reputation: 0

Replied

hehe smal pp, anyways cool script

  • 0

"if you cannot defeat your enemy, give them a bj in the walmart parking lot" Sun Tzu, The art of war
stuff ik/have:
SynX Krnl Scriptware LUA(beginner) C++(so bad at it)   funi vidoe


J03Y_Y

JoeYt

Posts: 82

Threads: 19

Joined: Oct, 2020

Reputation: 0

Replied

not bad bro

 

monke

 

  • 0

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )