> ## 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

> 旧版 PlayFab CloudScript 概览:可运行由客户端、PlayStream 事件规则或计划任务触发的服务器端 JavaScript 逻辑。

CloudScript 是 PlayFab 最灵活的功能之一。它允许客户端代码请求执行任何你能实现的自定义服务器端功能,并且几乎可以与*任何事物*配合使用。

CloudScript 让你能够构建可根据需求扩展的服务器端逻辑和功能,而无需担心服务器或基础设施。你可以创建仅能通过你的服务访问的 CloudScript 函数,从而防止客户端的任何篡改尝试。

例如,你可以让客户端从游戏中请求“每日奖励”,并信任服务器端的验证以防止两次发放奖励。

## 另请参阅

若要使用 [Azure Functions 版 CloudScript](/services/playfab/live-service-management/service-gateway/automation/cloudscript-af) 的功能,请参阅我们的 [Azure Functions 版 CloudScript 快速入门指南](/services/playfab/live-service-management/service-gateway/automation/cloudscript-af/quickstart)。


## Related topics

- [PlayFab 的 PlayStream 事件模型参考](/zh-CN/services/playfab/api-references/events/index.md)
- [cloudscript_executed](/zh-CN/services/playfab/api-references/events/CloudScript/cloudscript-executed.md)
- [CloudScript 快速入门](/zh-CN/services/playfab/live-service-management/service-gateway/automation/cloudscript/quickstart.md)
- [编写自定义 CloudScript](/zh-CN/services/playfab/live-service-management/service-gateway/automation/cloudscript/writing-custom-cloudscript.md)
- [CloudScript 中的 ES6 特性](/zh-CN/services/playfab/live-service-management/service-gateway/automation/cloudscript/es6-features-in-cloudscript.md)
