# LUAScript

{% hint style="info" %}
Basic LUA and Some Web Development Knowledge required
{% endhint %}

Let's take a look at the script shown in [HTML Interpreter](/websitecreator/html.md)

```lua
delay(1)
local name = window.input("What is your name?","My name is ...")
local elm = document.createNode("p",{
style="color:red"
},string.format("Welcome %s",name))
document.querySelector("body").appendChild(elm)
elm.style="color:blue"
print("Updating")
--document.innerHTML ="<p>CHANGE INNER HTML</p>"
elm.style="color:red"
--elm.innerText = "Test!"
print("Done!")
```

LUAScript uses native LUA Functions but also takes some custom functions built in

LUAScript Functions

<table><thead><tr><th>Function</th><th>Documentation</th><th data-hidden></th></tr></thead><tbody><tr><td>delay</td><td><a data-mention href="/pages/NEHhyYTbM0ONnkGnlxE8">/pages/NEHhyYTbM0ONnkGnlxE8</a></td><td></td></tr><tr><td>Document Elements</td><td><a data-mention href="/pages/PWBRziIecaq7mVveeAD0">/pages/PWBRziIecaq7mVveeAD0</a></td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.novarietygames.com/websitecreator/luascript.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
