> ## 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 ที่ register สำหรับ getscriptglobals.

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

  ## Returns

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.