Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetMap()
- maps={"Map1","Map2","Map3","Map4","map5"}
- randommap=math.random(1,#maps)
- themap=game.Lighting:FindFirstChild(maps[randommap])
- message=Instance.new("Message")
- message.Name="Broadcast"
- message.Parent=game.Workspace
- message.Text="Map selected is: "..themap.Name..", get ready!"
- --countdown
- themap.Parent=game.Workspace
- for i=1,5 do
- wait(1)
- message.Text=5-i
- end
- message.Text=""
- getplayers=game.Players:GetChildren()
- for p=1,#players do
- character=game.Workspace:FindFirstChild(getplayers[p].Name)
- if character~=nil then
- spawns={"Spawn1","Spawn2","Spawn3","Spawn4","Spawn5","Spawn6","Spawn7"}
- TheSpawn = themap:FindFirstChild(spawns[math.random(1,#spawns)])
- if TheSpawn ~= nil then
- SX = TheSpawn.Position.X
- SY = TheSpawn.Position.Y
- SZ = TheSpawn.Position.Z
- RX = math.random(-10,10)
- RZ = math.random(-10,10)
- if character~=nil then
- thecharactertorso=character:FindFirstChild("Torso")
- thecharacter:moveTo(Vector3.new(SX + RX,SY + 6,SZ + RZ))
- end
- end
- end
- end
- wait(60)
- message.Text="Round Over!"
- Players = game.Players:GetChildren()
- themap:remove()
- for i = 1, #Players do
- if Players[i].Character:FindFirstChild("IsAlive") then
- Players[i].leaderstats.Points.Value = Players[i].leaderstats.Points.Value + 1 + (playerkills.Value * 4)
- Players[i].playerkills.Value = 10
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement