Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Simple screensaver Laine_prikol and modified by Kotik_Prikol 1.1
- local component = require("component")
- local gpu = component.gpu
- local os = require("os")
- local term = require("term")
- input = "None"
- stopping = 0
- -----------------------------
- 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, "♥")
- stopping = stopping + 1
- gpu.setForeground(0x0000FF)
- gpu.set(x1,y1, "☺")
- stopping = stopping + 1
- gpu.setForeground(0x008000)
- gpu.set(x2,y2, "◌")
- stopping = stopping + 1
- gpu.set(x2+4,y2+5, "◊")
- stopping = stopping + 1
- gpu.setForeground(0x008000)
- gpu.set(x2+2,y2+1, "♫")
- stopping = stopping + 1
- gpu.setForeground(0xF00000)
- if stopping == 3000 then
- os.sleep(10000000)
- end
- 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, "█")
- stopping = stopping + 1
- gpu.setForeground(0xff0000)
- gpu.set(x1,y1, "█")
- stopping = stopping + 1
- gpu.setForeground(0xff1a1a)
- gpu.set(x2,y2, "█")
- gpu.set(x2+4,y2+5, " ")
- gpu.setForeground(0xe60000)
- gpu.set(x2+2,y2+1, "█")
- stopping = stopping + 1
- gpu.setForeground(0xff8080)
- if stopping == 3000 then
- os.sleeep(10000000)
- 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, "█")
- stopping = stopping + 1
- gpu.setForeground(0x0033cc)
- gpu.set(x1,y1, "█")
- stopping = stopping + 1
- gpu.setForeground(0x4d79ff)
- gpu.set(x2,y2, "█")
- stopping = stopping + 1
- gpu.set(x2+4,y2+5, " ")
- gpu.setForeground(0x002080)
- gpu.set(x2+2,y2+1, "█")
- stopping = stopping + 1
- gpu.setForeground(0x002699)
- if stopping == 3000 then
- os.sleep(10000)
- end
- 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, "█")
- stopping = stopping + 1
- gpu.setForeground(0x33cc33)
- gpu.set(x1,y1, "█")
- stopping = stopping + 1
- gpu.setForeground(0x196619)
- gpu.set(x2,y2, "█")
- stopping = stopping + 1
- gpu.set(x2+4,y2+5, " ")
- stopping = stopping + 1
- gpu.setForeground(0xadebad)
- gpu.set(x2+2,y2+1, "█")
- stopping = stopping + 1
- gpu.setForeground(0x47d147)
- if stopping == 3000 then
- os.sleep(100000)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement