---
url: /api/kiln/functions/savePlugin.md
---
[Kiln API](../../index.md) / [kiln](../index.md) / savePlugin

# Function: savePlugin()

```ts
function savePlugin(options?): Plugin;
```

Save slots and persisted settings. `savePlugin({ resources: [Level, Score], traits: [IsPlayer,
Transform, Health], persist: [Settings, HighScore] })`. Systems call `res.mut(Saves).save('slot1')`
/ `.load('slot1')`; `persist` resources load before Startup and save themselves when they change.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | [`SaveOptions`](../interfaces/SaveOptions.md) |

## Returns

[`Plugin`](../interfaces/Plugin.md)
