--- title: UI scripts description: UI scripts provide a way to package client-side JavaScript into a reusable form, similar to how script includes store server-side JavaScript. Administrators can create UI scripts and run them from client scripts and other client-side script objects and from HTML code.Create a UI script to define reusable client-side JavaScript code.Follow these general guidelines when running UI scripts. locale: en-US canonical_url: https://www.servicenow.com/docs/r/api-reference/scripts/c\_UIScripts.html release: brazil product: Scripts classification: scripts topic_type: concept last_updated: "2026-09-10" reading_time_minutes: 2 breadcrumb: [Write client-side scripts, Scripting, API implementation, API implementation and reference] --- # UI scripts UI scripts provide a way to package client-side JavaScript into a reusable form, similar to how script includes store server-side JavaScript. Administrators can create UI scripts and run them from client scripts and other client-side script objects and from HTML code. **Note:** UI scripts aren't supported on mobile or Next Experience. **Parent Topic:**[Writing client-side scripts](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/client-side-scripting-overview.md) ## Create a UI script Create a UI script to define reusable client-side JavaScript code. ### Before you begin Role required: admin ### Procedure 1. Navigate to **System UI** > **UI Scripts**. 2. Select **New**. 3. On the form, fill in the fields.
| Field | Description |
|---|---|
| API Name | The API name of the UI script, including the scope and script name \(for example, x\_custom\_app.HelloWorld\). |
| Application | Application that contains the UI script. |
| UI Type | Target user interface to which the UI script applies. |
| Active | Indicator of whether the UI script is active. Only active UI scripts can run. |
| Global | An option to makes the script available on any form in the system. You can call global UI scripts from any client script or UI policy you write.**Note:** Use caution when creating global UI scripts because they can impact performance. You can't create a global UI script in a scoped application. |
| Description | Summary of the purpose of the script. |
| Script | Client-side script to run when called from other scripts. |