-- load LuaPop from a single file, meant to be used through -- sm_ent_fire popscript $ExecuteScriptFile "loadpoplua.lua" -- OR -- sm_ent_create "$script_manager" "$scriptfile" "loadpoplua.lua" local popluaFileNames = { "royal_lua_core", "spawnbot", "spawntank", "tankdeploy", "dropcurrencypack", "wavebargen", "engiebotbehavior", "squadbehaviors", "parse_wave", "run_wave", "bot_templates", "bot_spawner_action", } local scriptManager = ents.FindByName("popscript") if not scriptManager or not IsValid(scriptManager) then print("unable to find popscript. attempting to find other script managers") for _, otherScriptManager in pairs(ents.FindAllByClass("$script_manager")) do if IsValid(otherScriptManager) then scriptManager = otherScriptManager end end if not scriptManager then print("no $script_manager found. aborting") return end end print(scriptManager) for _, fileName in ipairs(popluaFileNames) do print(fileName .. ".lua") local success, err = pcall(function() scriptManager:AcceptInput("$ExecuteScriptFile", fileName .. ".lua", scriptManager, scriptManager) end) if not success then print(err) end end timer.Simple(0.1, function() print("PopLua successfully loaded. to open bot spawner menu, please do:") print('sm_ent_fire popscript "$BotSpawnerPromptMenu"') print("OR") print('sm_ent_fire $script_manager "$BotSpawnerPromptMenu"') end)