DigitalVeer

Bits of Code - City Liberation

May 7th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. --Random Bits Of Code [CITY LIBERATION]
  2.  
  3. -Lib Progress
  4.  
  5. enemies = Workspace["Enemies"]
  6. toe = {}
  7.  
  8. function renameAI(table,location)
  9. i = 0
  10. for _,v in pairs(location:GetChildren()) do
  11. i = i + 1
  12. v.Name = "Enemy" .. i
  13. table.insert(table,v.Name)
  14. end end
  15.  
  16. function removeTable(table,instance)
  17. if instance:IsA("StringValue") then
  18. for _,v in pairs(table) do
  19. if instance.Value:lower() == v:lower() then
  20. table.remove(table,v)
  21. end end end end
  22.  
  23. script.ChildAdded:connect(function(p)
  24. removeTable(toe,p)
  25. end)
Advertisement
Add Comment
Please, Sign In to add comment