There's the final version to turn any string to code.
-- script: lua
function RUN(_x)
local _test = load("return ".._x) or load(_x)
return _test()
end
RUN("t=0")
x=96
y=RUN("24")
function TIC()
if RUN("btn(0)") then y=y-1 end
if btn(1) then RUN("y=y+1") end
RUN("if btn(2) then x=x-1 end")
if btn(3) then x=x+1 end
RUN("cls(13)")
spr(1+t%60//30*2,x,y,14,3,0,0,2,2)
RUN("print('HELLO WORLD!',84,84)")
t = RUN("t+1")
end
There's the link: https://tic80.com/play?cart=1819