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

> Zwraca new table zawierajaca current LUA_GLOBALSINDEX values dla _G i shared. Function nie przyjmuje arguments, tworzy fresh table, przypisuje _G z LUA_GLOBALSINDEX._G oraz shared z LUA_GLOBALSINDEX.shared i zwraca exactly one value. Nie zwraca full global table, a dla getscriptglobals nie zarejestrowano alias.

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

  ## Zwroty

  <ResponseField name={"globals"} type={"table"}>
    Fresh table z \_G i shared fields skopiowanymi z LUA\_GLOBALSINDEX.
  </ResponseField>

  ## Przykład

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

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

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