Chaos_Cash

drill2.lua

Oct 28th, 2025 (edited)
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. local rs_output = {}
  2. rs_output.__index = rs_output
  3. local other_id = 5
  4. rednet.open("back")
  5.  
  6. function rs_output:new(side)
  7. local object_table = {side = side}
  8. setmetatable(object_table, self)
  9. return object_table
  10. end
  11.  
  12.  
  13.  
  14. function rs_output:enable()
  15. print(self.side, "enable")
  16. rs.setOutput(self.side ,true)
  17. end
  18.  
  19.  
  20.  
  21. function rs_output:disable()
  22. print(self.side, "disable")
  23. rs.setOutput(self.side ,false)
  24. end
  25.  
  26.  
  27.  
  28. function rs_output:get_input()
  29. return rs.getInput(self.side)
  30. end
  31.  
  32.  
  33.  
  34.  
  35. local gearshift = rs_output:new("right")
  36. local sticker = rs_output:new("top")
  37.  
  38. rednet.send(other_id)
  39. repeat
  40. until rednet.receive() == other_id
  41. sticker:enable()
  42. sleep(0.2)
  43. sticker:disable()
  44. gearshift:enable()
  45. sleep(3)
  46. gearshift:disable()
  47. repeat
  48. until rednet.receive() == other_id
  49. rednet.send(other_id)
Advertisement
Add Comment
Please, Sign In to add comment