Skip to content

Instantly share code, notes, and snippets.

@sunmughan
Last active May 28, 2024 02:12
Show Gist options
  • Save sunmughan/81b59870228ae52365f5fc078f4a5579 to your computer and use it in GitHub Desktop.
Save sunmughan/81b59870228ae52365f5fc078f4a5579 to your computer and use it in GitHub Desktop.
All in one Pubg Mobile Script.
#!/bin/sh
show_menu(){
NORMAL=`echo "\033[m"`
MENU=`echo "\033[36m"` #Blue
NUMBER=`echo "\033[33m"` #yellow
FGRED=`echo "\033[41m"`
RED_TEXT=`echo "\033[31m"`
ENTER_LINE=`echo "\033[33m"`
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${MENU}× PUBG MOBILE UNIFIED SCRIPT ×${NORMAL}"
echo -e "${MENU}× CREATOR: SUNMUGHAN SWAMY ×${NORMAL}"
echo -e "${MENU}× Global | Korean | Taiwan | Vietnam ×${NORMAL}"
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${MENU}**${NUMBER} 1)${MENU} Custom Hosts ${NORMAL}"
echo -e "${MENU}**${NUMBER} 2)${MENU} Activate Modded Libs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 3)${MENU} Deactivate Modded Libs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 4)${MENU} Clear Logs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 5)${MENU} Reset ${NORMAL}"
echo -e "${MENU}**${NUMBER} 6)${MENU} Host Menu ${NORMAL}"
echo -e "${MENU}**${NUMBER} 7)${MENU} Lib Menu ${NORMAL}"
echo -e "${MENU}**${NUMBER} 8)${MENU} Logs Menu ${NORMAL}"
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${ENTER_LINE}Please enter a menu option and enter or ${RED_TEXT}enter to exit. ${NORMAL}"
read opt
while [ opt != '' ]
do
if [[ $opt = "" ]]; then
exit;
else
case $opt in
1) clear;
option_picked "Custom Host Selected";
show_menu;
;;
2) clear;
option_picked " Activate Modded Libs Selected";
show_menu;
;;
3) clear;
option_picked " Deactivate Modded Libs Selected";
show_menu;
;;
4) clear;
option_picked "Clear Logs Selected";
show_menu;
;;
5) clear;
option_picked "Host Menu";
sub_menu1;
;;
6) clear;
option_picked "Activate Lib Menu";
sub_menu2;
;;
6) clear;
option_picked "Deactivate Lib Menu";
sub_menu3;
;;
7) clear;
option_picked "Logs Menu";
sub_menu4;
;;
x)exit;
;;
\n)exit;
;;
*)clear;
option_picked "Pick an option from the menu";
show_menu;
;;
esac
fi
done
}
function option_picked() {
COLOR='\033[01;31m' # bold red
RESET='\033[00;00m' # normal white
MESSAGE=${@:-"${RESET}Error: No message passed"}
echo -e "${COLOR}${MESSAGE}${RESET}"
}
sub_menu1(){
NORMAL=`echo "\033[m"`
MENU=`echo "\033[36m"` #Blue
NUMBER=`echo "\033[33m"` #yellow
FGRED=`echo "\033[41m"`
RED_TEXT=`echo "\033[31m"`
ENTER_LINE=`echo "\033[33m"`
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${MENU}**${NUMBER} 1)${MENU} Global Host ${NORMAL}"
echo -e "${MENU}**${NUMBER} 2)${MENU} Korean Host ${NORMAL}"
echo -e "${MENU}**${NUMBER} 3)${MENU} Taiwan Host ${NORMAL}"
echo -e "${MENU}**${NUMBER} 4)${MENU} Vietnam Host ${NORMAL}"
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${ENTER_LINE}Please enter a menu option and enter or ${RED_TEXT}enter to exit. ${NORMAL}"
read sub
while [ sub != '' ]
do
if [[ $sub = "" ]]; then
exit;
else
case $sub in
1) clear;
option_picked "Global Host Selected";
echo "-----------------------------------------------------"
echo "Install the host file for Pubg Mobile Global version"
echo "-----------------------------------------------------"
#Removing old hosts
echo "| Removing old host |"
rm -rf /system/etc/hosts
#Pushing new host
echo "| Adding New Host |"
mv /storage/emulated/0/Sunmughan/Hosts/GBL/etc/hosts /system/etc/
#Applying Permissions
echo "| Applying Permissions |"
chmod -R 644 /system/etc/hosts
sub_menu_admin;
;;
2) clear;
option_picked "Korean Host Selected";
echo "-----------------------------------------------------"
echo "Install the host file for Pubg Mobile Korean version"
echo "-----------------------------------------------------"
#Removing old hosts
echo "| Removing old host |"
rm -rf /system/etc/hosts
#Pushing new host
echo "| Adding New Host |"
mv /storage/emulated/0/Sunmughan/Hosts/KR/etc/hosts /system/etc/
#Applying Permissions
echo "| Applying Permissions |"
chmod -R 644 /system/etc/hosts
sub_menu_admin;
;;
3) clear;
option_picked "Taiwan Host Selected";
echo "-----------------------------------------------------"
echo "Install the host file for Pubg Mobile Taiwan version"
echo "-----------------------------------------------------"
#Removing old hosts
echo "| Removing old host |"
rm -rf /system/etc/hosts
#Pushing new host
echo "| Adding New Host |"
mv /storage/emulated/0/Sunmughan/Hosts/TW/etc/hosts /system/etc/
#Applying Permissions
echo "| Applying Permissions |"
chmod -R 644 /system/etc/hosts
sub_menu_admin;
;;
4) clear;
option_picked "Vietnam Host Selected";
echo "-----------------------------------------------------"
echo "Install the host file for Pubg Mobile Vietnam version"
echo "-----------------------------------------------------"
#Removing old hosts
echo "| Removing old host |"
rm -rf /system/etc/hosts
#Pushing new host
echo "| Adding New Host |"
mv /storage/emulated/0/Sunmughan/Hosts/VN/etc/hosts /system/etc/
#Applying Permissions
echo "| Applying Permissions |"
chmod -R 644 /system/etc/hosts
sub_menu_admin;
;;
x)exit;
;;
\n)exit;
;;
*)clear;
option_picked "Select an option from the menu";
sub_menu1;
;;
esac
fi
done
}
sub_menu2(){
NORMAL=`echo "\033[m"`
MENU=`echo "\033[36m"` #Blue
NUMBER=`echo "\033[33m"` #yellow
FGRED=`echo "\033[41m"`
RED_TEXT=`echo "\033[31m"`
ENTER_LINE=`echo "\033[33m"`
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${MENU}**${NUMBER} 1)${MENU} Global Libs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 2)${MENU} Korean Libs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 3)${MENU} Taiwan Libs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 4)${MENU} Vietnam Libs ${NORMAL}"
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${ENTER_LINE}Please enter a menu option and enter or ${RED_TEXT}enter to exit. ${NORMAL}"
read sub
while [ sub != '' ]
do
if [[ $sub = "" ]]; then
exit;
else
case $sub in
1) clear;
option_picked "Global Libs Selected";
echo "Processing..."
sh Sunmughan/Libs/GBL/Activate.sh
echo "Activated Successfully"
sub_menu_admin;
;;
2) clear;
option_picked "Korean Libs Selected";
echo "Processing..."
sh Sunmughan/Libs/KR/Activate.sh
echo "Activated Successfully"
sub_menu_admin;
;;
3) clear;
option_picked "Taiwan Libs Selected";
echo "Processing..."
sh Sunmughan/Libs/TW/Activate.sh
echo "Activated Successfully"
sub_menu_admin;
;;
4) clear;
option_picked "Vietnam Libs Selected";
echo "Processing..."
sh Sunmughan/Libs/VN/Activate.sh
echo "Activated Successfully"
sub_menu_admin;
;;
x)exit;
;;
\n)exit;
;;
*)clear;
option_picked "Select an option from the menu";
sub_menu2;
;;
esac
fi
done
}
sub_menu3(){
NORMAL=`echo "\033[m"`
MENU=`echo "\033[36m"` #Blue
NUMBER=`echo "\033[33m"` #yellow
FGRED=`echo "\033[41m"`
RED_TEXT=`echo "\033[31m"`
ENTER_LINE=`echo "\033[33m"`
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${MENU}**${NUMBER} 1)${MENU} Global Libs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 2)${MENU} Korean Libs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 3)${MENU} Taiwan Libs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 4)${MENU} Vietnam Libs ${NORMAL}"
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${ENTER_LINE}Please enter a menu option and enter or ${RED_TEXT}enter to exit. ${NORMAL}"
read sub
while [ sub != '' ]
do
if [[ $sub = "" ]]; then
exit;
else
case $sub in
1) clear;
option_picked "Global Libs Selected";
echo "Processing..."
sh Sunmughan/Libs/KR/Deactivate.sh
echo "Deactivated Successfully"
sub_menu_admin;
;;
2) clear;
option_picked "Korean Libs Selected";
echo "Processing..."
sh Sunmughan/Libs/KR/Deactivate.sh
echo "Deactivated Successfully"
sub_menu_admin;
;;
3) clear;
option_picked "Taiwan Libs Selected";
echo "Processing..."
sh Sunmughan/Libs/TW/Deactivate.sh
echo "Deactivated Successfully"
sub_menu_admin;
;;
4) clear;
option_picked "Vietnam Libs Selected";
echo "Processing..."
sh Sunmughan/Libs/VN/Deactivate.sh
echo "Deactivated Successfully"
sub_menu_admin;
;;
x)exit;
;;
\n)exit;
;;
*)clear;
option_picked "Select an option from the menu";
sub_menu3;
;;
esac
fi
done
}
sub_menu4(){
NORMAL=`echo "\033[m"`
MENU=`echo "\033[36m"` #Blue
NUMBER=`echo "\033[33m"` #yellow
FGRED=`echo "\033[41m"`
RED_TEXT=`echo "\033[31m"`
ENTER_LINE=`echo "\033[33m"`
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${MENU}**${NUMBER} 1)${MENU} Global Logs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 2)${MENU} Korean Logs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 3)${MENU} Taiwan Logs ${NORMAL}"
echo -e "${MENU}**${NUMBER} 4)${MENU} Vietnam Logs ${NORMAL}"
echo -e "${MENU}*********************************************${NORMAL}"
echo -e "${ENTER_LINE}Please enter a menu option and enter or ${RED_TEXT}enter to exit. ${NORMAL}"
read sub
while [ sub != '' ]
do
if [[ $sub = "" ]]; then
exit;
else
case $sub in
1) clear;
option_picked "Global Logs Selected";
echo "Processing..."
rm -rf /storage/emulated/0/Android/data/com.tencent.ig/cache
rm -rf /storage/emulated/0/Android/data/com.tencent.ig/files/tbslog
rm -rf /storage/emulated/0/Android/data/com.tencent.ig/files/UE4Game/ShadowTrackerExtra/ShadowTrackerExtra/Saved/Logs
echo "Cleared Successfully"
sub_menu_admin;
;;
2) clear;
option_picked "Korean Logs Selected";
echo "Processing..."
rm -rf /storage/emulated/0/Android/data/com.pubg.krmobile/cache
rm -rf /storage/emulated/0/Android/data/com.pubg.krmobile/files/tbslog
rm -rf /storage/emulated/0/Android/data/com.pubg.krmobile/files/UE4Game/ShadowTrackerExtra/ShadowTrackerExtra/Saved/Logs
echo "Cleared Successfully"
sub_menu_admin;
;;
3) clear;
option_picked "Taiwan Logs Selected";
echo "Processing..."
rm -rf /storage/emulated/0/Android/data/com.rekoo.pubgm/cache
rm -rf /storage/emulated/0/Android/data/com.rekoo.pubgm/files/tbslog
rm -rf /storage/emulated/0/Android/data/com.rekoo.pubgm/files/UE4Game/ShadowTrackerExtra/ShadowTrackerExtra/Saved/Logs
echo "Cleared Successfully"
sub_menu_admin;
;;
4) clear;
option_picked "Vietnam Logs Selected";
echo "Processing..."
rm -rf /storage/emulated/0/Android/data/com.vng.pubgmobile/cache
rm -rf /storage/emulated/0/Android/data/com.vng.pubgmobile/files/tbslog
rm -rf /storage/emulated/0/Android/data/com.vng.pubgmobile/files/UE4Game/ShadowTrackerExtra/ShadowTrackerExtra/Saved/Logs
echo "Cleared Successfully"
sub_menu_admin;
;;
x)exit;
;;
\n)exit;
;;
*)clear;
option_picked "Select an option from the menu";
sub_menu4;
;;
esac
fi
done
}
clear
show_menu
@egiww
Copy link

egiww commented Apr 17, 2020

How to use?

@sunmughan
Copy link
Author

Its easy to use if you know bash!

@egiww
Copy link

egiww commented Apr 18, 2020

I use MT manager to run the script. but still confused to continue

@egiww
Copy link

egiww commented Apr 18, 2020

can you give me the tutorial!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment