Look it marzojr.
I found a memory address that identifies whether the game is paused. Detected simply pause and show the box that says "Game Paused".
------------------------------------------------------------------------------
-- Pause box
------------------------------------------------------------------------------
local function draw_pause_box(ptext)
if memory.readbyte(0xfff63b) == 1 then -- Detect if game is paused
if memory.readbyte(0xfff600) == 16 then -- Detect if is into special stage
pbox = Frame_widget.Create(256/2-((4+4*#ptext)/2),224/2-4,4 + 4 * #ptext,10,nil,{0,0,0,192})
else
pbox = Frame_widget.Create(320/2-((4+4*#ptext)/2),224/2-4,4 + 4 * #ptext,10,nil,{0,0,0,192})
end
pbox:add(Text_widget.Create(0,0,ptext,nil),2,2)
pbox:draw()
end
end
callbacks.gui.register:add(function()
menu_active = menubtn:draw()
draw_pause_box("Game paused")
end)