> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-new-player-and-anti-troll/cas-new-player-and-anti-troll.md).

# CAS New Player & Anti-Troll

`cas-newplayer` protects your server from fresh-account trolls. New players are restricted from shooting or hostile actions until they have spent enough time in the game, keeping the experience fair and safe for everyone — especially newcomers.

## Highlights

* Time-based restrictions on hostile actions for new players
* Anti-troll protection that keeps newcomers safe
* Configurable health / stamina recharge handling
* Works with **VORP** and **RSG**

## At a glance

|               |                                   |
| ------------- | --------------------------------- |
| Frameworks    | VORP, RSG                         |
| Resource name | `cas-newplayer`                   |
| Install       | Plug & play (one small VORP edit) |

## Installation

Plug & play — drop the resource in and ensure it. On **VORP**, one small edit is required (below). **RSG** works out of the box.

### VORP Core integration

The script hooks character initialization through a custom event. In `vorp_core/client/spawnplayer.lua`, find the `vorp:initCharacter` handler and add this line **at the very end** of the function:

```lua
TriggerEvent("vorp:initCharCustom", coords, heading, isdead)
```

Do **not** replace the existing logic — only append this trigger so your custom initialization runs after the player has fully loaded. This keeps full VORP compatibility without breaking the default spawn flow.

## Configuration

Restrictions, timers and health/stamina recharge are configured in `config.lua`.

## Support

Join the [CAS Discord](https://discord.gg/X8bTK9Stwk) or use the support channel on your product page.
