Advertisement
Guest User

Untitled

a guest
Aug 5th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. local m = Instance.new("Hint")
  2. local Parts = 1
  3. local Partss = 0
  4. local x = game.ServerStorage.Meadows
  5. local s = game.ServerStorage.MapLoader
  6. local children = game.ServerStorage.Meadows:GetChildren()
  7. function PartLoader()
  8. for c = 1, #children do
  9. if children[c].className == "Part" or children[c].className == "WedgePart" or children[c].className == "VehicleSeat" or children[c].className == "Seat" or children[c].className == "UnionOperation" then
  10. Partss = Partss+1
  11. children[c].CanCollide = false
  12. children[c].Transparency = 1
  13. end
  14. end
  15. end
  16. function loading()
  17. s.Value = 3
  18. x:Clone().Parent = game.Workspace
  19. m.Parent = game.Workspace
  20. m.Text = "Loading Meadows"
  21. end
  22. function open()
  23. children = game.Workspace.Meadows:GetChildren()
  24. for c = 1, #children do
  25. if children[c].className == "Part" or children[c].className == "WedgePart" or children[c].className == "VehicleSeat" or children[c].className == "Seat" or children[c].className == "UnionOperation"
  26. then
  27. children[c].Transparency = 0
  28. children[c].CanCollide = true
  29. wait(.001)
  30. m.Text = "Loading "..Parts.." Out of "..Partss..""
  31. Parts = Parts+1
  32. if Parts >= Partss+1 then
  33. wait(.5)
  34. wait(.5)
  35. m.Text = "Load Complete"
  36. wait(.5)
  37. Parts = 1
  38. Partss = 0
  39. m:Remove()
  40. end
  41. end
  42. end
  43. end
  44. function Debounce()
  45. if s.Value == 1 then
  46. PartLoader()
  47. loading()
  48. open()
  49. end
  50. end
  51. script.Parent.MouseButton1Click:connect(Debounce)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement