static void Main(string[] args) { Random rnd = new Random(); VAMemory vam = new VAMemory(process); string driveInstructions; StringBuilder sb = new StringBuilder("", 120); for (int i = 0; i < 120; i++) { sb.Append(rnd.Next(9).ToString()); } driveInstructions = sb.ToString(); driveInstructions = "1111111111111111111111111111111111111111111111111"; Console.WriteLine("CURRENT INSTRUCTION: " + driveInstructions + "\nRestart the round"); while (true) { Thread.Sleep(100); if (vam.ReadInt32((IntPtr)vam.ReadInt32((IntPtr)vam.ReadInt32((IntPtr)vam.ReadInt32((IntPtr)vam.ReadInt32((IntPtr)vam.ReadInt32((IntPtr)TmForeverBaseAdress + 0x0096847C) + 0x100) + 0x5B4) + 0x24) + 0x30C) + 0x4B0) == 0) { foreach (char c in driveInstructions) { Console.Write(c); Drive(c, 250); } } } }
public static void RMain() { if (bAddress != 0) { VAMemory mem = new VAMemory(MainClass.injProc); int fjump = bAddress + Offsets.J; int ALocalPlayer = bAddress + Offsets.LP; int LocalPlayer = mem.ReadInt32((IntPtr)ALocalPlayer); int AJFlag = LocalPlayer + Offsets.JF; while (true && RabbitStatus) { while (GetAsyncKeyState(32) != 0) { int JStat = mem.ReadInt32((IntPtr)AJFlag); if (JStat == 257) { mem.WriteInt32((IntPtr)fjump, 6); } } } } }
private void checkBox4_CheckedChanged(object sender, EventArgs e) { if (checkBox4.Checked) { VAMemory vam = new VAMemory("ac_client"); IntPtr acBase = Process.GetProcessesByName("ac_client").FirstOrDefault().MainModule.BaseAddress + 0x0003D3A4; IntPtr off = IntPtr.Add((IntPtr)vam.ReadInt32(acBase), 0x108); int readEdit = vam.ReadInt32((IntPtr)off); vam.WriteInt32((IntPtr)off, 16777472); //string showEdit = readEdit.ToString(); //MessageBox.Show(showEdit); } else if (checkBox4.Checked == false) { VAMemory vam = new VAMemory("ac_client"); IntPtr acBase = Process.GetProcessesByName("ac_client").FirstOrDefault().MainModule.BaseAddress + 0x0003D3A4; IntPtr off = IntPtr.Add((IntPtr)vam.ReadInt32(acBase), 0x108); int readEdit = vam.ReadInt32((IntPtr)off); vam.WriteInt32((IntPtr)off, 0); //string showEdit = readEdit.ToString(); //MessageBox.Show(showEdit); } }
public static void Memory() { Process[] processes = Process.GetProcessesByName("otpdx_beta"); if (processes.Length > 0) { IntPtr BaseAddress = IntPtr.Zero; Process MYProc = processes[0]; foreach (ProcessModule module in MYProc.Modules) { if (module.ModuleName.Contains("otpdx_beta")) { BaseAddress = module.BaseAddress; //MessageBox.Show(BaseAddres.ToString()); } } if (BaseAddress != IntPtr.Zero) { VAMemory memory = new VAMemory("otpdx_beta"); //x-y int finalAddress = memory.ReadInt32((IntPtr)BaseAddress + +0x00384810); Setting.chary = memory.ReadInt32((IntPtr)finalAddress + 0x84C); Setting.charx = memory.ReadInt32((IntPtr)finalAddress + 0x848); ////pokehp //int PokeAddr = memory.ReadInt32((IntPtr)BaseAddress + +0x00384810); //Setting.chary = memory.ReadInt32((IntPtr)PokeAddr + 0x84C); //Setting.charx = memory.ReadInt32((IntPtr)PokeAddr + 0x848); ////charhp //int CharAddr= memory.ReadInt32((IntPtr)BaseAddress + +0x00384810); //Setting.chary = memory.ReadInt32((IntPtr)CharAddr + 0x84C); //Setting.charx = memory.ReadInt32((IntPtr)CharAddr + 0x848); } } }
public static Angles getCurrentAngles(VAMemory vam, int engine) { float x = vam.ReadFloat((IntPtr)(vam.ReadInt32((IntPtr)(engine + Offsets.oClientState)) + Offsets.oViewAngles)); float y = vam.ReadFloat((IntPtr)(vam.ReadInt32((IntPtr)(engine + Offsets.oClientState)) + Offsets.oViewAngles + 4)); return(new Angles(x, y)); }
static void Main(string[] args) { VAMemory vam = new VAMemory(process); if (GetModuleAddy()) { int fjump = bClient + aJump; aLocalPlayer = bClient + aLocalPlayer; int LocalPlayer = vam.ReadInt32((IntPtr)aLocalPlayer); int aFlags = LocalPlayer + oFlags; while (true) { while (GetAsyncKeyState(32) > 0) { int Flags = vam.ReadInt32((IntPtr)aFlags); if (Flags == 257) { vam.WriteInt32((IntPtr)fjump, 5); Thread.Sleep(10); vam.WriteInt32((IntPtr)fjump, 4); } } } } }
public int GetPlayerCount(VAMemory vam) { Int32 enginebaseaddress = GetModuleBaseAddress(process, "engine.dll"); Int32 playercount = vam.ReadInt32((IntPtr)enginebaseaddress + a_playercount); playercount = vam.ReadInt32((IntPtr)playercount + o_playercount); return(playercount); } //reading this too often seems to break shit
public static Vector3 getLocalPlayerPosition(VAMemory vam, int bClient) { int playerIndex = vam.ReadInt32((IntPtr)(vam.ReadInt32((IntPtr)(bClient + Offsets.oLocalPlayer)) + 0x64)); int start = vam.ReadInt32((IntPtr)(bClient + Offsets.oEntityList + (playerIndex - 1) * Offsets.oEntityLoopDistance)); float x = vam.ReadFloat((IntPtr)(start + Offsets.vecOrigin)); float y = vam.ReadFloat((IntPtr)(start + Offsets.vecOrigin + 4)); float z = vam.ReadFloat((IntPtr)(start + Offsets.vecOrigin + 8)); return(new Vector3(x, y, z)); }
public static bool isAlive(int index, VAMemory vam, int bClient) { int baseentity = vam.ReadInt32((IntPtr)(bClient + Offsets.oEntityList + (index) * Offsets.oEntityLoopDistance)); if (vam.ReadInt32((IntPtr)(baseentity + Offsets.oHealth)) > 0 && vam.ReadInt32((IntPtr)(baseentity + Offsets.oHealth)) <= 100) { return(true); } return(false); }
public int buscarMiPalo2Crudo() { VAMemory vam = new VAMemory(); vam.processName = process; int read = vam.ReadInt32((IntPtr)direccionBase + offsetBase); int read2 = vam.ReadInt32((IntPtr)read + 0x8); int read3 = vam.ReadInt32((IntPtr)read2 + 0x10); int palo2 = vam.ReadByte((IntPtr)read3 + 0x1C70); return(palo2); }
public int buscarMiCarta2Cruda() { VAMemory vam = new VAMemory(); vam.processName = process; int read = vam.ReadInt32((IntPtr)direccionBase + offsetBase); int read2 = vam.ReadInt32((IntPtr)read + 0x8); int read3 = vam.ReadInt32((IntPtr)read2 + 0x10); int carta2 = vam.ReadByte((IntPtr)read3 + 0x1C6C); return(carta2); }
public Form1() { InitializeComponent(); try { vam = new VAMemory("gta_sa"); aInvisible = vam.ReadInt32((IntPtr)aPlayer) + oInvisible; aHealth = vam.ReadInt32((IntPtr)aPlayer) + oHealth; } catch { MessageBox.Show("Process not running! Please restart the game"); } updateHealth.Enabled = true; }
public static void TriggrerbotThread() { while (true) { Player MyPlayer = new Player(); Player player = new Player(); int address; address = client + oLocalPlayer; int lPlayer = vam.ReadInt32((IntPtr)address); if (checkBoxTrigger) //triggerbot { address = lPlayer + oCrosshairID; int crosshair = vam.ReadInt32((IntPtr)address); if ((crosshair > 0) && (crosshair < 30)) { address = client + oEntityList + ((crosshair - 1) * 0x10); int entity = vam.ReadInt32((IntPtr)address); //Console.WriteLine(crosshair); MyPlayer = GetMyPlayerInfo(lPlayer); player = GetMyPlayerInfo(entity); handleTB(MyPlayer, player); } } Thread.Sleep(1); } }
private string buscarmiCarta2() { VAMemory vam = new VAMemory(); vam.processName = process; int read = vam.ReadInt32((IntPtr)direccionBase + offsetBase); int read2 = vam.ReadInt32((IntPtr)read + 0x8); int read3 = vam.ReadInt32((IntPtr)read2 + 0x10); string carta2 = vam.ReadByte((IntPtr)read3 + 0x1C6C).ToString(); string palo2 = vam.ReadByte((IntPtr)read3 + 0x1C70).ToString(); carta2 = convertirCarta(carta2, palo2); return(carta2); }
static void Main(string[] args) { foreach (ProcessModule mod in csgo.Modules) { if (mod.ModuleName == "client.dll") { module = (int)mod.BaseAddress; } } int cur; int curTeam; int curGlowIndex; GlowStruct Team = new GlowStruct() { r = 0, g = 0, b = 1, a = 1, rwo = true, rwuo = false }; GlowStruct Enemy = new GlowStruct() { r = 1, g = 0, b = 0, a = 1, rwo = true, rwuo = false }; Thread trigger = new Thread(Trigger); trigger.Start(); Thread bhop = new Thread(Bhop); bhop.Start(); while (true) { LocalPlayer = memory.ReadInt32((IntPtr)(module + Offsets.dwLocalPlayer)); PlayerTeam = memory.ReadInt32((IntPtr)(LocalPlayer + Offsets.m_iTeamNum)); for (int i = 0; i < 64; i++) { cur = memory.ReadInt32((IntPtr)(module + Offsets.dwEntityList + i * 0x10)); curTeam = memory.ReadInt32((IntPtr)(cur + Offsets.m_iTeamNum)); curGlowIndex = memory.ReadInt32((IntPtr)(cur + Offsets.m_iGlowIndex)); if (!memory.ReadBoolean((IntPtr)cur + Offsets.m_bDormant)) { if (curTeam == PlayerTeam) { DrawGlow(curGlowIndex, Team); } else { DrawGlow(curGlowIndex, Enemy); } } } } }
private void UpdateDeathCounterLabel(object myObject, EventArgs myEventArgs) { UpdateDeathCounter_Timer.Stop(); UpdateDeathCounter_Timer.Interval = 2000; if (currentGameID != -1 && Process.GetProcessesByName(currentGame[currentGameID]).FirstOrDefault() != null) { IntPtr BaseOffseted = Base; for (short i = 0; i < max_offsets; i++) { if (currentGameOffset[currentGameID, i] != 0) { if (!NativeMethods.IsWin64Emulator(Process.GetProcessesByName(currentGame[currentGameID]).FirstOrDefault())) { BaseOffseted = (IntPtr)vam.ReadInt64(BaseOffseted) + currentGameOffset[currentGameID, i]; } else { BaseOffseted = (IntPtr)vam.ReadInt32(BaseOffseted) + currentGameOffset[currentGameID, i]; } } else { break; } } var deathCount = ((IntPtr)vam.ReadInt32(BaseOffseted)).ToString(); if (currentDeathCount != int.Parse(deathCount)) { this.DeathCounter_Label.BeginInvoke((MethodInvoker) delegate() { this.DeathCounter_Label.Text = deathCount; }); File.WriteAllText(Directory.GetCurrentDirectory() + "\\deaths.txt", deathCount); currentDeathCount = int.Parse(deathCount); Focus(); Refresh(); Update(); } } else { currentDeathCount = 0; this.DeathCounter_Label.BeginInvoke((MethodInvoker) delegate() { this.DeathCounter_Label.Text = "..."; }); File.WriteAllText(Directory.GetCurrentDirectory() + "\\deaths.txt", "0"); DetectGame(); } UpdateDeathCounter_Timer.Start(); }
public static Vector3 getPlayerVectorByIndex(VAMemory vam, int bClient, int index) { float x = 0f, y = 0f, z = 0f; //get enemy coords; int PtrToPIC = vam.ReadInt32((IntPtr)(bClient + Offsets.oEntityList + (index) * Offsets.oEntityLoopDistance)); if (PtrToPIC != 0) { x = vam.ReadFloat((IntPtr)(PtrToPIC + Offsets.vecOrigin)); y = vam.ReadFloat((IntPtr)(PtrToPIC + Offsets.vecOrigin + 4)); z = vam.ReadFloat((IntPtr)(PtrToPIC + Offsets.vecOrigin + 8)); if (x == 0 || y == 0 || z == 0) { x = 99999999f; y = 99999999f; z = 99999999f; } return(new Vector3(x, y, z)); } else { return(new Vector3(999999f, 999999f, 999999f)); } }
private void Timer1_Tick(object sender, EventArgs e) { try { checkGame(); if (gameOn) { // start memory object and calculate values vam = new VAMemory(procName); // initilize a Memory reader object baseAddress = (int)Process.GetProcessesByName(procName)[0].MainModule.BaseAddress; // get the Base Address, which we use to get all the other addresses playerBaseAddress = vam.ReadInt32((IntPtr)baseAddress + playerAddress); // the player base address is basically the starting point playerHealthAddress = playerBaseAddress + playerHealthOffset; // the player health address is calculated by adding the health offset to the player Base Address //check if any checkbox is checked if (godMode.Checked == true) { vam.WriteFloat((IntPtr)playerHealthAddress, 100); // write to the memory the value 100, so in another words 'unlimited health' } } else { } } catch (Exception) { throw; } GC.Collect(); }
static int ReadMemoryInt(int pid, UInt64 address)//example for read int { vam.WriteInt32(bAddress + offset_pid, pid); vam.WriteInt32(bAddress + offset_memSize, 4); vam.WriteUInt64(bAddress + offset_memAddress, address); vam.WriteInt32(bAddress + offset_typeReq, 2); return(vam.ReadInt32(bAddress + offset_retAnswer)); }
static void Main(string[] args) { // using VAMemory.dll to read memory from the game VAMemory vam = new VAMemory("ac_client"); // declaring some int to read value of pointer we put before the program int LocalPlayer1 = vam.ReadInt32((IntPtr)Base); // array for the different offset for Ammo var AmmoOffset = new int[] { 0x378, 0x14, 0x0 }; while (true) { // Changing the health of player int HealthAddress = LocalPlayer1 + Health; vam.WriteInt32((IntPtr)HealthAddress, 9999); // changing the armor of player int ArmorAddress = LocalPlayer1 + Armor; vam.WriteInt32((IntPtr)ArmorAddress, 9999); // loop for add offset to the playerbase addres IntPtr pointer = IntPtr.Add((IntPtr)vam.ReadInt32((IntPtr)PlayerBase), AmmoOffset[0]); for (int i = 1; i < AmmoOffset.Length; i++) { pointer = IntPtr.Add((IntPtr)vam.ReadInt32(pointer), AmmoOffset[i]); } vam.WriteInt32((IntPtr)pointer, 9999); Console.WriteLine(" value: " + vam.ReadInt32(pointer)); Thread.Sleep(500); } }
public bool InGame(VAMemory vam, Int32 localplayeraddr) { if (vam.ReadInt32((IntPtr)GetModuleBaseAddress(process, modulename) + a_localplayer) != 0x00) { return(true); } return(false); }
static void Main(string[] args) { Console.Title = "Terraria fishing bot for verion 1.4.1.1"; Process[] processes = Process.GetProcessesByName("Terraria"); if (processes.Length > 0) { IntPtr BaseAdress = IntPtr.Zero; Process MYProc = processes[0]; foreach (ProcessModule module in MYProc.Modules) { if (module.ModuleName.ToLower().Contains("asw")) { BaseAdress = module.BaseAddress; } } if (BaseAdress != IntPtr.Zero) { VAMemory memory = new VAMemory("Terraria"); int finalAdress = memory.ReadInt32((IntPtr)BaseAdress + 0x00159B24); Console.WriteLine("Press enter when you're ready "); Console.ReadLine(); Console.WriteLine("starting in:"); for (int i = 5; i > 0; i--) { Console.WriteLine(i); Thread.Sleep(1000); } while (true) { catched = false; Click(); Console.WriteLine("the rod was thrown"); Thread.Sleep(2000); while (catched == false) { byte x = memory.ReadByte((IntPtr)finalAdress + 0x170); //reading value from memory if (x != 0) { Thread.Sleep(100); Console.WriteLine($"you got a fish"); Click(); catched = true; } } Thread.Sleep(2000); } } } else { Console.WriteLine("You have to start terraria first."); Console.ReadLine(); } }
static void Main(string[] args) { VAMemory vam = new VAMemory("ac_client"); Base = vam.ReadInt32((IntPtr)Base); while (true) { int Helfaddress = Base + healf; if (Helfaddress != 1337) { vam.WriteInt32((IntPtr)Helfaddress, 1337); } int PistalAmmoaddress = Base + pistelammo; if (PistalAmmoaddress != 1337) { vam.WriteInt32((IntPtr)PistalAmmoaddress, 1337); } int DPPistelammo = Base + DPpistelammo; if (DPPistelammo != 1337) { vam.WriteInt32((IntPtr)DPPistelammo, 1337); } int lmgammoddress = Base + lmgammo; if (lmgammoddress != 1337) { vam.WriteInt32((IntPtr)lmgammoddress, 1337); } int Pistalreloadaddress = Base + pistelreload; if (Pistalreloadaddress != 88) { vam.WriteInt32((IntPtr)Pistalreloadaddress, 88); } int DPPistelReloadaddres = Base + DPpistelreload; if (Pistalreloadaddress != 88) { vam.WriteInt32((IntPtr)DPPistelReloadaddres, 88); } int lmgreloadddress = Base + lmgreload; if (lmgreloadddress != 88) { vam.WriteInt32((IntPtr)lmgreloadddress, 88); } int neightsammount = Base + neights; if (neightsammount != 1337) { vam.WriteInt32((IntPtr)neightsammount, 1337); } int kevlerammount = Base + kevler; if (kevlerammount != 888) { vam.WriteInt32((IntPtr)kevlerammount, 888); } System.Threading.Thread.Sleep(100); } }
public List <EntityData> BuildEnemyList(int playercount, int enemyteamnumber, VAMemory vam, Int32 baseaddress) //returns an list of floats arranged in (x, y, z) * number of players { Int32 a_playerobject; float entityx; float entityy; float entityz; int entityhealth; int team; int entitynumber; List <EntityData> retlist = new List <EntityData>(); //iterate through the entitylist for the players and skipping local player for (int i = 0; i < playercount; i++) { //read the player object address a_playerobject = vam.ReadInt32((IntPtr)baseaddress + a_entitylist + (0x10 * (i))); entityx = vam.ReadFloat((IntPtr)a_playerobject + o_coordinates); entityy = vam.ReadFloat((IntPtr)a_playerobject + o_coordinates + 0x4); entityz = vam.ReadFloat((IntPtr)a_playerobject + o_coordinates + 0x8); entityhealth = vam.ReadInt32((IntPtr)a_playerobject + o_health); team = vam.ReadInt32((IntPtr)a_playerobject + o_teamnumber); entitynumber = vam.ReadInt32((IntPtr)a_playerobject + o_entitynumber); //add to the return list if (team == enemyteamnumber) { retlist.Add((new EntityData(entityx, entityy, entityz, entityhealth, team, entitynumber))); } if (showdebugmessages) { System.Console.WriteLine("Entity Pointer: 0x" + (baseaddress + a_entitylist + (0x10 * (i))).ToString("X")); System.Console.WriteLine("Entity Object Address: 0x" + a_playerobject.ToString("X")); System.Console.WriteLine("Entity X: " + entityx); System.Console.WriteLine("Entity Y: " + entityy); System.Console.WriteLine("Entity Z: " + entityz); } } return(retlist); }
static void Main(string[] args) { VAMemory vam = new VAMemory("hl2"); int serverdllAddress = 0; int pointerHealth = 0x633AFC; int pointerArmor = 0x633AFC; int pointerAUX = 0x633AFC; Process[] p = Process.GetProcessesByName("hl2"); if (p.Length > 0) { foreach (ProcessModule processModule in p[0].Modules) { if (processModule.ModuleName == "server.dll") { serverdllAddress = (int)processModule.BaseAddress; } } } while (true) { IntPtr firstAddressHealth = IntPtr.Add((IntPtr)serverdllAddress, pointerHealth); IntPtr firstAddressHealthValue = (IntPtr)vam.ReadInt32(firstAddressHealth); IntPtr healthAddress = IntPtr.Add(firstAddressHealthValue, HealthOffset); vam.WriteInt32((IntPtr)healthAddress, 1337); IntPtr firstAddressArmor = IntPtr.Add((IntPtr)serverdllAddress, pointerArmor); IntPtr firstAddressArmorValue = (IntPtr)vam.ReadInt32(firstAddressArmor); IntPtr armorAddress = IntPtr.Add(firstAddressArmorValue, ArmorOffset); vam.WriteInt32((IntPtr)armorAddress, 1337); IntPtr firstAddressAux = IntPtr.Add((IntPtr)serverdllAddress, pointerAUX); IntPtr firstAddressAuxValue = (IntPtr)vam.ReadInt32(firstAddressAux); IntPtr auxAddress = IntPtr.Add(firstAddressAuxValue, AUXOffset); vam.WriteInt32((IntPtr)auxAddress, 1120403456); Thread.Sleep(100); } }
public IntPtr getAddressLevelTwo(IntPtr baseAddress, int one, int two) { IntPtr Base = baseAddress; IntPtr base1 = IntPtr.Add((IntPtr)vam.ReadInt32(Base), one); IntPtr base2 = IntPtr.Add((IntPtr)vam.ReadInt32(base1), two); return(base2); }
int FindMultiLevelPointer(long Base, int[] offsets) { int prev = (int)Base; int cur; for (int i = 0; i < offsets.Length - 1; i++) { cur = Mem.ReadInt32((IntPtr)prev + offsets[i]); prev = cur; } int final_offset = offsets[offsets.Length - 1]; int returned_address = prev + final_offset; if (returned_address <= 100) { return(-1); } return(prev + final_offset); }
private string buscarMiscartas() { VAMemory vam = new VAMemory(); vam.processName = process; int read = vam.ReadInt32((IntPtr)direccionBase + offsetBase2); int read2 = vam.ReadInt32((IntPtr)read + 0x8); int read3 = vam.ReadInt32((IntPtr)read2 + 0x10); string carta1 = vam.ReadByte((IntPtr)read3 + 0x1C60).ToString(); string palo1 = vam.ReadByte((IntPtr)read3 + 0x1C64).ToString(); string carta2 = vam.ReadByte((IntPtr)read3 + 0x1C6C).ToString(); string palo2 = vam.ReadByte((IntPtr)read3 + 0x1C70).ToString(); carta1 = convertirCarta(carta1, palo1); carta2 = convertirCarta(carta2, palo2); string misCartas = carta1 + " " + carta2; return(misCartas); }
public static Vector3 GetBonePosition(int boneIndex, int PlayerNumber, int bClient, VAMemory vam) { int BaseEntity = GetBaseEntity(PlayerNumber, bClient, vam); if (BaseEntity != 0) { int BoneMatrix = vam.ReadInt32((IntPtr)(BaseEntity + Offsets.dwBoneMatrix)); int hp = vam.ReadInt32((IntPtr)(BaseEntity + Offsets.oHealth)); if (BoneMatrix != 0 && hp > 0) { float x = vam.ReadFloat((IntPtr)(BoneMatrix + 0x30 * boneIndex + 0x0C)); float y = vam.ReadFloat((IntPtr)(BoneMatrix + 0x30 * boneIndex + 0x1C)); float z = vam.ReadFloat((IntPtr)(BoneMatrix + 0x30 * boneIndex + 0x2C)); return(new Vector3(x, y, z)); } return(new Vector3(99999f, 99999f, 99999f)); } return(new Vector3(99999f, 99999f, 99999f)); }
static void Main(string[] args) { VAMemory vam = new VAMemory(process); if (getModule()) { int fJump = baseAdress + dwForceJump; dwLocalPlayer = baseAdress + dwLocalPlayer; int localPlayer = vam.ReadInt32((IntPtr)dwLocalPlayer); int a_flags = localPlayer + m_flags; while (true) { while (GetAsyncKeyState(32) > 0) { int flags = vam.ReadInt32((IntPtr)a_flags); if (flags == 257) //stay { vam.WriteInt32((IntPtr)fJump, 5); //jump Thread.Sleep(20); vam.WriteInt32((IntPtr)fJump, 4); //stay Console.Clear(); Console.WriteLine("JUMP", Console.ForegroundColor = ConsoleColor.Green); } } Console.Clear(); Console.WriteLine("STAY", Console.ForegroundColor = ConsoleColor.Green); Thread.Sleep(20); } } }