Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loadJSON()
- local sName = 'JSON'
- local tEnv = {}
- setmetatable( tEnv, { __index = _G } )
- local fnAPI, err = loadstring(_jstr)
- if fnAPI then
- setfenv( fnAPI, tEnv )
- fnAPI()
- else
- printError( err )
- return false
- end
- local tAPI = {}
- for k,v in pairs( tEnv ) do
- tAPI[k] = v
- end
- _G[sName] = tAPI
- return true
- end
- local mainTitle = 'OneOS Installer'
- local subTitle = 'Please wait...'
- function Draw()
- sleep(0)
- term.setBackgroundColour(colours.white)
- term.clear()
- local w, h = term.getSize()
- term.setTextColour(colours.lightBlue)
- term.setCursorPos(math.ceil((w-#mainTitle)/2), 8)
- term.write(mainTitle)
- term.setTextColour(colours.blue)
- term.setCursorPos(math.ceil((w-#subTitle)/2), 10)
- term.write(subTitle)
- end
- sleep(10)
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement