Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.94 KB | None | 0 0
  1. function hnt(string)
  2.     for i,v in ipairs(game.Players:GetChildren()) do
  3.         v.PlayerGui.ScreenGui.Info.Text = string
  4.     end
  5. end
  6.  
  7. while true do
  8.     minigames = game.ServerStorage.Maps:GetChildren()
  9.     local m = math.random(1,  #minigames)
  10.     wait(5)
  11.     if game.Players.NumPlayers >= 2 then
  12.         hnt ("Choosing Map")
  13.         wait(2)
  14.         hnt ("minigame = "..m.Name)
  15.         wait(2)
  16.         for i,plr in pairs (game.Players:GetPlayers()) do
  17.             plr.value.Value = 1
  18.         end
  19.         hnt ("Generating map")
  20.         wait(2)
  21.         local map = game.ServerStorage.Map:Clone()
  22.         map.Parent = game.Workspace
  23.         hnt ("game will start in 20 seconds")
  24.         wait(15)
  25.         local plrs = game.Players.NumPlayers
  26.         game.ServerScriptService.Alive.Value = plrs
  27.         local Coordinates = {
  28.         ["X"] = {-48, 48, -48, 48, -101, 48, 0, 101};
  29.         ["Y"] = {27.999, 27.997, 27.999, 28, 28.992, 27.997, 28.997, 28.992};
  30.         ["Z"] = {-48, 48, -48, 48, -101, 48, 0, 101};
  31.         }
  32.         for i, Player in pairs (game.Players:getPlayers()) do
  33.             if Player.value.Value == 1 then
  34.                 Player.Character:MoveTo(Vector3.new(Coordinates["X"][i], Coordinates["Y"][i], Coordinates["Z"][i]))
  35.                 Player.Character.Torso.Anchored = true
  36.             end
  37.         end
  38.         hnt (".....5.....")
  39.         wait(1)
  40.         hnt ("....4....")
  41.         wait(1)
  42.         hnt ("...3...")
  43.         wait(1)
  44.         hnt ("..2..")
  45.         wait(1)
  46.         hnt (".1.")
  47.         wait(1)
  48.         hnt ("Begin!")
  49.         for __, player in pairs(game.Players:GetPlayers()) do
  50.             player.Character.Torso.Anchored = false
  51.             for _,weapon in ipairs(game.ServerStorage.Swords:GetChildren()) do
  52.                 newWeapon = weapon:Clone()
  53.                 if weapon.Name == "Sword" then
  54.                     if player.value.Value == 1 then
  55.                         newWeapon.Parent = player.Backpack
  56.                     end
  57.                 end
  58.             end
  59.         end
  60.         hnt ("you have 1 minute to kill other players")
  61.         wait(3)
  62.         hnt ("last standing's win 10 points")
  63.         local get = 0
  64.         local got = 53
  65.         while get < got do
  66.             if game.ServerScriptService.Alive.Value == 1 then
  67.                 hnt ("There's a winner, he gets 20 points")
  68.                 wait(1)
  69.                 for i,v in pairs(game.Players:GetPlayers()) do
  70.                     if v.value.Value == 1 then
  71.                         v.leaderstats.Points.Value = v.leaderstats.Points.Value + 20
  72.                         wait(1)
  73.                         v:LoadCharacter()
  74.                     end
  75.                 end
  76.                 hnt ("Removing map")
  77.                 game.Workspace.Map:remove()
  78.                 wait(1)
  79.                 hnt ("Starting new round")
  80.                 wait(1)
  81.                 return
  82.             end
  83.             get = get + 1
  84.             wait(1)
  85.         end
  86.         hnt (".....5.....")
  87.         wait(1)
  88.         hnt ("....4....")
  89.         wait(1)
  90.         hnt ("...3...")
  91.         wait(1)
  92.         hnt ("..2..")
  93.         wait(1)
  94.         hnt (".1.")
  95.         wait(1)
  96.         hnt ("Stop!")
  97.         for i,v in pairs(game.Players:GetPlayers()) do
  98.             v.Character.Torso.Anchored = true
  99.             wait(1)
  100.             hnt ("winner(s) get 20 points")
  101.             wait(1)
  102.             if v.value.Value == 1 then
  103.                 v.leaderstats.Points.Value = v.leaderstats.Points.Value + 20
  104.                 wait(1)
  105.                 v:LoadCharacter()
  106.             end
  107.         end
  108.         wait(2)
  109.         hnt ("Removing map")
  110.         wait(2)
  111.         game.Workspace.Map:remove()
  112.         hnt ("Starting new round")
  113.         wait(2)
  114.     else
  115.         hnt("1 player more has to join")
  116.         wait(3)
  117.         hnt(" ")
  118.     end
  119. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement