Advertisement
xPrrox

loop

Apr 27th, 2022
974
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --local component = require("component")
  2. --ttttttttape = component.tape_drive
  3. tape = peripheral.find("tape_drive")
  4. local counter = 0
  5. repeat
  6.   if tape.read() ~= 170
  7.     then
  8.     print(tape.read())
  9.     sleep(0.01)
  10.     counter = 0
  11.     else
  12.     counter = counter + 1
  13.     end
  14.    
  15.     if counter == 100 then
  16.     tape.seek(-tape.getPosition())
  17.     tape.play()
  18.         counter = 0
  19.     end
  20. until i == 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement