I have this custom chat gui, and currently there is no censoring for it.
I have been told it is possible to use ROBLOX's censoring system in it, but how can I do that?
This is the coding for my Chat Gui (If that is needed):
function UpdateOldLabels(Parent)
for i,v in pairs(Parent:GetChildren()) do
if v.Name:sub(1,4):lower() == "line" then
local LineNumber = v.Name:sub(5)
if LineNumber == "7" then
v:Destroy()
else
v.Name = "line"..tostring(tonumber(LineNumber) + 1)
v.Position = v.Position - UDim2.new(0,0,0,20)
end
end
end
end
game.Players.PlayerAdded:connect(function(player)
for _,v in ipairs(game:GetService("Players"):GetChildren()) do
wait(1)
UpdateOldLabels(v:WaitForChild("PlayerGui"):WaitForChild("ChatGui").Frame)
if player then
newchatline = Instance.new("TextLabel",v:WaitForChild("PlayerGui").ChatGui.Frame)
newchatline.Text = "[Server]: "..player.Name.. " Has Joined The Server!"
newchatline.Size = UDim2.new(1,0,0,20)
newchatline.Position = UDim2.new(0,0,1,-15)
newchatline.Font = "ArialBold"
newchatline.TextStrokeTransparency = 1
newchatline.BackgroundTransparency = 1
newchatline.BorderSizePixel = 0
newchatline.FontSize = "Size18"
newchatline.TextXAlignment = "Left"
newchatline.TextYAlignment = "Top"
newchatline.ClipsDescendants = true
newchatline.Name = "line1"
newchatline.TextColor3 = Color3.new(1,1,1)
end
end
UpdateOldLabels(game:GetService("StarterGui").ChatGui.Frame)
newchatline:Clone().Parent = game:GetService("StarterGui").ChatGui.Frame
player.Chatted:connect(function(msg)
for _,v in ipairs(game:GetService("Players"):GetChildren()) do
if player.Name == "Nanaluk01" then
UpdateOldLabels(v:WaitForChild("PlayerGui").ChatGui.Frame)
newchatline = Instance.new("TextLabel",v:WaitForChild("PlayerGui").ChatGui.Frame)
newchatline.Text = "[ADMN] [CREATOR]: "..player.Name..": "..msg
newchatline.Size = UDim2.new(1,0,0,20)
newchatline.Position = UDim2.new(0,0,1,-15)
newchatline.Font = "ArialBold"
newchatline.TextStrokeTransparency = 1
newchatline.BackgroundTransparency = 1
newchatline.BorderSizePixel = 0
newchatline.FontSize = "Size18"
newchatline.TextXAlignment = "Left"
newchatline.TextYAlignment = "Top"
newchatline.ClipsDescendants = true
newchatline.Name = "line1"
newchatline.TextColor3 = Color3.new(255,0,0)
else
UpdateOldLabels(v:WaitForChild("PlayerGui").ChatGui.Frame)
newchatline = Instance.new("TextLabel",v:WaitForChild("PlayerGui").ChatGui.Frame)
newchatline.Text = player.Name..": "..msg
newchatline.Size = UDim2.new(1,0,0,20)
newchatline.Position = UDim2.new(0,0,1,-15)
newchatline.Font = "ArialBold"
newchatline.TextStrokeTransparency = 1
newchatline.BackgroundTransparency = 1
newchatline.BorderSizePixel = 0
newchatline.FontSize = "Size18"
newchatline.TextXAlignment = "Left"
newchatline.TextYAlignment = "Top"
newchatline.ClipsDescendants = true
newchatline.Name = "line1"
newchatline.TextColor3 = Color3.new(1,1,1)
end
end
UpdateOldLabels(game:GetService("StarterGui").ChatGui.Frame)
newchatline:Clone().Parent = game:GetService("StarterGui").ChatGui.Frame
end)
end)
