Why make it so complicated and not simply install it as flatpak? https://flathub.org/apps/com.skype.Client
There you can also see the most recent version: 8.108.0.205
Also the script seems to rely on the fact that ~/Downloads/ exists, which might not be the case depending on if you renamed the standard folders to your locale.
Should probably be changed to download to ${XDG_DOWNLOAD_DIR}/ instead.