Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait(1)
- local Bottom = 8
- local Top = 68
- local Base = 4
- local ExtentNeg = -16
- local ExtentPos = 16
- local Model = Instance.new("Model",game.Workspace)
- local Part = Instance.new("Part")
- Part.FormFactor = "Symmetric"
- Part.Anchored = true
- Part.TopSurface = "Smooth"
- Part.BottomSurface = "Smooth"
- Part.Size = Vector3.new(Base,Base,Base)
- local X = {}
- for i = ExtentNeg, ExtentPos, Base do
- X[i] = Bottom
- end
- while true do
- local gameover = false
- for i, v in pairs(X) do
- if v == Top - Base then
- gameover = true
- end
- end
- if gameover == false then
- local NewPart = Part:clone()
- NewPart.Parent = Model
- NewPart.BrickColor = BrickColor.Random()
- local NewX = math.random(ExtentNeg + Base, ExtentPos - Base)
- local Y = Top
- repeat NewX = NewX + 1 until NewX % Base == 0
- NewPart.CFrame = CFrame.new(NewX,Y,0)
- repeat
- wait(1/10)
- NewPart.CFrame = NewPart.CFrame - Vector3.new(0,Base,0)
- Y = Y - Base
- until
- Y == X[NewX] + Base
- X[NewX] = Y
- else
- local hint = Instance.new("Message",game.Workspace)
- hint.Text = "Game over!"
- wait(5)
- hint:Destroy()
- Model:ClearAllChildren()
- for i = ExtentNeg, ExtentPos, 4 do
- X[i] = Bottom
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement