Your game server script leaked: what to do next

Latch team · 2026-12-05 · 5 min read

Someone sends you a link. Your script, the one you spent months on, is sitting in a Discord channel or a forum thread for anyone to download. It's a bad feeling, and the first instinct is to post something angry. Hold off for an hour. What you do in the next day decides how much the leak actually costs you.

This is a practical checklist: confirm what leaked, find where it came from, cut off access, ship an update, talk to your community and close the gap for next time. Where Latch helps, we say how. Where it doesn't, we say that too.

Five steps after a script leak: confirm, trace, revoke, update, tell your community

1. Confirm what actually leaked

Download the leaked copy into a folder away from your work and look at it before you do anything else. "My script leaked" can mean very different things:

  • Your source code. Readable, commented, maybe with your build config. This came from somewhere you or your team keep code: a repository, a shared drive, a test build you sent someone.
  • A protected package. If you publish with Latch, a leaked package is the encrypted download a server owner got from their Library. The server code in it isn't readable.
  • Client files only. On MafiaHub games, client scripts are sent to every player by the game, so they can't be encrypted. Latch obfuscates their JavaScript instead. Someone posting your client files is annoying, but your server logic isn't in them.
  • A key, not a file. Sometimes the "leak" is a server owner handing their license key to a friend.

Each of these has a different next step, so be sure which one you're dealing with.

2. Find out where it came from

A leaked Latch package

Every package a server owner downloads carries an invisible mark linked to their account. Open a support ticket with the leaked file; the team decodes the mark and tells you which account's package it came from. You don't need to guess, and you don't need to accuse anyone until you know.

A leaked package also doesn't run for whoever downloads it. A package only runs with a key of the account that downloaded it, so a copy passed to someone else stops with a message saying so:

Server console showing a leaked package refusing to run with another account's key

A shared key

A key runs on one server at a time. If the same key is started on a second server, the script won't open there and a flag is raised on the script's page. On Pro and above you're also emailed, and on Studio and above a flag.opened webhook can post it straight to your staff channel. Owners, admins and support members of your workspace can review flags. The leaks and key sharing page covers this in detail.

Leaked source code

Latch can't trace source that never went through it. Check who had access to the repository, which test builds went out unprotected, and whether any old releases are still floating around from before you protected the script. Change any secrets or tokens that were in the code.

3. Revoke access

Once you know the account, revoke it. On the script's Access tab, use Revoke access, or from the command line:

npx -y @heylatch/cli@latest access my-resource
npx -y @heylatch/cli@latest revoke my-resource LA-7K2M-9QXD

The script stops on all of that account's servers at the next verification, within about five minutes. Their server keeps running; only your script stops. Access belongs to the account, not to a key, so new keys don't bring it back. If the account added a free script from Explore, it can't add it again after you revoke it.

Access can also come from a bundle or a Discord role rule, so check the Access list afterwards to make sure nothing else still gives that account the script. The access docs describe how grants work.

For a shared key, the server owner can regenerate it on their Keys page; the old value stops working immediately.

4. Ship an update

If the leak is serious, ask the team in your ticket to rotate the script's encryption key. Every old package stops opening, and the console on those servers shows "this package is outdated". Everyone who still has access downloads the new package and carries on.

That's a good moment to publish a real update too, so the people who rely on your script get something out of the disruption:

npx -y @heylatch/cli@latest publish ./my-resource --changelog "Security update, please download the new version"

Everyone with access is notified when the version is ready. Server owners who keep their scripts current with the CLI pick it up on their next run without doing anything:

npx -y @heylatch/cli pull --all --to resources

If they update by hand, the updates guide explains it in three steps. Link to it in your announcement.

5. Talk to your community

The server owners who run your script will hear about the leak either way. It's better if they hear it from you, briefly and calmly:

  • Say what happened in one or two sentences. No details about how you traced it.
  • Say what they need to do. Usually: download the latest version from their Library and replace the old folder.
  • Say where official copies come from. Their Library on Latch, through access you granted. Anything else isn't from you and won't run.
  • Don't name anyone publicly. Revoking access is enough. A public callout tends to start an argument you don't need.

If you've connected the Latch Discord bot, release posts for the new version go to your announcement channel when it's ready, so the update and the message arrive together.

For copies hosted on public sites, most platforms have a copyright takedown process. GitHub, for example, documents its process in its guide to submitting a DMCA takedown notice. Read the platform's own rules before filing, and only file for work you own.

6. Prevent the next one

Where leaks startWhat helps
Unprotected builds sent to testers or clientsGive testers access through Latch like everyone else, and revoke it when testing ends
One license shared between several serversOne key per server; second servers are refused and flagged
A server owner passing their package onEach package is marked to its account and only runs with that account's keys
Packages committed to a public repositoryOwners who automate updates from a repo should keep it private
Source in shared drives or old releasesKeep source private; publish only protected versions

A few habits on your side help as well. Keep only the config server owners edit readable, and publish the rest protected. If you run a beta group on Discord, a role rule can give your beta testers access while they have the role and take it away when the role goes. And keep an eye on flags; on Pro and above, key sharing alerts come by email.

Be realistic about what protection does. No protection for code running on someone else's machine is 100%. Encryption and licensing stop unlicensed use and make reaching your source impractical, but a determined person with full control of a server may still pull code from memory. That's why the tracing and revoking matter as much as the encryption: when something does get out, you can find the source and shut it off. The How protection works page explains the model without the technical detail.

If you're dealing with a leak right now, start with the leaks and key sharing docs and open a ticket with the file. If your scripts aren't protected yet, the Free plan lets you try Latch with one script before the next release goes out.

All posts