Sayomie550

laser Control.lua

Mar 26th, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 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.     term.clear()
  10.     term.setCursorPos(1, 1)
  11.     if status == 1 then
  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.         print("Lasers Currently Disengaged")
  23.         Print("Press Enter to Turn Lasers ON")
  24.         local input = read("")
  25.         if input == enter then
  26.             status = 1
  27.             rs.setOutput("bottom",false)
  28.         end
  29.     end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment