> ## 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.

# getscriptglobals

> Devuelve una new table que contiene los current LUA_GLOBALSINDEX values para _G y shared. La function no toma arguments, crea una fresh table, asigna _G desde LUA_GLOBALSINDEX._G y shared desde LUA_GLOBALSINDEX.shared, y devuelve exactly one value. No devuelve la full global table, y no hay alias registrado para getscriptglobals.

<div className="real-function-page">
  ```lua theme={null}
  getscriptglobals(): table
  ```

  ## Retornos

  <ResponseField name={"globals"} type={"table"}>
    Fresh table con \_G y shared fields copiados desde LUA\_GLOBALSINDEX.
  </ResponseField>

  ## Ejemplo

  Read the \_G and shared values copied from LUA\_GLOBALSINDEX.

  ```lua theme={null}
  local globals = getscriptglobals()

  print(globals._G)
  print(globals.shared)
  ```
</div>
