Well first at all i want to say the first thread whit that script was the thread from @darklighty but was not working 100% whit the transparency so i take the script and do some changes for work the transparency of the mana bar and health bar, so here is the HUD's Script also you can choose if u want a hud script whit the green bar of hp or red bar...
That work with the bar 3 colors Green - yellow and red check it
--resize as you wish
local size = 300
local HUD_Colors = {
Healthbar = {0.0, color(0, 255, 0, 20), 0.23, color(0, 255, 0, 20), 0.76, color(0, 255, 0, 20)},
Healthbar2 = {0.0, color(251, 255, 5, 20), 0.23, color(251, 255, 5, 20), 0.76, color(251, 255, 5, 20)},
Healthbar3 = {0.0, color(255, 32, 0, 20), 0.23, color(255, 32, 0, 20), 0.76, color(255, 32, 0, 20)},
Manabar = {0.0, color(2, 15, 245, 34), 0.23, color(2, 15, 245, 34), 0.76, color(2, 15, 245, 34)},
}
-- don't change nothing below this if u don't know what u're doing
locationx = ($screenwin.width - 180) / 2 - size / 2
locationy = ($screenwin.height / 2) - (size/2) - 100
locationx2 = locationx + size - ((size + (size * 0.85)) / 2)
locationy2 = locationy + size - ((size + (size * 0.85)) / 2)
auto(100)
if $windowsxp then
setmaskcolorxp(0)
end
hp = 90 / (100 / $hppc )* - 1
mp = 90 / (100 / $mppc)
--both border
setbordercolor(1)
setfillstyle('color', -1)
drawpie(locationx, locationy, size, size, 45, -90)
drawpie(locationx, locationy, size, size, 135, 90)
--manabar
setfillstyle('gradient', 2, 0, 0, 0, 21)
addgradcolors(unpack(HUD_Colors.Manabar))
drawpie(locationx, locationy, size, size, -45, mp)
--hpbar
if $hppc >= 60 and $hppc <= 100 then
setfillstyle('gradient', 2, 0, 0, 0, 21)
addgradcolors(unpack(HUD_Colors.Healthbar))
drawpie(locationx, locationy, size, size, 225, hp)
elseif $hppc >= 30 and $hppc <= 59 then
addgradcolors(unpack(HUD_Colors.Healthbar2))
drawpie(locationx, locationy, size, size, 225, hp)
elseif $hppc < 29 then
addgradcolors(unpack(HUD_Colors.Healthbar3))
drawpie(locationx, locationy, size, size, 225, hp)
end
--transparency
setbordercolor(-1)
setfillstyle('color', -1)
drawcircle(locationx2, locationy2, size * 0.85, size * 0.85)
setfillstyle('color', 0)
setbordercolor(1)
drawarc(locationx2, locationy2, (size * 0.85) - 1, size * 0.85, 135, 90)
drawarc(locationx2, locationy2, size * 0.85, size * 0.85, 45, - 90)
--drawtext(locationx, 423, resh / 2 - 60)
And this work whit the bar of hp of color red
--resize as you wish
local size = 300
local HUD_Colors = {
Healthbar = {0.0, color(255, 32, 0, 20), 0.23, color(255, 32, 0, 20), 0.76, color(255, 32, 0, 20)},
Manabar = {0.0, color(2, 15, 245, 34), 0.23, color(2, 15, 245, 34), 0.76, color(2, 15, 245, 34)},
}
-- don't change nothing below this if u don't know what u're doing
locationx = ($screenwin.width - 180) / 2 - size / 2
locationy = ($screenwin.height / 2) - (size/2) - 100
locationx2 = locationx + size - ((size + (size * 0.85)) / 2)
locationy2 = locationy + size - ((size + (size * 0.85)) / 2)
auto(100)
if $windowsxp then
setmaskcolorxp(0)
end
hp = 90 / (100 / $hppc)* - 1
mp = 90 / (100 / $mppc)
--both border
setbordercolor(1)
setfillstyle('color', -1)
drawpie(locationx, locationy, size, size, 45, -90)
drawpie(locationx, locationy, size, size, 135, 90)
--manabar
setfillstyle('gradient', 2, 0, 0, 0, 21)
addgradcolors(unpack(HUD_Colors.Manabar))
drawpie(locationx, locationy, size, size, -45, mp)
--hpbar
setfillstyle('gradient', 2, 0, 0, 0, 21)
addgradcolors(unpack(HUD_Colors.Healthbar))
drawpie(locationx, locationy, size, size, 225, hp)
--transparency
setbordercolor(-1)
setfillstyle('color', -1)
drawcircle(locationx2, locationy2, size * 0.85, size * 0.85)
setfillstyle('color', 0)
setbordercolor(1)
drawarc(locationx2, locationy2, (size * 0.85) - 1, size * 0.85, 135, 90)
drawarc(locationx2, locationy2, size * 0.85, size * 0.85, 45, - 90)
--drawtext(locationx, 423, resh / 2 - 60)
And here is a image of the HUD script working