Advertisement
stefbrad15

parkourChallenge

Mar 10th, 2021 (edited)
783
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. counter = 0
  2. waiting_for_runner = true
  3.  
  4. sprint_details = {}
  5.  
  6. mon = peripheral.wrap("right")
  7. mon.clear()
  8. mon.setCursorPos(1,1)
  9. mon.write("Parkour Challenge")
  10. mon.setCursorPos(1,2)
  11. mon.write("Waiting for runner")
  12.  
  13. while waiting_for_runner do
  14.     if redstone.getAnalogInput("left") > 0 then
  15.       waiting_for_runner = false
  16.       mon.clearLine()
  17.       mon.setCursorPos(1,2)
  18.       mon.write("Runner found")
  19.     end
  20.     counter = counter + 0.1
  21.     sleep(0.1)
  22. end
  23.  
  24. term.setCursorPos(1,3)
  25. term.write(counter)
Advertisement
RAW Paste Data Copied
Advertisement