Please refer the script for, Activate high performance power plan.
High Performance mode doesn’t lower your CPU’s speed when it isn’t being used, running it at higher speeds most of the time. It also increases screen brightness. Other components, such as your Wi-Fi or disk drive, may also not go into power-saving modes.
Please run the script as System User