> For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daikirai.gitbook.io/scripting/player/autoswap.md).

# AutoSwap

It keeps a bridge or other build going without a manual slot change.

## Choose when to switch

`Switch at` sets how many blocks may remain before AutoSwap changes stacks. `0` waits until the current stack is empty. `1` changes one block before empty, which is a practical starting point.

## Choose the next stack

`Only same type` limits the swap to another stack of the same block type. This prevents a build from changing material when several kinds of blocks are available.

`Swap to greater stack` chooses the matching stack with the most blocks when more than one is available.

## Keep the held item unchanged

`Spoof item` sends the slot change to the server without changing the item shown in your hand on the client.

## Related modules

* [Scaffold](/scripting/player/scaffold.md)
