Advertisement
ColdSpecs

ff

Jun 24th, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. local Workspace = game:GetService("Workspace")
  2. local UserInputService = game:GetService("UserInputService")
  3. local StarterGui = game:GetService("StarterGui")
  4.  
  5. local preferredSizeLarge = 13
  6. local preferredSizeSmall = 10
  7. local currentSize = preferredSizeLarge
  8.  
  9. local function CreateHighlight(part)
  10. local highlight = Instance.new("Highlight", part)
  11. highlight.OutlineColor = Color3.fromRGB(255, 0, 0) -- Red outline
  12. highlight.FillTransparency = 0.5 -- Semi-transparent fill
  13. return highlight
  14. end
  15.  
  16. local function SendNotification(size)
  17. local sizeText = (size == preferredSizeLarge) and "Large" or "Small"
  18. StarterGui:SetCore("SendNotification", {
  19. Title = "Head Size",
  20. Text = "Head size set to " .. sizeText,
  21. Duration = 5
  22. })
  23. end
  24.  
  25. local function HighlightModelParts(model)
  26. for _, part in ipairs(model:GetDescendants()) do
  27. if part:IsA("BasePart") then
  28. CreateHighlight(part)
  29. end
  30. end
  31. end
  32.  
  33. local function FindAndHighlightHead(model)
  34. local head = model:FindFirstChild("Head", true)
  35. if head then
  36. head.Size = Vector3.new(currentSize, currentSize, currentSize)
  37. HighlightModelParts(model)
  38. SendNotification(currentSize)
  39. end
  40. end
  41.  
  42. local function ToggleHeadSize()
  43. currentSize = (currentSize == preferredSizeLarge) and preferredSizeSmall or preferredSizeLarge
  44. for _, model in ipairs(Workspace:GetDescendants()) do
  45. if model:IsA("Model") and model:FindFirstChild("Head", true) then
  46. FindAndHighlightHead(model)
  47. end
  48. end
  49. end
  50.  
  51. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  52. if not gameProcessed then
  53. if input.KeyCode == Enum.KeyCode.T then
  54. ToggleHeadSize()
  55. end
  56. end
  57. end)
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement