Skip to content

Instantly share code, notes, and snippets.

@motebaya
Created March 23, 2025 02:09
Show Gist options
  • Save motebaya/555db75296059cbd1f44a57743b93874 to your computer and use it in GitHub Desktop.
Save motebaya/555db75296059cbd1f44a57743b93874 to your computer and use it in GitHub Desktop.
-- https://github.com/yasugami/yasugami.github.io
-- 23/03/2025 - @github.com/motebaya
if arg[1] then
local code = assert(io.open(arg[1])):read("*a")
local f = io.open('.tmp.lua', "w")
if f then
local modcode = code:gsub('_ENV%[%"\\108\\111\\97\\100%"%]', "print"):gsub('%(%)', '')
f:write(modcode)
f:close()
end
os.execute("lua .tmp.lua")
os.remove('.tmp.lua')
else
print("Usage: lua yasucator.lua <filename>")
os.exit()
end
@motebaya
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment