Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this script displays the Account Details of the User on their tablet Screen, best used to check taxes access or Affilation
- version = "1.0.0"
- settings.load(".settings")
- local Username = "guest"
- local IngameAddress = "n"
- local PropertyList = "n"
- local TaxedAmount = 0
- local w, h = term.getSize()
- local function Clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- local function CenterText(y,text)
- local x = math.floor((w - string.len(text)) /2)
- term.setCursorPos(x,y)
- term.clearLine()
- term.write(text)
- end
- local function GetDetails()
- local file = fs.open("os/os_UserFiles/AccountDetails","r")
- Username = settings.get("os_Username")
- local fake1 = file.readLine()
- TaxedAmount = file.readLine()
- IngameAddress = file.readLine()
- PropertyList = file.readLine()
- file.close()
- end
- local function AccountPage()
- Clear()
- CenterText(1,"====UserPage====")
- CenterText(2,Username)
- CenterText(3,IngameAddress)
- CenterText(5,"==Properties==")
- CenterText(6,PropertyList)
- CenterText(12,"Pays $"..TaxedAmount.." In Taxes")
- CenterText(13,"Press Enter to exit")
- repeat
- local event, key = os.pullEvent("key")
- until key == keys.enter
- shell.run(settings.get("os_DesktopLoc"))
- end
- Clear()
- GetDetails()
- AccountPage()
Add Comment
Please, Sign In to add comment