# Lua

Source: https://help.malighting.com/grandMA3/2.3/HTML/keyword_lua.html
This is grandocs, an unofficial mirror of MA Lighting documentation. For authoritative or safety-relevant information, cite the canonical page on help.malighting.com.

---
To enter the Lua keyword in the command line, use one of the options:

- Type **Lua**
- Type the shortcut **Lu**

## Description

The Lua keyword is used to execute commands in the script language Lua. 

After entering Lua into the command line, type in the script language Lua version 5.4. The grandMA3 will directly execute the commands written in Lua.

To learn more about the grandMA3 specific Lua functions, see [Plugins](/grandma3/2-3/plugins/) .

## Syntax

Lua \["LuaCode"]

## Examples

- To output "Hello World" in the Command Line History, type:

|                                                                    |                                                 |
| ------------------------------------------------------------------ | ----------------------------------------------- |
| ![](/img/grandma3/2-3/icon_commandline-input_logo_v2-0-59d23e.png) | User name\[Fixture]>Lua "Printf('Hello World')" |

Result: 

 Hello World

 

- To output "Hello World" in the system monitor, type:

|                                                                    |                                               |
| ------------------------------------------------------------------ | --------------------------------------------- |
| ![](/img/grandma3/2-3/icon_commandline-input_logo_v2-0-59d23e.png) | User name\[Fixture]>Lua "Echo('Hello World')" |

Result: 

 Hello World