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

# getscripts

> ส่งคืนค่า script object ที่มีอยู่ใน Instance cache ในตอนนี้ function นี้ไม่รับ arguments โดยวนผ่าน cache ที่เก็บไว้ใต้ key Instance cache lightobject และพิจารณาเฉพาะ entries ที่ value เป็น object อ่าน field ClassName ของแต่ละ value ด้วย optional string handling entries แบบ LocalScript และ ModuleScript จะถูกใส่ในผลลัพธ์ entries แบบ Script จะถูกใส่เฉพาะเมื่อ RunContext offset เท่ากับ CLIENT หรือ PLUGIN ค่า ClassName อื่น entries ที่ไม่มี string ClassName และ CoreScript จะถูกข้าม ผลลัพธ์เป็น sequential Luau table function ไม่ traverse DataModel และไม่รับประกัน sorted order

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

  ## Returns

  <ResponseField name={"scripts"} type={"{ Instance }"}>
    Sequential table ของ cached LocalScript, ModuleScript และ Script object ที่เข้าเงื่อนไขจาก Instance cache
  </ResponseField>
</div>


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