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

> يرجع new table تحتوي على current LUA_GLOBALSINDEX values للحقول _G و shared. لا تأخذ function أي arguments، تنشئ fresh table، تعين _G من LUA_GLOBALSINDEX._G و shared من LUA_GLOBALSINDEX.shared، وترجع exactly one value. لا ترجع full global table، ولا يوجد alias مسجل لـ getscriptglobals.

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

  ## القيم الراجعة

  <ResponseField name={"globals"} type={"table"}>
    Fresh table تحتوي على \_G و shared fields منسوخة من LUA\_GLOBALSINDEX.
  </ResponseField>

  ## مثال

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

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

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