
KeylessUniversal

local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local Lighting = game:GetService("Lighting")
local SoundService = game:GetService("SoundService")
local Debris = game:GetService("Debris")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
print("⚫ HealthUI GRAYSCALE + DYNAMIC VOLUME + BLINK - LOADED!")
-- Remove old GUI if exists
local oldGui = playerGui:FindFirstChild("HealthUI")
if oldGui then oldGui:Destroy() end
-- Screen GUI
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "HealthUI"
screenGui.ResetOnSpawn = false
screenGui.IgnoreGuiInset = true
screenGui.Parent = playerGui
-- Health frame
local healthFrame = Instance.new("Frame")
healthFrame.Name = "HealthFrame"
healthFrame.Size = UDim2.new(0, 240, 0, 36)
healthFrame.Position = UDim2.new(0, 16, 1, -50)
healthFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
healthFrame.BackgroundTransparency = 0.15
healthFrame.BorderSizePixel = 0
healthFrame.ClipsDescendants = true
healthFrame.Parent = screenGui
local healthCorner = Instance.new("UICorner")
healthCorner.CornerRadius = UDim.new(0, 16)
healthCorner.Parent = healthFrame
-- Health bar background
local healthBarBg = Instance.new("Frame")
healthBarBg.Name = "HealthBarBg"
healthBarBg.AnchorPoint = Vector2.new(0, 0.5)
healthBarBg.Position = UDim2.new(0, 8, 0.5, 0)
healthBarBg.Size = UDim2.new(0, 200, 0, 22)
healthBarBg.BackgroundColor3 = Color3.fromRGB(40, 0, 0)
healthBarBg.BorderSizePixel = 0
healthBarBg.Parent = healthFrame
local bgCorner = Instance.new("UICorner")
bgCorner.CornerRadius = UDim.new(0, 11)
bgCorner.Parent = healthBarBg
-- Health bar
local healthBar = Instance.new("Frame")
healthBar.Name = "HealthBar"
healthBar.AnchorPoint = Vector2.new(0, 0.5)
healthBar.Position = UDim2.new(0, 0, 0.5, 0)
healthBar.Size = UDim2.new(1, 0, 1, 0)
healthBar.BackgroundColor3 = Color3.fromHSV(1/3, 1, 1)
healthBar.BorderSizePixel = 0
healthBar.Parent = healthBarBg
local healthBarCorner = Instance.new("UICorner")
healthBarCorner.CornerRadius = UDim.new(0, 11)
healthBarCorner.Parent = healthBar
-- Health text
local healthText = Instance.new("TextLabel")
healthText.Name = "HealthText"
healthText.Size = UDim2.new(0, 110, 1, 0)
healthText.Position = UDim2.new(1, -118, 0, 0)
healthText.BackgroundTransparency = 1
healthText.Text = "100/100"
healthText.TextColor3 = Color3.fromRGB(255, 255, 255)
healthText.TextStrokeTransparency = 0
healthText.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
healthText.Font = Enum.Font.GothamBold
healthText.TextScaled = true
healthText.TextXAlignment = Enum.TextXAlignment.Right
healthText.Parent = healthFrame
-- Death screen
local deathScreen = Instance.new("Frame")
deathScreen.Name = "DeathScreen"
deathScreen.Size = UDim2.new(1, 0, 1, 0)
deathScreen.BackgroundColor3 = Color3.new(0,0,0)
deathScreen.BackgroundTransparency = 1
deathScreen.ZIndex = 100
deathScreen.Parent = screenGui
-- Color correction effect
local cce = Lighting:FindFirstChild("HealthDesat")
if cce then cce:Destroy() end
cce = Instance.new("ColorCorrectionEffect")
cce.Name = "HealthDesat"
cce.Saturation = 0
cce.Parent = Lighting
-- Blur effect
local blur = Lighting:FindFirstChild("HealthBlur")
if blur then blur:Destroy() end
blur = Instance.new("BlurEffect")
blur.Name = "HealthBlur"
blur.Size = 0
blur.Parent = Lighting
-- Sound group for dynamic volume
local healthSoundGroup = Instance.new("SoundGroup")
healthSoundGroup.Name = "HealthVolumeGroup"
healthSoundGroup.Volume = 1
healthSoundGroup.Parent = SoundService
local function assignToGroup(parent)
for _, obj in ipairs(parent:GetDescendants()) do
if obj:IsA("Sound") and not obj:IsDescendantOf(playerGui) then
obj.SoundGroup = healthSoundGroup
end
end
end
assignToGroup(workspace)
assignToGroup(game.Players)
workspace.DescendantAdded:Connect(function(desc)
if desc:IsA("Sound") then
desc.SoundGroup = healthSoundGroup
end
end)
-- Health update
local connections = {}
local function updateHealth(hp, maxHp)
local percent = hp / maxHp
local hue = (percent / 3)
TweenService:Create(healthBar, TweenInfo.new(0.4, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {
Size = UDim2.new(percent, 0, 1, 0),
BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
}):Play()
healthText.Text = math.floor(hp).."/"..maxHp
-- Grayscale
local desatAmount = math.min((1 - percent) * 1.2, 1) * -1
TweenService:Create(cce, TweenInfo.new(0.5, Enum.EasingStyle.Quart), {Saturation = desatAmount}):Play()
-- Optional contrast tweak for low health
if percent < 0.2 then
TweenService:Create(cce, TweenInfo.new(0.5), {Contrast = 0.1}):Play()
else
TweenService:Create(cce, TweenInfo.new(0.5), {Contrast = 0}):Play()
end
-- Blur effect
local blurAmount = math.clamp((0.2 - percent) * 50, 0, 8)
TweenService:Create(blur, TweenInfo.new(0.5), {Size = blurAmount}):Play()
-- Volume fade
local minVolume = 0.2
local targetVol = minVolume + (1 - minVolume) * percent
TweenService:Create(healthSoundGroup, TweenInfo.new(0.6, Enum.EasingStyle.Quart), {Volume = targetVol}):Play()
end
-- Death
local function onDied()
healthSoundGroup.Volume = 0
TweenService:Create(cce, TweenInfo.new(1), {Saturation = -1}):Play()
TweenService:Create(blur, TweenInfo.new(1), {Size = 8}):Play()
task.delay(1, function()
TweenService:Create(deathScreen, TweenInfo.new(0.6), {BackgroundTransparency = 0}):Play()
end)
end
-- Character setup
local function setupCharacter(char)
TweenService:Create(cce, TweenInfo.new(0.5), {Saturation = 0}):Play()
healthSoundGroup.Volume = 1
for _, conn in pairs(connections) do conn:Disconnect() end
connections = {}
local hum = char:WaitForChild("Humanoid", 10)
if not hum then return end
assignToGroup(char)
task.wait(0.5)
updateHealth(hum.Health, hum.MaxHealth)
local lastHp = hum.Health
connections[#connections+1] = hum.HealthChanged:Connect(function(hp)
updateHealth(hp, hum.MaxHealth)
if hp < lastHp then
-- Red flash for damage
local flash = Instance.new("Frame")
flash.Size = UDim2.new(1,0,1,0)
flash.BackgroundColor3 = Color3.fromRGB(255,0,0)
flash.BackgroundTransparency = 0.7
flash.ZIndex = 200
flash.Parent = screenGui
TweenService:Create(flash, TweenInfo.new(0.3), {BackgroundTransparency = 1}):Play()
Debris:AddItem(flash, 0.35)
end
lastHp = hp
end)
connections[#connections+1] = hum.Died:Connect(onDied)
TweenService:Create(deathScreen, TweenInfo.new(0.8, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play()
end
player.CharacterAdded:Connect(setupCharacter)
if player.Character then
setupCharacter(player.Character)
end
-- Blink mechanic
local blinkTimer = 0
local blinkInterval = 5 + math.random() * 5
RunService.RenderStepped:Connect(function(dt)
blinkTimer += dt
if blinkTimer >= blinkInterval then
local blinkOverlay = Instance.new("Frame")
blinkOverlay.Size = UDim2.new(1,0,1,0)
blinkOverlay.BackgroundColor3 = Color3.new(0,0,0)
blinkOverlay.BackgroundTransparency = 1
blinkOverlay.ZIndex = 1000
blinkOverlay.Parent = screenGui
local tweenInfo = TweenInfo.new(0.1, Enum.EasingStyle.Quad)
TweenService:Create(blinkOverlay, tweenInfo, {BackgroundTransparency = 0}):Play()
task.delay(0.1, function()
TweenService:Create(blinkOverlay, tweenInfo, {BackgroundTransparency = 1}):Play()
Debris:AddItem(blinkOverlay, 0.2)
end)
blinkTimer = 0
blinkInterval = 5 + math.random() * 5
end
end)
print("✅ GRAYSCALE + WORLD VOLUME FADES + BLINK LIVE! Take damage & feel it! ⚫🔇")No comments yet for this script.



