> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CloudScript

> Overview of legacy PlayFab CloudScript for running server-side JavaScript logic triggered by clients, PlayStream event rules, or scheduled tasks.

CloudScript is one of PlayFab's most versatile features. It allows client code to request execution of any custom server-side functionality you can implement, and it can be used in conjunction with virtually *anything*.

CloudScript enables you to build server-side logic and functionality that scales to meet your demand, without worrying about servers or infrastructure. You can create CloudScript functions that can only be accessed via your service, to prevent any tampering attempts from clients.

For example, you can have a client request a "daily reward" from your game, and trust your server-side validation to prevent granting the reward twice.

## See Also

To leverage the power of [CloudScript using Azure Functions](/services/playfab/live-service-management/service-gateway/automation/cloudscript-af), check out our [CloudScript using Azure Functions quickstart guide](/services/playfab/live-service-management/service-gateway/automation/cloudscript-af/quickstart).


## Related topics

- [PlayStream event model reference for PlayFab](/services/playfab/api-references/events/index.md)
- [CloudScript quickstart](/services/playfab/live-service-management/service-gateway/automation/cloudscript/quickstart.md)
- [Writing custom CloudScript](/services/playfab/live-service-management/service-gateway/automation/cloudscript/writing-custom-cloudscript.md)
- [Handling Errors in CloudScript](/services/playfab/live-service-management/service-gateway/automation/cloudscript/handling-errors-in-cloudscript.md)
- [cloudscript_executed](/services/playfab/api-references/events/CloudScript/cloudscript-executed.md)
