Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- speed = 15
- --Generate Room
- local RoomHolder = Instance.new("Model")
- RoomHolder.Parent = game.Workspace
- local Room1 = Instance.new("SpawnLocation")
- Room1.Parent = RoomHolder
- Room1.Position = Vector3.new(20000,20000,20000)
- Room1.Size = Vector3.new(200,1,200)
- Room1.Color = Color3.fromRGB(0, 0, 0)
- Room1.Material = ("Neon")
- Room1.Anchored = true
- local Room2 = Instance.new("Part")
- Room2.Parent = RoomHolder
- Room2.Position = Vector3.new(20000,20100,20000)
- Room2.Size = Vector3.new(200,1,200)
- Room2.Color = Color3.fromRGB(0, 0, 0)
- Room2.Material = ("Neon")
- Room2.Anchored = true
- local Room3 = Instance.new("Part")
- Room3.Parent = RoomHolder
- Room3.Position = Vector3.new(19900,20000,20000)
- Room3.Size = Vector3.new(1,200,200)
- Room3.Color = Color3.fromRGB(0, 0, 0)
- Room3.Material = ("Neon")
- Room3.Anchored = true
- local Room4 = Instance.new("Part")
- Room4.Parent = RoomHolder
- Room4.Position = Vector3.new(20100,20000,20000)
- Room4.Size = Vector3.new(1,200,200)
- Room4.Color = Color3.fromRGB(0, 0, 0)
- Room4.Material = ("Neon")
- Room4.Anchored = true
- local Room5 = Instance.new("Part")
- Room5.Parent = RoomHolder
- Room5.Position = Vector3.new(20000,20000,20100)
- Room5.Size = Vector3.new(200,200,1)
- Room5.Color = Color3.fromRGB(0, 0, 0)
- Room5.Material = ("Neon")
- Room5.Anchored = true
- local Room6 = Instance.new("Part")
- Room6.Parent = RoomHolder
- Room6.Position = Vector3.new(20000,20000,19900)
- Room6.Size = Vector3.new(200,200,1)
- Room6.Color = Color3.fromRGB(0, 0, 0)
- Room6.Material = ("Neon")
- Room6.Anchored = true
- p1 = Instance.new("Part")
- p1.Position = Vector3.new(-400, 150, 0)
- p1.Size = Vector3.new(100,300,1000)
- p1.Anchored = true
- p1.Parent = game.Workspace
- p2 = Instance.new("Part")
- p2.Position = Vector3.new(400, 150, 0)
- p2.Size = Vector3.new(100,300,1000)
- p2.Anchored = true
- p2.Parent = game.Workspace
- function touch1(hit)
- if hit.Parent:FindFirstChild("Torso") == nil then
- hit.Position = Vector3.new(20000,20000,20000)
- else
- hit.Parent.Torso.CFrame = CFrame.new(Vector3.new(math.random(19960, 20060),20000, math.random(19960, 20060)))
- end
- end
- p1.Touched:Connect(touch1)
- function touch2(hit)
- if hit.Parent:FindFirstChild("Torso") == nil then
- hit.Position = Vector3.new(20000,20015,20000)
- else
- hit.Parent.Torso.CFrame = CFrame.new(Vector3.new(20000,20015,20000))
- end
- end
- p2.Touched:Connect(touch2)
- while true do
- wait(0.1)
- p1.CFrame = CFrame.new(p1.Position + Vector3.new(speed, 0, 0))
- p2.CFrame = CFrame.new(p2.Position + Vector3.new(0 - speed, 0, 0))
- if RoomHolder == nil or Room1 == nil or Room2 == nil or Room3 == nil or Room4 == nil or Room5 == nil or Room6 == nil then
- local RoomHolder = Instance.new("Model")
- RoomHolder.Parent = game.Workspace
- local Room1 = Instance.new("Part")
- Room1.Parent = RoomHolder
- Room1.Position = Vector3.new(20000,20000,20000)
- Room1.Size = Vector3.new(200,1,200)
- Room1.Color = Color3.fromRGB(0, 0, 0)
- Room1.Material = ("Neon")
- Room1.Anchored = true
- local Room2 = Instance.new("Part")
- Room2.Parent = RoomHolder
- Room2.Position = Vector3.new(20000,20100,20000)
- Room2.Size = Vector3.new(200,1,200)
- Room2.Color = Color3.fromRGB(0, 0, 0)
- Room2.Material = ("Neon")
- Room2.Anchored = true
- local Room3 = Instance.new("Part")
- Room3.Parent = RoomHolder
- Room3.Position = Vector3.new(19900,20000,20000)
- Room3.Size = Vector3.new(1,200,200)
- Room3.Color = Color3.fromRGB(0, 0, 0)
- Room3.Material = ("Neon")
- Room3.Anchored = true
- local Room4 = Instance.new("Part")
- Room4.Parent = RoomHolder
- Room4.Position = Vector3.new(20100,20000,20000)
- Room4.Size = Vector3.new(1,200,200)
- Room4.Color = Color3.fromRGB(0, 0, 0)
- Room4.Material = ("Neon")
- Room4.Anchored = true
- local Room5 = Instance.new("Part")
- Room5.Parent = RoomHolder
- Room5.Position = Vector3.new(20000,20000,20100)
- Room5.Size = Vector3.new(200,200,1)
- Room5.Color = Color3.fromRGB(0, 0, 0)
- Room5.Material = ("Neon")
- Room5.Anchored = true
- local Room6 = Instance.new("Part")
- Room6.Parent = RoomHolder
- Room6.Position = Vector3.new(20000,20000,19900)
- Room6.Size = Vector3.new(200,200,1)
- Room6.Color = Color3.fromRGB(0, 0, 0)
- Room6.Material = ("Neon")
- Room6.Anchored = true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement