vodka / Protection

How to stop people stealing your Roblox script. Raise the cost, trace the leak, cut off access.

A realistic guide to reducing script theft: layer protection, key access and HWID locks, trace leaks with per-key fingerprints, and keep the real secret on the server.

Protection6 min read

The honest premise

You cannot make a script un-stealable. You can make it not worth it.

Start from the truth, because a guide that promises theft-proofing is lying to you. An authorized player receives the code they run, so a determined person with that access can study it. No client-side tool changes that. What you can do is raise the cost of copying, limit how far one copy spreads, and keep the ability to cut off access when a leak happens.

The way to do that is layers. No single setting stops theft; a stack of them makes it expensive and traceable enough that most people move on to an easier target.

Layer one

Protect the code so a casual copy is useless.

The first layer is making the distributed code hard to read and reuse. vodka's default build encodes constants, flattens control flow, renames locals and watermarks the output, and an opt-in bytecode VM goes further for the scripts that warrant it. A copied file is then a wall of transformed Luau rather than your clean source.

Walk through the specifics in how to obfuscate and protect a Luau script, and see exactly what the engine does and does not defeat on the protection reference and the benchmarks.

Layer two

Gate access and bind it to devices.

Protection slows a reader. A key system controls who gets the script at all, and that control is what lets you respond to a leak:

  • A server-enforced key means only people you authorized run the current release, and you can revoke that authorization later. See how to add a key system.
  • HWID locking binds a key to one machine, so a single shared key does not spread across a whole server. Read HWID locking explained.
  • Revocation and a blacklist turn a leak from a permanent loss into a one-time one: kill the key, block the user, ship on.

Layer three

Trace a leak back to its source.

When a copy does get out, the useful question is which key it came from. Each keyed delivery on vodka carries a traceable per-key fingerprint, so a casually leaked copy maps back to the key that received it. That turns a vague loss into a specific one you can act on.

With the source key identified, you revoke it. The leaked copy stops verifying, the person who leaked it loses access, and your paid or gated flow is back in one piece. Tracing plus revocation is what makes a key system worth more than a password.

The real rule

Keep the thing you cannot lose on the server.

The strongest protection against theft is not shipping the valuable thing at all. Any secret you put inside the client can be recovered from the client. Any check you write into the loader can be edited out of the loader. So the logic you truly cannot afford to lose, and the decision about who gets access, belong on a server where the client never sees how it works.

That is exactly why vodka enforces the key, expiry, revocation and HWID checks server-side rather than trusting the loader. Protection raises the cost of copying; the server is what actually gates access.

Questions

A few things worth knowing.

01Can I make my script impossible to steal?

No, and anyone who tells you otherwise is selling something. An authorized client receives the code it runs. The realistic goal is to raise the cost of copying, limit how far one copy spreads, trace leaks to a key, and keep the ability to revoke access.

02If I obfuscate, do I still need a key system?

They do different jobs. Obfuscation makes a copied file harder to read; a key system controls who receives the script and lets you revoke access after a leak. Theft resistance comes from stacking both, plus HWID locks and leak tracing.

03How do I find out who leaked my script?

Each keyed delivery carries a per-key leak-tracing fingerprint, so a casually leaked copy maps back to the key that received it. Once you know the key, you revoke it to cut off the leaked copy.

04What should never go in the script itself?

Anything you cannot afford to leak: credentials, server secrets, and the logic behind an access decision. Keep those on a server. vodka already enforces the key check, expiry, revocation and HWID lock server-side rather than in the distributed loader.

Keep reading

Where to go next.

Keep building

Your next release starts here.

Bring your original source. Make the workspace your own.

Get started
vodka / BlogPublished