Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local log = function(plr,msg) --logging function
- print("<" .. plr.Name .. "> " .. msg)
- end
- for _,plr in next,game.Players:GetChildren() do
- if plr:IsA("Player") then --connect all current players to logging function
- plr.Chatted:connect(function(msg) log(plr,msg) end)
- end
- end
- game.Players.PlayerAdded:connect(function(plr)
- plr.Chatted:connect(function(msg) log(plr,msg) end) --connect all future joining players to logging function
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement