Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArg = {...}
- local Path = tArg[1]
- local API = {{"print","(",")","print(A)"}}
- local w, h = term.getSize()
- local Buttons = {}
- local functions = {}
- local Base = {}
- local Variables = {}
- local FullScreen = false
- local Window
- function UpdateVar(i)
- local Name = string.sub(Content,1,string.find(Content," = ") - 1)
- local Eq = string.sub(Content,string.find(Content," = ") + 2,string.len(Content))
- for I = 1, #Variables do
- if Variables[I][1] == Name then
- if string.find(Eq,Name) then Variables[I][2] = Variables[I][2] + Eq else Variables[I][2] = Eq end
- end
- end
- end
- function RunFunction(I)
- for i = 1, #functions[I][2] do
- local Task = functions[I][2][i]
- if string.find(Task,"print") then load.string(Task) end
- end
- end
- function Start()
- Decode()
- end
- function Decode()
- local file = fs.open(Path,"r")
- local Content = "no"
- local PathingFun = false
- local I = 0
- repeat
- Content = file.readLine()
- Base[#Base + 1] = Content
- until Content == nil
- file.close()
- RunProgram()
- end
- function RunProgram()
- local B
- for i = 1, #Base do
- for I = 1, #API do
- if string.find(Base[i],API[I][1]) then
- B = string.sub(Base[i],string.find(Base[i],API[I][2] + 1),string.find(Base[i],API[I][3] - 1))
- local Ex = API[I][4].."("..string.sub(Base[i],string.len(API[I][1]) + string.len(API[I][2]),string.len(Base[i]) - string.len(API[I][3]))..")"
- loadstring(Ex)
- end
- end
- end
- end
- Start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement