antoniorigo4

doge map selector v.1.1 still crap

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