Source Code [C++ to Lua] Lua Script Engine

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

rN'

Jr.Hacker
Meme Tier VIP
Jan 19, 2014
340
5,268
41
I started last year with the lua c api to write plugins for my cheat. Now I made a smaller, and standalone application which allows you to write (external based) hacks in lua and execute them.
There will come an overlay with drawing functions and dynamic font wrapper when I have some more free time.
Installation:
  1. Download the repo
  2. Extract the lua531_windows_files archive and follow the introductions from readme
  3. Move the lua5.X.X.dll into your executable path

Github: https://github.com/HazeProductions/Lua-Script-Engine

List of supported API's:
C++:
    /*
        - Base API
        - Type: UserAPI Wrapper
    */
    + RegisterCallbackFunction
    + int BitBand( Bit, Flag )
    + int GetKeyState( Key )
    + Include( pfad )
    + Sleep( Time )
     
    /*
        - Class: CVarSystem
        - Type: Wrapper
    */
    + bool CVar.RegisterCVar( Name, value )
    + bool CVar.GetBool( Name )
    + float CVar.GetFloat( Name )
    + int CVar.GetInt( Name )
    + bool CVar.SetValue( Name, value as bool or number )
     
    /*
        - Class: File
        - Type: UserAPI Wrapper
    */
    + bool File.GetBool( AppName, KeyName, File, optional default_value )
    + float File.GetFloat( AppName, KeyName, File, optional default_value )
    + int File.GetInt( AppName, KeyName, File, optional default_value )
    + bool File.WriteBool( AppName, KeyName, File, value )
    + bool File.WriteFloat( AppName, KeyName, File, value )
    + bool File.WriteInt( AppName, KeyName, File, value )
     
    /*
        - Class: RemoteProcess
        - Type: Wrapper
    */
    + bool Process.RegisterModule( ModuleName )
    + int Process.FindSignature( ModuleName, Signature, ExtraOffset )
    + int, int Process.GetModuleData( ModuleName )
    + bool Process.SendMessage( Msg, WPARAM, LPARAM )
    + bool Process.ReadBool( Address )
    + int Process.ReadByte( Address )
    + float Process.ReadFloat( Address )
    + int Process.ReadInteger( Address )
    + bool Process.WriteBool( Address, value )
    + bool Process.WriteByte( Address, value )
    + bool Process.WriteFloat( Address, value )
    + bool Process.WriteInt( Address, value )
Example (for source engine, base module init):
C++:
    local firsttick = true
    function MainCallbackFunction( )
        
        if( firsttick == true ) then
            print( "print from MainCallbackFunction" )
            firsttick = false
        end
    end
     
    if( Process.RegisterModule( "client.dll" ) == true and Process.RegisterModule( "engine.dll" ) == true ) then
        
        local ClientBase, ClientSize = Process.GetModuleData( "client.dll" )
        print( string.format( "found client.dll at 0x%X, size: 0x%X", ClientBase, ClientSize ) )
        
        local EngineBase, EngineSize = Process.GetModuleData( "engine.dll" )
        print( string.format( "found engine.dll at 0x%X, size: 0x%X", EngineBase, EngineSize ) )
        
        if( ClientBase ~= 0 and EngineBase ~= 0 ) then
            RegisterCallbackFunction( "MainCallbackFunction" )
        end
    end
Credits:
- me
- lua.org

Best regards,
ReactiioN
 

dmo

Coder
Full Member
Nobleman
Nov 8, 2014
145
678
5
Nice. I think botoflegends is using something like this.:rolleyes:
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods