Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- os.loadAPI("noteutils")
- rs.setAnalogOutput("front", 0)
- rs.setAnalogOutput("left", 0)
- rs.setAnalogOutput("back", 0)
- rs.setAnalogOutput("right", 0)
- local music = noteutils.loadMusic(tostring(tArgs[1]))
- for i, v in pairs(music) do
- for k, e in pairs(v) do
- --print(i .. " " .. k .. " " .. e)
- if e ~= "0" then
- if k == 1 then
- rs.setAnalogOutput("front", 1)
- end
- if k == 2 then
- rs.setAnalogOutput("left", 1)
- end
- if k == 3 then
- rs.setAnalogOutput("back", 1)
- end
- if k == 4 then
- rs.setAnalogOutput("right", 1)
- end
- end
- end
- sleep(.5)
- rs.setAnalogOutput("front", 0)
- rs.setAnalogOutput("left", 0)
- rs.setAnalogOutput("back", 0)
- rs.setAnalogOutput("right", 0)
- sleep(.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement