Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Varibles
- version = "2.1"
- running = true
- --Images
- _dt = paintutils.loadImage("/1")
- system = paintutils.loadImage("/sys")
- --Booleans
- _ms = 0
- _rcm = 0
- --Functions
- clear = function()
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1, 1)
- end
- drawMenu1 = function()
- term.setCursorPos(1, 18)
- term.setBackgroundColor( colors.blue )
- term.setTextColor( colors.white )
- print("Desligar ")
- term.setCursorPos(1, 17)
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.white)
- print("Reiniciar ")
- term.setCursorPos(1, 16)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.lightBlue)
- print("AAAAAAAAAAAAAAAAAA")
- term.setCursorPos(1, 15)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.black)
- print("Jogo da Minhoca ")
- term.setCursorPos(1, 14)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.black)
- print("Aventura ")
- term.setCursorPos(1, 13)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.black)
- print("CraftOS ")
- term.setCursorPos(1, 12)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.black)
- print("Monitor ")
- term.setCursorPos(1, 11)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.black)
- print("Paint! ")
- term.setCursorPos(1, 10)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.black)
- print("TextEdit++ ")
- term.setCursorPos(1, 9)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.black)
- print("Versao do sistema ")
- term.setCursorPos(1, 8)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.black)
- print("Discar iG ")
- term.setCursorPos(1, 7)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.lightBlue)
- print("AAAAAAAAAAAAAAAAAA")
- term.setCursorPos(1, 6)
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.white)
- print(" Admin ")
- end
- rightClickMenu = function(x, y)
- term.setCursorPos(x, y)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- print(" Prompt de comando ")
- term.setCursorPos(x, y+1)
- print(" Config. ")
- term.setCursorPos(x, y+2)
- print(" Personalizar ")
- term.setCursorPos(x, y+3)
- print(" Senha ")
- local event, button, xPos, yPos = os.pullEvent("mouse_click")
- while true do
- if button ==1 and yPos == y and xPos <= (x+7) and xPos >= x then
- clear()
- running = false
- term.setTextColor(colors.lime)
- print("Prompt do LepOS foi aberto")
- shell.run("lua")
- restart()
- break
- elseif button == 1 and yPos == y+1 and xPos <= (x+19) and xPos >= x then
- clear()
- shell.run("edit", "/gui")
- restart()
- break
- elseif button == 1 and yPos == y+2 and xPos <= (x+19) and xPos >= x then
- shell.run("paint", "/1")
- restart()
- break
- elseif button == 1 and yPos == y+3 and xPos <= (x+19) and xPos >= x then
- clear()
- shell.run("edit", "/pass")
- restart()
- break
- else
- init()
- break
- end
- end
- _rcm = 0
- end
- drawTaskBar = function()
- term.setCursorPos(1, 19)
- term.setBackgroundColor( colors.blue )
- term.clearLine()
- term.setCursorPos(1, 19)
- term.setBackgroundColor( colors.lime )
- term.setTextColor( colors.black )
- term.write(" Iniciar")
- end
- drawDeskTop = function()
- term.setBackgroundColor(colors.lightBlue)
- term.clear()
- paintutils.drawImage(_dt, 1, 1)
- end
- stop = function()
- clear()
- running = false
- term.setCursorPos(17, 10)
- term.setBackgroundColor(colors.lightBlue)
- term.clear()
- term.setTextColor(colors.black)
- print("Fazendo Logoff...")
- sleep(2)
- term.setCursorPos(20, 10)
- term.setBackgroundColor(colors.lightBlue)
- term.clear()
- term.setTextColor(colors.black)
- print("Encerrando...")
- sleep(4)
- os.shutdown()
- end
- dialUp = function()
- drawDeskTop()
- drawTaskBar()
- sleep(0,1)
- paintutils.drawFilledBox(5, 3, 36, 10, colors.white)
- paintutils.drawPixel(5, 3, colors.blue)
- paintutils.drawPixel(6, 3, colors.blue)
- paintutils.drawPixel(7, 3, colors.blue)
- paintutils.drawPixel(8, 3, colors.blue)
- paintutils.drawPixel(9, 3, colors.blue)
- paintutils.drawPixel(10, 3, colors.blue)
- paintutils.drawPixel(11, 3, colors.blue)
- paintutils.drawPixel(12, 3, colors.blue)
- paintutils.drawPixel(13, 3, colors.blue)
- paintutils.drawPixel(14, 3, colors.blue)
- paintutils.drawPixel(15, 3, colors.blue)
- paintutils.drawPixel(16, 3, colors.blue)
- paintutils.drawPixel(17, 3, colors.blue)
- paintutils.drawPixel(18, 3, colors.blue)
- paintutils.drawPixel(19, 3, colors.blue)
- paintutils.drawPixel(20, 3, colors.blue)
- paintutils.drawPixel(21, 3, colors.blue)
- paintutils.drawPixel(22, 3, colors.blue)
- paintutils.drawPixel(23, 3, colors.blue)
- paintutils.drawPixel(24, 3, colors.blue)
- paintutils.drawPixel(25, 3, colors.blue)
- paintutils.drawPixel(26, 3, colors.blue)
- paintutils.drawPixel(27, 3, colors.blue)
- paintutils.drawPixel(28, 3, colors.blue)
- paintutils.drawPixel(29, 3, colors.blue)
- paintutils.drawPixel(30, 3, colors.blue)
- paintutils.drawPixel(31, 3, colors.blue)
- paintutils.drawPixel(32, 3, colors.blue)
- paintutils.drawPixel(33, 3, colors.blue)
- paintutils.drawPixel(34, 3, colors.blue)
- paintutils.drawPixel(35, 3, colors.blue)
- paintutils.drawPixel(36, 3, colors.red)
- term.setCursorPos(6, 4)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- print("Abrindo porta...")
- sleep(0.5)
- term.setCursorPos(6, 4)
- print("Porta foi aberta")
- sleep(0.5)
- paintutils.drawFilledBox(5, 3, 36, 10, colors.white)
- paintutils.drawPixel(5, 3, colors.blue)
- paintutils.drawPixel(6, 3, colors.blue)
- paintutils.drawPixel(7, 3, colors.blue)
- paintutils.drawPixel(8, 3, colors.blue)
- paintutils.drawPixel(9, 3, colors.blue)
- paintutils.drawPixel(10, 3, colors.blue)
- paintutils.drawPixel(11, 3, colors.blue)
- paintutils.drawPixel(12, 3, colors.blue)
- paintutils.drawPixel(13, 3, colors.blue)
- paintutils.drawPixel(14, 3, colors.blue)
- paintutils.drawPixel(15, 3, colors.blue)
- paintutils.drawPixel(16, 3, colors.blue)
- paintutils.drawPixel(17, 3, colors.blue)
- paintutils.drawPixel(18, 3, colors.blue)
- paintutils.drawPixel(19, 3, colors.blue)
- paintutils.drawPixel(20, 3, colors.blue)
- paintutils.drawPixel(21, 3, colors.blue)
- paintutils.drawPixel(22, 3, colors.blue)
- paintutils.drawPixel(23, 3, colors.blue)
- paintutils.drawPixel(24, 3, colors.blue)
- paintutils.drawPixel(25, 3, colors.blue)
- paintutils.drawPixel(26, 3, colors.blue)
- paintutils.drawPixel(27, 3, colors.blue)
- paintutils.drawPixel(28, 3, colors.blue)
- paintutils.drawPixel(29, 3, colors.blue)
- paintutils.drawPixel(30, 3, colors.blue)
- paintutils.drawPixel(31, 3, colors.blue)
- paintutils.drawPixel(32, 3, colors.blue)
- paintutils.drawPixel(33, 3, colors.blue)
- paintutils.drawPixel(34, 3, colors.blue)
- paintutils.drawPixel(35, 3, colors.blue)
- paintutils.drawPixel(36, 3, colors.red)
- term.setCursorPos(6, 4)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- print("Discando")
- term.setCursorPos(18, 4)
- textutils.slowPrint("5702340003")
- sleep(41)
- term.setTextColor(colors.black)
- term.setCursorPos(6, 4)
- print("iG Conectado a 33,5 Kbps")
- local event, button, x, y = os.pullEvent("mouse_click")
- if button == 1 and y == y and x <= (x+1) and x >= x then
- init()
- end
- end
- textEdit = function()
- clear()
- running = false
- shell.run("edit", "arquivo1")
- restart()
- end
- paint = function()
- clear()
- running = false
- shell.run("mkdir", "fotos")
- sleep(0.1)
- shell.run("paint", "/fotos/foto1")
- restart()
- end
- systemVersion = function()
- drawDeskTop()
- drawTaskBar()
- sleep(0.1)
- paintutils.drawFilledBox(1, 1, 49, 18, colors.white)
- paintutils.drawImage(system, 1, 2)
- term.setCursorPos(1, 1)
- term.setBackgroundColor(colors.blue)
- term.clearLine()
- paintutils.drawPixel(49, 1, colors.red)
- term.setCursorPos(7, 7)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- print("CyberOS 2.3 com SimSoft Plus!")
- term.setCursorPos(7, 8)
- print("Versao: 2.3 Plus!")
- term.setCursorPos(7, 9)
- print("Memoria livre do HD: 493.34 GB")
- term.setCursorPos(7, 10)
- print("Memoria RAM: 10 GB")
- term.setCursorPos(7, 11)
- print("Copyright (c) SimSoft 2017.")
- local event, butto, x, y = os.pullEvent("mouse_click")
- if button == 1 and y == y and x <= (x+49) and x >= x then
- init()
- end
- end
- playAdventure = function()
- clear()
- running = false
- shell.run("adventure")
- restart()
- end
- playWorm = function()
- clear()
- running = false
- shell.run("worm")
- restart()
- end
- reboot = function()
- clear()
- running = false
- term.setCursorPos(17, 10)
- term.setBackgroundColor(colors.lightBlue)
- term.clear()
- term.setTextColor(colors.black)
- print("Fazendo Logoff...")
- sleep(2)
- term.setCursorPos(20, 10)
- term.setBackgroundColor(colors.lightBlue)
- term.clear()
- term.setTextColor(colors.black)
- print("Encerrando...")
- sleep(4)
- os.reboot()
- end
- restart = function()
- clear()
- running = false
- sleep(0,2)
- term.setBackgroundColor(colors.gray)
- sleep(0,2)
- term.setBackgroundColor(colors.blue)
- sleep(0,1)
- shell.run("gui")
- end
- runTime = function()
- while running do
- event, button, x, y = os.pullEvent("mouse_click")
- if _ms == 0 and button == 1 and x < 9 and y == 19 then
- drawMenu1()
- _ms = 1
- elseif _ms == 1 and button == 1 and y == 18 and x < 19 then
- stop()
- elseif _ms == 1 and button == 1 and y == 17 and x < 19 then
- reboot()
- elseif _ms == 1 and button == 1 and y == 15 and x < 19 then
- playWorm()
- elseif _ms == 1 and button == 1 and y == 14 and x < 19 then
- playAdventure()
- elseif _ms == 1 and button == 1 and y == 13 and x < 19 then
- clear()
- running = false
- elseif _ms == 1 and button == 1 and y == 12 and x < 19 then
- clear()
- running = false
- shell.run("monitor", "monitor_2", "gui")
- restart()
- elseif _ms == 1 and button == 1 and y == 11 and x < 19 then
- paint()
- elseif _ms == 1 and button == 1 and y == 10 and x < 19 then
- textEdit()
- elseif _ms == 1 and button == 1 and y == 9 and x < 19 then
- systemVersion()
- elseif _ms == 1 and button == 1 and y == 8 and x < 19 then
- dialUp()
- elseif _ms == 1 and button == 1 and x < 9 and y == 19 then
- init()
- elseif _ms == 0 and button == 1 and x < 1 and y == 1 then
- init()
- elseif _ms == 0 and _rcm == 0 and button == 2 then
- rightClickMenu(x ,y)
- _rcm = 1
- end
- end
- end
- init = function()
- _ms = 0
- _rcm = 0
- drawDeskTop()
- drawTaskBar()
- runTime()
- end
- --Main Stuff
- init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement