# Security

Server-side validation and anti-cheat protection.

### Validation Checks

| Check       | Description                        |
| ----------- | ---------------------------------- |
| Distance    | Player must be within range of ATM |
| Timing      | Minimum 3 seconds for completion   |
| Rate Limit  | Max 1 request per 500ms            |
| Item Check  | Server verifies tool in inventory  |
| Cooldown    | Server-side cooldown enforcement   |
| Coordinates | World bounds validation            |

### Violation System

| Count | Action                   |
| ----- | ------------------------ |
| 1-9   | Console log (debug mode) |
| 10+   | Discord webhook alert    |
| 20+   | Player kicked            |

### What Gets Validated

* Player source is valid
* ATM coordinates within world bounds
* ATM ID format is correct
* Item names are valid strings
* Amounts within limits
* Distance to ATM
* Robbery completion timing
* Cooldown bypass attempts

### Anti-Exploit Measures

* All rewards calculated server-side
* No client-side money distribution
* Tool break chances server-side
* Active robbery state tracking
* Minigame timing validation
* Stale entity detection

### Webhook Alerts

```
Config.Webhook = {
    enabled = true,
    url = 'YOUR_WEBHOOK_URL',
}
```

Alert includes: Player name/ID, violation type, count, identifier, timestamp


---

# 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://elena-scripts.gitbook.io/elenascripts/gameplay/atm-rob/security.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.
