Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local computer = require("computer")
- melody = {
- {660, 0.1}, {660, 0.1}, {0, 0.1}, {660, 0.1},
- {0, 0.1}, {510, 0.1}, {660, 0.1}, {0, 0.1},
- {770, 0.1}, {0, 0.3}, {380, 0.1}, {0, 0.3},
- {510, 0.1}, {0, 0.1}, {380, 0.1}, {0, 0.1},
- {320, 0.1}, {0, 0.2}, {440, 0.1}, {0, 0.1},
- {480, 0.1}, {0, 0.1}, {450, 0.1}, {0, 0.1},
- {430, 0.1}, {0, 0.1}, {380, 0.1}, {660, 0.1},
- {760, 0.1}, {860, 0.1}, {0, 0.1},
- {700, 0.1}, {800, 0.1}, {660, 0.1}, {0, 0.1},
- {520, 0.1}, {580, 0.1}, {480, 0.1}, {0, 0.2},
- {510, 0.1}, {0, 0.1}, {380, 0.1}, {0, 0.1},
- {320, 0.1}, {0, 0.2}, {440, 0.1}, {0, 0.1},
- {480, 0.1}, {0, 0.1}, {450, 0.1}, {0, 0.1},
- {430, 0.1}, {0, 0.1}, {380, 0.1}, {660, 0.1},
- {760, 0.1}, {860, 0.1}, {0, 0.1},
- {700, 0.1}, {800, 0.1}, {660, 0.1}, {0, 0.1},
- {520, 0.1}, {580, 0.1}, {480, 0.1}, {0, 0.2}
- }
- function music()
- for _, note in ipairs(melody) do
- print(note[1], note[2])
- if note[1] == 0 then os.sleep(note[2]) else computer.beep(note[1], note[2]) end
- end
- music()
- end
- music()
Advertisement
Comments
-
- Leon West Accidental Goblin King Audiobooks 1-4
- magnet:?xt=urn:btih:49d386821d7a4093ac6209084242fbdf979b0ac1
- magnet:?xt=urn:btih:9f49b631081256fdab2d7b13927ce27bd44cf683
- magnet:?xt=urn:btih:6ef04c5cd32428d63afbca8a5b754688082059d3
- magnet:?xt=urn:btih:feae4390a335f0743bc8852d70183ace64240e1a
Add Comment
Please, Sign In to add comment
Advertisement