Script that bans a player for 1 minute for saying the word "bottle"

Title says all


why not?

Because of the glass and cutting and hurting :saddowns:

function Bottlezarebad4yourhealth( talker, demtxt, team )
if string.find(demtxt,"bottle") then
talker:Ban(1, "NOT THE BOTTLEZ!")

Untested, But it should work.

looks like a bottle of BANNED

Thankyou very much Zoey. :3:

he could just type Bottle so do
[lua]function Bottlezarebad4yourhealth( talker, demtxt, team )
if string.find(string.lower(demtxt),“bottle”) then
talker:Ban(1, “NOT THE BOTTLEZ!”)


Would this work if it was part of a scentance, such as " this is my bottle "? If so, I’m going to implement his into my server, with a 1 hour ban time for saying ni**er

you mean nigger?

He’s not using it in a racist way, such as referring to a group of CERTAIN people as ‘Niggers’, is he?

It is just a redneck American pronunciation of negro. The Spanish/French word for black.

No he’s fine with that, it’s just people saying ni**er he doesn’t like.

Yeah. It would…
function NiggaBans( talker, text, team )
if string.find(string.lower(text),“nigger”) and not talker:IsAdmin() then
talker:Ban(60, “nigga?!”)
hook.Add(“PlayerSay”,“NiggaBan”,NiggaBans) [/lua]
included admin immunity


I’m going to trial this with the word furry

wait can it be tabled to ref from a list of words?

local bannedWordList = {

function bannedWords( talker, text, team )
for k,v in pairs( bannedWordList )do
if ( string.find(string.lower(text), v) and not talker:IsAdmin() ) then
talker:Ban(60, "Using the word " … v);
hook.Add(“PlayerSay”,“bannedWords”,bannedWords); [/lua]

Hope I didn’t screw up in some way…

Why have ; at the "end"s? end; instead of end?

It’s for people who script PHP purely. There is no actual reason to have it in.
In php, the end of a line is signified by a “;” and for the sake of people not inputting them each time, Garry just made them do the same thing in php even though they’re not needed.

nice, i was already writing the same thing in code lol