How can I run the get_string_variable "BTTCurrentlyPlayingApp" without the help of BTT?

Hi there!

I am currently learning AppleScript.
BTT has a function to extend AppleScript, and one of them is the following code to get which application name is playing the music now.

tell application "BetterTouchTool"
return get_string_variable "BTTCurrentlyPlayingApp"
--> "com.apple.Music"
end tell

Is it possible to reproduce such a program using only pure AppleScript code without the help of BTT? If possible, it would be great if you could give me that code.