Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("rom/apis/miscperipheralsutil")
- note, noteSide = miscperipheralsutil.getPeripheral("note")
- if note == nil then
- print("No Note peripheral found")
- return
- end
- if note == nil then
- print("No Iron Note Block peripheral found")
- return
- end
- print("Using Iron Note Block peripheral on "..noteSide)
- print("Press any key to stop")
- parallel.waitForAny(
- function()
- while true do
- note.playNote(math.random(0, 4), math.random(0, 24))
- sleep(0.25)
- end
- end,
- function()
- os.pullEvent("char")
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement