Advertisement
appleguy1999

Shooting Range

May 18th, 2014
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. local monitorSide = "top" -- the side the monitor is on
  2. local textScale = 3 -- the text scale
  3.  
  4. -- check if the monitor is present
  5. if peripheral.isPresent(monitorSide) and peripheral.getType(monitorSide) == "monitor" then
  6. local mon = peripheral.wrap(monitorSide) -- get the monitor
  7. mon.setTextScale(textScale) -- set the text scale
  8. term.redirect(mon) -- redirect output to the monitor
  9. else
  10. -- monitor not found, exit
  11. print("Monitor not found")
  12. return
  13. end
  14.  
  15. -- your code here
  16.  
  17.  
  18. repeat
  19. repeat
  20. sleep(0)
  21. until redstone.getAnalogInput("right") > 0
  22. print (redstone.getAnalogInput("right"))
  23. sleep(0.5)
  24. shell.run("clear")
  25. until 1 < 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement