SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local mon = peripheral.wrap("back")
|
| 1 | + | local mon = peripheral.wrap("right")
|
| 2 | local password = "launch" | |
| 3 | --SlowPrint Start | |
| 4 | function SlowText(Text) | |
| 5 | for I=1,string.len(Text) do | |
| 6 | NewText=string.sub(Text,I,I) | |
| 7 | mon.write(NewText) | |
| 8 | sleep(0.1) | |
| 9 | end | |
| 10 | end | |
| 11 | --Slowprint End | |
| 12 | --Start | |
| 13 | mon.clear() | |
| 14 | - | while true do |
| 14 | + | |
| 15 | - | sleep(0) |
| 15 | + | term.clear() |
| 16 | - | if redstone.getInput("bottom") then
|
| 16 | + | term.setCursorPos(1,1) |
| 17 | - | break |
| 17 | + | write("ENTER PASSWORD TO INITIATE LAUNCH:")
|
| 18 | - | end |
| 18 | + | local input = read("*")
|
| 19 | if input == password then | |
| 20 | - | mon.setTextScale(1) |
| 20 | + | term.clear() |
| 21 | term.setCursorPos(1,1) | |
| 22 | - | mon.setCursorPos(2,6) |
| 22 | + | textutils.slowPrint("ACCESS GRANTED.")
|
| 23 | textutils.slowPrint("INITIATING LAUNCH SEQUENCE!")
| |
| 24 | - | SlowText("LAUNCH INITIATED!")
|
| 24 | + | else |
| 25 | term.clear() | |
| 26 | term.setCursorPos(1,1) | |
| 27 | print("ACCESS DENIED. LAUNCH CANCELED!")
| |
| 28 | - | for I=10,1,-1 do |
| 28 | + | sleep(3) |
| 29 | end | |
| 30 | mon.setTextScale(2) | |
| 31 | mon.clear() | |
| 32 | mon.setCursorPos(3,5) | |
| 33 | - | mon.setTextScale(4) |
| 33 | + | |
| 34 | SlowText(" LAUNCH")
| |
| 35 | mon.setCursorPos(3,6) | |
| 36 | mon.setTextColor(colors.green) | |
| 37 | SlowText("INITIATED!")
| |
| 38 | - | mon.setTextScale(1) |
| 38 | + | sleep(2) |
| 39 | rs.setOutput("back",true)
| |
| 40 | - | mon.setCursorPos(7,6) |
| 40 | + | |
| 41 | mon.clear() | |
| 42 | mon.setCursorPos(10,6) | |
| 43 | - | redstone.setOutput("right",true)
|
| 43 | + | |
| 44 | for I=20,1,-1 do | |
| 45 | - | redstone.setOutput("right",false)
|
| 45 | + | |
| 46 | mon.setCursorPos(3,2) | |
| 47 | mon.setTextColor(colors.red) | |
| 48 | NewNumber = tostring(I) | |
| 49 | mon.setTextScale(5) | |
| 50 | mon.write(NewNumber) | |
| 51 | sleep(1) | |
| 52 | end | |
| 53 | --Counter End | |
| 54 | mon.setTextScale(2) | |
| 55 | mon.clear() | |
| 56 | mon.setCursorPos(4,5) | |
| 57 | mon.setTextColor(colors.green) | |
| 58 | SlowText("LAUNCH!")
| |
| 59 | sleep(4) | |
| 60 | rs.setOutput("back",false)
| |
| 61 | sleep(5) | |
| 62 | mon.clear() | |
| 63 | --End | |
| 64 | end |