ReferenceScripts

iscorescript

Reports whether a script belongs to Roblox's own interface code.

Syntax

iscorescript(script: LuaSourceContainer) -> boolean

Parameters

ParameterTypeDescription
scriptLuaSourceContainerThe script to check.

Returns

TypeDescription
booleantrue when the script is under CoreGui or CorePackages.

Example

local gui = game:GetService("CoreGui"):FindFirstChildWhichIsA("ModuleScript", true)
if gui then
    print(iscorescript(gui))
end

These are Game executor contracts. Check build requirements and session lifetimes before using them.