2013/luau/60595695.luau

37 lines
887 B
Plaintext

-- Script Context./Libraries/LibraryRegistration/LibraryRegist
print "[Mercury]: Loaded corescript 60595695"
-- Library Registration Script
-- This script is used to register RbxLua libraries on game servers, so game scripts have
-- access to all of the libraries (otherwise only local scripts do)
local ScriptContext
for i = 1, 4 do
ScriptContext = game:GetService "ScriptContext"
if ScriptContext then
break
end
wait(0.2)
end
local function RegisterLibraries(t: { [string]: number })
for name, id in pairs(t) do
ScriptContext:RegisterLibrary(`Libraries/Rbx{name}`, tostring(id))
end
end
if ScriptContext then
RegisterLibraries {
Fusion = 10000001,
Red = 10000002,
Gui = 45284430,
Gear = 45374389,
Utility = 60595411,
Stamper = 73157242,
}
ScriptContext:LibraryRegistrationComplete()
else
print "failed to find script context, libraries did not load"
end