Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local dir = args[1]
- local steps = tonumber(args[2]) or 1
- local side = "left"
- up = colors.blue
- down = colors.black
- left = colors.magenta
- right = colors.orange
- front = colors.white
- back = colors.red
- armdown = colors.lightGray
- armup = colors.lightBlue
- if dir == "l" then dir = left
- elseif dir == "r" or dir == "right" then dir = right
- elseif dir == "u" or dir == "up" then dir = up
- elseif dir == "d" or dir == "down" then dir = down
- elseif dir == "f" or dir == "forward" then dir = front
- elseif dir == "b" or dir == "back" then dir = back
- elseif dir == "ad" then dir = armdown
- elseif dir == "au" then dir = armup end
- function pulse(col, num,time)
- num = num or 1
- for i=1, num do
- rs.setBundledOutput(side,col)
- sleep(time)
- rs.setBundledOutput(side,0)
- sleep(time)
- end
- end
- local t = 1
- if dir == armup or dir == armdown then t =.3 end
- pulse(dir,steps,t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement