Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local roundTime = 180
- local spawns = {
- Map1 = {
- {Vector3.new(0, 50, 0), true},
- {Vector3.new(0, 0, 50), true}
- }
- }
- function getPlayers(callback, returnRandomPlayer)
- local players = game.Players:GetPlayers()
- if returnRandomPlayer then
- return players[math.random(#players)]
- end
- for i, v in pairs(players) do
- callback(v)
- end
- end
- function giveTool(player, tool)
- local clone = tool:clone();
- clone.Parent = player.Backpack;
- end
- function message(bg, color, tran, text, Time)
- local xbg = Color3.new(unpack(bg));
- local xcolor = Color3.new(unpack(color));
- coroutine.wrap(function()
- getPlayers(function(plyr)
- local GUI = plyr.PlayerGui.MessageGUI
- GUI.Frame.Visible = true;
- GUI.Frame.TextLabel.Text = text;
- GUI.Frame.BackgroundColor3 = xbg;
- GUI.Frame.TextLabel.TextColor3 = xcolor;
- GUI.Frame.BackgroundTransparency = tran;
- GUI.Frame.TextLabel.BackgroundTransparency = tran;
- end)
- wait(Time)
- getPlayers(function(plyr)
- local GUI = plyr.PlayerGui.MessageGUI.Frame;
- GUI:Destroy()
- end)
- end)()
- end
- function chooseMap()
- for _, object in ipairs(Workspace:GetChildren()) do
- if object.Name:match("Map") then
- object:Destroy()
- end
- end
- local maps = game.ServerStorage.Maps:GetChildren()
- local map = maps[math.random(#maps)]:clone()
- local cloneOfSpawns = spawns
- local teleport = cloneOfSpawns[map.Name]
- map.Parent = Workspace
- map:MakeJoints()
- getPlayers(function(player)
- local place;
- repeat
- place = teleport[math.random(#teleport)]
- until place[2]
- place[2] = false
- player.Character:MoveTo(place[1])
- end)
- end
- while wait() do
- for i = 10, 1, -1 do
- print("Intermission: " .. i)
- wait(1)
- end
- chooseMap()
- for i = roundTime, 1, -1 do
- print("Time: " .. i)
- wait(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment