adding rigid body mass in the toolbar as own panel?

I have a script I can’t seem to fix.
it just wont execute.

import bpy
from bpy.types import Panel



class activemasspanel(bpy.types.Panel):
    bl_category = "Physics"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"
    #bl_context = "editmode"
    bl_label = "Active Mass"

class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
    bl_label = "Active Mass"

    @classmethod
    def poll(cls, context):
        obj = context.object
        return (obj and obj.rigid_body and
                (not context.scene.render.use_game_engine))

    def draw(self, context):
        layout = self.layout

        ob = context.object
        rbo = ob.rigid_body

        if rbo is not None:
            
            row = layout.row()
            
            if rbo.type == 'ACTIVE':
                layout.prop(rbo, "mass)
                


def register():
    bpy.utils.register_module(__name__)
 

def unregister():
    bpy.utils.unregister_module(__name__)
  
if __name__ == "__main__":
    register()
    

Currently rigid bodies are added only from the “Physics” panel (in previous versions you could add them as modifiers but this is not the case now).


import bpy

class ActiveMassPanel(bpy.types.Panel):
    bl_label = "Active Mass"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"
    bl_category = "Tools"

    def draw(self, context):
        layout = self.layout

        if context.object.rigid_body != None:
            layout.prop(context.object.rigid_body, "mass")
        else:
            layout.label("Add Rigid Body First", icon="ERROR")
            
def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

Is this what you want to do?