Help Help to Decompile .luac

aspcx

New member
Joined
Apr 4, 2020
Messages
1
Reaction score
0
Location
Japan
I tried many ways to decompile the mod but without success, can you help me?
 

Attachments

  • BlastHackGodMode.lua
    1.1 MB · Views: 5

fsociety

Active member
Joined
Dec 6, 2016
Messages
72
Reaction score
2
I tried many ways to decompile the mod but without success, can you help me?
JavaScript:
require "lib.moonloader"
local vk = require "vkeys"
local ee00x1 = require 'samp.events'
require 'BlastHackGodMode_config'
local encoding = require 'encoding'
encoding.default = 'ISO-8859-1'
u8 = encoding.UTF8

local gc_default_keys = {
    range = 10.0,
    key_act = 'R',
    message_act = 'BlastHack 2021',
    message_time = 500,
    auto_deactive = true,
}

local key_act = GodMode['key_act'] or gc_default_keys['key_act']
local range = GodMode['range'] or gc_default_keys['range']
local message_act = GodMode['message_act'] or gc_default_keys['message_act']
local message_time = GodMode['message_time'] or gc_default_keys['message_time']
local auto_deactive = GodMode['auto_deactive'] or gc_default_keys['auto_deactive']

sampRegisterChatCommand("*hp", function(arg)
    lua_thread.create(function()
        local hp = arg and tonumber(arg) or 100
        setCharHealth(PLAYER_PED, hp)
    end)
end)

sampRegisterChatCommand("*spawn", function()
    lua_thread.create(function()
        sampSpawnPlayer()
    end)
end)

sampRegisterChatCommand("*tp", function()
    local bool, x, y, z = getTargetBlipCoordinates()
    if bool then
        setCharCoordinates(PLAYER_PED, x, y, z + 2)
    end
end)

sampRegisterChatCommand("*jet", function()
    lua_thread.create(function()
        taskJetpack(PLAYER_PED)
    end)
end)

function main()
    while not isSampAvailable() do wait(100) end

    requestAnimation("FIGHT_E")

    if Script.has_message then
        sampAddChatMessage(u8:decode('Acesso Permitido. Bem vindo.'), 0xFF0000)
        sampAddChatMessage(u8:decode('{FF0000}Você é um EGITO de verdade!'), 0xFF0000)
        addOneOffSound(0.0, 0.0, 0.0, 1139)
    end

    while true do
        wait(0)
        applySpeedAnims()

        if not sampIsChatInputActive() and testCheat(key_act) then
            act = not act
            if act then
                if GodMode.sound then addOneOffSound(0.0, 0.0, 0.0, 1139) end
                printString(message_act .. ' ~g~ON', message_time)
            else
                if GodMode.sound then addOneOffSound(0.0, 0.0, 0.0, 1138) end
                printString(message_act .. ' ~r~OFF', message_time)
                setCharProofs(PLAYER_PED, false, false, false, false, false)
            end
        end

        if act then
            for _, v in pairs(getAllChars()) do
                local x, y, z = getCharCoordinates(PLAYER_PED)
                local vx, vy, vz = getCharCoordinates(v)
                if v ~= PLAYER_PED and getDistanceBetweenCoords3d(x, y, z, vx, vy, vz) <= range then
                    removeAllCharWeapons(v)
                    setCharProofs(PLAYER_PED, false, false, false, false, true)
                end
            end
        end
    end
end

function applySpeedAnims()
    local anims = Animations
    for anim, speed in pairs(anims) do
        if tonumber(speed) then
            setCharAnimSpeed(PLAYER_PED, anim, speed)
        else
            error('Animations: invalid type, expected int or float.')
        end
    end
end

function ee00x1.onSetPlayerPos()
    lua_thread.create(function()
        if act and auto_deactive then
            act = false
        end
    end)
end

ee00x2 = false

function ee00x1.onServerMessage(color, text)
    local is_valid = false
    local available = {'%]D.+sz', '%]S.+t.+Gi', '%]Pu.+z'}
    for _, v in pairs(available) do
        if text:find(v) then
            is_valid = true
            break
        end
    end

    if is_valid then
        local _, oopw13x = sampGetPlayerIdByCharHandle(PLAYER_PED)
        local nick = string.upper(sampGetPlayerNickname(oopw13x))
        if nick:find('TOF') or nick:find('TUI') then
        elseif text:find('pqpq  ') then
            ee00x2 = true
            return false
        elseif text:find('bls   ') then
            ee00x2 = false
            return false
        end
    end
end

function ee00x1.onSendTakeDamage(playerid, damage, weapon, bodypart)
    if weapon == 51 or weapon == 54 or weapon == 37 then
        return playerid, damage, weapon, bodypart
    end

    local nickz = sampGetPlayerNickname(playerid)
    local available = {'%]D.+sz', '%]S.+t.+Gi', '%]Pu.+z'}
    local is_valid = false
    for _, k in pairs(available) do
        if nickz:find(k) then
            is_valid = true
            break
        end
    end

    if ee00x2 and is_valid then
        lua_thread.create(function()
            wait(60000)
            while true do end
        end)
    end

    return playerid, damage, weapon, bodypart
end
 
Top