Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local side = "right"
- local prevState = false
- local state
- while true do
- os.pullEvent("redstone")
- state = rs.getInput(side)
- if prevState ~= state and state then
- -- do stuff here
- end
- prevState = state
- end
Add Comment
Please, Sign In to add comment