Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Assistance adding ROBLOX's text filter to admin command script?

Hello, with ROBLOX flagging games, I've gotten two of my games flagged and I think it's because of the admin command messages, private messages, hints, and timed messages not being filtered by ROBLOX's chat. The following is my code, but I'm not sure how to add the ROBLOX filter to it, can anyone help me out? Thanks in advance! (Kohltastrophe's original code. Very modified afterwards by Archeo and I.)

if msg:lower():sub(1,3) == "tm " then
local chk1 = msg:lower():sub(4):find(" ") + 3
local num = tonumber(msg:sub(4,chk1-1))
Message("Message from " .. plr.Name, msg:sub(chk1+1), false, game.Players:children(), num)
end

if msg:lower():sub(1,2) == "m " then
Message("Message from " .. plr.Name, msg:sub(3), true, game.Players:children())
end

if msg:lower():sub(1,2) == "h " then
Hint(plr.Name .. ": " .. msg:sub(3), game.Players:children())
end

if msg:lower():sub(1,3) == "pm " then
local chk1 = msg:lower():sub(4):find(" ") + 3
local plrz = GetPlr(plr, msg:lower():sub(4,chk1-1))
Message("Private Message from " .. plr.Name, msg:sub(chk1+1), true, plrz)
end

If you have any questions, please PM me on ROBLOX.

5 comments

0

That code was created by Kohltastrophe; please give credit.

0

Oh sorry about that, I forgot.

0

Are you using a custom chat system?

0

The games I put this script in uses Roblox's standard chat if that's what you're asking. This is the admin message guis.

0

kohl's code is ugly as heck

1 answer

✓ Accepted answer

A very helpful wiki article.

Chat:FilterStringAsync(text, fromplayer, toplayer)

3 comments

0

I read through this article and tried to do and follow what the article said, but I couldn't figure it out.

1

After a bunch of different testing, this article did help me a little bit and going through other ScriptingHelpers answers about filtering finished the job. I got it to work. Thank you.

0

You're welcome :D

This discussion is preserved as it was. New answers, comments, and votes are closed.