keblade07

Untitled

May 29th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 KB | None | 0 0
  1.  
  2.  
  3. attached = false
  4. Timer = createTimer(nil)
  5. MemScanCount = 0
  6. MemScanCountMax = 10
  7.  
  8. ProcessFound = function()
  9.         local scan = createMemScan(true)
  10.         memscan_returnOnlyOneResult(scan, true)
  11.         memscan_firstScan(scan, soExactValue, vtByteArray, rtTruncated, "D9 00 8B 46 20 8B 8A 2C 01 00 00 D9 1C 24 8B", nil, 0x00000000, 0xFFFFFFFF, "*W", fsmNotAligned, nil, true, false, false, false)
  12.         memscan_waitTillDone(scan)
  13.  
  14.         local result = memscan_getOnlyResult(scan)
  15.  
  16.         if result == nil then
  17.                 MemScanCount = MemScanCount + 1
  18.                 if not (MemScanCount > MemScanCountMax) then
  19.                         sleep(100)
  20.                         ProcessFound()
  21.                 else
  22.                         showMessage"Failed to hook to Roblox. Run the script before opening up Roblox."
  23.                 end
  24.         else
  25.                 result = string.format("%x", result)
  26.                 result = ("0"):rep(8-#result) .. result
  27.  
  28.                 writeBytes(result, 0x90, 0x90)
  29.         end
  30. end
  31.  
  32. timer_setInterval(Timer, 100)
  33. timer_onTimer(Timer, function()
  34.         if getProcessIDFromProcessName"RobloxPlayerBeta.exe" then
  35.                 if not Attached then
  36.                         Attached = true
  37.                         openProcess(getProcessIDFromProcessName"RobloxPlayerBeta.exe")
  38.                         ProcessFound()
  39.                 end
  40.         else
  41.                 Attached = false
  42.         end
  43. end)
Advertisement
Add Comment
Please, Sign In to add comment