function SExecute(File,Features)
local path=Get_Path(File)
ROOT = os.execute("su") --Whether it is ROOT
if ROOT then
os.execute("su -c chmod 777 "..path)
cmd="su -c '"..path.."'"
else
os.execute("chmod 777 "..path)
cmd=path
end
pd=os.execute(cmd)
if pd then
print((Features).."Success")
else
print((Features).."Failure")
end
end
function Get_Path(File)
import "java.io.File"
return tostring(File(activity.getLuaDir(File)))
end
SExecute("files/1","MB Turned on")function twice(x)
return 2*x --return value (x)=2x
end
print("The Number Is :")
io.read("*number")--Read variable number
a = 4
print(twice(a))
--Output will be like this :
--The Number Is :
--8