Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sleep(2)
- if (fs.exists("newVersion.txt")) == true then
- fs.delete("newVersion.txt")
- end
- while (fs.exists("newVersion.txt")) == false do
- sleep(2)
- shell.run("pastebin get KWdzfSbG newVersion.txt")
- sleep(2)
- local ver = fs.open("newVersion.txt", "r")
- print(ver.readline())
- newVersion = tonumber(ver.readline())
- ver.close()
- sleep(2)
- local oldVer = fs.open("version.txt", "r")
- print(oldVer.readline())
- oldVersion = tonumber(oldVer.readline())
- oldVer.close()
- fs.delete("version.txt")
- end
- sleep(2)
- if newVersion > oldVersion then
- UpdateAvailable = true
- else
- UpdateAvailable = false
- end
- sleep(2)
- update = fs.open("updater.txt","w")
- update.write(UpdateAvailable)
- update.close()
- local turbine
- term.clear()
- sleep(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement