Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Gui---------------
- Xs,Ys = term.getSize()
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- paintutils.drawPixel(1,1,colors.white)
- term.clear()
- text = "Welcome to mr_jack"
- term.setCursorPos(Xs/2-#text/2,Ys/2-1)
- print(text)
- text = "installer"
- term.setCursorPos(Xs/2-#text/2,Ys/2)
- print(text)
- term.setCursorPos(Xs/2-5,Ys/2+2)
- term.setBackgroundColor(colors.green)
- term.setTextColor(colors.black)
- write("Install API")
- term.setCursorPos(Xs,1)
- term.setTextColor(colors.red)
- term.setBackgroundColor(colors.white)
- print("x")
- --Other--------------
- while true do
- e,key,x,y = os.pullEvent()
- term.setCursorPos(1,1)
- rXa = math.floor(Xs/2-5)
- rXb = math.floor(Xs/2+5)
- rY = math.floor(Ys/2+2)
- if e == "mouse_click" and rXa <= x and rXb >= x and y == rY then
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- paintutils.drawPixel(1,1,colors.black)
- term.clear()
- shell.run("pastebin get 0Nmm13K0 System/API/sysapi")
- term.clear()
- break
- elseif e == "mouse_click" and x == Xs and y == 1 then
- paintutils.drawPixel(1,1,colors.black)
- term.clear()
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement