local player = game.Players.
LocalPlayer
local UserInputService = game:GetService("UserInputService")
local sizeMultiplier = 1.2 -- Multiplies size by this amount each press (20%
bigger)
local maxSize = 10 -- Optional max scale limit (set to nil for no limit)
local currentScale = 1 -- Tracks overall scale (starts at default size)
-- Function to increase character size uniformly
local function growCharacter()
local character = player.Character
if not character then
warn("Character not found!")
return
end
local humanoid = character:FindFirstChild("Humanoid")
if not humanoid then
warn("Humanoid not found!")
return
end
-- Calculate new scale
currentScale = currentScale * sizeMultiplier
if maxSize and currentScale > maxSize then
currentScale = maxSize
end
-- Scale all parts uniformly, including head
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
-- Define original sizes for key parts
local originalSize = Vector3.new(1, 1, 1) -- Default for most parts
if part.Name == "HumanoidRootPart" then
originalSize = Vector3.new(2, 2, 1) -- R15 root default
elseif part.Name == "Head" then
originalSize = Vector3.new(1.25, 1.25, 1.25) -- Adjusted R15 head default
elseif part.Name == "UpperTorso" or part.Name == "LowerTorso" then
originalSize = Vector3.new(2, 1, 1) -- R15 torso defaults
end
part.Size = originalSize * currentScale
end
end
-- Sync head scale with humanoid properties for consistency
humanoid.HeadScale.Value = currentScale
-- Update movement properties
humanoid.WalkSpeed = 16 * currentScale
humanoid.JumpPower = 50 * currentScale
print("Character scaled to: " .. currentScale)
end
-- Handle character respawn
local function onCharacterAdded(newCharacter)
currentScale = 1 -- Reset scale on respawn
print("Character loaded!")
end
player.CharacterAdded:Connect(onCharacterAdded)
if player.Character then
onCharacterAdded(player.Character)
end
-- Detect "P" key press
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == Enum.KeyCode.P and not gameProcessed then
print("P pressed!")
growCharacter()
end
end)