thatonepuggo

build only

Sep 1st, 2020 (edited)
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. --[[(removes all scripts from selection use if you know there is nothing functioning in the build or you dont want it to function)]]
  2. local inches = 0
  3. local scrs = 0
  4. warn("START")
  5. for bruhi,bruhv in pairs(game.Selection:Get()) do
  6.  if bruhv:IsA("BaseScript")==false or bruhv:IsA("ModuleScript")==false then
  7.   for i,v in pairs(bruhv:GetDescendants()) do
  8.    inches = inches+1
  9.    if v:IsA("BaseScript") or v:IsA("ModuleScript") then
  10.     scrs = scrs+1
  11.     print("removed ".. v.Name .. " class: ".. v.ClassName)
  12.     v:Destroy()
  13.    end
  14.   end
  15.  else
  16.   bruhv:Destroy()
  17.  end
  18. end
  19. warn("looked through ".. inches .." items ".. scrs .. " scripts found.")
  20. warn("END")
Add Comment
Please, Sign In to add comment