-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] -- Serviços do Roblox local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") -- Configurações do Sistema local LocalPlayer = Players.LocalPlayer local Health_Ativo = false local Distancia_Proximidade = 30 -- Só ativa se estiver a MENOS de 30 studs local Conexao_Render = nil local Elementos_Health = {} -- Interface Principal local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "PlayersHealth_System" ScreenGui.ResetOnSpawn = false ScreenGui.Parent = PlayerGui ---------------------------------------------------------------- -- 1. DESIGN DO BOTÃO FLUTUANTE (MK) ---------------------------------------------------------------- local BotaoMK = Instance.new("TextButton") BotaoMK.Name = "BotaoMK" BotaoMK.Parent = ScreenGui BotaoMK.Size = UDim2.new(0, 60, 0, 60) BotaoMK.Position = UDim2.new(0.05, 0, 0.4, 0) BotaoMK.BackgroundColor3 = Color3.fromRGB(46, 204, 113) -- Verde Lindo BotaoMK.Text = "MK" BotaoMK.TextColor3 = Color3.fromRGB(255, 255, 255) BotaoMK.Font = Enum.Font.GothamBold BotaoMK.TextSize = 22 BotaoMK.BorderSizePixel = 0 BotaoMK.ZIndex = 10 BotaoMK.Active = true local CornerBotao = Instance.new("UICorner") CornerBotao.CornerRadius = UDim.new(1, 0) CornerBotao.Parent = BotaoMK local StrokeBotao = Instance.new("UIStroke") StrokeBotao.Color = Color3.fromRGB(39, 174, 96) StrokeBotao.Thickness = 3 StrokeBotao.Parent = BotaoMK ---------------------------------------------------------------- -- 2. DESIGN DO MENU PRINCIPAL (PLAYERS HEALTH) ---------------------------------------------------------------- local MenuPrincipal = Instance.new("Frame") MenuPrincipal.Name = "MenuPrincipal" MenuPrincipal.Parent = ScreenGui MenuPrincipal.Size = UDim2.new(0, 300, 0, 180) MenuPrincipal.Position = UDim2.new(0.5, -150, 0.5, -90) MenuPrincipal.BackgroundColor3 = Color3.fromRGB(20, 20, 20) -- Fundo Escuro Moderno MenuPrincipal.Visible = false MenuPrincipal.BorderSizePixel = 0 MenuPrincipal.ZIndex = 5 local CornerMenu = Instance.new("UICorner") CornerMenu.CornerRadius = UDim.new(0, 12) CornerMenu.Parent = MenuPrincipal -- Título Atualizado local Titulo = Instance.new("TextLabel") Titulo.Parent = MenuPrincipal Titulo.Size = UDim2.new(1, 0, 0, 45) Titulo.BackgroundTransparency = 1 Titulo.Text = "PLAYERS HEALTH by MKgabriel" Titulo.TextColor3 = Color3.fromRGB(46, 204, 113) Titulo.Font = Enum.Font.GothamBold Titulo.TextSize = 16 Titulo.ZIndex = 6 -- Botão Start/Stop local BotaoStart = Instance.new("TextButton") BotaoStart.Parent = MenuPrincipal BotaoStart.Size = UDim2.new(0, 200, 0, 45) BotaoStart.Position = UDim2.new(0.5, -100, 0.6, -10) BotaoStart.BackgroundColor3 = Color3.fromRGB(46, 204, 113) BotaoStart.Text = "START" BotaoStart.TextColor3 = Color3.fromRGB(255, 255, 255) BotaoStart.Font = Enum.Font.GothamBold BotaoStart.TextSize = 16 BotaoStart.BorderSizePixel = 0 BotaoStart.ZIndex = 6 local CornerStart = Instance.new("UICorner") CornerStart.CornerRadius = UDim.new(0, 8) CornerStart.Parent = BotaoStart ---------------------------------------------------------------- -- 3. SISTEMA DE ARRASTE SEM CONFLITO DE CLIQUE ---------------------------------------------------------------- local arrastando = false local abrindoMenu = true local posicaoClique, posicaoInicialBotao BotaoMK.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then arrastando = true abrindoMenu = true posicaoClique = input.Position posicaoInicialBotao = BotaoMK.Position end end) UserInputService.InputChanged:Connect(function(input) if arrastando and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - posicaoClique if delta.Magnitude > 8 then abrindoMenu = false BotaoMK.Position = UDim2.new(posicaoInicialBotao.X.Scale, posicaoInicialBotao.X.Offset + delta.X, posicaoInicialBotao.Y.Scale, posicaoInicialBotao.Y.Offset + delta.Y) end end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then if arrastando then arrastando = false if abrindoMenu then MenuPrincipal.Visible = not MenuPrincipal.Visible end end end end) ---------------------------------------------------------------- -- 4. LOGICA DE EXIBIÇÃO DE VIDA POR PROXIMIDADE ---------------------------------------------------------------- local function deletarVisualJogador(vPlayer) if Elementos_Health[vPlayer] then if Elementos_Health[vPlayer].Billboard then Elementos_Health[vPlayer].Billboard:Destroy() end Elementos_Health[vPlayer] = nil end end local function limparTodosFiltros() for _, vPlayer in pairs(Players:GetPlayers()) do deletarVisualJogador(vPlayer) end end local function loopVerificacaoHealth() if not Health_Ativo then return end local meuChar = LocalPlayer.Character if not meuChar or not meuChar:FindFirstChild("HumanoidRootPart") then limparTodosFiltros() return end local meuPos = meuChar.HumanoidRootPart.Position for _, vPlayer in pairs(Players:GetPlayers()) do if vPlayer ~= LocalPlayer then local charAlvo = vPlayer.Character if charAlvo and charAlvo:FindFirstChild("HumanoidRootPart") and charAlvo:FindFirstChild("Humanoid") then local humanoid = charAlvo.Humanoid local alvoPos = charAlvo.HumanoidRootPart.Position local distancia = (meuPos - alvoPos).Magnitude -- CONDIÇÃO: Só ativa se estiver PERTO (menos de 30 studs) e vivo if distancia <= Distancia_Proximidade and humanoid.Health > 0 then local vidaAtual = humanoid.Health local vidaMaxima = humanoid.MaxHealth local percentualVida = math.clamp(vidaAtual / vidaMaxima, 0, 1) if not Elementos_Health[vPlayer] then Elementos_Health[vPlayer] = {} -- Criar a interface 3D flutuante acima da cabeça local bb = Instance.new("BillboardGui") bb.Parent = charAlvo.HumanoidRootPart bb.AlwaysOnTop = true bb.Size = UDim2.new(0, 140, 0, 45) bb.ExtentsOffset = Vector3.new(0, 3.5, 0) -- Posição acima da cabeça -- Fundo da Barra de Vida (Parte escura) local bgBarra = Instance.new("Frame") bgBarra.Name = "FundoBarra" bgBarra.Parent = bb bgBarra.Size = UDim2.new(1, 0, 0, 8) bgBarra.Position = UDim2.new(0, 0, 0.7, 0) bgBarra.BackgroundColor3 = Color3.fromRGB(40, 40, 40) bgBarra.BorderSizePixel = 0 local cornerBg = Instance.new("UICorner") cornerBg.CornerRadius = UDim.new(1, 0) cornerBg.Parent = bgBarra -- Barra de Vida Ativa (Preenchimento) local barraPreenchimento = Instance.new("Frame") barraPreenchimento.Name = "Preenchimento" barraPreenchimento.Parent = bgBarra barraPreenchimento.Size = UDim2.new(percentualVida, 0, 1, 0) barraPreenchimento.BorderSizePixel = 0 local cornerPreenchimento = Instance.new("UICorner") cornerPreenchimento.CornerRadius = UDim.new(1, 0) cornerPreenchimento.Parent = barraPreenchimento -- Texto indicador da quantidade de Vida (Ex: "100 / 100 HP") local txtHealth = Instance.new("TextLabel") txtHealth.Parent = bb txtHealth.Size = UDim2.new(1, 0, 0.6, 0) txtHealth.Position = UDim2.new(0, 0, 0, 0) txtHealth.BackgroundTransparency = 1 txtHealth.Text = math.floor(vidaAtual) .. " / " .. math.floor(vidaMaxima) .. " HP" txtHealth.TextColor3 = Color3.fromRGB(255, 255, 255) txtHealth.Font = Enum.Font.GothamBold txtHealth.TextSize = 13 txtHealth.TextStrokeTransparency = 0 -- Borda preta para leitura limpa Elementos_Health[vPlayer].Billboard = bb Elementos_Health[vPlayer].Barra = barraPreenchimento Elementos_Health[vPlayer].Texto = txtHealth else -- Atualizar tamanho da barra e o texto dinamicamente Elementos_Health[vPlayer].Barra.Size = UDim2.new(percentualVida, 0, 1, 0) Elementos_Health[vPlayer].Texto.Text = math.floor(vidaAtual) .. " / " .. math.floor(vidaMaxima) .. " HP" -- Sistema de Cor Dinâmica para a Barra (Verde -> Amarelo -> Vermelho) Elementos_Health[vPlayer].Barra.BackgroundColor3 = Color3.fromHSV(percentualVida * 0.33, 1, 1) -- Força a visibilidade caso estivesse oculto Elementos_Health[vPlayer].Billboard.Enabled = true end else -- Oculta imediatamente se o jogador se afastar mais de 30 studs if Elementos_Health[vPlayer] then Elementos_Health[vPlayer].Billboard.Enabled = false end end else deletarVisualJogador(vPlayer) end end end end -- Limpeza ao sair do jogo Players.PlayerRemoving:Connect(function(vPlayer) deletarVisualJogador(vPlayer) end) -- Gatilho de Ativação do Menu BotaoStart.MouseButton1Click:Connect(function() Health_Ativo = not Health_Ativo if Health_Ativo then BotaoStart.Text = "STOP" BotaoStart.BackgroundColor3 = Color3.fromRGB(231, 76, 60) -- Botão fica Vermelho Conexao_Render = RunService.RenderStepped:Connect(loopVerificacaoHealth) else BotaoStart.Text = "START" BotaoStart.BackgroundColor3 = Color3.fromRGB(46, 204, 113) -- Botão volta a ser Verde if Conexao_Render then Conexao_Render:Disconnect() Conexao_Render = nil end limparTodosFiltros() end end)