# Code stripping

When you ship a client build of your game, all your code goes with it. That includes server-side logic like damage calculations, loot tables, or anti-cheat checks. Anyone who decompiles your build can read that code and use it to find exploits. Code stripping removes server-only code from client builds automatically, so that sensitive logic never leaves your server.

This allows for an added layer of safety to your Server-Client games. And it's all handled for you by PurrNet.

It will automatically strip all server specific code from all builds but Server builds. You can find the setting in Project Settings -> Multiplayer -> PurrNet -> Strip Code Mode, and simply set the desired strip mode.

<figure><img src="https://3317286851-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsgxJN58uttGJCEXbBIwp%2Fuploads%2Fgit-blob-2470535189684656f958c378863068019d58c8e0%2Fimage%20(34).png?alt=media" alt=""><figcaption></figcaption></figure>

You also have `ServerOnly` attribute at your disposal to strip and ensure methods are only ever executed by server.

```csharp
public class TestingClass
{
    [ServerOnly(StripCodeModeOverride.ReplaceWithLogError)]
    public void Testy()
    {
        Debug.Log("Testy called!");
    }
}
```
