oliverrook

Untitled

May 15th, 2020
2,898
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. function spawnThem(number, mob, tags)
  3.     num = number
  4.     mobtype = mob
  5.     customtags = tags
  6.     --customtags = 'CustomName:"\"Uncle\"",Attributes:[{Name:generic.maxHealth,Base:100}],Health:100.0f'
  7.     a = 0
  8.     while a <= num do
  9.         commands.exec("summon " .. mobtype .. " ~-10 ~ ~ {" .. customtags .. "}")
  10.         a = a + 1
  11.     end
  12. end
  13. levels = 3
  14. levelsnum = {
  15. 5,
  16. 10,
  17. 20
  18. }
  19. levelsmob = {
  20. "minecraft:zombie",
  21. "minecraft:zombie",
  22. "minecraft:zombie"}
  23. levelstag = {
  24. "",
  25. "",
  26. ""}
  27. function startSimulation()
  28.     a = 1
  29.     b = true
  30.     while a <= levels+1 do
  31.         spawnThem(levelsnum[a],levelsmob[a],levelstag[a])
  32.         a=a+1
  33.         while b == true do
  34.             sleep(0.5)
  35.             if (redstone.getInput("left")) == true then
  36.                 b = false
  37.             end
  38.         end
  39.         b = true
  40.         print(a)
  41.         print(levels)
  42.         sleep(5)    
  43.     end
  44. end
  45. startSimulation()
RAW Paste Data