Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.runBTN = function(e, t, a, ...)_G.require = _ENV.require if not
- fs.exists("button")then shell.run("pastebin get LTDZZZEJ button")end e = e or ""if
- e:match("%.(.-)$") ~= "btn"then error("not a button file", 0)end if not
- fs.exists(e)then error("no such file", 0)end if t ~= "terminal" and
- t ~= "monitor"then
- error("invalid button type !. should be monitor/terminal", 0)end if
- type(a) ~= "string"then error("empty button variable!. should be a string", 0)end
- _G[a] = require("button")[t]local o = {}for i in io.lines(e)do o[#o + 1] = i end local
- n = loadstring(table.concat(o, " "))while true do local s, h = pcall(n, ...)if not s
- then error("button program has crashed. reason:\n" .. h, 0)end end
- end
Add Comment
Please, Sign In to add comment