Advertisement
devomaa

Untitled

Jul 28th, 2020
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 KB | None | 0 0
  1. local color = "a"
  2. function _G.string.startsWith(s, start)
  3.     if start then
  4.         return string.sub(s, 1,#start) == start
  5.     else
  6.         return string.sub(s, 1,1)
  7.     end
  8. end
  9. function _G.string.split(s)
  10.     local words = {}
  11.  
  12.     for word in s:gmatch("%w+") do
  13.         table.insert(words, word)
  14.     end
  15.     return words
  16. end
  17. while true do
  18.     local otherthing = "/" .. shell.dir()
  19.     local thing = string.rep("f", #otherthing)
  20.     local thing2 = string.gsub(thing, "f", color)
  21.     term.blit(otherthing .. "  \157", thing .. "ff"..color, thing2 .. color..color.."f")
  22.     write(" ")
  23.     local input = read()
  24.     if input:split()[1] == "exit" then
  25.        
  26. local color = "a"
  27. function _G.string.startsWith(s, start)
  28.     if start then
  29.         return string.sub(s, 1,#start) == start
  30.     else
  31.         return string.sub(s, 1,1)
  32.     end
  33. end
  34. function _G.string.split(s)
  35.     local words = {}
  36.  
  37.     for word in s:gmatch("%w+") do
  38.         table.insert(words, word)
  39.     end
  40.     return words
  41. end
  42. while true do
  43.     local otherthing = "/" .. shell.dir()
  44.     local thing = string.rep("f", #otherthing)
  45.     local thing2 = string.gsub(thing, "f", color)
  46.     term.blit(otherthing .. "  \157", thing .. "ff"..color, thing2 .. color..color.."f")
  47.     write(" ")
  48.     local input = read()
  49.     if input:split()[1] == "exit" then
  50.         shell.run("exit")
  51.         return
  52.     end
  53.     shell.run(input)
  54. end
  55.  
  56. return
  57.     end
  58.     shell.run(input)
  59. end
  60.  
  61.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement