Advertisement
The_Newt

[ROBLOX] Map Randomizer Script v1.2b

Aug 27th, 2014
3,406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. --[[
  2. updated 30-09-2014
  3. randomly chooses a map for the next round
  4. replace num with how many maps you have
  5. replace default-map with your default map's name and map1 etc with each map's name
  6. programmed by NewtPewt
  7. ]]--
  8.  
  9. num =
  10. main = "first-map"
  11. maps = {"map1", "map2", "map3", "map4", "map5", "first-map"}
  12. time = 60
  13. function change(0
  14.     m = math.random(1, num)
  15.     t = game.lighting:findfirstchild(maps[m]):clone()
  16.     t.parent = workspace
  17.     ms = instance.new("message", workspace)
  18.     ms.text = game.lighting:findfirstchild(maps[m]).name.. " has been chosen."
  19.     wait(5)
  20.     ms:remove()
  21. end
  22. function mainit()
  23.     game.workspace[main]:remove(0
  24. end
  25. wait(time)
  26. mainit()
  27. while true do
  28.     wait()
  29.     change()
  30.     wait(time)
  31.     t:remove()
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement