Advertisement
Slopeh

Untitled

Dec 12th, 2023
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. function RemoveRobots() nAndro, nDrone, nMech = 0, 0, 0; local function alert(msg) PreventionSystem.ShowMessage(msg, 4.0) end local ents = Game.GetEntityList(); for i, robot in ipairs(ents) do local class = robot:ToString(); if class == 'NPCPuppet' then local andro = robot:IsAndroid(); local drone = robot:IsDrone(); local mech = robot:IsMech(); if andro or drone or mech then if andro then nAndro = nAndro + 1; elseif drone then nDrone = nDrone + 1; elseif mech then nMech = nMech + 1; end robot:Kill() robot:Dispose() end end end local msg, aMsg, dMsg, mMsg = 'ANDROIDS / MECHS / DRONES IN THE AREA', '[ '..nAndro..' ] ANDROID/s FOUND AND REMOVED.', '[ '..nDrone..' ] DRONE/s FOUND AND REMOVED.', '[ '..nMech..' ] MECH/s FOUND AND REMOVED.'; alert(msg..'\n'..aMsg..'\n'..dMsg..'\n'..mMsg) print(' \n\t'..msg..'\n\t\t'..aMsg..'\n\t\t'..dMsg..'\n\t\t'..mMsg..'\n ') end RemoveRobots()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement