Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cBox = peripheral.wrap("left")
- nBlock = peripheral.wrap("right")
- isPlaying = true
- nLeft = 0
- maxNotes = 20
- delay = .0025
- while true do
- if isPlaying then
- ins = math.random(0,6)
- note = math.random(0,24)
- nBlock.playNote(ins, note)
- nLeft = nLeft - 1
- if nLeft == 0 then
- isPlaying = false
- end
- os.sleep(delay)
- else
- myEvent, person, message = os.pullEvent("chat_message")
- if person == "tterrag1098" or message == "Commence." then
- isPlaying = true
- nLeft = maxNotes
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement