Larvix

.changeLogin [MagmaOS]

Dec 17th, 2019
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. shell.run(".clear")
  2. local h = fs.open(".settings", "r")
  3. x = h.readAll()
  4. print(x)
  5. xPos, yPos = term.getCursorPos()
  6. term.setCursorPos(1,(yPos+1))
  7. h.close()
  8.  
  9. print("Enter new username:")
  10. user = read()
  11. print("Enter new password:")
  12. pass = read()
  13.  
  14. local h = fs.open(".settings", "w")
  15. h.writeLine("Username = "..user)
  16. h.writeLine("Password = "..pass)
  17. h.close()
  18.  
  19. xPos, yPos = term.getCursorPos()
  20. term.setCursorPos(1,(yPos+1))
  21. shell.run("label set MagmaOS_"..user)
  22. print("Press any key to continue")
  23. os.pullEvent( 'key' )
  24. shell.run(".menu")
Advertisement
Add Comment
Please, Sign In to add comment