Dynamic Hitboxes
Key Required

Dynamic Hitboxes

[UPD] Volleyball Legendsdream66rusdream66rus 2.4K views 662 executesUpdated Jan 10, 2026
5.0/ 5(2 votes)
20100% Positive
Lua Script•399 lines (10317 chars)
-- [⚡] RAGE mode - Dynamic Hitboxes
-- Educational purposes only

local Services = {
    Players = game:GetService("Players"),
    RunService = game:GetService("RunService"),
    Workspace = game:GetService("Workspace"),
    CoreGui = game:GetService("CoreGui"),
    TeleportService = game:GetService("TeleportService"),
    UserInputService = game:GetService("UserInputService")
}

local LocalPlayer = Services.Players.LocalPlayer
local Camera = Services.Workspace.CurrentCamera

-- ============================
-- SIMPLE RAYFIELD LOADER (FIXED)
-- ============================
local Rayfield, Window

-- Try loading Rayfield
local function LoadRayfield()
    for _, url in pairs({
        "https://sirius.menu/rayfield",
        "https://raw.githubusercontent.com/shlexware/Rayfield/main/source"
    }) do
        local success, result = pcall(function()
            return loadstring(game:HttpGet(url))()
        end)
        
        if success and result then
            return result
        end
    end
    return nil
end

-- Create UI
Rayfield = LoadRayfield()

if not Rayfield then
    warn("Rayfield failed to load")
    return
end

Window = Rayfield:CreateWindow({
    Name = "🎯 Dynamic Hitboxes",
    LoadingTitle = "⚡ Loading System...",
    LoadingSubtitle = "Dynamic Hitbox System",
    ConfigurationSaving = {Enabled = true, FileName = "HitboxConfig"},
    KeySystem = false,
    Theme = "Dark",
    ToggleUIKeybind = Enum.KeyCode.K
})

-- ============================
-- DYNAMIC HITBOX SYSTEM
-- ============================
local Hitbox = {
    Enabled = false,
    Interval = 5,
    MinSize = 1.0,
    MaxSize = 8.0,
    CurrentSize = 3.0,
    Color = Color3.fromRGB(0, 255, 100),
    Transparency = 0.35,
    UpdateThread = nil
}

function Hitbox:Unload()
    -- Stop everything
    self.Enabled = false
    
    if self.UpdateThread then
        self.UpdateThread:Disconnect()
        self.UpdateThread = nil
    end
    
    -- Remove all hitboxes
    for _, model in ipairs(Services.Workspace:GetChildren()) do
        if model:IsA("Model") and model.Name:match("^CLIENT_BALL_%d+$") then
            local hitbox = model:FindFirstChild("DYNAMIC_HITBOX")
            if hitbox then hitbox:Destroy() end
        end
    end
    
    -- Destroy UI
    if Rayfield and Rayfield.Destroy then
        Rayfield:Destroy()
    end
    
    print("[🔴] System unloaded")
end

function Hitbox:GetRandomSize()
    return math.random(self.MinSize * 10, self.MaxSize * 10) / 10
end

function Hitbox:ApplyToBall(model)
    if not model:IsA("Model") then return end
    if not model.Name:match("^CLIENT_BALL_%d+$") then return end
    
    -- Find base part
    local basePart
    for _, child in ipairs(model:GetDescendants()) do
        if child:IsA("BasePart") then
            basePart = child
            break
        end
    end
    
    if not basePart then return end
    
    -- Create or update hitbox
    local hitbox = model:FindFirstChild("DYNAMIC_HITBOX")
    
    if not hitbox then
        hitbox = Instance.new("Part")
        hitbox.Name = "DYNAMIC_HITBOX"
        hitbox.Shape = Enum.PartType.Ball
        hitbox.Size = Vector3.new(2, 2, 2) * self.CurrentSize
        hitbox.CFrame = basePart.CFrame
        hitbox.Anchored = true
        hitbox.CanCollide = false
        hitbox.Transparency = self.Transparency
        hitbox.Material = Enum.Material.Neon
        hitbox.Color = self.Color
        hitbox.Parent = model
    else
        hitbox.Size = Vector3.new(2, 2, 2) * self.CurrentSize
        hitbox.Transparency = self.Transparency
        hitbox.Color = self.Color
    end
end

function Hitbox:UpdateAll()
    if not self.Enabled then return end
    
    self.CurrentSize = self:GetRandomSize()
    
    for _, model in ipairs(Services.Workspace:GetChildren()) do
        if model:IsA("Model") and model.Name:match("^CLIENT_BALL_%d+$") then
            self:ApplyToBall(model)
        end
    end
end

function Hitbox:StartAutoUpdate()
    if self.UpdateThread then
        self.UpdateThread:Disconnect()
    end
    
    self.UpdateThread = Services.RunService.Heartbeat:Connect(function()
        if tick() - (self.LastUpdate or 0) >= self.Interval then
            self:UpdateAll()
            self.LastUpdate = tick()
        end
    end)
end

function Hitbox:Cleanup()
    for _, model in ipairs(Services.Workspace:GetChildren()) do
        if model:IsA("Model") and model.Name:match("^CLIENT_BALL_%d+$") then
            local hitbox = model:FindFirstChild("DYNAMIC_HITBOX")
            if hitbox then hitbox:Destroy() end
        end
    end
    
    if self.UpdateThread then
        self.UpdateThread:Disconnect()
        self.UpdateThread = nil
    end
end

-- Monitor new balls
Services.Workspace.ChildAdded:Connect(function(child)
    if child:IsA("Model") and child.Name:match("^CLIENT_BALL_%d+$") then
        task.wait(0.1)
        if Hitbox.Enabled then
            Hitbox:ApplyToBall(child)
        end
    end
end)

-- ============================
-- 🎯 UI CONTROLS
-- ============================
local MainTab = Window:CreateTab("🎯 Hitboxes", "target")

MainTab:CreateToggle({
    Name = "⚡ Enable Hitboxes",
    CurrentValue = Hitbox.Enabled,
    Callback = function(state)
        Hitbox.Enabled = state
        
        if state then
            Hitbox:StartAutoUpdate()
            Hitbox:UpdateAll()
            Rayfield:Notify({
                Title = "✅ Hitboxes ON",
                Content = "Auto-updating every " .. Hitbox.Interval .. "s",
                Duration = 3
            })
        else
            Hitbox:Cleanup()
            Rayfield:Notify({
                Title = "⛔ Hitboxes OFF",
                Content = "All hitboxes removed",
                Duration = 3
            })
        end
    end
})

MainTab:CreateSlider({
    Name = "🔄 Update Interval",
    Range = {1, 30},
    Increment = 1,
    Suffix = " seconds",
    CurrentValue = Hitbox.Interval,
    Callback = function(value)
        Hitbox.Interval = value
        if Hitbox.Enabled then
            Hitbox:StartAutoUpdate()
        end
    end
})

MainTab:CreateSlider({
    Name = "📏 Min Size",
    Range = {0.5, 5},
    Increment = 0.1,
    Suffix = "x",
    CurrentValue = Hitbox.MinSize,
    Callback = function(value)
        Hitbox.MinSize = value
        if Hitbox.Enabled then
            Hitbox:UpdateAll()
        end
    end
})

MainTab:CreateSlider({
    Name = "📐 Max Size",
    Range = {1, 15},
    Increment = 0.1,
    Suffix = "x",
    CurrentValue = Hitbox.MaxSize,
    Callback = function(value)
        Hitbox.MaxSize = value
        if Hitbox.Enabled then
            Hitbox:UpdateAll()
        end
    end
})

MainTab:CreateColorPicker({
    Name = "🎨 Color",
    Color = Hitbox.Color,
    Callback = function(color)
        Hitbox.Color = color
        if Hitbox.Enabled then
            Hitbox:UpdateAll()
        end
    end
})

MainTab:CreateSlider({
    Name = "🔍 Transparency",
    Range = {0, 1},
    Increment = 0.05,
    Suffix = "",
    CurrentValue = Hitbox.Transparency,
    Callback = function(value)
        Hitbox.Transparency = value
        if Hitbox.Enabled then
            Hitbox:UpdateAll()
        end
    end
})

MainTab:CreateButton({
    Name = "🔄 Update Now",
    Callback = function()
        if Hitbox.Enabled then
            Hitbox:UpdateAll()
            Rayfield:Notify({
                Title = "⚡ Updated",
                Content = "New sizes applied",
                Duration = 2
            })
        end
    end
})

MainTab:CreateButton({
    Name = "🎲 Random Color",
    Callback = function()
        Hitbox.Color = Color3.fromRGB(
            math.random(50, 255),
            math.random(50, 255),
            math.random(50, 255)
        )
        
        if Hitbox.Enabled then
            Hitbox:UpdateAll()
        end
        
        Rayfield:Notify({
            Title = "🌈 Random Color",
            Content = string.format("RGB(%d, %d, %d)",
                math.floor(Hitbox.Color.R * 255),
                math.floor(Hitbox.Color.G * 255),
                math.floor(Hitbox.Color.B * 255)),
            Duration = 3
        })
    end
})

-- ============================
-- ⚙️ UTILITIES
-- ============================
local UtilTab = Window:CreateTab("⚙️ Utilities", "settings")

UtilTab:CreateButton({
    Name = "🧹 Clear Hitboxes",
    Callback = function()
        Hitbox:Cleanup()
        Rayfield:Notify({
            Title = "🧹 Cleared",
            Content = "All hitboxes removed",
            Duration = 3
        })
    end
})

UtilTab:CreateButton({
    Name = "🔄 Rejoin Server",
    Callback = function()
        Services.TeleportService:Teleport(game.PlaceId, LocalPlayer)
    end
})

UtilTab:CreateButton({
    Name = "🔴 Unload Script",
    Callback = function()
        Rayfield:Notify({
            Title = "🔴 Unloading...",
            Content = "Removing everything",
            Duration = 3
        })
        
        task.wait(1)
        Hitbox:Unload()
    end
})

UtilTab:CreateParagraph({
    Title = "⚠️ Warning",
    Content = "Unload will remove ALL hitboxes and close UI. Use 'Clear Hitboxes' to just remove visuals."
})

-- ============================
-- 📊 INFO
-- ============================
local InfoTab = Window:CreateTab("📊 Info", "info")

InfoTab:CreateParagraph({
    Title = "🎯 Dynamic Hitbox System",
    Content = "⚡ Auto-changing hitbox sizes\n🎨 Custom colors & transparency\n🔄 Random updates every interval\n🧹 Easy cleanup & unload"
})

InfoTab:CreateButton({
    Name = "📊 Show Status",
    Callback = function()
        Rayfield:Notify({
            Title = "📊 System Status",
            Content = "Enabled: " .. (Hitbox.Enabled and "✅" or "❌") .. 
                    "\nInterval: " .. Hitbox.Interval .. "s" ..
                    "\nSize: " .. Hitbox.MinSize .. "x - " .. Hitbox.MaxSize .. "x" ..
                    "\nTransparency: " .. string.format("%.2f", Hitbox.Transparency),
            Duration = 5
        })
    end
})

-- ============================
-- 🔧 INITIALIZATION
-- ============================
task.wait(1)

Rayfield:Notify({
    Title = "🎯 System Ready",
    Content = "Press K to toggle menu",
    Duration = 4
})

print("[⚡] Dynamic Hitbox System Loaded")
print("[ℹ️] Press K to toggle menu")

Features & Information

Dynamic Hitboxes, open sorce, clearly ai

Community Comments (1)

HappyTimeHappyTimeJan 11, 2026

good

More Scripts for [UPD] Volleyball Legends