Advertisement
antoniorigo4

doge map selector

Sep 13th, 2020 (edited)
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. --doge map selector made by antoniorigo4
  2. --posted accidently as guest
  3. local timeleft = 25
  4. local timecounter = Instance.new("Hint",workspace)
  5. function mapselect()
  6. local random = math.random(1,#game.Lighting.Maps:GetChildren())
  7. if random == 1 then
  8. game.Lighting.Maps.forest.Parent = workspace
  9. return "forest"
  10. elseif random==2 then
  11. game.Lighting.Maps.neighbourhood.Parent = workspace
  12. return "neighbourhood"
  13. elseif random==3 then
  14. game.Lighting.Maps.house.Parent = workspace
  15. return "house"
  16. elseif random==4 then
  17. game.Lighting.Maps.city.Parent = workspace
  18. return "city"
  19. end
  20. end
  21. mapselect()--start at game
  22. coroutine.resume(coroutine.create(function()
  23. while true do wait(1)
  24. timeleft = timeleft -1
  25. timecounter.Text = "There is "..timeleft.." seconds left"
  26. if timeleft == "0" then
  27. timeleft = 25
  28.  
  29. mapselect()
  30. for i,v in pairs(game.Players:GetDescendants()) do
  31. if v:IsA("Player") then
  32. v.Character.Humanoid.Health = 0
  33. end
  34. end
  35. end
  36. end end))
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement