Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cmp = require('component')
- local red = cmp.redstone
- local gpu = cmp.gpu
- local side = require("sides")
- gpu.setResolution(100,10);
- while true do
- gpu.fill(1,1,100,10," ");
- local lvl = red.getInput(side.top)
- if lvl == 15 then
- gpu.set(2,2, "Кнопка 15");
- os.execute("del music15.lua")
- os.execute("wget http://playm.000webhostapp.com/music15.lua")
- os.execute("music15.lua")
- elseif lvl == 14 then
- gpu.set(2,2, "Кнопка 14");
- os.execute("del music14.lua")
- os.execute("wget http://playm.000webhostapp.com/music14.lua")
- os.execute("music14.lua")
- elseif lvl == 13 then
- gpu.set(2,2, "Кнопка 13");
- os.execute("del music13.lua")
- os.execute("wget http://playm.000webhostapp.com/music13.lua")
- os.execute("music13.lua")
- elseif lvl == 12 then
- gpu.set(2,2, "Кнопка 12");
- os.execute("del music12.lua")
- os.execute("wget http://playm.000webhostapp.com/music12.lua")
- os.execute("music12.lua")
- elseif lvl == 11 then
- gpu.set(2,2, "Кнопка 11");
- os.execute("del music11.lua")
- os.execute("wget http://playm.000webhostapp.com/music11.lua")
- os.execute("music11.lua")
- elseif lvl == 10 then
- gpu.set(2,2, "Кнопка 10");
- os.execute("del music10.lua")
- os.execute("wget http://playm.000webhostapp.com/music10.lua")
- os.execute("music10.lua")
- elseif lvl == 9 then
- gpu.set(2,2, "Кнопка 9");
- os.execute("del music9.lua")
- os.execute("wget http://playm.000webhostapp.com/music9.lua")
- os.execute("music9.lua")
- else
- gpu.set(2,2, lvl .. " Кнопка Не нажата");
- end
- os.sleep(0.5);
- end;
Add Comment
Please, Sign In to add comment