What's new
Heapleak - Scripthub

Get the most out of HeapLeak by creating a free account! Once signed in, you’ll gain full access to restricted content, be able to share your own scripts, and participate in our member-only discussions.

SCPRP | ESP Script | Boxes | Names (+Team), Health, Tracers

Version / Update: v1.0.0
Download / Script Link
-- =============================================
-- SCP: Roleplay ESP Script (by Luc1d)
-- Features: Boxes, Names (+ Team), Health, Distance, Tracers
-- Toggle: INSERT key
-- Works in SCP: Roleplay (standard Roblox characters)
-- Paste into any executor (Krnl, Fluxus, Delta, etc.)
-- =============================================

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Workspace = game:GetService("Workspace")
local Camera = Workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer

-- ================== SETTINGS ==================
local ESPSettings = {
Enabled = true,
Boxes = true,
Names = true,
Health = true,
Distance = true,
Tracers = true,
TeamColor = true, -- false = always red for enemies
BoxThickness = 2,
TextSize = 14,
TracerThickness = 1.5,
BoxTransparency = 1,
}

-- ================== TABLES ==================
local ESP = {} -- [player] = {Box, Name, Health, Distance, Tracer}

-- ================== COLOR HELPER ==================
local function GetESPColor(player)
if ESPSettings.TeamColor and player.Team and LocalPlayer.Team and player.Team == LocalPlayer.Team then
return player.Team.TeamColor.Color
end
return Color3.fromRGB(255, 0, 0) -- red for enemies / no team
end

-- ================== CREATE ESP FOR PLAYER ==================
local function CreateESP(player)
if player == LocalPlayer then return end

local drawings = {}

-- Box
drawings.Box = Drawing.new("Square")
drawings.Box.Thickness = ESPSettings.BoxThickness
drawings.Box.Filled = false
drawings.Box.Transparency = ESPSettings.BoxTransparency
drawings.Box.Visible = false

-- Name
drawings.Name = Drawing.new("Text")
drawings.Name.Size = ESPSettings.TextSize
drawings.Name.Center = true
drawings.Name.Outline = true
drawings.Name.Color = Color3.new(1, 1, 1)
drawings.Name.Visible = false

-- Health
drawings.Health = Drawing.new("Text")
drawings.Health.Size = ESPSettings.TextSize
drawings.Health.Center = false
drawings.Health.Outline = true
drawings.Health.Visible = false

-- Distance
drawings.Distance = Drawing.new("Text")
drawings.Distance.Size = ESPSettings.TextSize
drawings.Distance.Center = true
drawings.Distance.Outline = true
drawings.Distance.Color = Color3.new(1, 1, 1)
drawings.Distance.Visible = false

-- Tracer
drawings.Tracer = Drawing.new("Line")
drawings.Tracer.Thickness = ESPSettings.TracerThickness
drawings.Tracer.Transparency = 1
drawings.Tracer.Visible = false

ESP[player] = drawings
end

-- ================== UPDATE LOOP ==================
local function UpdateESP()
if not ESPSettings.Enabled then
for _, drawings in pairs(ESP) do
for __, drawing in pairs(drawings) do
drawing.Visible = false
end
end
return
end

for player, drawings in pairs(ESP) do
local character = player.Character
if not character or not character:FindFirstChild("Humanoid") or not character:FindFirstChild("HumanoidRootPart") or not character:FindFirstChild("Head") then
for _, drawing in pairs(drawings) do drawing.Visible = false end
continue
end

local humanoid = character.Humanoid
local rootPart = character.HumanoidRootPart
local head = character.Head

-- Check if on screen
local _, onScreen = Camera:WorldToViewportPoint(rootPart.Position)
if not onScreen then
for _, drawing in pairs(drawings) do drawing.Visible = false end
continue
end

-- Box calculation (works great in SCP: Roleplay)
local headPos = Camera:WorldToViewportPoint(head.Position + Vector3.new(0, 0.5, 0))
local feetPos = Camera:WorldToViewportPoint(rootPart.Position - Vector3.new(0, 3.5, 0))

local boxHeight = headPos.Y - feetPos.Y
local boxWidth = boxHeight * 0.65 -- perfect ratio for Roblox avatars
local boxPosition = Vector2.new(headPos.X - boxWidth / 2, headPos.Y)

-- Box
if ESPSettings.Boxes then
drawings.Box.Size = Vector2.new(boxWidth, boxHeight)
drawings.Box.Position = boxPosition
drawings.Box.Color = GetESPColor(player)
drawings.Box.Visible = true
else
drawings.Box.Visible = false
end

-- Name
if ESPSettings.Names then
drawings.Name.Text = player.Name .. (player.Team and " [" .. player.Team.Name .. "]" or "")
drawings.Name.Position = Vector2.new(boxPosition.X + boxWidth / 2, boxPosition.Y - 20)
drawings.Name.Visible = true
else
drawings.Name.Visible = false
end

-- Health
if ESPSettings.Health then
local healthText = math.floor(humanoid.Health) .. "/" .. math.floor(humanoid.MaxHealth)
local healthColor = Color3.fromRGB(255 * (1 - humanoid.Health / humanoid.MaxHealth), 255 * (humanoid.Health / humanoid.MaxHealth), 0)
drawings.Health.Text = healthText
drawings.Health.Position = Vector2.new(boxPosition.X + boxWidth + 5, boxPosition.Y)
drawings.Health.Color = healthColor
drawings.Health.Visible = true
else
drawings.Health.Visible = false
end

-- Distance
if ESPSettings.Distance and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
local myRoot = LocalPlayer.Character.HumanoidRootPart
local dist = (rootPart.Position - myRoot.Position).Magnitude
drawings.Distance.Text = math.floor(dist) .. " studs"
drawings.Distance.Position = Vector2.new(boxPosition.X + boxWidth / 2, boxPosition.Y + boxHeight + 5)
drawings.Distance.Visible = true
else
drawings.Distance.Visible = false
end

-- Tracers
if ESPSettings.Tracers then
drawings.Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y)
drawings.Tracer.To = Vector2.new(boxPosition.X + boxWidth / 2, boxPosition.Y + boxHeight)
drawings.Tracer.Color = GetESPColor(player)
drawings.Tracer.Visible = true
else
drawings.Tracer.Visible = false
end
end
end

-- ================== SETUP ==================
-- Create ESP for existing players
for _, player in ipairs(Players:GetPlayers()) do
CreateESP(player)
end

-- New players
Players.PlayerAdded:Connect(CreateESP)

-- Player leaving cleanup
Players.PlayerRemoving:Connect(function(player)
if ESP[player] then
for _, drawing in pairs(ESP[player]) do
drawing:Remove()
end
ESP[player] = nil
end
end)

-- Toggle with INSERT key
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Insert then
ESPSettings.Enabled = not ESPSettings.Enabled
print("SCP: Roleplay ESP " .. (ESPSettings.Enabled and "ENABLED" or "DISABLED"))
end
end)

-- Main loop
RunService.RenderStepped:Connect(UpdateESP)

print("✅ SCP: Roleplay ESP loaded! Press INSERT to toggle.")
[ View More ]
faead4a1-8480-4407-a537-7c33652e979c.webp


-- SCP: Roleplay ESP Script (by Luc1d)-- Features: Boxes, Names (+ Team), Health, Distance, Tracers-- Toggle: INSERT key-- Works in SCP: Roleplay (standard Roblox characters)-- Paste into any executor (Krnl, Fluxus, Delta, etc.)
 
Works on mobile
  1. Yes
Back
Top