# script

> Talos 0.7 · Since 0.6

Use it in a scene entity's `components` list as `{ "type": "script", … }`. The contract writes the fields flat and refuses unknown keys.

## Fields

| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| `module` | `string` | yes |  |  |  |
| `props` | `object` | no |  |  |  |

## Rules that can refuse it

- `animator-transition-unheard`
- `author-failed`
- `behaviour-detached`
- `behaviour-prop-unknown`
- `build.asset-missing`
- `build.import`
- `build.module-not-found`
- `build.module-outside-project`
- `camera-fov-overrides-scene`
- `dangling-ref`
- `feel/buried`
- `input-reader-not-player`
- `input-unbound`
- `play/no-response`
- `play/player-script-error`
- `prefab-unused`

## Example

From the contract's tested fixture `fixtures/contract/full20/scene.json#door`.

```json
{
  "type": "script",
  "module": "sliding-door",
  "props": {
    "openOn": "hazard-reached",
    "speed": 1.5
  }
}
```
