Skip to main content
This is designed to attempt to fix injection detections and certain native executions, NOT completely bypass native calls like CreateVehicle, etc.
Lean provides two simulation methods for injecting code into a resource context. Both aim to reduce detection risk, but differ in reliability and execution consistency/methodology.

Simulate1 (Safer, but less reliable successful injections)

Execute code within a specific resource context using method 1.

Parameters

  • resourceName (string) – Name of the target resource, or β€œany” to target a random found injectable resource
  • code (string) – Lua code to execute inside the resource context

Returns

Example


Execute code within a specific resource context using method 2.

Parameters

  • resourceName (string) – Name of the target resource, or β€œany” to target a random found injectable resource
  • code (string) – Lua code to execute inside the resource context

Returns

Example


Key Differences


Recommendation

  • Use Simulate1 when prioritizing maximum injection detection avoidance and safety when calling certain natives or funcs
  • Use Simulate2 when you need consistent execution and are unlikely to fail, although certain detections can occur due to this being the less safe method.