Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Workspace = game:GetService("Workspace")
- local UserInputService = game:GetService("UserInputService")
- local StarterGui = game:GetService("StarterGui")
- local preferredSizeLarge = 13
- local preferredSizeSmall = 10
- local currentSize = preferredSizeLarge
- local function CreateHighlight(part)
- local highlight = Instance.new("Highlight", part)
- highlight.OutlineColor = Color3.fromRGB(255, 0, 0) -- Red outline
- highlight.FillTransparency = 0.5 -- Semi-transparent fill
- return highlight
- end
- local function SendNotification(size)
- local sizeText = (size == preferredSizeLarge) and "Large" or "Small"
- StarterGui:SetCore("SendNotification", {
- Title = "Head Size",
- Text = "Head size set to " .. sizeText,
- Duration = 5
- })
- end
- local function HighlightModelParts(model)
- for _, part in ipairs(model:GetDescendants()) do
- if part:IsA("BasePart") then
- CreateHighlight(part)
- end
- end
- end
- local function FindAndHighlightHead(model)
- local head = model:FindFirstChild("Head", true)
- if head then
- head.Size = Vector3.new(currentSize, currentSize, currentSize)
- HighlightModelParts(model)
- SendNotification(currentSize)
- end
- end
- local function ToggleHeadSize()
- currentSize = (currentSize == preferredSizeLarge) and preferredSizeSmall or preferredSizeLarge
- for _, model in ipairs(Workspace:GetDescendants()) do
- if model:IsA("Model") and model:FindFirstChild("Head", true) then
- FindAndHighlightHead(model)
- end
- end
- end
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if not gameProcessed then
- if input.KeyCode == Enum.KeyCode.T then
- ToggleHeadSize()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement