Sayomie550

laser Control.lua

Mar 26th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. --[[
  2. Laser Mining Control V1.0
  3. --]]
  4. local status = 1
  5. local enter = ""
  6.  
  7. while true do
  8.     sleep(.1)
  9.     if status == 1 then
  10.         term.clear()
  11.         term.setCursorPos(1, 1)
  12.         print("Lasers Currently Engaged")
  13.         print("Press Enter to Turn Lasers OFF")
  14.         local input = read("")
  15.         if input == enter then
  16.             status = 0
  17.             rs.setOutput("bottom",true)
  18.         end
  19.     end
  20.    
  21.     if status == 0 then
  22.         term.clear()
  23.         term.setCursorPos(1, 1)
  24.         print("Lasers Currently Disengaged")
  25.         print("Press Enter to Turn Lasers ON")
  26.         local input = read("")
  27.         if input == enter then
  28.             status = 1
  29.             rs.setOutput("bottom",false)
  30.         end
  31.     end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment