uses
  SysUtils;
var
  BotCustom: TBot;
  ScriptCustom: TPaxEngine;
begin
  BotCustom:= TBot(BotList(1));
  ScriptCustom:= TPaxEngine(BotCustom.Control.GetScript);

  if (FileExists(Script.Path + 'test.txt')) then
  begin
    print(ScriptCustom.Stop);
    while (ScriptCustom.Status <> ssStopped) do delay(10);
    ScriptCustom.LoadScript(BotCustom, Script.Path + 'test.txt');
    ScriptCustom.Run(false);
  end;
end.