The app script is still in my template after the removal of the app. How do I remove it?

The Shopify uninstall process does not allow us to access your store once you hit the 'Uninstall' button.

For that reason we cannot remove the app script if you haven't disabled the Quick Load feature before. So we always suggest to disable the Quick Load feature before uninstalling it. In this way a clean removal of app will be ensured.
If you didn't disable the Quick Load feature before uninstalling you will find a line similar to

<script type="text/javascript" async="" src="https://upselly.azurewebsites.net/Scripts/store.min.js?env=https://upselly.azurewebsites.net&v=1&shop=upselly-store.myshopify.com"></script>

at the end of your theme .liquid template. It won't harm your store but you can remove it safely, just delete that line from your template.