0% found this document useful (0 votes)
2 views

message (6)

The document contains a Lua script that modifies functions and constants related to a game module. It includes error handling for a FireServer function, validation for arguments passed to a ShuffleFunction, and modifications to constants in the PlayerModule. The script aims to enhance or alter the behavior of specific game functionalities while ensuring certain conditions are met.

Uploaded by

xqwcvz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

message (6)

The document contains a Lua script that modifies functions and constants related to a game module. It includes error handling for a FireServer function, validation for arguments passed to a ShuffleFunction, and modifications to constants in the PlayerModule. The script aims to enhance or alter the behavior of specific game functionalities while ensuring certain conditions are met.

Uploaded by

xqwcvz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

if not LPH_OBFUSCATED then

function LPH_NO_VIRTUALIZE(f) return f end


end

local function findErrorHandler()


for _, func in ipairs(getgc()) do
if type(func) == "function" and islclosure(func) and not
is_synapse_function(func) then
local constants = debug.getconstants(func)
for _, const in ipairs(constants) do
if const == "error" and debug.getinfo(func).name == "FireServer"
then
local env = getfenv(func)
local originalFireServer = env.FireServer

env.FireServer = function(self, ...)


if select(1, ...) == "error" then
return
end
return originalFireServer(self, ...)
end

setfenv(func, env)
return true
end
end
end
end
return false
end

task.wait()

local function findShuffleFunction()


for _, v in pairs(getgc()) do
if type(v) == "function" and
debug.getinfo(v).source:find("PlayerModule.LocalScript") then
local info = debug.getinfo(v)
local paramCount = info.params and #info.params or info.nparams
if paramCount == 7 then
return v
end
end
end
return nil
end

if ShuffleFunction then
local function ValidateArgs(Args)
if #Args < 6 then return false end

local validSets = {
{655, 775, 724, 633, 891},
{760, 760, 771, 665, 898},
{898, 892, 811, 671, 781}
}

for _, set in ipairs(validSets) do


local isValid = true
for i = 1, 5 do
if Args[i + 1] ~= set[i] then
isValid = false
break
end
end
if isValid then return true end
end

return false
end

local function FindShuffleFunctionInGC()


for _, func in ipairs(getgc()) do
if type(func) == "function" and func == ShuffleFunction then
return func
end
end
return nil
end

local originalFunction = FindShuffleFunctionInGC()


if originalFunction then
local env = getfenv(originalFunction)
env.ShuffleFunction = function(...)
local Args = {...}

if not ValidateArgs(Args) then


warn("Invalid arguments detected:", table.unpack(Args))
warn("Operation reverted:", table.unpack(Args))
return
end

return originalFunction(...)
end
setfenv(originalFunction, env)
end
end

local function modifyPlayerModuleConstants()


for _, func in pairs(getgc()) do
if type(func) == 'function' and
debug.getinfo(func).source:find("PlayerModule.LocalScript") then
local constants = debug.getconstants(func)

for index, value in pairs(constants) do


if value == 4000001 then
debug.setconstant(func, index, 1)
end

if table.find({20.03, 50.03, 20.09, 50.09, 197, 196}, value) then


debug.setconstant(func, index, 100000)
end
end

local mt = getmetatable(func)
if mt and type(mt.__index) == "table" then
local indexTable = mt.__index
mt.__index = nil
indexTable.protectkills = true
mt.__index = indexTable
end
end
end
end

modifyPlayerModuleConstants()
print("S")

You might also like