Advertisement
KINGOFCOOL

Untitled

Jan 9th, 2015
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. -- This script just cycles through all of the different demos, spending 1 minute on each
  2. local demoScriptsToRun = {"Script_1_SPAWN", "Script_2_RESPAWN", "Script_3_WANDER", "Script_4_JUMP", "Script_5_TICKTICK", "Script_6_BOOM", "BotSpawnerScript"}
  3. local demoNames = {"1 - BOT SPAWNED", "2 - BOT RESPAWNS WHEN KILLED", "3 - BOT WANDERS", "4 - BOT JUMPS OBSTACLES", "5 - BOT DROPS BOMBS", "6 - BOMBS MAKE CRATERS!", "7 - FINAL BOT BATTLE DEMO"}
  4.  
  5. local currentDemo = 1
  6.  
  7. -- function to clean up all the bots, so we can start the next demo [we just search for them by name and remove them, since we only have 5 different names for them anyways]
  8. function removeAllBots()
  9. local skelebomber = game.Workspace:FindFirstChild("Skelebomber") or game.Workspace:FindFirstChild("Primus") or game.Workspace:FindFirstChild("Secundus") or game.Workspace:FindFirstChild("Tertius") or game.Workspace:FindFirstChild("Quaternus")
  10. while skelebomber do
  11. skelebomber:Remove()
  12. skelebomber = game.Workspace:FindFirstChild("Skelebomber") or game.Workspace:FindFirstChild("Primus") or game.Workspace:FindFirstChild("Secundus") or game.Workspace:FindFirstChild("Tertius") or game.Workspace:FindFirstChild("Quaternus")
  13. wait(1)
  14. end
  15. end
  16.  
  17.  
  18. while true do
  19. -- start the current demo
  20. local currentDemoScript = game.Workspace:FindFirstChild(demoScriptsToRun[currentDemo])
  21. local currentDemoName = demoNames[currentDemo]
  22.  
  23. local newMessage = Instance.new("Message")
  24. newMessage.Text = currentDemoName
  25. newMessage.Parent = game.Workspace
  26.  
  27. currentDemoScript.Disabled = false
  28.  
  29. wait(3)
  30. newMessage:Remove()
  31.  
  32. -- let it run for a while [first two demos get 15 seconds, next 5 get 30 seconds, last one gets 45 seconds]
  33. if currentDemo < 3 then
  34. wait(15)
  35. elseif currentDemo < 7 then
  36. wait(30)
  37. else
  38. wait(45)
  39. end
  40.  
  41. -- stop the current demo
  42. currentDemoScript.Disabled = true
  43. removeAllBots()
  44.  
  45. -- move on to the next demo
  46. currentDemo = currentDemo + 1
  47. if currentDemo > 7 then currentDemo = 1 end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement