-
Автор темы
- #1
заранее спасибо
Код:
local ffi = require("ffi")
ffi.cdef[[
int VirtualProtect(void*, unsigned long, unsigned long, unsigned long*);
]]
local function write_to_memory(address, value, bytes)
local old_protect = ffi.new("unsigned long[1]")
ffi.C.VirtualProtect(ffi.cast("void*", address), bytes, 0x40, old_protect)
ffi.copy(ffi.cast("void*", address), ffi.cast("const void*", value), bytes)
ffi.C.VirtualProtect(ffi.cast("void*", address), bytes, old_protect[0], nil)
end
local invite_cooldown_check = Utils.PatternScan("client.dll", "74 63 8B 76 24") or error("Pattern Invalid!")
local cfg_cooldown = Menu.Switch("Bypass invite cooldown", "Enable", false)
local cfg_cooldown_callback = function()
if cfg_cooldown:GetBool() then
write_to_memory(invite_cooldown_check, "\xEB", 1)
else
write_to_memory(invite_cooldown_check, "\x74", 1)
end
end
cfg_cooldown_callback()
cfg_cooldown:RegisterCallback(cfg_cooldown_callback)
Cheat.RegisterCallback("destroy", function()
if cfg_cooldown:GetBool() then
write_to_memory(invite_cooldown_check, "\x74", 1)
end
end)