Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Thanks for using this script
- --This script is made by Joriangames/Problox Studio Scripts
- --Want to know how to use this? Watch my tutorial: https://www.roblox.com/library/6316459099/Random-map-with-intermission
- local maps = game:GetService("ServerStorage").Maps:GetChildren()
- local Title = game.StarterGui.MapSelector.Title
- local spawns = game.Workspace.Spawns:GetChildren()
- local status = game.ReplicatedStorage.Status
- ti = 0
- while true do
- ti = 10
- repeat
- ti = ti -1
- status.Value = "Intermission "..ti
- wait(1)
- until ti == 0
- local randomMap = maps[math.random(1, #maps)]
- randomMap:Clone().Parent = workspace
- current = randomMap.Name
- status.Value = "Chosen game is "..randomMap.Name
- wait(5)
- status.Value = "Loading game!"
- wait(2)
- status.Value = "Starting game!"
- wait(2)
- local plrs = game.Players:GetChildren()
- for i = 1, #plrs do
- local randomSpawn = spawns[math.random(1, #spawns)]
- plrs[i].Character.HumanoidRootPart.CFrame = CFrame.new(randomSpawn.Position)
- end
- ti = 10
- repeat
- ti = ti -1
- status.Value = ti.." seconds left!"
- wait(1)
- until ti == 0
- for i = 1, #plrs do
- plrs[i].Character.HumanoidRootPart.CFrame = workspace.SpawnLocation.CFrame + Vector3.new(0, 10, 0)
- end
- workspace[current]:Destroy()
- end
Add Comment
Please, Sign In to add comment