Advertisement
Baennon

Load Bedrock ooed

Aug 26th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. local bedrockPath='/'
  2. if OneOS then
  3.     OneOS.LoadAPI('/System/API/Bedrock.lua', false)
  4. elseif fs.exists(bedrockPath..'/Bedrock') then
  5.     os.loadAPI(bedrockPath..'/Bedrock')
  6. else if http then
  7.     print('Downloading Bedrock...')
  8.     local h=http.get('http://pastebin.com/raw.php?i=0MgKNqpN')
  9.     if h then
  10.         local f=fs.open(bedrockPath..'/Bedrock','w')
  11.         f.write(h.readAll())
  12.         f.close()
  13.         h.close()
  14.         os.loadAPI(bedrockPath..'/Bedrock')
  15.     else
  16.         error('Failed to download Bedrock. Is your internet working?')
  17.     end
  18. else
  19.     error('This program needs to download Bedrock to work. Please enable HTTP.')
  20.     end
  21. end
  22. if Bedrock then
  23.     Bedrock.BasePath = bedrockPath
  24.     Bedrock.ProgramPath = shell.getRunningProgram()
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement