SergOmarov

Untitled

Jan 12th, 2016
83
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function build(data)
  2. local t=data
  3.          len = 1
  4.          while len > 0 do
  5.             t, len = string.gsub(t,'while(.+){(.+)}', 'while %1 do %2 end')
  6.          end
  7.          len = 1
  8.          while len > 0 do
  9.             t, len = string.gsub(t,'for(.+){(.+)}', 'for %1 do %2 end')
  10.          end
  11.          len = 1
  12.          while len > 0 do
  13.             t, len = string.gsub(t,'if(.+){(.+)}','if %1 then %2 end')
  14.          end
  15.          len = 1
  16.          while len > 0 do
  17.             t, len = string.gsub(t,'function(.+){(.+)}', 'function %1 %2 end')
  18.          end
  19.         return t
  20. end
  21. print(build)
  22. return build
RAW Paste Data