Skip to content

scripts

These functions grant you the ability to manage scripts.

moonlight.scripts.get_all

Returns

  • table[table]

string name

string path

string code

Remarks

  • See manager.lua for example usage.

moonlight.scripts.reload

Parameters

  • string file

Remarks

  • The file parameter expects a full file path as an argument.
  • See manager.lua for example usage.

moonlight.scripts.unload

Parameters

  • string file

Remarks

  • The file parameter expects a full file path as an argument.
  • See manager.lua for example usage.

moonlight.scripts.load

Parameters

  • string file
  • boolean callback

Remarks

  • The file parameter will only look in your scripts folder. The argument must not have an extension.
  • The callback parameter will determine whether to activate PostInitialize after loading the script.
moonlight.scripts.load( "hello_world", true )