--pavetr.top/ds --[[dobryak]] surface.CreateFont("samsontutut",{font="Roboto",extended=false,size=40,weight=300,blursize=0,scanlines=0,antialias=true,underline=false,italic=false,strikeout=false,symbol=false,rotary=false,shadow=false,additive=false,outline=false,})local healthPercentage=0 local currentHealth=0 hook.Add("HUDPaint","DrawCustomHUD",function()local ply=LocalPlayer()local health=ply:Health()local clip1=0 local reserve=0 local weapon=ply:GetActiveWeapon()if IsValid(weapon)and weapon:IsWeapon()then clip1=weapon:Clip1()reserve=ply:GetAmmoCount(weapon:GetPrimaryAmmoType())end local barWidth=200 local barHeight=20 local padding=25 local scale=ScrH()/1080 local xPos=ScrW()-(barWidth+padding*scale)local yPosHealth=ScrH()-(barHeight+padding*2*scale)local yPosAmmo=ScrH()-(barHeight+padding*scale)local hudWidth=220 local hudHeight=55 local xPos1=ScrW()-(hudWidth+padding*scale)local yPos1=ScrH()-(hudHeight+padding*scale)local xPos2=ScrW()-(padding*scale)local yPos2=ScrH()-(padding*scale)local targetHealthPercentage=health/100 if healthPercentagetargetHealthPercentage then healthPercentage=math.max(healthPercentage-0.01,targetHealthPercentage)end draw.RoundedBox(4,xPos,yPosHealth,barWidth*scale*healthPercentage,barHeight*scale,Color(0,255,0,255))draw.RoundedBox(4,xPos,yPosHealth,barWidth*scale,barHeight*scale,Color(255,0,0,100))local ammo="0"local weapon=ply:GetActiveWeapon()if IsValid(weapon)and weapon:IsWeapon()then local clip1=weapon:Clip1()local reserve=ply:GetAmmoCount(weapon:GetPrimaryAmmoType())ammo=clip1.." / "..reserve end local totalAmmo=clip1+reserve draw.RoundedBox(4,xPos,yPosAmmo,barWidth*scale,barHeight*scale,Color(100,100,255,255))draw.RoundedBox(4,xPos,yPosAmmo,barWidth*scale*(clip1/totalAmmo),barHeight*scale,Color(200,200,255,255))draw.SimpleText(""..health,"samsontutut",xPos1+5*scale,yPos1-1*scale,Color(255,255,255,255),TEXT_ALIGN_RIGHT,TEXT_ALIGN_TOP)draw.SimpleText(""..ammo,"samsontutut",xPos1+5*scale,yPos1+30*scale,Color(255,255,255,255),TEXT_ALIGN_RIGHT,TEXT_ALIGN_TOP)draw.SimpleText("","samsontutut",xPos2+10,yPos2-90,Color(255,255,255,255),TEXT_ALIGN_RIGHT,TEXT_ALIGN_TOP)end)