Skip to content

Instantly share code, notes, and snippets.

@bastienvoirin
Last active May 25, 2025 13:23
Show Gist options
  • Save bastienvoirin/e4cfb69b21fd3fd42bc9fa0b644fb02a to your computer and use it in GitHub Desktop.
Save bastienvoirin/e4cfb69b21fd3fd42bc9fa0b644fb02a to your computer and use it in GitHub Desktop.
ComputerCraft - Auto update function using Pastebin API - 1.0.0
function update()
term.setCursorPos( 1, -5 ) -- Hide the pastebin retrivial
shell.run( "rm", shell.getRunningProgram() ) -- Delete the current program
shell.run( "pastebin", "get", "PASTEBIN CODE", shell.getRunningProgram() ) -- Update it
shell.run( shell.getRunningProgram() ) -- Restart it
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment