Lua Cheat Engine

Uzman Üye
Katılım
11 Mar 2023
Mesajlar
186
Çözümler
2
Tepki puanı
34
Ödüller
2
Yaş
23
3 HİZMET YILI
Cheat Engine üzerine Lua kodunu nasıl çalıştırabilirim elimde bir lua kodu var

Lua:
local ffi = require("ffi")
ffi.cdef[[
    typedef unsigned long DWORD;
    typedef struct { float x, y, z; } vec3;
    DWORD GetModuleHandleA(const char* lpModuleName);
    DWORD GetAsyncKeyState(int vKey);
    void Sleep(DWORD dwMilliseconds);
    bool FreeLibraryAndExitThread(void* hModule, DWORD dwExitCode);
]]

local pi = 3.1415926535897932
local client = ffi.C.GetModuleHandleA("client.dll")
local engine = ffi.C.GetModuleHandleA("engine.dll")

local function ValidPlayer(ent, lp)
    if ent ~= lp and ffi.cast("DWORD*", ent + 0x100)[0] > 0 then
        return true
    else
        return false
    end
end

local function GetDistance(p1, p2)
    return math.sqrt((p1.x - p2.x)^2 + (p1.y - p2.y)^2 + (p1.z - p2.z)^2)
end

local function GetBonePos(entaddress, bone)
    local boneptr = ffi.cast("DWORD*", entaddress + 0x26A8)[0]
    local bonepos = ffi.new("vec3")
    bonepos.x = ffi.cast("float*", boneptr + 0x30 * bone + 0x0C)[0]
    bonepos.y = ffi.cast("float*", boneptr + 0x30 * bone + 0x1C)[0]
    bonepos.z = ffi.cast("float*", boneptr + 0x30 * bone + 0x2C)[0]
    return bonepos
end

local function GetClosestEnemy(lp, entitylist)
    local maxDist = 99999
    local entNum
    for i = 0, 31 do
        local entityptr = ffi.cast("DWORD*", entitylist + i * 0x10)[0]
        if entityptr ~= nil then
            local entityaddr = ffi.cast("DWORD*", entityptr)[0]
            if ValidPlayer(entityaddr, lp) then
                local entdistance = GetDistance(ffi.cast("vec3*", entityaddr + 0x138)[0], ffi.cast("vec3*", lp + 0x138)[0])
                if entdistance < maxDist then
                    maxDist = entdistance
                    entNum = i
                end
            end
        end
    end
    return ffi.cast("DWORD*", entitylist + entNum * 0x10)[0]
end

local function Thread(hModule)
    local clientstate = ffi.cast("DWORD*", engine + 0x58ADD4)[0]
    local entitylist = client + 0x4D5450C
    local pLocalplayer = client + 0xD3FC5C
    local localcamerapos = ffi.new("vec3")
    local entityaddr
    local localplayer
    local entheadpos = ffi.new("vec3")
    local cameraoffset = ffi.new("vec3")
    local localplayerpos = ffi.new("vec3")
    while true do
        ffi.C.Sleep(2)
        if ffi.C.GetAsyncKeyState(0x12) ~= 0 then
            if ffi.cast("DWORD*", pLocalplayer)[0] ~= nil then
                localplayer = ffi.cast("DWORD*", pLocalplayer)[0]
                entityaddr = GetClosestEnemy(localplayer, entitylist)
                entheadpos = GetBonePos(entityaddr, 8)
                localplayerpos = ffi.cast("vec3*", localplayer + 0x138)[0]
                cameraoffset = ffi.cast("vec3*", localplayer + 0x108)[0]
                localcamerapos.x = localplayerpos.x + cameraoffset.x
                localcamerapos.y = localplayerpos.y + cameraoffset.y
                localcamerapos.z = localplayerpos.z + cameraoffset.z
                local hyp = math.sqrt((entheadpos.x - localcamerapos.x)^2 + (entheadpos.y - localcamerapos.y)^2 + (entheadpos.z - localcamerapos.z)^2)
                local opp = entheadpos.z - localcamerapos.z
                local delta = -math.asin(opp / hyp) * (180 / pi)
                ffi.cast("float*", clientstate + 0x4D88)[0] = delta
                local adj = entheadpos.y - localcamerapos.y
                local opp2 = entheadpos.x - localcamerapos.x
                local delta2 = math.atan2(adj, opp2) * (180 / pi)
                ffi.cast("float*", clientstate + 0x4D8C)[0] = delta2
            end
        elseif ffi.C.GetAsyncKeyState(0x23) ~= 0 then
            break
        end
    end
    ffi.C.FreeLibraryAndExitThread(hModule, 0)
    return 0
end

local function DllMain(hModule, ul_reason_for_call, lpReserved)
    if ul_reason_for_call == 1 then
        ffi.C.CreateThread(nil, 0, ffi.cast("LPTHREAD_START_ROUTINE", Thread), hModule, 0, nil)
    end
    return true
end
 
Seçkin Üye
Katılım
23 Ağu 2018
Mesajlar
507
Çözümler
1
Tepki puanı
49
Ödüller
8
Yaş
26
Sosyal
7 HİZMET YILI
Cheat Engine'yi açın.
Memory Wiew Tıklayın.
Sol Üst'den Tool 'a tıklayın.
Lua Script tıklayın ve kodu yapıştırın.
Execute Tuşuna Basın.
Devam.

2. Yöntem

Yada Cheat Engine Açın Memory Wiew Tıklayın Ardından CTRL+L tuşuna basın ve gelen ekrana kodu yapıştırıp Execute basın.
 
Moderatörün son düzenlenenleri:
Onaylı Üye
Katılım
16 Kas 2023
Mesajlar
50
Tepki puanı
3
Yaş
26
2 HİZMET YILI
Cheat engine in hala işlevini kaybetmemesine çok şaşırdım.
 
kmode exception
Seçkin Üye
Katılım
18 Tem 2022
Mesajlar
325
Çözümler
9
Tepki puanı
87
Ödüller
3
Sosyal
3 HİZMET YILI
cheat engineyi aç ctrl + alt + l yap kodu yapıştır execute script de
 
Onaylı Üye
Katılım
2 Haz 2018
Mesajlar
122
Tepki puanı
3
Ödüller
7
Yaş
31
8 HİZMET YILI
Ccheat engine demişkn lole fln yda valorant para hilesi gelse
 
Onaylı Üye
Katılım
11 Nis 2024
Mesajlar
91
Tepki puanı
4
Ödüller
1
Yaş
25
2 HİZMET YILI
memory wiev var ona tıkla sonra toola tıkla orda lua script var oraya yapıştır executeye bas
:peepoNice:
 
Üst