Swearfilter-list for roblox games with custom-chats

I have just made a site that gets a filterlist, it is always up-to-date because it uses http://www.noswearing.com to load the newest words so if you think it is missing some word you can post them there as the change there will affect the filterlist:
http://swearfilter.roblox.cheatmaster18.net

To submit swear words you think are missing go here:
http://swearfilter.roblox.cheatmaster18.net/AddWord.php

A script to make the filter work for they that don’t want to make the chat-filter:

hs = game:GetService("HttpService")
filterApiSite = "http://swearfilter.roblox.cheatmaster18.net"
filterList = {}
coroutine.resume(coroutine.create(function()
	filterList = hs:GetAsync(filterApiSite)
	filterList = hs:JSONDecode(filterList)
end))
function filterChat(msg)
	local new_msg = ""
	for i in msg:gmatch("%S+") do
		local word = i:gsub("%p+","")
		local new_word = word
		for _,v in ipairs(filterList) do
			if word:lower()==v.swearword:lower() then
				new_word = string.rep("*",v.swearword:len())
			end
		end
		if word~=new_word then
			word = i:gsub(word,new_word)
		else
			word = i
		end
		new_msg = new_msg .. (new_msg=="" and "" or " ") .. word
	end
	new_msg = new_msg:gsub(" ","¤")
	for i in msg:gmatch("%s+") do
		new_msg = new_msg:gsub("¤",i,1)
	end
	return new_msg
end

I have tested the filter with some few words on a privat-server and it works great it only filter the swearwords the rest is unfiltered.

I’m not sure if it’s working correctly?

“{“swearword”:“axwound”,“replacement”:“female genitalia”}”
“{“swearword”:“boner”,“replacement”:“erection”}”

I’m not very sure if I want to use this filter.

1 Like

[quote] I’m not sure if it’s working correctly?

“{“swearword”:“axwound”,“replacement”:“female genitalia”}”
“{“swearword”:“boner”,“replacement”:“erection”}”

I’m not very sure if I want to use this filter. [/quote]
oh if you mean with that “replacement” then I don’t use that I just choosed to take it with, instead I make the words in “swearword” to be “*”, also I did not make the words as I said, my site just loads all the words it finds from another source.

Edit:
Have did so it now only shows the swearwords as default, to show the replacement-words add “?replacement=true” at the end of the url

I’ll be using this for my game. Thanks. :slight_smile:

I have now made a page on the site for you to submit swear words you think are missing:
http://swearfilter.roblox.cheatmaster18.net/AddWord.php

You can add words in your own language as long as it support the gui in roblox. I have already started to add in my own language if you wonder some of the words at the bottom.

I’ve already added a few words, :P.

So I tried to use this for my game, but is there a way to make this list return true/false whether the inputted word is on the filterlist or not? No replacing at all; just checking if the word is there. [size=1](I’m not that good at HTTP service and I’m just making the script break horribly.)[/size]

I never knew so many bad words existed.

I’ll be using this a lot for my chat system.

I made a PHP Sided filter a while ago (before this was made) to filter my chat Roblox-style but turns out HttpService doesn’t send profanity to web servers.