AppleScript to indicate battery status

I've made this apple script and share the code with you here to be sure there is nothing that causes security issues.
Features:
• indicate battery level
• Indicate whether battery is charging, fully charged or discharging.
How to use it?!
1. Download the script file or copy the code below. If you download the file continue from step 4.
2. If you copied the code, open Apple script editor by searching for "Script" on spotlight.
3. paste the code and save the file in a directory you could easily reach.
4. Open Voiceover utilities>commanders>keyboard.
5. Click add new commander. I personally prefer choosing the letter 'b'.
6. From the commands menu choose from, select custom commands> Run AppleScript Script …
7. Get to the place of script and select it.

Hope that helps,
Mohamed E. Fayed

Google drive for the script file:
https://drive.google.com/drive/folders/1t97s1ThBzJxU6tVQiwN2sB1pmv8sekvp...

This is the code (I may update it later to use "pmset" command only once):
set cmd to "/usr/bin/pmset -g batt | grep -Eo '[0-9]{2,3}%'"
set batteryLevel to (do shell script cmd)
set cmd to "/usr/bin/pmset -g batt | grep -Eo '(charged)|(charging)|(discharging)'"
set batteryStatus to (do shell script cmd)
if batteryStatus = "charged" then
set batteryStatus to "fully charged"
end if
set message to batteryLevel & ", " & batteryStatus
tell application "VoiceOver" to output message

Forum: