diff --git a/methods/userdata.lua b/methods/userdata.lua index e4ebfdc8..620129bd 100644 --- a/methods/userdata.lua +++ b/methods/userdata.lua @@ -41,7 +41,7 @@ local function userdataValue(data) local dataType = typeof(data) if dataType == "userdata" then - return toString(data) + return "aux.placeholderUserdataConstant" elseif dataType == "Instance" then return data.Name elseif dataType == "BrickColor" then diff --git a/ohaux.lua b/ohaux.lua index ff03fd05..8dd23d29 100644 --- a/ohaux.lua +++ b/ohaux.lua @@ -9,6 +9,8 @@ local isLClosure = islclosure or is_l_closure or (iscclosure and function(f) ret assert(getGc and getInfo and getConstants and isXClosure, "Your exploit is not supported") +local placeholderUserdataConstant = newproxy(false) + local function matchConstants(closure, list) if not list then return true @@ -16,8 +18,8 @@ local function matchConstants(closure, list) local constants = getConstants(closure) - for index in pairs(list) do - if not constants[index] then + for index, value in pairs(list) do + if constants[index] ~= value and value ~= placeholderUserdataConstant then return false end end @@ -46,6 +48,7 @@ local function searchClosure(script, name, upvalueIndex, constants) end end +aux.placeholderUserdataConstant = placeholderUserdataConstant aux.searchClosure = searchClosure return aux \ No newline at end of file