Advertisement
Guest User

Untitled

a guest
Apr 13th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local testss = "local pullEvent = os.pullEvent os.pullEvent = os.pullEventRaw"
  2.  
  3. local m = periphperal.wrap("top")
  4.  
  5. local todolist = {["xxmobkiller"] = {"1. Finish Walls","2. Finish -1 walls and floor"}, ["demo"] = {"1. Need to get more money","2. Follow the rules"}}
  6. local todolistColors = {["xxmobkiller"] = {color.red,colors.red}, ["demo"] = {color.red, color.green}}
  7.  
  8. local usernames = {"xxmobkiller","demo"}
  9. local passwords = {["xxmobkiller"] = "25565", ["demo"] = "demo"}
  10.  
  11. local user = ""
  12.  
  13. local foundUsername = false
  14. local foundPassword = false
  15.  
  16. local currentpos1 = 1
  17. local currentpos2 = 1
  18.  
  19. while true do
  20.  term.clear()
  21.  term.setCursorPos(1,1)
  22.  write("===========================")
  23.  write("Welcome to ToDoList")
  24.  write("made by xxmobkiller")
  25.  write("===========================")
  26.  write("Loading LUA")
  27.  sleep(2)
  28.  write("Loading LUA.")
  29.  sleep(1)
  30.  write("Loading LUA..")
  31.  sleep(2)
  32.  write("Loading LUA...")
  33.  sleep(3)
  34.  write("Loading Finished")
  35.  sleep(2)
  36.  term.clear()
  37.  term.setCursorPos(1,1)
  38.  write("===========================")
  39.  write("Welcome to ToDoList")
  40.  write("made by xxmobkiller")
  41.  write("===========================")
  42.  write("Your Username:")
  43.  local input = read()
  44.  for index,username in pairs(usernames) do
  45.    if foundUsername == false and username == input then
  46.       foundUsername = true
  47.       user = username
  48.    end
  49.  end
  50.  sleep(2)
  51.  write("Not Your Minecraft Password:")
  52.  local input = read("*")
  53.  if foundUsername == true and passwords[user] == input then
  54.     foundUsername = true
  55.     user = username
  56.     term.clear()
  57.     term.setCursorPos(1,1)
  58.  end
  59.  if foundUsername == true and foundPassword == true then
  60.    print("===========================")
  61.    print("Welcome, " .. user .. " to ToDoList")
  62.    print("===========================")
  63.    print("Now Loading your ToDo List on the BigScreen!")
  64.    sleep(2)
  65.    for index,value in pairs(todolist) do
  66.    if todolistColors[user] ~= nil and todolistColors[user][index] ~= nil then
  67.       setText(1,todolistColors[user][index],currentpos1,currentpos2,value)
  68.       currentpos2 = currentpos2 + 1
  69.    end
  70.    end
  71.    print("Editing System is coming soon :)")
  72.    sleep(3)
  73.  else
  74.    print("I did not found your username or password in")
  75.    print("my database!")
  76.    sleep(5)
  77.  end
  78. end
  79.  
  80. setText = function(scale,color,pos1,pos2,text)
  81. m.setTextScale(scale)
  82. m.setTextColor(color)
  83. m.setCursorPos(pos1,pos2)
  84. m.write(text)
  85. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement