generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Bad Words Script

Previous Thread :: Next Thread 
oldanthony89 is not online. oldanthony89
Joined: 02 Feb 2010
Total Posts: 17
26 Dec 2011 09:15 PM
Now, as I have been asked to post this for the longest time..... I am giving everyone it.

------------------------------------------------------------------------------------------
filteredWords = { "", "", "", }

function checkForRecord(name)
local name = string.lower(name)
local p = script:GetChildren()
for i = 1,#p do
if string.lower(p[i].Name) == name then
return true
end
end
return false
end

function onChatted(msg, recipient, speaker)
for i = 1,#filteredWords do
if string.match(string.lower(msg), string.lower(filteredWords[i])) then
if checkForRecord(speaker.Name) then
table.insert(banned, string.lower(speaker.Name))
speaker.Parent = nil
else
local tag = Instance.new("IntValue")
tag.Name = speaker.Name
tag.Parent = script
speaker.Parent = nil
end
end
end
end

function onEntered(newPlayer)
for i = 1,#banned do
if string.lower(banned[i]) == string.lower(newPlayer.Name) then
newPlayer:Remove()
end
end
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end

game.Players.ChildAdded:connect(onEntered)
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
26 Dec 2011 09:16 PM
cOLD mOLD with a fOLD that's gOLD on a sLATE pLATE.

GOBWEY.
Report Abuse
1Ra is not online. 1Ra
Joined: 02 May 2010
Total Posts: 2400
26 Dec 2011 09:18 PM
if you dont understand, read the capitalized letters in the above post.
Report Abuse
oldanthony89 is not online. oldanthony89
Joined: 02 Feb 2010
Total Posts: 17
26 Dec 2011 09:19 PM
No.... Really?
Report Abuse
1Ra is not online. 1Ra
Joined: 02 May 2010
Total Posts: 2400
26 Dec 2011 09:20 PM
hey, you seem like the kind of guy who needs explanations.

im looking out for you, is all.
Report Abuse
Jopc67 is not online. Jopc67
Joined: 10 Oct 2009
Total Posts: 5550
26 Dec 2011 09:43 PM
We can all create one in 5 seconds from scratch here in this forum.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
26 Dec 2011 09:46 PM
That script doesn't even work.
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
26 Dec 2011 09:52 PM
"speaker.Parent = nil"

what?
Report Abuse
oldanthony89 is not online. oldanthony89
Joined: 02 Feb 2010
Total Posts: 17
26 Dec 2011 10:51 PM
@Arc It's an actual source, not a c/ or x/



lol
Report Abuse
Cuyler is not online. Cuyler
Joined: 27 Feb 2006
Total Posts: 3784
26 Dec 2011 10:55 PM
Attempt to call 'banned' a nil value.
Report Abuse
oxcool1 is not online. oxcool1
Joined: 05 Nov 2009
Total Posts: 15444
26 Dec 2011 10:58 PM
[ Content Deleted ]
Report Abuse
NVI is not online. NVI
Joined: 11 Jan 2009
Total Posts: 4744
27 Dec 2011 12:31 AM
Uhh... I made one of these literally years ago. Mine would actually give you a few warnings first, too.

This is kind of hilarious.
Report Abuse
1waffle1 is online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
27 Dec 2011 12:34 AM
game.Players.PlayerAdded:connect(function(p) p.Chatted:connect(function(msg) if msg:find("%w") then p:Destroy() end end) end)
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
27 Dec 2011 12:34 AM
"It's an actual source, not a c/ or x/"

>you thought I was using admin commands in-game to test it

I didn't even even need to test it to see that it wouldn't work.
Report Abuse
1waffle1 is online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
27 Dec 2011 12:38 AM
"Please note that the recipient value is always nil."
Report Abuse
NVI is not online. NVI
Joined: 11 Jan 2009
Total Posts: 4744
27 Dec 2011 12:39 AM
(3/14/2008)

-- chat messages with swear words in them are not displayed, but if you want a swearing noob to be punished
-- anyway, use this. Just add words to filteredWords, not case-sensitive.
-- They will get a second chance to stop swearing, and if they don't they are
-- server permanently banned.
-- this is only V1. Maybe in V2, I'll put in admins, so they can ban,
-- add words, or remove words.

-- If you have any suggestions, send them to Zuka, please.

filteredWords = { "sample", "sample2", "sample phrase" }
banned = { "SamplePlayerName", "SamplePlayerName2" }

function checkForRecord(name)
local name = string.lower(name)
local p = script:GetChildren()
for i = 1,#p do
if string.lower(p[i].Name) == name then
return true
end
end
return false
end

function onChatted(msg, recipient, speaker)
for i = 1,#filteredWords do
if string.match(string.lower(msg), string.lower(filteredWords[i])) then
if checkForRecord(speaker.Name) then
table.insert(banned, string.lower(speaker.Name))
speaker.Parent = nil
else
local tag = Instance.new("IntValue")
tag.Name = speaker.Name
tag.Parent = script
speaker.Parent = nil
end
end
end
end

function onEntered(newPlayer)
for i = 1,#banned do
if string.lower(banned[i]) == string.lower(newPlayer.Name) then
newPlayer:Remove()
end
end
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end

game.Players.ChildAdded:connect(onEntered)
Report Abuse
NVI is not online. NVI
Joined: 11 Jan 2009
Total Posts: 4744
27 Dec 2011 12:40 AM
... wait a second.

I wrote this. OP, you're a complete buffoon.
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
27 Dec 2011 12:43 AM
NVI == Zuka?

Wait what?
Report Abuse
1waffle1 is online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
27 Dec 2011 12:45 AM
zuka is legendary. :O
Report Abuse
NVI is not online. NVI
Joined: 11 Jan 2009
Total Posts: 4744
27 Dec 2011 02:09 AM
Come on, I thought this was common knowledge by now.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
27 Dec 2011 02:50 AM
"NVI == Zuka?

Wait what?"

Yes. You didn't know it yet? :O

And if you want to know it all, well, Varp is Meelo. I hope you at least knew that...
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
27 Dec 2011 02:51 AM
who is zuka plz
Report Abuse
EverquestI is not online. EverquestI
Joined: 03 Feb 2011
Total Posts: 11109
27 Dec 2011 05:02 AM
>We can all create one in 5 seconds from scratch here in this forum.

Wouldn't you need several extra hands to type that fast?

[Continent Defeated]
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
27 Dec 2011 11:17 AM
"NVI == Zuka"

cOLD mOLD
Report Abuse
Vitouliss14 is not online. Vitouliss14
Joined: 18 Mar 2009
Total Posts: 7918
27 Dec 2011 11:41 AM
Just made my own...And it's only 21 lines.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image