Advertisement
ColdSpecs

weird

Jun 24th, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local UserInputService = game:GetService("UserInputService")
  3. local RunService = game:GetService("RunService")
  4.  
  5. local HEAD_SIZES = {
  6. Small = Vector3.new(10, 10, 10),
  7. Large = Vector3.new(13, 13, 13)
  8. }
  9.  
  10. local currentSize = "Large"
  11. local espOutlines = {}
  12.  
  13. local function CreateESP(player)
  14. local highlight = Instance.new("Highlight", player.Character)
  15. highlight.OutlineColor = Color3.fromRGB(255, 255, 0) -- Yellow outline
  16. highlight.FillTransparency = 1 -- Only the outline is visible
  17. espOutlines[player] = highlight
  18. end
  19.  
  20. local function UpdateESP(player, size)
  21. if espOutlines[player] then
  22. espOutlines[player].Adornee = player.Character:FindFirstChild("Head")
  23. -- Adjust the outline size if necessary based on the head size
  24. end
  25. end
  26.  
  27. local function UpdateHeadSize(player, size)
  28. if player.Character and player.Character:FindFirstChild("Head") then
  29. player.Character.Head.Size = HEAD_SIZES[size]
  30. UpdateESP(player, size)
  31. end
  32. end
  33.  
  34. local function DisplayNotification(size)
  35. game.StarterGui:SetCore("SendNotification", {
  36. Title = "Head Size",
  37. Text = "Head size set to " .. size,
  38. Duration = 2
  39. })
  40. end
  41.  
  42. local function OnPlayerAdded(player)
  43. player.CharacterAdded:Connect(function(character)
  44. CreateESP(player)
  45. UpdateHeadSize(player, "Large")
  46. character:WaitForChild("Humanoid").Died:Connect(function()
  47. UpdateHeadSize(player, "Large")
  48. end)
  49. end)
  50. end
  51.  
  52. local function ToggleSize()
  53. currentSize = (currentSize == "Large") and "Small" or "Large"
  54. DisplayNotification(currentSize)
  55. for _, player in ipairs(Players:GetPlayers()) do
  56. UpdateHeadSize(player, currentSize)
  57. end
  58. end
  59.  
  60. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  61. if not gameProcessed and input.KeyCode == Enum.KeyCode.T then
  62. ToggleSize()
  63. end
  64. end)
  65.  
  66. Players.PlayerAdded:Connect(OnPlayerAdded)
  67. for _, player in ipairs(Players:GetPlayers()) do
  68. OnPlayerAdded(player)
  69. end
  70.  
  71. RunService.RenderStepped:Connect(function()
  72. for _, player in ipairs(Players:GetPlayers()) do
  73. if player.Character and not player.Character:FindFirstChild("Head") then
  74. if espOutlines[player] then
  75. espOutlines[player]:Destroy()
  76. espOutlines[player] = nil
  77. end
  78. end
  79. end
  80. end)
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement