# AI chat moderation in Roblox — by meaning, not a word list

> Source: <https://dev.to/korvus228/ai-chat-moderation-in-roblox-by-meaning-not-a-word-list-5pk>
> Published: 2026-08-23 12:16:33+00:00

Word-list chat filters break the moment someone types `a s s a s s i n`

with spaces, or a slur spelled with a `0`

, or a perfectly innocent word that happens to contain a banned substring. You end up in an endless arms race patching your blocklist.

An AI model reads the **meaning** of a message, so it catches obfuscated toxicity and stops false-flagging harmless phrases.

``` js
local Cortex = require(game.ServerStorage.Cortex)
local ai = Cortex.new("YOUR_KEY")

local verdict = ai:ask(
    "You moderate a kids' game chat. Reply with exactly one word: SAFE or BLOCK.",
    message
)
if verdict == "BLOCK" then
    -- don't send it
end
```

The reply is one word, so it's cheap: with [Cortex](https://cortex-rbx.github.io) you're billed on **output tokens only**, and repeated messages are served from cache for free — so moderating your whole chat costs a fraction of a Robux. You pay in Robux, no credit card, and the key stays server-side.

`BLOCK`

verdicts so you can tune the prompt.Free open beta and open-source kit: [https://github.com/cortex-rbx/roblox-ai-kit](https://github.com/cortex-rbx/roblox-ai-kit) · demo: [https://cortex-rbx.github.io](https://cortex-rbx.github.io)
