Custom Slider for Volume Control of Second Mac

I was laying in bed with YouTube playing on my Mac Pro desktop when a video came on that was just a little too loud, but I didn't want to get up. So I grabbed my MBP and launched Apple Remote Desktop to lower the volume, which was a whole process. I thought to myself, "There must be a better way". I'm not really a scripting guy though, but after a lot of trial and (even more) error, I managed to throw a rough AppleScript together to control the Mac Pro's volume via touchbar slider on my MBP.

Action shot: https://media.giphy.com/media/dsdKGYVMnohb5l5rwI/giphy.gif

~Attached is a the widget's JSON file. Open the file in TextEdit, look for the filler IP "255.255.255.255"* and replace it with the local IP of the target machine**.

*the filler IP appears twice in the script, once near the beginning and once near the end
**could probably be an external IP forwarded to the machine, but why?

~You also need to enable "Remote Apple Events" in System Preferences>Sharing on the target computer. I live in a dorm so I have the access restricted to just my user, but if you're at home or on a secure network running locally, you're probably safe to leave it set to "All Users".

---Bugs---
~First use after wake on MBP triggers multiple prompts for credentials. Also prompted for credentials when editing script within BTT. (Maybe this could be solved with keychain scripting? Like I said, not a script guy.)
~If you go nuts on the slider, it'll kinda glitch out the target computer's volume. Technically a bug, but also, just don't do it?

Remote Volume.json (53.2 KB)