Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Height = "floor1"
- local up = 0
- local z = true
- -- Floor1 = at 23
- -- Floor2 = at 31
- -- Floor3 = at 64
- while z do
- --This is to go to Floor3
- os.pullEvent("redstone")
- if redstone.getOutput("back") and Height == "floor1" then
- while up < 41 do
- redstone.setOutput("front")
- sleep(1)
- up = up + 1
- end
- Height = "floor3"
- up = 0
- elseif redstone.getOutput("back") and Height == "floor2" then
- while up < 32 do
- redstone.setOutput("front")
- sleep(1)
- up = up + 1
- end
- Height = "floor3"
- up = 0
- -- This is to go to Floor2
- elseif redstone.getOutput("right") and Height == "floor1" then
- repeat
- redstone.setOutput("front")
- sleep(1)
- up = up + 1
- until up == 11
- Height = "floor2"
- up = 0
- elseif redstone.getOutput("right") and Height == "floor3" then
- repeat
- redstone.setOutput("top")
- sleep(1)
- up = up + 1
- until up == 33
- Height = "floor2"
- up = 0
- -- This is to go to Floor1
- elseif redstone.getOutput("left") and Height == "floor2" then
- repeat
- redstone.setOutput("top")
- sleep(1)
- up = up + 1
- until up == 11
- Height = "floor1"
- up = 0
- elseif redstone.getOutput("right") and Height == "floor3" then
- repeat
- redstone.setOutput("top")
- sleep(1)
- up = up + 1
- until up == 33
- Height = "floor1"
- up = 0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement