DEV Community

Korvus
Korvus

Posted on

I built an AI that writes and runs Luau inside Roblox Studio

Roblox Studio scripting is mostly boilerplate. You already know what you want — a healing potion that gives +25 HP, a door that opens when a player is near — but you still hand-write the Instance tree, wire the events, and wade through the property soup.

So I built Cortex: an AI terminal that lives inside Studio. You type what you want in plain English, it turns that into Luau, and runs it right in your place. Made a mistake? Ctrl+Z, like any other Studio action.

What it feels like

› make a healing potion that gives +25 HP
✻ Thinking…
⎿ applied Luau
   + HealingPotion (Tool) → StarterPack
   + heal server script
✔ done · Ctrl+Z to undo
Enter fullscreen mode Exit fullscreen mode

It reads your current selection too. Select a script, say "make it respawn the player on death", and it edits that script's .Source in place — you're not copy-pasting snippets back and forth.

What it generated for that request

local tool = Instance.new("Tool")
tool.Name = "HealingPotion"
tool.RequiresHandle = false
tool.Parent = game.StarterPack

local s = Instance.new("Script", tool)
s.Source = [[
  script.Parent.Activated:Connect(function()
    local h = script.Parent.Parent:FindFirstChildOfClass("Humanoid")
    if h then h.Health = math.min(h.MaxHealth, h.Health + 25) end
  end)
]]
Enter fullscreen mode Exit fullscreen mode

Under the hood

  • It's a Studio plugin that calls a small gateway routing to frontier models (Claude, GPT-5).
  • The generated Luau runs via loadstring, with a ModuleScript require fallback.
  • Every change is wrapped in ChangeHistoryService, so Undo/Redo just works.
  • No account, no config — install and go.

Why not just use Studio's built-in Assistant?

Roblox's own AI is handy for snippets, but Cortex builds in your place and reads your actual selection and context. It's less "chat that hands you code to paste" and more "say what you want and it's there." Different tool for a different moment.

Try it (free, open beta)

  • Kit + plugin loader: github.com/cortex-rbx/roblox-ai-kit
  • What the terminal looks like: cortex-rbx.github.io/cortex.html
  • Grab a free beta key in the Discord: discord.gg/A3MSqwkvn7

Honest note: it's an open beta — free keys for early testers, no 24/7 uptime guarantee yet. If you try it and it breaks, tell me; that feedback is the whole point right now.

Top comments (0)