var anim = render.newContinualAnimation()
script.onRender2D(function (event) {
var target = client.getAuraTarget()
if (!target) return null
var healthbarWidth = 100
var healthPercentage = target.getHealth() / target.getMaxHealth()
anim.animate(healthbarWidth * healthPercentage, 18)
render.drawRect(100, 100, anim.getOutput(), 80, color({red: 255, green: 255, blue: 255}))
})