# MSK Tokenizer

`Event Tokenizer` is a FiveM anti-cheat resource designed to protect server events from executor abuse.

Each player receives a dynamic rotating token that must be included when triggering protected server events. If the token is invalid, the action is rejected and the player can be banned automatically through `Core.BanPlayer`.

The system is lightweight, secure, and designed to integrate easily into any resource that needs protected server-side event handling.

### Features

* Dynamic per-player security token
* Hidden client key injection
* Protected server event validation
* Automatic token rotation
* Automatic ban support for invalid requests
* Replay protection
* Easy integration into existing resources
* Uses `msk_bridge` for ban handling

### How it works

When a player joins, the server generates a unique token and hidden key.

The hidden key is injected into the client and used internally to request the current token. Your client-side resource includes that token as the first argument when triggering a protected server event.

On the server, the event validates the token using the tokenizer export. If validation fails, the request is treated as invalid and the player can be banned automatically.

Tokens rotate after every valid protected event and also rotate periodically to improve security.

### Included Pages

* Installation
* Configuration

### Requirements

Before using this resource, make sure all required dependencies are installed and started correctly.

### Notes

* Invalid tokens can result in automatic bans
* Token protection must be added manually to each protected event
* Token rotation happens automatically
* Ban handling is performed through `msk_bridge`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mskscripts.gitbook.io/mskscripts/general-information/msk-tokenizer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
