Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local HEAD_SIZES = {
- Small = Vector3.new(10, 10, 10),
- Large = Vector3.new(13, 13, 13)
- }
- local currentSize = "Large"
- local espOutlines = {}
- local function CreateESP(player)
- local highlight = Instance.new("Highlight", player.Character)
- highlight.OutlineColor = Color3.fromRGB(255, 255, 0) -- Yellow outline
- highlight.FillTransparency = 1 -- Only the outline is visible
- espOutlines[player] = highlight
- end
- local function UpdateESP(player, size)
- if espOutlines[player] then
- espOutlines[player].Adornee = player.Character:FindFirstChild("Head")
- -- Adjust the outline size if necessary based on the head size
- end
- end
- local function UpdateHeadSize(player, size)
- if player.Character and player.Character:FindFirstChild("Head") then
- player.Character.Head.Size = HEAD_SIZES[size]
- UpdateESP(player, size)
- end
- end
- local function DisplayNotification(size)
- game.StarterGui:SetCore("SendNotification", {
- Title = "Head Size",
- Text = "Head size set to " .. size,
- Duration = 2
- })
- end
- local function OnPlayerAdded(player)
- player.CharacterAdded:Connect(function(character)
- CreateESP(player)
- UpdateHeadSize(player, "Large")
- character:WaitForChild("Humanoid").Died:Connect(function()
- UpdateHeadSize(player, "Large")
- end)
- end)
- end
- local function ToggleSize()
- currentSize = (currentSize == "Large") and "Small" or "Large"
- DisplayNotification(currentSize)
- for _, player in ipairs(Players:GetPlayers()) do
- UpdateHeadSize(player, currentSize)
- end
- end
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if not gameProcessed and input.KeyCode == Enum.KeyCode.T then
- ToggleSize()
- end
- end)
- Players.PlayerAdded:Connect(OnPlayerAdded)
- for _, player in ipairs(Players:GetPlayers()) do
- OnPlayerAdded(player)
- end
- RunService.RenderStepped:Connect(function()
- for _, player in ipairs(Players:GetPlayers()) do
- if player.Character and not player.Character:FindFirstChild("Head") then
- if espOutlines[player] then
- espOutlines[player]:Destroy()
- espOutlines[player] = nil
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement