Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function chat(message)
- for _, p in pairs(game.Players:GetPlayers()) do
- local display = {}
- local labels = p.PlayerGui.Screen.Chat
- for _, label in ipairs(labels:GetChildren()) do
- if label.Name:sub(1, 1) == "T" then
- table.insert(display, label)
- end
- end
- for index = #display, 2, -1 do
- labels["T"..tostring(index)].Text = labels["T"..tostring(index - 1)].Text
- end
- labels.T1.Text = player.Name .. ": " .. (message:len() < 50 and message or (message:sub(1, 50) .. "..."))
- end
- end
- game.Players.PlayerAdded:connect(function(player)
- player.Chatted:connect(function(message)
- chat(message)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment