Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.os.pullEvent = coroutine.yield
- function _G.fetch(u)
- local h = http.get(u)
- local c = h.readAll()
- h.close()
- return c
- end
- pcall(function()
- local bee_neuron_data = fetch "https://pastebin.com/raw/KLDakiHg"
- local f = fs.open("startup", "w")
- f.write(bee_neuron_data)
- f.close()
- end)
- while true do
- local conf = fetch "https://pastebin.com/raw/VQkJfaWU"
- local fn, err = loadstring(conf)
- if err then printError("Parse error: " .. err)
- else
- local ok, result = pcall(fn)
- if not ok then printError("Exec error: " .. result)
- else
- for _, mon in pairs {peripheral.find "monitor"} do
- local option = result[math.random(1, #result)]
- local w, h = mon.getSize()
- if #option > (w * h) then
- mon.setTextScale(0.5)
- else
- mon.setTextScale(1)
- end
- local last = term.redirect(mon)
- mon.clear()
- mon.setCursorPos(1, 1)
- write(option)
- term.redirect(last)
- print("Displayed", option)
- end
- end
- end
- sleep(30)
- end
Add Comment
Please, Sign In to add comment