Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago
Edited 7 years ago

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.

0
That code was created by Kohltastrophe; please give credit. TheeDeathCaster 2368 — 7y
0
Oh sorry about that, I forgot. Samueldb 10 — 7y
0
Are you using a custom chat system? M39a9am3R 3210 — 7y
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. Samueldb 10 — 7y
0
kohl's code is ugly as heck Perci1 4988 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

A very helpful wiki article.

Chat:FilterStringAsync(text, fromplayer, toplayer)
0
I read through this article and tried to do and follow what the article said, but I couldn't figure it out. Samueldb 10 — 7y
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. Samueldb 10 — 7y
0
You're welcome :D Programical 653 — 7y
Ad

Answer this question