Script (set into Client):
local LocalPlayer = game:GetService("Players").LocalPlayer
local function dropRandomTool(character)
local tools = {}
for _, item in ipairs(LocalPlayer.Backpack:GetChildren()) do
if item:IsA("Tool") and item.CanBeDropped then
table.insert(tools, item)
end
end
for _, item in ipairs(character:GetChildren()) do
if item:IsA("Tool") and item.CanBeDropped then
table.insert(tools, item)
end
end
if #tools > 0 then
local randomIndex = math.random(#tools)
local toolToDrop = tools[randomIndex]
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local forwardVector = humanoidRootPart.CFrame.LookVector
local dropPosition = humanoidRootPart.Position + forwardVector * 4
toolToDrop.Parent = game.Workspace
toolToDrop.Handle.CFrame = CFrame.new(dropPosition)
end
end
LocalPlayer.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
local previousHealth = humanoid.Health
humanoid.HealthChanged:Connect(function(health)
if health < previousHealth then
dropRandomTool(character)
end
previousHealth = health
end)
end)