Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --GyorsMenü
- term.clear()
- term.setCursorPos(1,1)
- print("[PulseBook]")
- term.setCursorPos(13,1)
- print("[Terminal]")
- term.setCursorPos(24,1)
- print("[Worm]")
- term.setCursorPos(31,1)
- print("[AntiVirus]")
- menu = false
- ----Ikonok
- Icons = function()
- local p = paintutils.drawPixel
- local c = colors
- --Files
- --sor 1
- p(14, 3, c.yellow)
- p(15, 3, c.black)
- p(16, 3, c.gray)
- p(17, 3, c.gray)
- p(18, 3, c.gray)
- --sor 2
- p(14, 4, c.yellow)
- p(15, 4, c.yellow)
- p(16, 4, c.yellow)
- p(17, 4, c.yellow)
- p(18, 4, c.gray)
- --sor 3
- p(14, 5, c.yellow)
- p(15, 5, c.yellow)
- p(16, 5, c.yellow)
- p(17, 5, c.yellow)
- p(18, 5, c.gray)
- --sor 4
- p(14, 6, c.gray)
- p(15, 6, c.gray)
- p(16, 6, c.gray)
- p(17, 6, c.gray)
- p(18, 6, c.gray)
- --sor 5
- term.setBackgroundColor(c.black)
- term.setCursorPos(14,7)
- print("Files")
- --Worm
- --sor 1
- p(2,3, c.gray)
- p(3,3, c.green)
- p(4,3, c.gray)
- p(5,3, c.gray)
- p(6,3, c.green)
- --sor 2
- p(2,4, c.green)
- p(3,4, c.green)
- p(4,4, c.gray)
- p(5,4, c.gray)
- p(6,4, c.green)
- --sor 3
- p(2,5, c.green)
- p(3,5, c.gray)
- p(4,5, c.gray)
- p(5,5, c.gray)
- p(6,5, c.green)
- --sor 4
- p(2,6, c.green)
- p(3,6, c.green)
- p(4,6, c.green)
- p(5,6, c.green)
- p(6,6, c.green)
- --sor 5
- term.setBackgroundColor(c.black)
- term.setCursorPos(2,7)
- print("Worm")
- --AntiVirus
- --sor 1
- p(8, 3, c.gray)
- p(9, 3, c.gray)
- p(10, 3, c.blue)
- p(11, 3, c.gray)
- p(12, 3, c.gray)
- --sor 2
- p(8, 4, c.gray)
- p(9, 4, c.blue)
- p(10, 4, c.blue)
- p(11, 4, c.blue)
- p(12, 4, c.gray)
- --sor 3
- p(8, 5, c.blue)
- p(9, 5, c.blue)
- p(10, 5, c.blue)
- p(11, 5, c.blue)
- p(12, 5, c.blue)
- --sor 4
- p(8, 6, c.gray)
- p(9, 6, c.gray)
- p(10, 6, c.blue)
- p(11, 6, c.gray)
- p(12, 6, c.gray)
- --sor 5
- term.setCursorPos(8, 7)
- term.setBackgroundColor(c.black)
- print("AntiV")
- end
- ----Ikonok end
- Icons()
- while true do
- local event, vmi, cx, cy = os.pullEvent()
- if event == "mouse_click" then
- --Ikonok
- if cx >= 8 and cx <= 12 and cy >= 3 and cy <= 7 then
- term.clear()
- term.setCursorPos(1,1)
- shell.run("Pulse/apps/antivirus")
- end
- if cx >= 2 and cx <=6 and cy >= 3 and cy <= 7 then
- shell.run("worm")
- end
- if cx >= 14 and cx <= 18 and cy >= 3 and cy <= 7 then
- term.clear()
- term.setCursorPos(1,1)
- print("Directory:")
- menu = true
- while menu do
- local b = "Pulse/"
- local g = b..read()
- if fs.exists(g) then
- local FileList = fs.list(g)
- print("Files:")
- print("----------------")
- for _, file in ipairs(FileList) do
- print(file)
- end
- print("----------------")
- print("Directory:")
- elseif g == b.."exit" then
- shell.run("Pulse/startup/gui")
- else
- print("Not a directory!")
- print("Directory:")
- end
- end
- end
- --GyorsMenü
- if cx >= 1 and cx <= 11 and cy == 1 then
- term.clear()
- term.setCursorPos(1,5)
- print("1> Shutdown")
- term.setCursorPos(1,6)
- print("2> Reboot")
- term.setCursorPos(1,7)
- print("3> <- Back")
- local event, key = os.pullEvent("key")
- if key == keys.one then
- os.shutdown()
- elseif key == keys.two then
- os.reboot()
- elseif key == keys.three then
- shell.run("Pulse/startup/gui")
- end
- end
- if cx >= 13 and cx <= 22 and cy == 1 then
- term.clear()
- term.setCursorPos(1,1)
- break
- end
- if cx >= 24 and cx <= 29 and cy == 1 then
- term.clear()
- term.setCursorPos(1,1)
- shell.run("worm")
- end
- if cx >= 31 and cx <= 41 and cy == 1 then
- term.clear()
- shell.run("Pulse/apps/antivirus")
- end
- end
- end
- --GyorsMenü end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement