Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local gpu = component.gpu
- local w, h = gpu.getResolution()
- local shell = require("shell")
- local event = require("event")
- local computer = require("computer")
- local term = require("term")
- local internet = require("internet")
- local fs = require("filesystem")
- local maxw, maxh = gpu.maxResolution()
- if maxh < 40 then
- gpu.set(1, 1, "Sorry, your computer doesn't meet them minimum requirements.")
- term.setCursor(1, 2)
- end
- gpu.setBackground(0xCCCCCC)
- gpu.setForeground(0x000000)
- gpu.setResolution(100, 50)
- gpu.fill(1, 1, 100, 50, " ")
- gpu.set(1, 1, "╔════════════════╦═════════════════════════════════════════════════════════════════════════════════╗")
- gpu.set(1, 2, "║ ║ ║")
- gpu.set(1, 3, "║ ║ ║")
- gpu.set(1, 4, "║ ║ ║")
- gpu.set(1, 5, "║ ║ ║")
- gpu.set(1, 6, "║ ║ ║")
- gpu.set(1, 7, "║ ║ ║")
- gpu.set(1, 8, "║ ║ ║")
- gpu.set(1, 9, "║ ║ ║")
- gpu.set(1, 10, "║ ║ ║")
- gpu.set(1, 11, "║ ║ ║")
- gpu.set(1, 12, "║ ║ ║")
- gpu.set(1, 13, "║ ║ ║")
- gpu.set(1, 14, "║ ║ ║")
- gpu.set(1, 15, "║ ║ ║")
- gpu.set(1, 16, "║ ║ ║")
- gpu.set(1, 17, "║ ║ ║")
- gpu.set(1, 18, "║ ║ ║")
- gpu.set(1, 19, "║ ║ ║")
- gpu.set(1, 20, "║ ║ ║")
- gpu.set(1, 21, "║ ║ ║")
- gpu.set(1, 22, "║ ║ ║")
- gpu.set(1, 23, "║ ║ ║")
- gpu.set(1, 24, "║ ║ ║")
- gpu.set(1, 25, "║ ║ ║")
- gpu.set(1, 26, "║ ║ ║")
- gpu.set(1, 27, "║ ║ ║")
- gpu.set(1, 28, "║ ║ ║")
- gpu.set(1, 29, "║ ║ ║")
- gpu.set(1, 30, "║ ║ ║")
- gpu.set(1, 31, "║ ║ ║")
- gpu.set(1, 32, "║ ║ ║")
- gpu.set(1, 33, "║ ║ ║")
- gpu.set(1, 34, "║ ║ ║")
- gpu.set(1, 35, "║ ║ ║")
- gpu.set(1, 36, "║ ║ ║")
- gpu.set(1, 37, "║ ║ ║")
- gpu.set(1, 38, "║ ║ ║")
- gpu.set(1, 39, "║ ║ ║")
- gpu.set(1, 40, "║ ║ ║")
- gpu.set(1, 41, "║ ║ ║")
- gpu.set(1, 42, "║ ║ ║")
- gpu.set(1, 43, "║ ║ ║")
- gpu.set(1, 44, "║ ║ ║")
- gpu.set(1, 45, "║ ║ ║")
- gpu.set(1, 46, "║ ║ ║")
- gpu.set(1, 47, "║ ║ ║")
- gpu.set(1, 48, "║ ║ ║")
- gpu.set(1, 49, "║ ║ ║")
- gpu.set(1, 50, "╚════════════════╩═════════════════════════════════════════════════════════════════════════════════╝")
- gpu.setBackground(0x000099)
- gpu.setForeground(0xCC0000)
- gpu.set(3, 1, "I")
- gpu.fill(2, 2, 16, 48, " ")
- gpu.setBackground(0xCC0000)
- gpu.setForeground(0xFFFFFF)
- gpu.set(98, 1, "X")
- gpu.setBackground(0xCCCCCC)
- gpu.setForeground(0x000000)
- gpu.set(5, 1, "╣Setup - Eko Slots╠")
- gpu.setBackground(0xEEEEEE)
- gpu.set(21, 3, "Welcome to the Eko Slots Setup Wizard")
- gpu.setBackground(0xCCCCCC)
- gpu.set(21, 5, "This will install Eko Slots on your computer.")
- gpu.set(21, 7, "In order to install Eko Slots, your computer must be at or above the")
- gpu.set(21, 8, "requirements, which are as follows:")
- gpu.set(21, 9, " •Tier 3 Screen")
- gpu.set(21, 10, " •Tier 3 Graphics Card")
- gpu.set(21, 11, " •Tier 1 Lua 5.2 CPU")
- gpu.set(21, 12, " •1 Tier 2 Memory Card")
- gpu.set(21, 13, " •An Internet Card")
- if not component.isAvailable("internet") then
- gpu.set(21, 43, "You do not meet the requirements. Missing:")
- gpu.set(21, 44, "Internet Card")
- gpu.set(21, 45, "Your computer will now restart.")
- os.sleep(3)
- computer.shutdown(true)
- end
- gpu.setBackground(0x333333)
- gpu.setForeground(0xFFFFFF)
- gpu.fill(21, 44, 8, 3, " ")
- gpu.fill(31, 44, 7, 3, " ")
- gpu.set(22, 45, "Cancel")
- gpu.set(33, 45, "Next")
- gpu.setBackground(0xCCCCCC)
- gpu.setForeground(0x000000)
- while true do
- local _, _, x, y, _, player = event.pull('touch')
- if x > 20 and x < 30 and y < 48 and y > 43 then
- gpu.fill(18, 2, 98, 48, " ")
- gpu.set(21, 3, "Your computer will now restart.")
- os.sleep(3)
- computer.shutdown(true)
- elseif x > 30 and x < 39 and y < 48 and y > 43 then
- gpu.fill(1, 1, 50, 25, " ")
- gpu.set(1, 1, "╔══════════════════════════════════════════════════════════════════════════════════════════════════╗")
- gpu.set(1, 2, "║ ║")
- gpu.set(1, 3, "║ ║")
- gpu.set(1, 4, "╠══════════════════════════════════════════════════════════════════════════════════════════════════╣")
- gpu.set(1, 5, "║ ║")
- gpu.set(1, 6, "║ ║")
- gpu.set(1, 7, "║ ║")
- gpu.set(1, 8, "║ ║")
- gpu.set(1, 9, "║ ║")
- gpu.set(1, 10, "║ ║")
- gpu.set(1, 11, "║ ║")
- gpu.set(1, 12, "║ ║")
- gpu.set(1, 13, "║ ║")
- gpu.set(1, 14, "║ ║")
- gpu.set(1, 15, "║ ║")
- gpu.set(1, 16, "║ ║")
- gpu.set(1, 17, "║ ║")
- gpu.set(1, 18, "║ ║")
- gpu.set(1, 19, "║ ║")
- gpu.set(1, 20, "║ ║")
- gpu.set(1, 21, "║ ║")
- gpu.set(1, 22, "║ ║")
- gpu.set(1, 23, "║ ║")
- gpu.set(1, 24, "║ ║")
- gpu.set(1, 25, "║ ║")
- gpu.set(1, 26, "║ ║")
- gpu.set(1, 27, "║ ║")
- gpu.set(1, 28, "║ ║")
- gpu.set(1, 29, "║ ║")
- gpu.set(1, 30, "║ ║")
- gpu.set(1, 31, "║ ║")
- gpu.set(1, 32, "║ ║")
- gpu.set(1, 33, "║ ║")
- gpu.set(1, 34, "║ ║")
- gpu.set(1, 35, "║ ║")
- gpu.set(1, 36, "║ ║")
- gpu.set(1, 37, "║ ║")
- gpu.set(1, 38, "║ ║")
- gpu.set(1, 39, "║ ║")
- gpu.set(1, 40, "║ ║")
- gpu.set(1, 41, "║ ║")
- gpu.set(1, 42, "║ ║")
- gpu.set(1, 43, "║ ║")
- gpu.set(1, 44, "║ ║")
- gpu.set(1, 45, "║ ║")
- gpu.set(1, 46, "║ ║")
- gpu.set(1, 47, "║ ║")
- gpu.set(1, 48, "║ ║")
- gpu.set(1, 49, "║ ║")
- gpu.set(1, 50, "╚══════════════════════════════════════════════════════════════════════════════════════════════════╝")
- gpu.setBackground(0x000099)
- gpu.fill(95, 2, 99, 4, " ")
- gpu.setBackground(0xCCCCCC)
- gpu.set(3, 2, "License Agreement")
- gpu.set(5, 3, "Please read the following important information before continuing.")
- gpu.setBackground(0xFFFFFF)
- gpu.fill(3, 6, 96, 34, " ")
- gpu.set(4, 8, "Don't claim my software as your own and use common sense.")
- gpu.set(4, 9, "Also, installation starts the instant you click Agree.")
- gpu.set(4, 10, "It installs to bin/slots and also puts a shortcut in the main")
- gpu.set(4, 11, "bin folder so you don't have to do \"bin/slots/binaries/main.lua\"")
- goto install
- end
- end
- --Yes, I know there is a more efficient way to do this, but I don't want people lecturing me on how goto sucks.
- ::install::
- gpu.setBackground(0x333333)
- gpu.setForeground(0xFFFFFF)
- gpu.fill(3, 44, 8, 3, " ")
- gpu.fill(13, 44, 7, 3, " ")
- gpu.set(4, 45, "Cancel")
- gpu.set(14, 45, "Agree")
- while true do
- local _, _, x, y, _, player = event.pull('touch')
- if x > 2 and x < 14 and y > 43 and y < 47 then
- gpu.fill(18, 2, 98, 48, " ")
- gpu.set(21, 3, "Your computer will now restart.")
- os.sleep(3)
- computer.shutdown(true)
- elseif x > 12 and x < 21 and y < 47 and y > 43 then
- gpu.fill(2, 2, 98, 3, " ")
- gpu.fill(2, 5, 98, 48, " ")
- gpu.setBackground(0x000099)
- gpu.fill(95, 2, 99, 4, " ")
- gpu.setBackground(0xCCCCCC)
- gpu.set(3, 2, "Installing Eko Slots")
- gpu.set(5, 3, "Do not shut down your computer")
- local f, reason = io.open(filename, "w")
- if not f then
- computer.shutdown(true)
- end
- gpu.set(4, 8, "Downloading...")
- fs.makeDirectory("bin/slots")
- fs.makeDirectory("bin/slots/binaries")
- fs.makeDirectory("bin/slots/resource")
- local file = "bin/slots/binaries/main.lua"
- local f, reason = io.open(file)
- local url = "http://pastebin.com/raw.php?i=d8gr7mQF"
- local result, response = pcall(internet.request, url)
- if result then
- for chunk in response do
- string.gsub(chunk, "\r\n", "\n")
- f:write(chunk)
- f:close()()
- end
- gpu.set(4, 10, "Downloading QFSERAAc to resource/chery")
- file = "bin/slots/resource/chery"
- f, reason = io.open(file)
- url = "http://pastebin.com/raw.php?i=QFSERAAc"
- result, response = pcall(internet.request, url)
- if result then
- for chunk in response do
- string.gsub(chunk, "\r\n", "\n")
- f:write(chunk)
- f:close()
- end
- gpu.set(4, 11, "Downloading 5Y8mhTSd to resource/berry")
- file = "bin/slots/resource/berry"
- f, reason = io.open(file)
- url = "http://pastebin.com/raw.php?i=5Y8mhTSd"
- result, response = pcall(internet.request, url)
- if result then
- for chunk in response do
- string.gsub(chunk, "\r\n", "\n")
- f:write(chunk)
- end
- gpu.set(4, 11, "Downloading dANxa1j0 to resource/base")
- file = "bin/slots/resource/base"
- f, reason = io.open(file)
- url = "http://pastebin.com/raw.php?i=dANxa1j0"
- result, response = pcall(internet.request, url)
- if result then
- for chunk in response do
- string.gsub(chunk, "\r\n", "\n")
- f:write(chunk)
- end
- gpu.set(4, 12, "Downloading D0TxLjZC to resource/title")
- file = "bin/slots/resource/title"
- f, reason = io.open(file)
- url = "http://pastebin.com/raw.php?i=D0TxLjZC"
- result, response = pcall(internet.request, url)
- if result then
- for chunk in response do
- string.gsub(chunk, "\r\n", "\n")
- f:write(chunk)
- end
- gpu.set(4, 13, "Downloading sztVKV2R to resource/spin")
- file = "bin/slots/resource/spin"
- f, reason = io.open(file)
- url = "http://pastebin.com/raw.php?i=sztVKV2R"
- result, response = pcall(internet.request, url)
- if result then
- for chunk in response do
- string.gsub(chunk, "\r\n", "\n")
- f:write(chunk)
- end
- gpu.set(4, 14, "Downloading tEuhBce7 to resource/melon")
- file = "bin/slots/resource/melon"
- f, reason = io.open(file)
- url = "http://pastebin.com/raw.php?i=tEuhBce7"
- result, response = pcall(internet.request, url)
- if result then
- for chunk in response do
- string.gsub(chunk, "\r\n", "\n")
- f:write(chunk)
- end
- gpu.set(4, 15, "Downloading PYfStCRb to resource/lemon")
- file = "bin/slots/resource/lemon"
- f, reason = io.open(file)
- url = "http://pastebin.com/raw.php?i=PYfStCRb"
- result, response = pcall(internet.request, url)
- if result then
- for chunk in response do
- if not options.k then
- string.gsub(chunk, "\r\n", "\n")
- end
- f:write(chunk)
- f:close()
- end
- gpu.set(4, 16, "Downloading g5GNwMAm to resource/eagle")
- file = "bin/slots/resource/eagle"
- f, reason = io.open(file)
- url = "http://pastebin.com/raw.php?i=g5GNwMAm"
- result, response = pcall(internet.request, url)
- if result then
- for chunk in response do
- string.gsub(chunk, "\r\n", "\n")
- f:write(chunk)
- end
- gpu.set(4, 18, "Install finished. Rebooting...")
- os.sleep(3)
- computer.shutdown(true)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment