MagmaLP

Lau auto pastebin delete

Nov 29th, 2023 (edited)
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. -- Lösche das Programm "1" vom Computer, falls es existiert
  2. if fs.exists("1") then
  3.     fs.delete("1")
  4.     print("Programm '1' gelöscht")
  5. else
  6.     print("Programm '1' nicht gefunden")
  7. end
  8.  
  9. -- Lade das Programm '1' von Pastebin herunter
  10. local pastebinCode = "<pastebinkürzel>" -- Ersetze das mit deinem Pastebin-Kürzel
  11. local downloadSuccess = shell.run("pastebin get " .. pastebinCode .. " 1")
  12.  
  13. -- Überprüfe, ob der Download erfolgreich war
  14. if downloadSuccess then
  15.     print("Programm '1' erfolgreich von Pastebin geladen")
  16. else
  17.     print("Fehler beim Herunterladen des Programms von Pastebin")
  18. end
  19.  
Add Comment
Please, Sign In to add comment