> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getreg

> Returns the current Lua registry table. The function takes no arguments and returns the registry table directly.

Returns the current Lua registry table. The function takes no arguments and returns the registry table directly.

## Syntax

```lua theme={null}
getreg(): table
```

## Aliases

* `getregistry`
* `debug.getreg`
* `debug.getregistry`

## Returns

| Name       | Type    | Description                     |
| ---------- | ------- | ------------------------------- |
| `registry` | `table` | The current Lua registry table. |

## Example

Return the current Lua registry table.

```lua theme={null}
local registry = getreg()

print(type(registry))
print(type(getregistry()))
print(type(debug.getreg()))
print(type(debug.getregistry()))
```
