-- Simple screensaver by Laine_prikol local component = require("component") local gpu = component.gpu local os = require("os") local term = require("term") input = "None" ----------------------------- term.clear() print("Введите режим: [a] - Полный рандом [b] - Красный [c] - Синий [d] - Зелёный") while true do input = io.read() if input == "a" then term.clear() while true do os.sleep(0) local x = math.random(0, 160) local y = math.random(0, 80) local x1 = x + math.random(0,10) local y1 = y + math.random(1,5) local x2 = x + math.random(1,8) local y2 = y + math.random(2,5) gpu.set(x,y, "█") gpu.setForeground(0x0000FF) gpu.set(x1,y1, "▓") gpu.setForeground(0x008000) gpu.set(x2,y2, "░") gpu.set(x2+4,y2+5, " ") gpu.setForeground(0x008000) gpu.set(x2+2,y2+1, "█") gpu.setForeground(0xF00000) end end if input == "b" then term.clear() while true do os.sleep(0) local x = math.random(0, 160) local y = math.random(0, 80) local x1 = x + math.random(0,10) local y1 = y + math.random(1,5) local x2 = x + math.random(1,8) local y2 = y + math.random(2,5) gpu.set(x,y, "█") gpu.setForeground(0xff0000) gpu.set(x1,y1, "█") gpu.setForeground(0xff1a1a) gpu.set(x2,y2, "█") gpu.set(x2+4,y2+5, " ") gpu.setForeground(0xe60000) gpu.set(x2+2,y2+1, "█") gpu.setForeground(0xff8080) end end if input == "c" then term.clear() while true do os.sleep(0) local x = math.random(0, 160) local y = math.random(0, 80) local x1 = x + math.random(0,10) local y1 = y + math.random(1,5) local x2 = x + math.random(1,8) local y2 = y + math.random(2,5) gpu.set(x,y, "█") gpu.setForeground(0x0033cc) gpu.set(x1,y1, "█") gpu.setForeground(0x4d79ff) gpu.set(x2,y2, "█") gpu.set(x2+4,y2+5, " ") gpu.setForeground(0x002080) gpu.set(x2+2,y2+1, "█") gpu.setForeground(0x002699) end end if input == "d" then while true do os.sleep(0) local x = math.random(0, 160) local y = math.random(0, 80) local x1 = x + math.random(0,10) local y1 = y + math.random(1,5) local x2 = x + math.random(1,8) local y2 = y + math.random(2,5) gpu.set(x,y, "█") gpu.setForeground(0x33cc33) gpu.set(x1,y1, "█") gpu.setForeground(0x196619) gpu.set(x2,y2, "█") gpu.set(x2+4,y2+5, " ") gpu.setForeground(0xadebad) gpu.set(x2+2,y2+1, "█") gpu.setForeground(0x47d147) end end end