In this tutorial, I will be teaching you how to customly censor inappropriate language.
This bug is where furries are able to get harassed because the bug doesnt block messages which
_____ _ _ _
|_ _| | | (_) | |
| |_ _| |_ ___ _ __ _ __ _| |
| | | | | __/ _ \| '__| |/ _` | |
| | |_| | || (_) | | | | (_| | |
\_/\__,_|\__\___/|_| |_|\__,_|_|
Customly censor messages meant to harass furries
[1] Create a local script
[2] Make sure the local script is inside of **StarterCharacterScripts**
[3] Copy and paste this code into the local script:
local meanWords = {"suck", "wrong","unacceptable","hate","awful","horrible","terrible","disastrous","disgusting", "filthy","unkempt","annoying","bad","barbaric","dirty","dishonorable","feak","freaks","freakish","gross","putrid","odd","trash", "weird", "areanimals", "dogs", "dumb"}
local extras = {"fatherless", "nodad"}
local function removeSpaces(msg)
local result = ""
for i,v in pairs(string.split(msg, " ")) do
result = result .. v
end
return string.lower(result)
end
local function censorMessage(msg)
local gui = game.Players.LocalPlayer.PlayerGui:WaitForChild("Chat").Frame.ChatChannelParentFrame.Frame_MessageLogDisplay.Scroller
local noSpacesMsg = removeSpaces(msg)
for i,v in pairs(gui:GetChildren()) do
if v:IsA("Frame") then
local noSpacesGui = removeSpaces(v.TextLabel.Text)
if noSpacesMsg == noSpacesGui then
local newMessage = " ";
for i=string.len(msg),1,-1 do
newMessage = newMessage .. "#"
end
v.TextLabel.Text = newMessage
end
end
end
end
local function checkForHate(plr)
local lastMessageContainedFurry = false
plr.Chatted:Connect(function(msg)
local containsFurry = false
local flagged = false
local extraFlagged = false
local msg = removeSpaces(msg)
for i,v in pairs(meanWords) do
if #string.split(msg, v) > 1 then
flagged = true
end
end
for i,v in pairs(extras) do
if #string.split(msg,v) > 1 then
extraFlagged = true
end
end
if lastMessageContainedFurry and not flagged then
lastMessageContainedFurry = false
end
if #string.split(msg, "furry") > 1 or #string.split(msg, "furries") > 1 or #string.split(msg, "furrys") > 1 or #string.split(msg, "furry's") > 1 then
containsFurry = true
lastMessageContainedFurry = true
end
if containsFurry and flagged then
task.wait(.5)
censorMessage(msg)
elseif lastMessageContainedFurry and flagged then
task.wait(.5)
censorMessage(msg)
elseif extraFlagged then
task.wait(.5)
censorMessage(msg)
end
end)
end
for i,v in pairs(game.Players:GetPlayers()) do
checkForHate(v)
end
game.Players.PlayerAdded:Connect(function(plr)
checkForHate(plr)
end)
Before:
After: