Outdatedload before autorun for lua in lua

Posts 1–15 of 25 · Page 1 of 2
load before autorun for lua in lua
leaving, releasing some shit

glhf

usage:
pax_run_auto *filename in lua/* -- use this command before joining a server to make a file load before autorun
pax_run_menu *code* -- use the command to run lua on the menustate
pax_run_client *code* -- while in-game, use this to run lua on client, bypasses QAC
pax_openscript *filename in lua/* -- use this command while in a server to load a file, bypasses QAC

installation:
drag the folder menu_plugins and bin into lua/
go into the lua folder if you aren't in there already, go into menu (garrysmod/lua/menu)
edit menu.lua
make a new line at the bottom, make it
Code:
include("menu_plugins/init.lua")
then start up ur gmod and see if the menu is fucked, if it is you did something wrong

example of cac bypass:
Code:
local G, R = table.Copy(_G), table.Copy(debug.getregistry()) // this loads before cac so we should copy these tables now
local function Aimbot(self)
        oGAMEMODE["Think"](self)
        ...AIMBOT CODE HERE, USE BACKUPS FAGLORD...
end

while GAMEMODE != nil do // probably doesn't work, lazy to check
oGAMEMODE = GAMEMODE
GAMEMODE["Think"] = Aimbot
break
end
Also, please do point how much of a retard i am and how this and that won't work. I don't care.

VirusTotalⓘ
Jottiⓘ

almost forgot, it has a filestealer that dumps everything to garrysmod/data/pax/steals/*server name*/


!!IMPORTANT!!
MAKE SURE TO REPLACE LUA/MENU_PLUGINS/MODULES/PAX.LUA WITH:

Code:
require("roc")

if !file.IsDir("pax", "DATA") then
    file.CreateDir("pax")
end

if !file.IsDir("pax/steals", "DATA") then
    file.CreateDir("pax/steals")
end

if !file.IsDir("pax/steals", "DATA") then
    file.CreateDir("pax/steals")
end

local autorun = nil

local function PaXLog(msg)
    MsgC(Color(16, 53, 235), "PaX>> ", Color(255, 255, 255), msg .. "\n")
end

PaXLog("Loaded!")

concommand.Add("pax_run_auto", function(ply, cmd, args, argStr)
    autorun = argStr
    PaXLog("File lua/" .. argStr .. " will load on autorun! Make sure to use backups of everything!")
end )

concommand.Add("pax_run_client", function(ply, cmd, args, argStr)
    RunOnClient(argStr, "lua/includes/util/color.lua")
end )

concommand.Add("pax_openscript", function(ply, cmd, args, argStr)
    RunOnClient(file.Read("lua/" .. args[1], "GAME"), args[2] or "lua/includes/util/color.lua")
end )

concommand.Add("pax_run_menu", function(ply, cmd, args, argStr)
    RunStringEx(argStr, "PaXMenu")
end )

local hostname = "ERROR_FAILED_TO_GET_HOSTNAME"
local append = {
    Startup = true,
    RunString = true,
    LuaCmd = true,
}

local badname = {
    "\\",
    "/",
    ":",
    "*",
    "?",
    '"',
    "<",
    ">",
    "|",
}

local oGameDetails = GameDetails

function GameDetails(sn, su, mn, mp, sid, gm)
    local safehn = sn

    for k,v in next, badname do
        local new = safehn:gsub(v, "")
        safehn = new
    end

    hostname = string.lower(safehn)
    oGameDetails(sn, su, mn, mp, sid, gm)
end

local function DumpFile(name, source)
    if name == "gamemode/base/cl_init.lua" then return end

    if !file.IsDir("pax/steals/" .. hostname, "DATA") then
        file.CreateDir("pax/steals/" .. hostname)
        PaXLog("Created filestealer directory! (pax/steals/" .. hostname .. ")")
    end

    if !append[name] then
        //PaXLog("Ran & stole file " .. name .. ", dumped to pax/steals/" .. hostname .. "/" .. name .. ".txt")
        
        local garbage = {}

        for i = 1, #name do
            if name[i] == "/" then
                garbage[#garbage + 1] = i
            end         
        end

        if #garbage > 1 then
            local str = name
        
            for i = 1, #garbage do
                file.CreateDir("pax/steals/" .. hostname .. "/" .. string.sub(str, 1, garbage[i] - 1))
            end

            file.Write("pax/steals/" .. hostname .. "/" .. name .. ".txt", source)
        else
            file.Write("pax/steals/" .. hostname .. "/" .. name .. ".txt", source)
        end
    else
        file.Append("pax/steals/" .. hostname .. "/" .. name .. ".txt", "\n\n\n " .. source)
    end
end

hook.Add("RunOnClient", "PaX", function(name, source)
    DumpFile(name, source)

    if name == "lua/includes/init.lua" then
        if autorun != nil and file.Exists("lua/" .. autorun, "GAME") then
            source = source .. "\n\n" .. file.Read("lua/" .. autorun, "GAME")
            PaXLog("B4Autorun file loaded!")
        end

        return source
    else
        return file.Read("pax/overrides/" .. name, "DATA") or source
    end
end)
paxmod_mpgh.net.zip44 KB · 422 downloads 2/58 malicious
//Approved...
Wouldn't concommand.GetTable() wreck those concommands?
Quote Originally Posted by snipwnage3 View Post
Wouldn't concommand.GetTable() wreck those concommands?
yes it would
Quote Originally Posted by snipwnage3 View Post
Wouldn't concommand.GetTable() wreck those concommands?
No it wouldn't, the concommands are in the menu state so they're undetectable from the client state.
It's not working, the autorun file says that it'll autorun my file but when I join a server it doesn't do anything. I just spammed the print function in a file to make sure and still nothing.
This caused my game to start throwing Stack Overflow errors.
Quote Originally Posted by ShitFucks View Post
This caused my game to start throwing Stack Overflow errors.


hey dude did you read the big flashy red letters
Quote Originally Posted by cdr1za View Post


hey dude did you read the big flashy red letters
Ah shit yeah, I did that first and it worked fine I only swapped back because the load lua before pre auto run wasn't working for me and I wanted to see if that would fix it.
Quote Originally Posted by ShitFucks View Post
Ah shit yeah, I did that first and it worked fine I only swapped back because the load lua before pre auto run wasn't working for me and I wanted to see if that would fix it.
I don't know why lb4a isn't working, you could probs fix it.
Quote Originally Posted by dustyroo View Post
Help im getting this error and idk how to fix it, its a engine error
https://gyazo.com/6b9f6384aa3c6e61253431084db119ceⓘ
it's good when you take the time to read the noob friendly instructions

"drag the folder menu_plugins and bin into lua/"
Quote Originally Posted by cdrizzle View Post
it's good when you take the time to read the noob friendly instructions

"drag the folder menu_plugins and bin into lua/"
I did do this thats why I need help

- - - Updated - - -

Quote Originally Posted by OJthejuiceman View Post
you didnt put the fucking module in your bin folder lol
I did thats why im asking for help

- - - Updated - - -

I fixed it I had a broken file now im getting this engine error when i join a sever - Lua panic! Something went horribly wrong "stack overflow"
Posts 1–15 of 25 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us