Advertisement
dahpiglz

Untitled

Jul 22nd, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. speed = 15
  2.  
  3. --Generate Room
  4.  
  5. local RoomHolder = Instance.new("Model")
  6. RoomHolder.Parent = game.Workspace
  7.  
  8. local Room1 = Instance.new("SpawnLocation")
  9. Room1.Parent = RoomHolder
  10. Room1.Position = Vector3.new(20000,20000,20000)
  11. Room1.Size = Vector3.new(200,1,200)
  12. Room1.Color = Color3.fromRGB(0, 0, 0)
  13. Room1.Material = ("Neon")
  14. Room1.Anchored = true
  15.  
  16. local Room2 = Instance.new("Part")
  17. Room2.Parent = RoomHolder
  18. Room2.Position = Vector3.new(20000,20100,20000)
  19. Room2.Size = Vector3.new(200,1,200)
  20. Room2.Color = Color3.fromRGB(0, 0, 0)
  21. Room2.Material = ("Neon")
  22. Room2.Anchored = true
  23.  
  24. local Room3 = Instance.new("Part")
  25. Room3.Parent = RoomHolder
  26. Room3.Position = Vector3.new(19900,20000,20000)
  27. Room3.Size = Vector3.new(1,200,200)
  28. Room3.Color = Color3.fromRGB(0, 0, 0)
  29. Room3.Material = ("Neon")
  30. Room3.Anchored = true
  31.  
  32. local Room4 = Instance.new("Part")
  33. Room4.Parent = RoomHolder
  34. Room4.Position = Vector3.new(20100,20000,20000)
  35. Room4.Size = Vector3.new(1,200,200)
  36. Room4.Color = Color3.fromRGB(0, 0, 0)
  37. Room4.Material = ("Neon")
  38. Room4.Anchored = true
  39.  
  40. local Room5 = Instance.new("Part")
  41. Room5.Parent = RoomHolder
  42. Room5.Position = Vector3.new(20000,20000,20100)
  43. Room5.Size = Vector3.new(200,200,1)
  44. Room5.Color = Color3.fromRGB(0, 0, 0)
  45. Room5.Material = ("Neon")
  46. Room5.Anchored = true
  47.  
  48. local Room6 = Instance.new("Part")
  49. Room6.Parent = RoomHolder
  50. Room6.Position = Vector3.new(20000,20000,19900)
  51. Room6.Size = Vector3.new(200,200,1)
  52. Room6.Color = Color3.fromRGB(0, 0, 0)
  53. Room6.Material = ("Neon")
  54. Room6.Anchored = true
  55.  
  56. p1 = Instance.new("Part")
  57. p1.Position = Vector3.new(-400, 150, 0)
  58. p1.Size = Vector3.new(100,300,1000)
  59. p1.Anchored = true
  60. p1.Parent = game.Workspace
  61.  
  62. p2 = Instance.new("Part")
  63. p2.Position = Vector3.new(400, 150, 0)
  64. p2.Size = Vector3.new(100,300,1000)
  65. p2.Anchored = true
  66. p2.Parent = game.Workspace
  67.  
  68. function touch1(hit)
  69. if hit.Parent:FindFirstChild("Torso") == nil then
  70. hit.Position = Vector3.new(20000,20000,20000)
  71. else
  72. hit.Parent.Torso.CFrame = CFrame.new(Vector3.new(math.random(19960, 20060),20000, math.random(19960, 20060)))
  73. end
  74. end
  75. p1.Touched:Connect(touch1)
  76. function touch2(hit)
  77. if hit.Parent:FindFirstChild("Torso") == nil then
  78. hit.Position = Vector3.new(20000,20015,20000)
  79. else
  80. hit.Parent.Torso.CFrame = CFrame.new(Vector3.new(20000,20015,20000))
  81. end
  82. end
  83. p2.Touched:Connect(touch2)
  84.  
  85. while true do
  86. wait(0.1)
  87. p1.CFrame = CFrame.new(p1.Position + Vector3.new(speed, 0, 0))
  88. p2.CFrame = CFrame.new(p2.Position + Vector3.new(0 - speed, 0, 0))
  89. if RoomHolder == nil or Room1 == nil or Room2 == nil or Room3 == nil or Room4 == nil or Room5 == nil or Room6 == nil then
  90. local RoomHolder = Instance.new("Model")
  91. RoomHolder.Parent = game.Workspace
  92.  
  93. local Room1 = Instance.new("Part")
  94. Room1.Parent = RoomHolder
  95. Room1.Position = Vector3.new(20000,20000,20000)
  96. Room1.Size = Vector3.new(200,1,200)
  97. Room1.Color = Color3.fromRGB(0, 0, 0)
  98. Room1.Material = ("Neon")
  99. Room1.Anchored = true
  100.  
  101. local Room2 = Instance.new("Part")
  102. Room2.Parent = RoomHolder
  103. Room2.Position = Vector3.new(20000,20100,20000)
  104. Room2.Size = Vector3.new(200,1,200)
  105. Room2.Color = Color3.fromRGB(0, 0, 0)
  106. Room2.Material = ("Neon")
  107. Room2.Anchored = true
  108.  
  109. local Room3 = Instance.new("Part")
  110. Room3.Parent = RoomHolder
  111. Room3.Position = Vector3.new(19900,20000,20000)
  112. Room3.Size = Vector3.new(1,200,200)
  113. Room3.Color = Color3.fromRGB(0, 0, 0)
  114. Room3.Material = ("Neon")
  115. Room3.Anchored = true
  116.  
  117. local Room4 = Instance.new("Part")
  118. Room4.Parent = RoomHolder
  119. Room4.Position = Vector3.new(20100,20000,20000)
  120. Room4.Size = Vector3.new(1,200,200)
  121. Room4.Color = Color3.fromRGB(0, 0, 0)
  122. Room4.Material = ("Neon")
  123. Room4.Anchored = true
  124.  
  125. local Room5 = Instance.new("Part")
  126. Room5.Parent = RoomHolder
  127. Room5.Position = Vector3.new(20000,20000,20100)
  128. Room5.Size = Vector3.new(200,200,1)
  129. Room5.Color = Color3.fromRGB(0, 0, 0)
  130. Room5.Material = ("Neon")
  131. Room5.Anchored = true
  132.  
  133. local Room6 = Instance.new("Part")
  134. Room6.Parent = RoomHolder
  135. Room6.Position = Vector3.new(20000,20000,19900)
  136. Room6.Size = Vector3.new(200,200,1)
  137. Room6.Color = Color3.fromRGB(0, 0, 0)
  138. Room6.Material = ("Neon")
  139. Room6.Anchored = true
  140. end
  141. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement