Advertisement
PaymentOption

Client Install

May 14th, 2012
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. fs.delete("startup")
  2. fs.delete("OS")
  3. fs.delete("client")
  4.  
  5. function check(side)
  6.     if peripheral.isPresent("top") then return "top" end
  7.     if peripheral.isPresent("bottom") then return "bottom" end
  8.     if peripheral.isPresent("back") then return "back" end
  9.     if peripheral.isPresent("front") then return "front" end
  10.     if peripheral.isPresent("right") then return "right" end
  11.     if peripheral.isPresent("left") then return "left" end
  12.     return false
  13. end
  14.  
  15. side = ""
  16. isThere = check(side)
  17.  
  18. if isThere == "" then
  19.     shell.run("rom/programs/http/pastebin", "get", "K5g8wmeg", "client")
  20.     local file = fs.open("/startup", "w")
  21.     file.write("shell.run('monitor', '"..side.."', 'client')")
  22.     file.close()
  23. else shell.run("rom/programs/http/pastebin", "get", "K5g8wmeg", "startup") end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement