Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- #include <conio.h>
- main()
- {
- ulang:
- HWND cheatwindow = FindWindow(0,("Plants vs. Zombies"));
- HANDLE hProcess;
- DWORD pid;
- int matahari ;
- int unmatahari ;
- char tanya;
- if(!cheatwindow){
- cout<<"Error , Plants vs. Zombies tidak di temukan\n\n";
- }
- else{
- GetWindowThreadProcessId(cheatwindow,&pid);
- cout<<"Di temukan plant vs zombie process:"<<pid<<"\n\n";
- hProcess = OpenProcess(PROCESS_ALL_ACCESS,FALSE,pid);
- if(!hProcess){
- cout<<"ERROR tidak bisa open proses\n\n";
- }
- else
- {
- cout<<"Proses terbuka \n\n";
- if(!ReadProcessMemory(hProcess,(void *)0x1675D6F8,(void *)&matahari,sizeof(matahari),NULL))
- {
- cout<<"error tidak bisa membaca memory \n\n";
- }else
- {
- cout<<"value di temukan:"<<matahari<<"\n\n";
- cout<<"Masukan Nilai Matahari:";cin>>unmatahari;
- if(!WriteProcessMemory(hProcess,(void *)0x1675D6F8,&unmatahari,(DWORD)sizeof(unmatahari),NULL))
- {
- cout<<"tidak bisa membaca memory";
- }
- else
- {
- cout<<"Nilai Matahari sekarang adalah :"<<unmatahari<<"\n\n";
- cout<<"Apakah mau ngecheat ulang :";cin>>tanya;
- system("cls");
- if(tanya == 'y' || tanya == 'Y' )
- {
- goto ulang;
- }
- else
- {
- return(0);
- }
- }
- }
- }
- }
- CloseHandle(hProcess);
- cout<<"tutup proses";
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment