local Players = game:GetService("Players") local player = Players.LocalPlayer local function loopTool(tool) if tool:GetAttribute("Looping") then return end tool:SetAttribute("Looping", true) task.spawn(function() while tool.Parent == player.Character do tool:Activate() task.wait(0.05) end tool:SetAttribute("Looping", false) end) end local function checkTool(tool) if tool:IsA("Tool") and (tool.Name == "Sword" or tool.Name == "Timebomb") then loopTool(tool) end end local function setupCharacter(character) character.ChildAdded:Connect(checkTool) for _, obj in ipairs(character:GetChildren()) do checkTool(obj) end end if player.Character then setupCharacter(player.Character) end player.CharacterAdded:Connect(setupCharacter)