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

> _G と shared の current LUA_GLOBALSINDEX values を含む new table を返します。この function は arguments を取らず、fresh table を作成し、_G を LUA_GLOBALSINDEX._G から、shared を LUA_GLOBALSINDEX.shared から割り当て、exactly one value を返します。full global table は返しません。getscriptglobals に登録された alias はありません。

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

  ## 戻り値

  <ResponseField name={"globals"} type={"table"}>
    LUA\_GLOBALSINDEX からコピーされた \_G と shared fields を持つ fresh table。
  </ResponseField>

  ## 例

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

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

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