if health or value smaller then 50 then…
(THERES SHALL BE LIKE 25 )
but how u see theres showing rotated 50 proc,
theres script,
(mine)
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local leftFrame = script.Parent:WaitForChild("LeftBG"):WaitForChild("LeftFrame")
local rightFrame = script.Parent:WaitForChild("RightBG"):WaitForChild("RightFrame")
local textLabel = script.Parent.Text
local healthValue = script.HealthValue
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out)
local numValue = Instance.new("NumberValue")
numValue.Parent = script
local function updateCircularBar()
local rightRot = math.clamp(numValue.Value, 0, 180)
rightFrame.Rotation = -rightRot
if numValue.Value > 180 then
leftFrame.Visible = true
local leftRot = math.clamp(numValue.Value - 180, 0, 180)
leftFrame.Rotation = -leftRot
else
leftFrame.Visible = false
end
end
numValue.Changed:Connect(updateCircularBar)
local function updateHealth()
local healthPercentage = (humanoid.Health / humanoid.MaxHealth) * 360
local healthTween = ts:Create(numValue, ti, {Value = healthPercentage})
healthTween:Play()
local currentHealth = math.floor(humanoid.Health + 0.5)
healthValue.Value = currentHealth
textLabel.Text = tostring(currentHealth)
local oldText = textLabel:Clone()
oldText.Parent = textLabel.Parent
oldText.Text = tostring(currentHealth)
oldText.Position = UDim2.new(0, 0, 0, 0)
local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local goal = {Position = UDim2.new(0, 0, 1, 0), TextTransparency = 1}
local tween = ts:Create(oldText, tweenInfo, goal)
tween:Play()
tween.Completed:Connect(function()
oldText:Destroy()
end)
end
humanoid.HealthChanged:Connect(updateHealth)
updateHealth()
player.Character.Humanoid.Changed:Connect(function()
script.HealthValue.Value = math.floor(player.Character.Humanoid.Health + 0.5)
local cvalue = script.HealthValue.Value
script.Parent.SShadow.Text = math.floor(cvalue + 0.5)
script.Parent.Shadow1.Text = math.floor(cvalue + 0.5)
end)
and original normally working script
local leftFrame = script.Parent:WaitForChild("LeftBG"):WaitForChild("LeftFrame")
local rightFrame = script.Parent:WaitForChild("RightBG"):WaitForChild("RightFrame")
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(5, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut)
local numValue = Instance.new("NumberValue")
numValue.Changed:Connect(function()
local rightRot = math.clamp(numValue.Value - 180, -180, 0)
rightFrame.Rotation = rightRot
if numValue.Value <= 180 then
leftFrame.Visible = false
else
local leftRot = math.clamp(numValue.Value - 360, -180, 0)
leftFrame.Rotation = leftRot
leftFrame.Visible = true
end
end)
function progressBar()
numValue.Value = 0
local progressTween = ts:Create(numValue, ti, {Value = 360})
progressTween:Play()
end
progressBar()
idk help plez