Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - using System;
 - using System.Collections.Generic;
 - using System.ComponentModel;
 - using System.Data;
 - using System.Drawing;
 - using System.Diagnostics;
 - using System.Linq;
 - using System.Text;
 - using System.Threading.Tasks;
 - using System.Windows.Forms;
 - using Binarysharp.MemoryManagement;
 - using Binarysharp.MemoryManagement.Helpers;
 - using System.Runtime.InteropServices;
 - namespace WindowsFormsApplication1
 - {
 - public partial class Form1 : Form
 - {
 - public Form1()
 - {
 - InitializeComponent();
 - }
 - private void Form1_Load(object sender, EventArgs e)
 - {
 - txtNetWorth.Text = GetMoney().ToString();
 - }
 - public int GetMoney()
 - {
 - string gameName = "South Park - The Stick of Truth";
 - using (var m = new MemorySharp(ApplicationFinder.FromProcessName(gameName).FirstOrDefault()))
 - {
 - var moneyPtr = new IntPtr(0x01B71110);
 - int[] offsets = { 0x0, 0x14, 0x14, 0x218 };
 - moneyPtr = m[moneyPtr].Read<IntPtr>();
 - moneyPtr = m[moneyPtr + offsets[0], false].Read<IntPtr>();
 - moneyPtr = m[moneyPtr + offsets[1], false].Read<IntPtr>();
 - moneyPtr = m[moneyPtr + offsets[2], false].Read<IntPtr>();
 - int Money = m[moneyPtr + offsets[3], false].Read<int>();
 - return Money;
 - }
 - }
 - public bool SetMoney(int money)
 - {
 - string gameName = "South Park - The Stick of Truth";
 - using (var m = new MemorySharp(ApplicationFinder.FromProcessName(gameName).FirstOrDefault()))
 - {
 - var moneyPtr = new IntPtr(0x01B71110);
 - int[] offsets = { 0x0, 0x14, 0x14, 0x218 };
 - moneyPtr = m[moneyPtr].Read<IntPtr>();
 - moneyPtr = m[moneyPtr + offsets[0], false].Read<IntPtr>();
 - moneyPtr = m[moneyPtr + offsets[1], false].Read<IntPtr>();
 - moneyPtr = m[moneyPtr + offsets[2], false].Read<IntPtr>();
 - m.Write<int>(m[moneyPtr + offsets[3], false].Read<IntPtr>(), money, false);
 - return true;
 - }
 - }
 - private void btnSubmit_Click(object sender, EventArgs e)
 - {
 - SetMoney(Convert.ToInt32(txtNetWorth.Text));
 - }
 - private void txtNetWorth_TextChanged(object sender, EventArgs e)
 - {
 - }
 - }
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment