# Custom Commands and Functions

* You can define your own [commands](https://docs.yarnspinner.dev/2.4/using-yarnspinner-with-rust/creating-commands-functions/creating-commands), which allow the scripts you write in Yarn Spinner to control parts of the game that you've built.
* [Functions](https://docs.yarnspinner.dev/2.4/using-yarnspinner-with-rust/creating-commands-functions/creating-functions) are units of code that Yarn scripts can call to receive a value. In addition to the [built-in functions](https://docs.yarnspinner.dev/2.4/getting-started/writing-in-yarn/functions#built-in-functions) that come with Yarn Spinner, you can create your own.
