universal head hitbox Script works on solara

Description

Universal, OP
OWNED BY ME
Tutorial: Put local Myusername = “Yourusernamehere” For it to work and make your head not size.
Bugs: Head size not showing but Actually has the real headsized Dont worry, Head pushes you alot. So take distance

_G.HeadSize = 12, 12, 12 -- Adjust this value as needed
_G.HumanoidRootPartSize = 5, 5, 5 -- Adjust this value as needed
_G.Disabled = false
local myUsername = "AddYourUsernameOrItwontWork"

local function scaleHitbox(character)
    if character then
        local head = character:FindFirstChild("Head")
        local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")

        if head then
            local mesh = head:FindFirstChildOfClass("SpecialMesh")
            if mesh then
                mesh.Scale = Vector3.new(_G.HeadSize / head.Size.X, _G.HeadSize / head.Size.Y, _G.HeadSize / head.Size.Z)
            else
                -- If the head doesn't have a SpecialMesh, create one
                local newMesh = Instance.new("SpecialMesh", head)
                newMesh.Scale = Vector3.new(_G.HeadSize / head.Size.X, _G.HeadSize / head.Size.Y, _G.HeadSize / head.Size.Z)
            end
            head.Size = Vector3.new(_G.HeadSize, _G.HeadSize, _G.HeadSize)
        end

        if humanoidRootPart then
            humanoidRootPart.Size = Vector3.new(_G.HumanoidRootPartSize, _G.HumanoidRootPartSize, _G.HumanoidRootPartSize)
            humanoidRootPart.Transparency = 0.7
            humanoidRootPart.BrickColor = BrickColor.new("Really blue")
            humanoidRootPart.Material = "Neon"
            humanoidRootPart.CanCollide = false
        end
    end
end

local function resizeParts(character)
    local head = character:FindFirstChild("Head")
    local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")

    if not head then
        -- Create a new head if it doesn't exist
        local newHead = Instance.new("Part")
        newHead.Name = "Head"
        newHead.Size = Vector3.new(12, 12, 12)
        newHead.Parent = character
    else
        head.Size = Vector3.new(12, 12, 12)
    end

    if humanoidRootPart then
        humanoidRootPart.Size = Vector3.new(5, 5, 5)
    end
end

local function onCharacterAdded(character)
    -- Wait for the character to load completely
    character:WaitForChild("Humanoid")

    -- Resize parts
    resizeParts(character)

    -- Connect to Humanoid's Died event to handle respawn
    character:WaitForChild("Humanoid").Died:Connect(function()
        -- Wait for the character to respawn
        character:WaitForChild("Humanoid").Died:Wait()

        -- Resize parts again after respawn
        resizeParts(character)
    end)
end

local function onPlayerAdded(player)
    -- Check if the player is not you
    if player.Name ~= myUsername then
        -- Connect to the CharacterAdded event
        player.CharacterAdded:Connect(onCharacterAdded)

        -- Apply resizing if the character already exists
        if player.Character then
            onCharacterAdded(player.Character)
        end
    end
end

-- Connect to the PlayerAdded event to handle players joining the game
game:GetService('Players').PlayerAdded:Connect(onPlayerAdded)

-- Apply resizing to all current players
for _, player in ipairs(game:GetService('Players'):GetPlayers()) do
    onPlayerAdded(player)
end

-- Continuous loop to ensure hitboxes remain scaled
game:GetService('RunService').RenderStepped:Connect(function()
    if not _G.Disabled then
        for _, player in pairs(game:GetService('Players'):GetPlayers()) do
            if player ~= game:GetService('Players').LocalPlayer then
                pcall(function() 
                    scaleHitbox(player.Character)
                    -- Ensure head size is maintained
                    if player.Character and player.Character:FindFirstChild("Head") then
                        player.Character.Head.Size = Vector3.new(_G.HeadSize, _G.HeadSize, _G.HeadSize)
                    end
                end)
            end
        end
    end
end)

-- Disable collision with the local player's character
local function disableCollision(character)
    for _, part in pairs(character:GetDescendants()) do
        if part:IsA("BasePart") then
            part.CanCollide = false
        end
    end
end

local localPlayer = game:GetService('Players').LocalPlayer
localPlayer.CharacterAdded:Connect(disableCollision)

if localPlayer.Character then
    disableCollision(localPlayer.Character)
end

⚠️ Warning: Do not download any extensions or anything other than .txt/.lua file, because script will download only in .txt/.lua format or It will redirect you to a pastebin link.

📋 Notice: If you find any of the scripts patched or not working, please report it to Forever4D through Discord. The script will be removed or marked as patched!