Advertisement
StefanBashkir

Untitled

May 12th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. function Assemble(Instructions)
  2.     local Stack = {}
  3.     local Globals1 = {};
  4.     print(Globals1)
  5.     local SourceBuild = "";
  6.     local Signifier = 0
  7.     for _, Instruction in pairs(Instructions) do
  8.         if Instruction['Name'] == "LOADBOOL" then
  9.             SourceBuild = SourceBuild .. "local a" .. Signifier .. "=" .. tostring(Instruction['Read'][1]['value']) .. " ";
  10.             Signifier = Signifier + 1
  11.         elseif Instruction['Name'] == "LOADK" then
  12.             local Value = tonumber(Instruction['value']) or tostring(Instruction['value']);
  13.             table.insert(Stack, Value)
  14.         elseif Instruction['Name'] == "GETGLOBAL" then
  15.             -- Implied LOADK
  16.             local GLOBAL = getfenv()[Instruction['value']];
  17.             print(Globals1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement