Try this: 
PART 1: 
addCommandHandler("dog", DMCreateDog) 
addCommandHandler("deletedog", DMDeleteDog) 
addCommandHandler("unlockall", DMUnlockAll) 
  
PART 2: 
--DOG CREATOR 
function DMCreateDog() 
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(Player)), aclGetGroup ( "Admin" ) ) then 
else 
return outputChatBox("This command can be used by admins only!", Player, 255, 0, 0, false) 
end 
if(DMClientOwnerGotDog == true)then 
outputChatBox("You already have a dog!", 255, 0,0) 
else 
if(DMDogPanel == true)then 
removeEventHandler("onClientRender", getRootElement(), DMDogPanelGui) 
DMDogPanel = false 
  
guiSetVisible(DMDogPanelButton1, false) 
guiSetVisible(DMDogPanelButton2, false) 
guiSetVisible(DMDogPanelButton3, false) 
guiSetVisible(DMDogPanelButton4, false) 
guiSetVisible(DMDogPanelButton5, false) 
guiSetVisible(DMDogPanelButton6, false) 
guiSetVisible(DMDogPanelButton7, false) 
  
showCursor(false) 
end