So i've been testing for a few hours now and I cannot seem to get this to work, ill read and respond in the morning because its currently 5 am.
[all in 1 script]
--USAGE--
--For every function, put a space between the (): and the last character of the function (before the ():)--
local aaaa = require(script.Parent.Py2Lua)
local code = [[
print("Hello, world!")
]]
local function convertJUNKtoCODE(junk)
myothertable = {}
tempValue2 = Instance.new("StringValue")
tempValue2.Name = "TEemP2"
tempValue2.Parent = script.Parent:FindFirstChild("Py To Lua Wrapper")
junk = junk
for i=1, junk:len() do
local tempresult = junk:sub(i,i):char()
local finalize = aaaa.join(tempresult," ")
local tablet = table.insert(mytable,tempresult)
tempValue2.Value = table.concat(mytable,"")
end
return tempValue2.Value
end
function convertCODEtoJUNK(code)
mytable = {}
tempValue = Instance.new("StringValue")
tempValue.Name = "TEemP"
tempValue.Parent = script.Parent:FindFirstChild("Py To Lua Wrapper")
code = code
for i=1, code:len() do
local tempresult = code:sub(i,i):byte()
local finalize = aaaa.join(tempresult," ")
local tablet = table.insert(mytable,tempresult)
tempValue.Value = table.concat(mytable,", ")
end
return tempValue.Value
end
script.C2J.Value = convertCODEtoJUNK(code)
wait(0.5)
print(convertJUNKtoCODE(tonumber(script.C2J.Value)))
module script
function Python.join(text,seprator)
if seprator == nil then
return string.gsub(text, "%s+", "")
else
charCount = string.len(seprator)
if charCount ~= 1 then
return print("might add multi character seprator support at some point")
elseif charCount == 1 then
return string.gsub(text, "%s+", seprator)
end
end
end
edit: solved it

3 comments
I'm sorry but what is your goal again? I don't understand much.
im awake now, so ill answer. the first script provides the error "attempt to index nil with "len"' on line 15, i posted a part of the module script just incase if there was something wrong with that too
still waiting for a answer/solution