> For the complete documentation index, see [llms.txt](https://docs.punkland.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.punkland.io/punkland-studio/script/client.md).

# Client Script

* The client script must exist in the project folder or in Scripts with a file name like Hello.lua to be read.

<table><thead><tr><th width="355">script</th><th>explanation</th></tr></thead><tbody><tr><td><strong>Client.width</strong></td><td>Gets the width of the screen.</td></tr><tr><td><strong>Client.height</strong></td><td>Gets the vertical size of the screen.</td></tr><tr><td><strong>Client.ShowAlert(text, callback)</strong></td><td>Displays a notification message.</td></tr><tr><td><strong>Client.ShowYesNoAlert(text, callback)</strong></td><td>Displays a Yes/No notification message.</td></tr><tr><td><strong>Client.ShowBuyItem(id, amount, callback)</strong></td><td>Displays a message to purchase a specific item.</td></tr><tr><td><strong>Client.Quit()</strong></td><td>Close the client.</td></tr><tr><td><strong>ScriptEventPublisher Client.GetTopic(topic)</strong></td><td>Register a specific topic to exchange messages with the server.</td></tr><tr><td><strong>Client.FireEvent(topic, args…)</strong></td><td>Sends a message to the server with a specific topic.</td></tr><tr><td><strong>Client.RunLater(callback, t)</strong></td><td>Executes a callback function after t seconds.</td></tr><tr><td><strong>Camera</strong></td><td>Object that controls the camera</td></tr><tr><td><strong>Point</strong></td><td>A class that contains x, y coordinates</td></tr><tr><td><strong>Rect</strong></td><td>A class that contains a rectangle with x, y, width, and height.</td></tr><tr><td><strong>Image</strong></td><td>A class that outputs images</td></tr><tr><td><strong>Text</strong></td><td>A class that prints text</td></tr><tr><td><strong>Slider</strong></td><td>A class that outputs a control controller.</td></tr><tr><td><strong>Button</strong></td><td>Class that outputs the button</td></tr><tr><td><strong>Panel</strong></td><td>A class that outputs a panel.</td></tr><tr><td><strong>ScrollPanel</strong></td><td>A class that outputs a scrolling panel.</td></tr><tr><td><strong>GridPanel</strong></td><td>A class that outputs panels arranged in a grid.</td></tr></tbody></table>
