local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()
-- Place this in a LocalScript under StarterPlayerScripts or StarterCharacterScripts
-- Setup the ESP UI
local function createESP(player)
local character = player.Character
if not character then return end
-- Create the Billboard GUI
local billboardGui = Instance.new("BillboardGui")
billboardGui.Adornee = character:WaitForChild("Head") -- Attaches to player's head
billboardGui.Parent = character:WaitForChild("Head")
billboardGui.Size = UDim2.new(0, 200, 0, 50) -- Size of the ESP box
billboardGui.StudsOffset = Vector3.new(0, 3, 0) -- Position offset above the head
-- Create a TextLabel for the player's name and health
local textLabel = Instance.new("TextLabel")
textLabel.Parent = billboardGui
textLabel.Size = UDim2.new(1, 0, 1, 0)
textLabel.BackgroundTransparency = 1 -- Make it transparent
textLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- Text color (white)
textLabel.TextSize = 14
textLabel.Text = player.Name .. " | Health: " .. math.floor(player.Character:WaitForChild("Humanoid").Health)
-- Update the health value
local function updateHealth()
if player.Character and player.Character:FindFirstChild("Humanoid") then
local humanoid = player.Character:FindFirstChild("Humanoid")
textLabel.Text = player.Name .. " | Health: " .. math.floor(humanoid.Health)
end
end
-- Update health on every health change
player.Character:WaitForChild("Humanoid").HealthChanged:Connect(updateHealth)
end
-- Function to create ESP for all players
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
createESP(player)
end)
end)
-- Cleanup when the player leaves
game.Players.PlayerRemoving:Connect(function(player)
if player.Character and player.Character:FindFirstChild("Head") then
local billboardGui = player.Character.Head:FindFirstChild("BillboardGui")
if billboardGui then
billboardGui:Destroy()
end
end
end)
To embed this program on your website, copy the following code and paste it into your website's HTML: