Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Args = {...}
- wr = peripheral.wrap("right")
- function pulse(freq,num)
- wr.setFreq(freq)
- for i=1,num do
- redstone.setOutput("right",true)
- os.sleep(0.8)
- redstone.setOutput("right",false)
- os.sleep(1)
- end
- end
- if Args[1] == "for" or Args[1] == "forward" then
- pulse(1337,tonumber(Args[2]))
- elseif Args[1] == "left" then
- pulse(1338,tonumber(Args[2]))
- elseif Args[1] == "back" or Args[1] == "backwards" then
- pulse(1339,tonumber(Args[2]))
- elseif Args[1] == "right" then
- pulse(1340,tonumber(Args[2]))
- end
Advertisement
Add Comment
Please, Sign In to add comment