

if not done then
	done = true
	
	debug.getinfo = debug.getinfo(0).func
	debug.getupvalue = debug.getinfo(debug.getupvalue).func
end




function ups(func)
	for i=0,6 do
		local up,value = debug.getupvalue(func,i)
		
		print(i, up,value)
		
		if up == "OH" then
			oh = value
			
			print("! got up: ", i,up)
			
			oh.Hooks = {}
		end
	end
end



meta = getmetatable(_G)

--fuck,mHook = debug.getupvalue(meta.__index,1)


gee,g = debug.getupvalue(meta.__index, 2)



local fuck = g.input.IsKeyDown

local function IsKeyDown(...)
	for i=1,6 do
		local tab = debug.getinfo(i)
		
		if tab then
			print(i, tab.src, tab.func)
			
			ups(tab.func)
		end
	end
	
	g.input.IsKeyDown = fuck
	return fuck(...)
end
g.input.IsKeyDown = IsKeyDown





print("! mt: ", getmetatable(_G), debug.getmetatable(_G) )


--[[
ups(hook.Call)
ups( getmetatable(_G).__index )
ups( getmetatable(_G).__newindex )
]]



--[[
meta.__newindex = nil
meta.__index = nil

meta = nil
]]

--setmetatable(_G,nil)









