| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| guily6669 How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 23 Sep 2024
 Posts: 3
 
 
 | 
			
				|  Posted: Mon Sep 23, 2024 8:34 pm    Post subject: Need Help with lua script variable string input... |   |  
				| 
 |  
				| Hi there, 
 After a lot of search in the forum I managed to make the following code to work pretty good, but I need a way to have a window open saying enter your username (input username) and then after typing and pressing enter it would go to chose the color (input color) and add the color code before the name (don't know if it's even possible).
 
 The color codes for this particular game are "^1" to "^9" each being a color so 9 colors to chose (without the ""). Example: "^1username" would look like "username" in this game.
 
 Also I need it to be able to compile into a ".exe" so I can share if that's allowed and work stand-alone without needing cheatengine.
 
 I don't know much about coding or Lua script
   
 My current script:
 
  	  | Code: |  	  | PROCESS_NAME = 'XXXXXXXXX.exe' --------
 -------- Auto Attach
 --------
 local autoAttachTimer = nil ---- variable to hold timer object
 local autoAttachTimerInterval = 1000 ---- Timer intervals are in milliseconds
 local autoAttachTimerTicks = 0 ---- variable to count number of times the timer has run
 local autoAttachTimerTickMax = 5000 ---- Set to zero to disable ticks max
 local function autoAttachTimer_tick(timer) ---- Timer tick call back
 ---- Destroy timer if max ticks is reached
 if autoAttachTimerTickMax > 0 and autoAttachTimerTicks >= autoAttachTimerTickMax then
 timer.destroy()
 end
 ---- Check if process is running
 if getProcessIDFromProcessName(PROCESS_NAME) ~= nil then
 timer.destroy() ---- Destroy timer
 openProcess(PROCESS_NAME) ---- Open the process
 end
 autoAttachTimerTicks = autoAttachTimerTicks + 1 ---- Increase ticks
 end
 autoAttachTimer = createTimer(getMainForm()) ---- Create timer with the main form as it's parent
 autoAttachTimer.Interval = autoAttachTimerInterval ---- Set timer interval
 autoAttachTimer.OnTimer = autoAttachTimer_tick ---- Set timer tick call back
 
 function onOpenProcess()
 local string_to_find = 'Username'
 local string_to_write = '^1Username'
 
 ms = createMemScan()
 ms.firstScan(soExactValue, vtString, 0, string_to_find, "" , 0, 0xffffffffffffffff, "", fsmNotAligned, "1", false, false, false, false)
 ms.waitTillDone()
 
 f=createFoundList(ms);
 f.initialize();
 
 resultToWrite = stringToByteTable(string_to_write .. string.char(0))
 
 for i = 0, f.Count - 1 do
 writeString(f.Address[i], string_to_write)
 writeBytes(("0x" .. f.Address[i]) + 17, 0)
 end
 f.destroy()
 ms.destroy()
 Sleep(30000) ---- Enough for this game and I like to keep it like this instead of a check
 closeCE()
 end
 | 
 
 ps: also is there any easy way to make the compiled ".exe" to not be detected as virus by most antivirus???
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| guily6669 How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 23 Sep 2024
 Posts: 3
 
 
 | 
			
				|  Posted: Fri Sep 27, 2024 2:40 pm    Post subject: |   |  
				| 
 |  
				| I already have it fully working, now is there any easy way to make the lua script as ".exe" to be undetected by most antivirus? 
 By hex editing I could only reduce the virus detection from 30 something to like 28 but still isn't enough
   |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| xxhehe Expert Cheater
 
 ![]() Reputation: 0 
 Joined: 11 Mar 2015
 Posts: 154
 
 
 | 
			
				|  Posted: Fri Sep 27, 2024 7:41 pm    Post subject: |   |  
				| 
 |  
				|  	  | guily6669 wrote: |  	  | I already have it fully working, now is there any easy way to make the lua script as ".exe" to be undetected by most antivirus? 
 By hex editing I could only reduce the virus detection from 30 something to like 28 but still isn't enough
  | 
 Lua2Exe :
 attempt to call global 'getMainForm' (a nil value)
 
 Code Obfuscation
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| guily6669 How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 23 Sep 2024
 Posts: 3
 
 
 | 
			
				|  Posted: Sat Sep 28, 2024 6:45 pm    Post subject: |   |  
				| 
 |  
				|  	  | xxhehe wrote: |  	  |  	  | guily6669 wrote: |  	  | I already have it fully working, now is there any easy way to make the lua script as ".exe" to be undetected by most antivirus? 
 By hex editing I could only reduce the virus detection from 30 something to like 28 but still isn't enough
  | 
 Lua2Exe :
 attempt to call global 'getMainForm' (a nil value)
 
 Code Obfuscation
 | 
 I have made the code in C++ with the help of a friend and ChatGPT, now only 2 detection's...
 
 But I gladly managed to make the lua script to .exe undetected at least by Microsoft antivirus.
 
 Do you mind elaborate in a noob way or PM me please on how to reduce more the detection's of lua script from CheatEngine to executable???
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |