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

> Tra ve new table chua current LUA_GLOBALSINDEX values cho _G va shared. Function khong nhan arguments, tao fresh table, gan _G tu LUA_GLOBALSINDEX._G va shared tu LUA_GLOBALSINDEX.shared, va tra ve exactly one value. No khong tra ve full global table, va khong co alias duoc dang ky cho getscriptglobals.

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

  ## Giá trị trả về

  <ResponseField name={"globals"} type={"table"}>
    Fresh table voi \_G va shared fields duoc copy tu LUA\_GLOBALSINDEX.
  </ResponseField>

  ## Ví dụ

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

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

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