minecraftwarlock

Computercraft On-screen Keyboard Installer

Apr 4th, 2015
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.74 KB | None | 0 0
  1. tArgs = {...}
  2.  
  3. local Install = "jBghcB1C"
  4. if type(tArgs[1]) == "string" and tArgs[1]:lower() == "disk" then
  5.    
  6.     print("\n\nAre you sure you want to create an install disk Keyboard for monitors (Y/N)")
  7.     term.setTextColor(colors.red)
  8.     print('Warning! this will delete the "startup" file on the disk')
  9.     term.setTextColor(colors.white)
  10.    
  11.     if read():lower() == "y" then
  12.         if fs.exists("disk") and fs.isDir("disk") then     
  13.             if fs.exists("disk/startup") then fs.delete("disk/startup") end
  14.        
  15.             print("\nDownloading installer")
  16.             shell.run("pastebin", "get", Install, "disk/startup")
  17.             print("\n\nInstall disk created successfully")
  18.             print("Note: reboot the computer to start the install")
  19.         else
  20.             error("No disk drive attached")
  21.         end
  22.     else
  23.         print("Install canceled")
  24.     end
  25. else
  26.     print("\n\nAre you sure you want to Install Keyboard for monitors (Y/N)")
  27.     term.setTextColor(colors.red)
  28.     print('Warning! this will delete the "Key" folder on this computer')
  29.     term.setTextColor(colors.white)
  30.    
  31.     if read():lower() == "y" then
  32.    
  33.         if fs.exists("Key") then fs.delete("Key") end
  34.        
  35.         local Run = "wutxWFKt"
  36.         local Keyboard = "CX4Aq5r1"
  37.         local Uninstall = "ugEh6GST"
  38.        
  39.         print("\nDownloading program")
  40.         shell.run("pastebin", "get", Keyboard, "Key/Keyboard")
  41.         print("\nDownloading launcher")
  42.         shell.run("pastebin", "get", Run, "Key/Run")
  43.         print("\nDownloading uninstaller")
  44.         shell.run("pastebin", "get", Uninstall, "Key/Uninstall")
  45.         print("\nDownloading installer")
  46.         shell.run("pastebin", "get", Install, "Key/Install")
  47.         print("\n\nInstall completed successfully")
  48.         print("To run simply type Key/Run <name of monitor>")
  49.         print("Note: designed to be used on a separate monitor")
  50.     else
  51.         print("Install canceled")
  52.     end
  53. end
Advertisement
Add Comment
Please, Sign In to add comment