
Key Required VerifiedUniversal

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local coreGui = game:GetService("CoreGui")
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "StatsHUD"
screenGui.ResetOnSpawn = false
screenGui.Parent = coreGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 220, 0, 140)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BorderSizePixel = 2
frame.BorderColor3 = Color3.fromRGB(255, 255, 255)
frame.Active = true -- Required for dragging
frame.Parent = screenGui
local dragging = false
local dragInput = nil
local dragStart = nil
local startPos = nil
frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
frame.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
RunService.Heartbeat:Connect(function()
if dragging and dragInput then
local delta = dragInput.Position - dragStart
frame.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
end)
local function createStatLabel(posY, color, initialText)
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 0.25, 0)
label.Position = UDim2.new(0, 0, posY, 0)
label.BackgroundTransparency = 1
label.TextColor3 = color
label.TextScaled = true
label.Font = Enum.Font.SourceSansBold
label.Text = initialText
label.Parent = frame
return label
end
local healthLabel = createStatLabel(0, Color3.fromRGB(0, 255, 0), "Health: Loading...")
local maxHealthLabel = createStatLabel(0.25, Color3.fromRGB(0, 255, 255), "MaxHealth: Loading...")
local speedLabel = createStatLabel(0.5, Color3.fromRGB(255, 255, 0), "WalkSpeed: Loading...")
local jumpLabel = createStatLabel(0.75, Color3.fromRGB(0, 162, 255), "JumpPower: Loading...")
local function refreshStats()
local character = player.Character
if not character then return end
local humanoid = character:FindFirstChild("Humanoid")
if not humanoid then return end
healthLabel.Text = string.format("Health: %.1f", humanoid.Health)
maxHealthLabel.Text = string.format("MaxHealth: %.1f", humanoid.MaxHealth)
speedLabel.Text = string.format("WalkSpeed: %.1f", humanoid.WalkSpeed)
jumpLabel.Text = string.format("JumpPower: %.1f", humanoid.JumpPower)
end
player.CharacterAdded:Connect(function(character)
task.wait(0.1)
refreshStats()
local humanoid = character:WaitForChild("Humanoid")
humanoid.HealthChanged:Connect(refreshStats)
humanoid:GetPropertyChangedSignal("MaxHealth"):Connect(refreshStats)
humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(refreshStats)
humanoid:GetPropertyChangedSignal("JumpPower"):Connect(refreshStats)
end)
if player.Character then
refreshStats()
end
local lastUpdate = 0
RunService.Heartbeat:Connect(function()
if tick() - lastUpdate > 1 then
refreshStats()
lastUpdate = tick()
end
end)



Норм