Derma on entity

How could I make a simple entity with a crate model and when the player hits E or action, it would open a derma frame? I tried but I always failed…

Derma:

local DermaPanel = vgui.Create( “DFrame” )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 200, 250 )
DermaPanel:SetTitle( “Testing Derma Stuff” )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()

local DermaButton = vgui.Create( “DButton” )
DermaButton:SetParent( DermaPanel ) – Set parent to our “DermaPanel”
DermaButton:SetText( “Kill yourself” )
DermaButton:SetPos( 25, 50 )
DermaButton:SetSize( 150, 50 )
DermaButton.DoClick = function ()
RunConsoleCommand( “kill” ) – What happens when you press the button
end

Okay, so is this like the 5th thread you make about this?

if Player:KeyReleased(IN_USE)and Player:GetEyeTrace().Entity==yourbox then
DermaPanel:MakePopup()
end

Stop posting, this is like his millionth thread.