Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script just cycles through all of the different demos, spending 1 minute on each
- local demoScriptsToRun = {"Script_1_SPAWN", "Script_2_RESPAWN", "Script_3_WANDER", "Script_4_JUMP", "Script_5_TICKTICK", "Script_6_BOOM", "BotSpawnerScript"}
- 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"}
- local currentDemo = 1
- -- 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]
- function removeAllBots()
- 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")
- while skelebomber do
- skelebomber:Remove()
- 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")
- wait(1)
- end
- end
- while true do
- -- start the current demo
- local currentDemoScript = game.Workspace:FindFirstChild(demoScriptsToRun[currentDemo])
- local currentDemoName = demoNames[currentDemo]
- local newMessage = Instance.new("Message")
- newMessage.Text = currentDemoName
- newMessage.Parent = game.Workspace
- currentDemoScript.Disabled = false
- wait(3)
- newMessage:Remove()
- -- let it run for a while [first two demos get 15 seconds, next 5 get 30 seconds, last one gets 45 seconds]
- if currentDemo < 3 then
- wait(15)
- elseif currentDemo < 7 then
- wait(30)
- else
- wait(45)
- end
- -- stop the current demo
- currentDemoScript.Disabled = true
- removeAllBots()
- -- move on to the next demo
- currentDemo = currentDemo + 1
- if currentDemo > 7 then currentDemo = 1 end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement