Advertisement
ccraftersanonmoose

redstone-relay.lua

Mar 22nd, 2025 (edited)
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. -- Script to test redstone relay from CC:tweaked and physical button redstone signals
  2.  
  3.  
  4. -----------------
  5.  
  6. local relay = peripheral.wrap("redstoneIntegrator_0")
  7.  
  8.  
  9. function getPress()
  10.    if relay.getAnalogInput("right") == true then
  11.     print("A button has been pressed!")
  12.    end
  13. end
  14.  
  15.  
  16. while true do
  17.    getPress()
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement