Advertisement
rahuliscool

map script

Nov 27th, 2015
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. num =
  4. main = "first-map"
  5. maps = {"map1", "map2", "map3", "map4", "map5", "first-map"}
  6. time = 60
  7. function change(0
  8.     m = math.random(1, num)
  9.     t = game.lighting:findfirstchild(maps[m]):clone()
  10.     t.parent = workspace
  11.     ms = instance.new("message", workspace)
  12.     ms.text = game.lighting:findfirstchild(maps[m]).name.. " has been chosen."
  13.     wait(5)
  14.     ms:remove()
  15. end
  16. function mainit()
  17.     game.workspace[main]:remove(0
  18. end
  19. wait(time)
  20. mainit()
  21. while true do
  22.     wait()
  23.     change()
  24.     wait(time)
  25.     t:remove()
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement