Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local hasCart = false
- local dector = peripheral.wrap("top")
- while (true)
- do
- if (dector.isPlayersInRange(5))
- then
- hasCart = true
- elseif (hasCart)
- then
- hasCart = false
- redstone.setOutput("back", true)
- os.sleep(0.5)
- redstone.setOutput("back", false)
- end
- os.sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement