Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local gameeditor = {}
- function gameeditor:getregistry(name)
- for i,v in next, getreg() do
- if typeof(v) == "function" then
- local func = debug.getupvalue(v, name)
- if func then
- return func
- end
- end
- end
- end
- function gameeditor:getregistrytable(name)
- for i,v in next, getreg() do
- if typeof(v) == "table" then
- local func = v[name]
- if func then
- return func
- end
- end
- end
- end
- function gameeditor:replacefunc(name, newfunc)
- for i,v in next, getreg() do
- if typeof(v) == "function" then
- local func = debug.getupvalue(v, name)
- if func and typeof(v) == "function" then
- debug.setupvalue(v, name, newfunc)
- end
- end
- end
- end
- function gameeditor:replacevalue(name, newvalue)
- for i,v in next, getreg() do
- if typeof(v) == "function" then
- local value = debug.getupvalue(v, name)
- if value then
- debug.setupvalue(v, name, newvalue)
- end
- end
- end
- end
- function gameeditor:getgc(name)
- for i,v in next, getgc() do
- if typeof(v) == "function" then
- local func = debug.getupvalue(v, name)
- if func then
- return func
- end
- end
- end
- end
- function gameeditor:getgcindex(sd)
- for i,v in next, getgc() do
- if typeof(v) == "function" and not is_synapse_function(v) then
- for i2, v2 in next, debug.getupvalues(v) do
- if typeof(v2) == "table" then
- if v2[sd] then
- return v2
- end
- end
- end
- end
- end
- end
- function gameeditor:getgctable(name)
- for i,v in next, getgc() do
- if typeof(v) == "table" then
- local func = v[name]
- if func then
- return func
- end
- end
- end
- end
- function gameeditor:replacefuncgc(name, newfunc)
- for i,v in next, getgc() do
- if typeof(v) == "function" then
- local func = debug.getupvalue(v, name)
- if func and typeof(v) == "function" then
- debug.setupvalue(v, name, newfunc)
- end
- end
- end
- end
- function gameeditor:replacevaluegc(name, newvalue)
- for i,v in next, getgc() do
- if typeof(v) == "function" then
- local value = debug.getupvalue(v, name)
- if value then
- debug.setupvalue(v, name, newvalue)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement