Guest User

Untitled

a guest
Jul 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. local side = "right"
  2. local prevState = false
  3. local state
  4.  
  5. while true do
  6. os.pullEvent("redstone")
  7. state = rs.getInput(side)
  8. if prevState ~= state and state then
  9. -- do stuff here
  10. end
  11. prevState = state
  12. end
Add Comment
Please, Sign In to add comment