Advertisement
Guest User

Untitled

a guest
Nov 6th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. while (true)
  2. do
  3. print(" ==========================================")
  4. print(" ")
  5. print(" Welcome to Fresh & Toby inc")
  6. print(" For a list of avalible commands type 'help'")
  7. print(" ")
  8. print(" ==========================================")
  9. print(" ")
  10. print("Enter your Username:")
  11. User = io.read()
  12. print("Enter your Password:")
  13. Pass = io.read()
  14. if (User == "Toby" or User == "Fresh") then
  15. if ((Pass == "123admin" and User == "Toby") or (Pass == "123admin" and User == "Fresh")) then
  16. while (true)
  17. do
  18. print ("All commands are done lower case")
  19. print ("Commands: Power (On/Off) | LogOut")
  20. Command = io.read()
  21. if (Command == "power on") then
  22. print ("Power Turning on")
  23. os.sleep(5)
  24. end
  25. if (Command == "power off") then
  26. print ("Power Turning off")
  27. break
  28. os.sleep(5)
  29. end
  30. if (Command == "Log Out") then {
  31. break
  32. end
  33. end
  34. term.clear()
  35. end
  36. end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement