Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this script allows the player to change their Gov info
- networkVersion = "1.0.0"
- SecCode = "0000"
- local returnScript = settings.get("os_DesktopLoc")
- local tArg = {...}
- if #tArg > 0 then
- returnScript = tArg[1]
- end
- local w, h = term.getSize()
- local n = 1
- local Headlines_1 = {"Capital Times 1/11/22","Head Builder of the capital has announced today that the construction of the Imperial Palace will be delayed, so a quicker and smaller Government Building could be set for temporary use, in the rush for the governments expected establishment on the 20th"}
- local Headlines_2 = {"Emperors Insight 1/10/22","Politicians across the nation are in complete agreement over the idea of rushing the constitutions Development. How will they legally do this? Experts say the only way they can is by forcing DeathsMainDomain out of the circle using the Arguement that he is slowing down its completion"}
- 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 HomePage()
- end
- function CUI(m) --declare function
- n=1
- local l = #m
- while true do
- CenterText(2,os.date())
- term.setCursorPos(1,3)
- term.clearLine()
- local Text = "-"
- for i = 1, #m do
- if i==n then Text = Text.."["..m[i].."]-" else Text = Text..m[i].."-" end
- end
- term.write(Text)
- local event = {os.pullEvent()}
- local Cat = {event[3]}
- a, b= os.pullEvent("key") --wait for keypress
- if b==keys.a and n>1 then n=n-1 end
- if b==keys.d and n<l then n=n+1 end
- if b==keys.enter then break end
- end
- return n --return the value
- end
- function DrawMenus(M)
- Clear()
- local Options
- print("Government Web Panel")
- term.setCursorPos(1,9)
- print(M)
- if M == "Home" then
- Options = {"Home","Politics","Account","Taxes","exit"}
- elseif M == "Politics" then
- Options = {"Home","Politics","Account","Taxes","exit"}
- term.setCursorPos(1,10)
- print("====Latest News====")
- print(Headlines_1[1])
- print(Headlines_1[2])
- print(Headlines_2[1])
- print(Headlines_2[2])
- elseif M == "Account" then
- Options = {"Home","Politics","Account","Taxes","exit"}
- print("Coming Soon!")
- elseif M == "Taxes" then
- Options = {"Home","Politics","Account","Taxes","exit"}
- print("Coming Soon!")
- elseif M == "exit" then
- shell.run(returnScript)
- end
- if M == "exit" then
- else
- local n = CUI(Options)
- DrawMenus(Options[n])
- end
- end
- DrawMenus("Home")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement