Marlingaming

CC Tweaked Personal Device Account Page

Jan 5th, 2022 (edited)
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. --this script displays the Account Details of the User on their tablet Screen, best used to check taxes access or Affilation
  2. version = "1.0.0"
  3. settings.load(".settings")
  4. local Username = "guest"
  5. local IngameAddress = "n"
  6. local PropertyList = "n"
  7. local TaxedAmount = 0
  8. local w, h = term.getSize()
  9.  
  10. local function Clear()
  11. term.clear()
  12. term.setCursorPos(1,1)
  13. end
  14.  
  15. local function CenterText(y,text)
  16. local x = math.floor((w - string.len(text)) /2)
  17. term.setCursorPos(x,y)
  18. term.clearLine()
  19. term.write(text)
  20. end
  21.  
  22. local function GetDetails()
  23. local file = fs.open("os/os_UserFiles/AccountDetails","r")
  24. Username = settings.get("os_Username")
  25. local fake1 = file.readLine()
  26. TaxedAmount = file.readLine()
  27. IngameAddress = file.readLine()
  28. PropertyList = file.readLine()
  29. file.close()
  30. end
  31.  
  32. local function AccountPage()
  33. Clear()
  34. CenterText(1,"====UserPage====")
  35. CenterText(2,Username)
  36. CenterText(3,IngameAddress)
  37. CenterText(5,"==Properties==")
  38. CenterText(6,PropertyList)
  39. CenterText(12,"Pays $"..TaxedAmount.." In Taxes")
  40. CenterText(13,"Press Enter to exit")
  41. repeat
  42. local event, key = os.pullEvent("key")
  43. until key == keys.enter
  44. shell.run(settings.get("os_DesktopLoc"))
  45. end
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. Clear()
  56. GetDetails()
  57. AccountPage()
Add Comment
Please, Sign In to add comment