Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
20 views1 page

Esp

The document contains a Lua script for creating an ESP (Extra Sensory Perception) effect in a game using Roblox. It defines functions to create a highlight for a player's character based on their team color and sets up the ESP for both existing and new players. The script ensures that the ESP is applied whenever a player's character is added to the game.

Uploaded by

fayoza72012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

Esp

The document contains a Lua script for creating an ESP (Extra Sensory Perception) effect in a game using Roblox. It defines functions to create a highlight for a player's character based on their team color and sets up the ESP for both existing and new players. The script ensures that the ESP is applied whenever a player's character is added to the game.

Uploaded by

fayoza72012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

local players = game:GetService("Players")

local function createESPForCharacter(character, player)


local highlight = Instance.new("Highlight")
highlight.Parent = character
highlight.Adornee = character
highlight.FillTransparency = 1 -- Fully transparent, only outline visible

-- Set the outline color based on team color


if player.Team then
highlight.OutlineColor = player.Team.TeamColor.Color -- Use the player's
team color
else
highlight.OutlineColor = Color3.new(1, 1, 1) -- Default to white if no team
end

highlight.OutlineTransparency = 0 -- Fully visible outline


end

local function createESP(player)


-- Check if the player has a character
local character = player.Character
if character then
createESPForCharacter(character, player)
end

player.CharacterAdded:Connect(function(character)
createESPForCharacter(character, player)
end)
end

local function setupESP()


-- Create ESP for existing players
for _, player in pairs(players:GetPlayers()) do
createESP(player)
end

-- Create ESP for new players that join


players.PlayerAdded:Connect(function(player)
createESP(player)
end)
end

-- Start ESP
spawn(function()
setupESP()
end)

You might also like