| Điều hướng hàm | Mô tả |
|---|---|
decompile | Decompile một Roblox script và trả về source text được tạo khi có bytecode. argument phải là script Instance được hỗ trợ. Nếu không có bytecode dùng được, function trả về nil. |
dumpstring | Tra ve decompressed bytecode string cho Roblox script object. dumpstring duoc register vao cung C++ function voi getscriptbytecode, nen hanh vi giong het. argument phai la object. bytecode reader dung chung chap nhan cac gia tri ClassName ModuleScript, LocalScript, CoreScript va Script. Voi Script, RunContext phai la Client. Neu thieu ClassName, function tao “Invalid Instance”. Neu ClassName khong phai script class duoc ho tro, function tao “Script expected”. Neu gia tri la Script voi RunContext khac, function tao “Expected a Script with RunContext set to Client”. Neu embedded bytecode reference khong hop le hoac do dai stored bytecode la 8 bytes hoac it hon, function tra ve nil. Neu khong, no decompress stored bytecode bang DecompressBytecode va tra ve resulting bytes nhu Luau string. Hash mismatch, too-short compressed data hoac ZSTD decompression errors duoc DecompressBytecode tra ve duoi dang error text bytes thay vi throw tai day. |
getcallingscript | Tra ve script duoc luu tren current Luau thread object. Function khong nhan arguments. No doc the current thread script, la mot stored reference. Neu stored reference do chua expired, function push script Instance bang Instance cache va tra ve no. Neu stored reference expired, function tra ve nil. Function khong kiem tra Lua call stack, khong tim ancestor scripts, va khong kiem tra script ClassName. |
getinstancesbyclass | Tra ve instances tu Instance cache table co ClassName field khop chinh xac voi string duoc yeu cau. Doi so dau tien duoc doc bang string type checking. Empty string tao “ClassName required”. Function tao mot array table moi, lap qua cache duoc luu duoi Instance cache, chi giu values co Lua type la object, doc ClassName field cua tung object value, va so sanh bang strcmp voi className duoc yeu cau. Matches duoc chen sequential bat dau tai index 1. Match la exact va case-sensitive. Function khong dung IsA, khong bao gom subclasses, khong walk descendants, khong filter theo Parent, va khong sort result. getinstancesofclass la alias cho cung function. |
getloadedmodules | Returns a new array table containing live entries from loaded module list. The optional excludeCore argument is read with optional boolean handling and defaults to true when omitted or nil. If excludeCore is true, entries whose instance is a descendant of core packages or CoreGui are skipped. Expired weak entries and locked stored references without a value are skipped. The function pushes each remaining entry with Instance cache at sequential array indexes starting at 1. The function does not check ClassName, does not sort the result, and does not walk the DataModel. |
getmenv | Returns the environment table associated with a ModuleScript. The argument must be a ModuleScript object. Invalid objects raise “Invalid Instance”, non-ModuleScript objects raise “ModuleScript expected”, and ModuleScripts without an available thread raise “invalid thread”. The function does not accept Script or LocalScript; use getsenv for those cases. |
getreferencedby | Returns cached Instance values whose supported reference properties point to the provided Instance. The argument must be an Instance. |
getrunningscripts | Tra ve mot array table moi gom unique script Instances lay tu live Lua threads. Function khong nhan arguments. No di qua the live Luau thread list, doc tung thread node va bo qua entries khong co thread node, khong co weak thread ref, khong co LiveLuaRef, khong co Lua state, khong co object hoac co expired Script stored reference. Voi moi thread con lai, no lock scriptThread->object->Script(), deduplicate bang script reference, push Instance bang Instance cache va chen vao array indexes lien tiep bat dau tu 1. Function khong quet DataModel, khong kiem tra ClassName va khong sap xep result. |
getscriptbytecode | Tra ve decompressed bytecode string cho Roblox script object. getscriptbytecode duoc register vao cung C++ function voi dumpstring, nen hanh vi giong het. argument phai la object. bytecode reader dung chung chap nhan cac gia tri ClassName ModuleScript, LocalScript, CoreScript va Script. Voi Script, RunContext phai la Client. Neu thieu ClassName, function tao “Invalid Instance”. Neu ClassName khong phai script class duoc ho tro, function tao “Script expected”. Neu gia tri la Script voi RunContext khac, function tao “Expected a Script with RunContext set to Client”. Neu embedded bytecode reference khong hop le hoac do dai stored bytecode la 8 bytes hoac it hon, function tra ve nil. Neu khong, no decompress stored bytecode bang DecompressBytecode va tra ve resulting bytes nhu Luau string. Hash mismatch, too-short compressed data hoac ZSTD decompression errors duoc DecompressBytecode tra ve duoi dang error text bytes thay vi throw tai day. |
getscriptclosure | Loads the stored bytecode for a supported Roblox script Instance and returns it as a Lua closure. Returns nil when usable bytecode is not available. |
getscripthash | Tra ve uppercase SHA384 hex digest cho stored bytecode string cua Roblox script object. Argument phai la object. Helper dung chung GetBytecode chap nhan cac gia tri ClassName ModuleScript, LocalScript, CoreScript va Script. Voi Script, RunContext phai la Client. Neu thieu ClassName, function nem “Invalid Instance”. Neu ClassName khong phai mot trong cac script classes duoc ho tro, function nem “Script expected”. Neu gia tri la Script voi RunContext khac, function nem “Expected a Script with RunContext set to Client”. Neu embedded bytecode reference khong hop le hoac do dai stored bytecode la 8 bytes hoac it hon, function tra ve nil. Neu khong, function hash dung stored bytecode bytes bang SHA384 va tra ve uppercase hex string. Function khong goi DecompressBytecode va khong hash decompressed bytecode. |
getscripts | Tra ve cac gia tri script object hien co trong Instance cache. Function khong nhan arguments. No lap qua cache duoc luu duoi key Instance cache lightobject va chi xet entries co value la object. No doc field ClassName cua moi value bang optional string handling. Entries LocalScript va ModuleScript duoc dua vao. Entries Script chi duoc dua vao khi RunContext offset bang CLIENT hoac PLUGIN. Cac gia tri ClassName khac, entries khong co string ClassName, va CoreScript bi bo qua. Ket qua la mot Luau table tuan tu. Function khong duyet DataModel va khong dam bao sorted order. |
getscriptthread | Tra ve Lua thread lien ket voi script object khi Real co the tim thay. Argument phai la object. Function doc field ClassName cua gia tri va nem “not a valid Instance” neu field do khong phai string. Cac gia tri ClassName duoc chap nhan la Script, LocalScript va ModuleScript; bat ky gia tri nao khac nem “Script expected”. Dau tien no kiem tra ScriptThreadCache cua Real bang script reference. Khi cache hit, no tra ve Luau thread da cache nhu mot thread. Khi cache miss, cac gia tri Script phai co RunContext Client, neu khong function nem “Expected a Script with RunContext set to Client”. Sau do no di qua the live Luau thread list, theo first weak thread reference cua moi thread node toi LiveLuaRef, bo qua missing thread data hoac expired Script stored references, va so sanh moi script reference voi script duoc yeu cau. Neu tim thay match, no tra ve Luau thread do nhu thread. Neu khong tim thay match, no tra ve nil. |
getsenv | Returns the environment table associated with a LocalScript, Script, or ModuleScript. Unsupported script objects or scripts without an available thread raise the same errors as the underlying script lookup. |
loadstring | Compiles a Luau source string and returns the loaded function. If loading fails, it returns nil and an error message. The returned function is not executed automatically. |
Scripts
Scripts
Truy vấn tập lệnh, mã byte và môi trường.
Truy vấn tập lệnh, mã byte và môi trường.