I need help with that. Lua

Hello guys. After i started to make gamemode and hud, my gmod started to has too low fps. And i damn hate it. I’ve got fps less then 20! Sometimes only 15 and its on clear gm_construct. I think its because of the code and if you can, please help me with that. THX

Check the code:


function HUDHide( myhud )
	for k, v in pairs {"CHudHealth","CHudBattery","CHudAmmo","CHudSecondaryAmmo"} do
		if myhud == v then return false 
		end
	end
 end
 hook.Add("HUDShouldDraw","HUDHide",HUDHide)

 
 function GM:HUDPaint()
 if not LocalPlayer():Alive() then return end
 if (LocalPlayer():GetActiveWeapon() == NULL or LocalPlayer():GetActiveWeapon() == "Camera") then return end
 
 draw.RoundedBox(1, 150, 655, 35, 35, Color(71, 71, 71, 200))
 draw.RoundedBox(2, 184, 660, 265, 25, Color(71, 71, 71, 200))
 draw.RoundedBox(1, 1150, 655, 35, 35, Color(71, 71, 71, 200))
 draw.RoundedBox(2, 886, 660, 265, 25, Color(71, 71, 71, 200))
 draw.RoundedBox(12, 588, 635, 165, 105, Color(71, 71, 71, 200))

 	local ply = LocalPlayer()
	
	local HP = LocalPlayer():Health()
	
	surface.SetTextColor( 255, 64, 64, 255)
	surface.SetTextPos( 394, 664 )
	surface.SetFont( "MyFont" )
	surface.SetDrawColor( 50, 150, 50, 255)
	surface.DrawText( HP.."%" )

	surface.SetTexture(surface.GetTextureID("vgui/silkicons/heart"))
	surface.DrawTexturedRect(160,ScrH() - 102,14,16)


	
	local ARM = LocalPlayer():Armor()
	
	
	surface.SetTextColor( 0,245,255,255 )
	surface.SetTextPos( 902, 664 )
	surface.SetFont( "MyFont" )
	surface.SetDrawColor( 50, 150, 50, 255 )
	surface.DrawText( ARM.."%" )

	
	surface.SetTexture(surface.GetTextureID("vgui/silkicons/shield"))
	surface.DrawTexturedRect(1161,ScrH() - 102,14,16)
 

 	
	
	local Ammo = LocalPlayer():GetActiveWeapon():Clip1()
	if Ammo ==  (-1)  then return false
	end

	surface.SetTextColor( 255,255,0,180 )
	surface.SetTextPos( 600, 666 )
	surface.SetFont( "Ammo" )
	surface.SetDrawColor( 50, 150, 50, 255 )
	surface.DrawText( Ammo )
	
	
	

	
	
	local TotalAmmo = LocalPlayer():GetAmmoCount(LocalPlayer():GetActiveWeapon():GetPrimaryAmmoType())

	surface.SetTextColor( 255,255,0,140 )
	surface.SetTextPos( 674, 664 )
	surface.SetFont( "TotalAmmo" )
	surface.SetDrawColor( 255, 255, 0, 255 )
	surface.DrawText( TotalAmmo )
	
	

	local TotalAmmo = LocalPlayer():GetAmmoCount(LocalPlayer():GetActiveWeapon():GetSecondaryAmmoType())

	surface.SetTextColor( 255,69,0,255 )
	surface.SetTextPos( 725, 702 )
	surface.SetFont( "TotalAmmo" )
	surface.SetDrawColor( 255, 69, 0, 255 )
	surface.DrawText( TotalAmmo )
 end  
	

	surface.CreateFont( "MyFont", 
                    {
                    font    = "Coolvetica",
                    size    = 20,
                    weight  = 1000,
                    antialias = false,
                    shadow = false
 })
	surface.CreateFont( "Ammo", 
                    {
                    font    = "Impact",
                    size    = 65,
                    weight  = 800,
                    antialias = false,
                    shadow = false
 })
	surface.CreateFont( "TotalAmmo", 
                    {
                    font    = "Coolvetica",
                    size    = 40,
                    weight  = 1000,
                    antialias = false,
                    shadow = false
 })

Didn’t you already make like 3 threads with this code?

[editline]13th January 2013[/editline]

I also told you possible sources for your FPS lag, why make another thread?

I asked you one question also in another thread, u didnt answered. And nobody else replies, so i made a new thread…