Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.find("modem")
- local songs =
- {
- "https://images.cloudninja.pw/TiRA.dfpwm",
- "https://images.cloudninja.pw/Ip1X.dfpwm",
- "https://images.cloudninja.pw/fqP4.dfpwm",
- "https://images.cloudninja.pw/Quyb.dfpwm",
- "https://images.cloudninja.pw/gg8H.dfpwm",
- "https://images.cloudninja.pw/GiYw.dfpwm",
- "https://images.cloudninja.pw/bBdu.dfpwm",
- "https://images.cloudninja.pw/YeS6.dfpwm"
- }
- local control = {1200,1500,1800}
- for k,v in pairs(control) do
- modem.open(v)
- end
- local function getSong()
- local int = math.random(1,#songs)
- print("Song #: "..int)
- return songs[int]
- end
- local SNG = getSong()
- while true do
- local evnt, side, sChan, rChan, data, dist = os.pullEvent("modem_message")
- if rChan == control[3] and data == "ready" then
- modem.transmit(control[1],control[1],SNG)
- end
- SNG = getSong()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement