Advertisement
NSKuber

Untitled

Sep 16th, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. local HandleMonster = function(monster)
  2. RunAsync(function()
  3. --Here you do whatever you need with the monster
  4. end)
  5. end
  6.  
  7. local IsMonsterHandled = {}
  8.  
  9. while true do
  10. local AllMonsters = worldInfo:GetCharacters("","Evil",worldInfo,10000)
  11. for i=1,#AllMonsters,1 do
  12. if not IsMonsterHandled[AllMonsters[i]] then
  13. IsMonsterHandled[AllMonsters[i]] = true
  14. HandleMonster(AllMonsters[i])
  15. end
  16. end
  17. Wait(CustomEvent("OnStep"))
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement