THE ORB
Starting the studio

Script Optimizer: guide and tutorial

The exact lines eating ms in resmon, with the fix for each.

Video tutorial coming soon

Until then, the written guide below takes you through every step.

What it is

Script Optimizer reads your scripts and tells you what will slow your server down once players fill it: code that runs 60 times a second for nothing, database calls that freeze everyone, data sent to every player when only one needs it. You get a health score and a list ordered by what to fix first, each item written as what happens to your server. Then ORBIE can rewrite the problem files and give them back ready to drop in.

Who it's for

  • Server owners whose server stutters or rubber-bands when it gets busy.
  • Anyone who sees a resource eating milliseconds in resmon (the in-game resource monitor) and wants to know why.
  • People who want to check a script before putting it on a live server.

Before you start

  • The scripts to scan: a .zip of your resources, a whole folder (even your full resources/ folder), or single .lua and .js files.
  • To let ORBIE fix things: a THE ORB account and, for most fixes, credits. See pricing.

Scan your scripts

  1. 1

    Open the Script Optimizer

    Go to Script Optimizer.

  2. 2

    Drop your resources

    Drag a .zip, a folder or .lua and .js files onto the box that says Drop your resources here, or use Choose .zip / files or Choose a folder. Several resources at once are fine.

  3. 3

    Wait a moment

    Every script is read and checked for the patterns known to slow FiveM servers. It takes seconds.

The scan happens entirely in your browser and is free. No file is sent anywhere unless you ask ORBIE to fix that file.

Only .lua and .js files and the resource manifests are read; images, models and sounds are ignored. The manifest tells the tool which scripts run on players' computers and which run on the server. Very large uploads stop being read at about 25 MB of code or 4,000 files.

Your last scan is kept on this device. If you come back later, it opens where you left it. After changing your scripts, use Re-analyze new version in the Scan section to scan them again.

Read the score and the list

At the top of the Issues section you see the Server health score, from 0 to 100, with a one-line verdict:

ScoreWhat it says
85 to 100Your server should hold up fine
60 to 84A few things will bite you as you grow
35 to 59This will lag once your server fills up
Under 35Your players are going to feel this

Below it, the problems are grouped by when to deal with them: Fix this first, Fix this soon, Worth fixing, and Minor. Each line says what happens to your server, followed by the resource it is in.

The viewer opens on What this does to your server: the three worst problems, each with what happens and when. Click any of them to open it.

Some of the things it looks for:

  • Code that runs 60 times a second, forever, even when nobody is near it.
  • Database calls that freeze the whole server every time they run, so everyone stops moving.
  • Data sent to every player on the server, including the ones who do not need it.
  • Background tasks started for every player who joins that never stop.
  • Work that freezes the server for a moment every time a player connects.
  • Menus on screen updated 60 times a second even when nothing changed.

At the bottom of the overview, What we counted while scanning shows the raw numbers: lines of code, background tasks, loops running every frame, messages sent to every player, database calls that block, and files scanned.

Open a problem

  1. 1

    Click a problem in the list

    The viewer shows its urgency, what it does to your server, who it hits and when.

  2. 2

    Read What needs to change

    A short description of the change, written so you can judge afterwards whether ORBIE's fix did it.

  3. 3

    Open See the technical details if you need them

    The file and line, whether it runs on the player's computer or the server, the code that triggered it, and the technical explanation. Useful for a developer.

  4. 4

    Go back

    Use Back to the summary in the viewer's top bar.

Let ORBIE fix one problem

Every problem has an ORBIE box with its price in the corner. The price depends on how much reasoning the fix needs: some are exact changes that need no AI and are free, the rest cost a few credits (by default 1 or 5). On the Free plan, the deeper fixes include one free try; after that they come with a paid plan.

  1. 1

    Press Fix it, ORBIE

    That one file is sent to our server. That is the only exception to the browser-only scan, it only happens when you click, and the code is not kept. You must be signed in.

  2. 2

    Read the answer

    You see How sure ORBIE is as a bar with a percentage, and What I changed in plain words. See exactly what changed opens the lines before and after.

  3. 3

    Press Use this fix

    The fix is applied to the copy kept in your browser, the file is checked again, and the score goes up if the problem is gone. Your files on disk are never touched.

ORBIE only offers Use this fix when it is sure enough (the minimum is shown on screen). Below that, read its answer as an idea, not a file to drop in.

If ORBIE cannot make a fix it trusts (for example, the change would break the script, or the code turns out to be fine), it says so. When it actually ran and produced nothing safe, 1 credit is kept for the try; otherwise you are not charged. Some kinds of problems are marked ORBIE doesn't fix this one on its own yet: those are not offered, so you are never charged for a try that would likely fail.

Fix all of it

  1. 1

    Check the total

    At the bottom of the Issues section, the panel says how many problems ORBIE can fix and the exact total in credits, next to your balance. If your credits do not cover everything, it says roughly how many they reach.

  2. 2

    Press Fix all of it

    ORBIE works through the list, one fix and one charge at a time. A banner shows how many are fixed and skipped.

  3. 3

    Leave if you want

    It keeps working if you go to another page. The chip in the top bar brings you back. Press Stop to end it early.

It stops when your credits run out. What it fixed stays fixed.

Ask ORBIE to double-check

Some problems depend on what the rest of the script does. When the list has any of those, a box offers Have ORBIE double-check these.

  1. 1

    Press Review

    ORBIE reads the code around each of those problems (up to 20). That part of each file is sent to us. It costs 1 credit by default, shown in the box.

  2. 2

    See what changed

    The ones that turn out to be fine are removed from the list and the score is recalculated. A line says how many were dropped.

Download or share the report

The Report section has three things:

  • Download the PDF report: a branded PDF with the score and every problem, made in your browser.
  • Share: publishes a public link at /report/<code> and copies it. You must be signed in. The public page only shows the score, how many problems of each urgency, the framework and the kinds of problems, never file names, lines or code. Once published, the button becomes Copy link.
  • What ORBIE changed: every fix applied, with the lines it touched.

Check for cheaters in the rail sends the same upload to the Vulnerability Scanner, so you do not have to drop it again.

What you download

After applying fixes, press Fixed files in the panel. You get <name>-fixed.zip with:

  • Only the files ORBIE changed, each at the same path it had in your upload. Files nobody touched are not in the zip.
  • ORBIE-CHANGES.md: every fix applied, the file, the lines and what changed.

The PDF report downloads as <name>-performance-report.pdf.

Install it on your server

  1. 1

    Back up the resource

    Copy the resource folder somewhere outside resources/.

  2. 2

    Copy the fixed files over the originals

    Unzip the download. Each file sits at the same path as in your upload, so copy it into the same place inside your resource, replacing the old one.

  3. 3

    Try it on a test server first

    Restart the server, or type ensure followed by the resource name in the console. Use the script in game and watch resmon to see the difference.

Keep your backup until you have played with the change for a while. If anything misbehaves, put the original file back.

Common problems

The report is the same after I changed my scripts.

You are looking at the scan kept from before. In the Scan section, use Re-analyze new version and choose the new files, or New scan to start clean.

Fix it, ORBIE opens the plans window.

That problem needs a deep fix, and on the Free plan you already used your free one. See pricing.

It says I am out of credits.

Get more credits or upgrade your plan. The scan itself stays free.

ORBIE answered, but there is no Use this fix button.

ORBIE was not sure enough to hand you the file. Use its explanation and What needs to change to fix it by hand, or pass it to a developer.

It says it already tried this one twice.

A third try will not go differently. Use the explanation to fix it by hand.

My big upload seems to be missing scripts.

Reading stops at about 25 MB of code or 4,000 files. Scan fewer resources at a time.

Questions

Is my code uploaded?

Not to scan it. A file is sent to our server only when you ask ORBIE to fix or double-check it, and the code is not kept.

Does a high score mean my server will not lag?

It means none of the known lag patterns were found in what you scanned. Lag can also come from scripts you did not upload, the host machine or streamed assets.

Does ORBIE change my files?

Never on your disk. The fixed copy lives in your browser until you download it, and you replace the files yourself.

Can I scan my whole server at once?

Yes, drop the whole resources/ folder or a .zip of it, up to about 25 MB of code.

Can I prove to someone that my script is clean?

Share the report: the public link shows the score and counts without exposing any of your code.

Checked against the tool on November 15, 2026.

Try Script Optimizer now

A resource eating ms in resmon? Paste the script and see the exact lines slowing your server, with the fix for each one.

More guides in Scripts