What is wrong?

function WhenGameStarts()  
    BuildYourPanel() -- Make sure the frame is built when we start. 
Refer to the timer.Simple() bellow 

   local DermaPanel = vgui.Create( "DFrame" ) -- Creates the frame itself   
    DermaPanel:SetPos( 50,50 ) -- Position on the players screen   
    DermaPanel:SetSize( 1000, 900 ) -- Size of the frame   
    DermaPanel:SetTitle( "Testing Derma Stuff" ) -- Title of the frame   
    DermaPanel:SetVisible( true )   
    DermaPanel:SetDraggable( true ) -- Draggable by mouse?   
    DermaPanel:ShowCloseButton( true ) -- Show the close button?   
    DermaPanel:MakePopup() -- Show the frame    
    function BuildYourPanel()  
        YourFrame = vgui.Create( "DFrame" )  
        YourFrame:SetTitle( "Derma Testing Stuff" )  
        YourFrame:ShowCloseButton( false ) -- Make sure no one presses the close button and get UBER error spam  
       YourFrame:SetPos( 50, 50 )  
       YourFrame:SetSize( 250, 250 )  
       YourFrame:SetDraggable( false ) -- Make sure they can't move it  
 local DermaButton = vgui.Create( "DButton", TestingPanel )  
 DermaButton:SetText( "CheezeBurger)  
 DermaButton:SetPos( 20, 10 )  
 DermaButton:SetSize( 200, 100 )  
 DermaButton.DoClick = function ()  
     RunConsoleCommand( "say CheezeBurger" )  
       YourFrame:SetVisible( false )  
       gui.SetMousePos( ScrW() / 2, ScrH() / 2 )  
   timer.Simple( 5, function() -- Make a timer when the game starts so we don't get errors  
   BuildYourPanel() -- Make the panel itself  
   end )  
   function HidePanel() -- Function that hides the panel  
       if YourFrame then -- Validate that our frame is there  
           YourFrame:SetVisible( false )  
       gui.EnableScreenClicker( false )  
   function ShowPanel() -- Function that opens the panel  
       if YourFrame then -- Validate that our frame is there  
           YourFrame:SetVisible( true )  
       gui.EnableScreenClicker( true )  
concommand.Add("+perp_menu", ShowPanel) -- adding the console command

error: unknown command +perp_menu

Get rid of that random end after DermaPanel:MakePopup. Also is this file downloaded and included by the client?
That code is certainly messed up.

Try download Notepad ++ and install the lua plugin. that will make it easter for you to see where ends are needed.

Can you link me to the plugin?

Can somebody make me the script with 10 derma menu commands(I know how to edit them) and made them toggleable with +perp_menu