StreamerYT

OC Music.program

Jun 18th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.54 KB | None | 0 0
  1. local cmp = require('component')
  2. local red = cmp.redstone
  3. local gpu = cmp.gpu
  4. local side = require("sides")
  5. gpu.setResolution(100,10);
  6.  
  7. while true do
  8. gpu.fill(1,1,100,10," ");
  9. local lvl = red.getInput(side.top)
  10.  
  11. if lvl == 15 then
  12.    gpu.set(2,2, "Кнопка 15");
  13. os.execute("del music15.lua")
  14. os.execute("wget http://playm.000webhostapp.com/music15.lua")
  15. os.execute("music15.lua")
  16. elseif lvl == 14 then
  17.    gpu.set(2,2, "Кнопка 14");
  18. os.execute("del music14.lua")
  19. os.execute("wget http://playm.000webhostapp.com/music14.lua")
  20. os.execute("music14.lua")
  21. elseif lvl == 13 then
  22.    gpu.set(2,2, "Кнопка 13");
  23. os.execute("del music13.lua")
  24. os.execute("wget http://playm.000webhostapp.com/music13.lua")
  25. os.execute("music13.lua")
  26. elseif lvl == 12 then
  27.    gpu.set(2,2, "Кнопка 12");
  28. os.execute("del music12.lua")
  29. os.execute("wget http://playm.000webhostapp.com/music12.lua")
  30. os.execute("music12.lua")
  31. elseif lvl == 11 then
  32.    gpu.set(2,2, "Кнопка 11");
  33. os.execute("del music11.lua")
  34. os.execute("wget http://playm.000webhostapp.com/music11.lua")
  35. os.execute("music11.lua")
  36. elseif lvl == 10 then
  37.    gpu.set(2,2, "Кнопка 10");
  38. os.execute("del music10.lua")
  39. os.execute("wget http://playm.000webhostapp.com/music10.lua")
  40. os.execute("music10.lua")
  41. elseif lvl == 9 then
  42.    gpu.set(2,2, "Кнопка 9");
  43. os.execute("del music9.lua")
  44. os.execute("wget http://playm.000webhostapp.com/music9.lua")
  45. os.execute("music9.lua")
  46. else
  47.    gpu.set(2,2, lvl .. " Кнопка Не нажата");
  48. end
  49.  
  50.  
  51. os.sleep(0.5);
  52. end;
Add Comment
Please, Sign In to add comment