local Players = game:GetService("Players") local player = Players.LocalPlayer local Y = 30 local function getEquippedTool() local character = player.Character if not character then return nil end for _, item in ipairs(character:GetChildren()) do if item:IsA("Tool") then return item end end return nil end local function recreateHumanoid(character, tool) local oldHumanoid = character:FindFirstChildOfClass("Humanoid") if oldHumanoid then wait(0.3) if tool then oldHumanoid:UnequipTools() end wait(0.3) oldHumanoid:Destroy() wait(0.3) end local newHumanoid = Instance.new("Humanoid") newHumanoid.Parent = character wait(0.3) if tool then newHumanoid:EquipTool(tool) wait(0.3) end return newHumanoid end local humanoidLoopRunning = false local function onTouched(otherPart) local character = player.Character if not character then return end local tool = getEquippedTool() if not tool then return end local otherCharacter = otherPart.Parent if otherCharacter and otherCharacter ~= character then local otherHumanoid = otherCharacter:FindFirstChild("Humanoid") if otherHumanoid then wait(0.3) local rootPart = character:FindFirstChild("HumanoidRootPart") local otherRoot = otherCharacter:FindFirstChild("HumanoidRootPart") if rootPart and otherRoot then rootPart.CFrame = otherRoot.CFrame + Vector3.new(0, 3, 0) wait(0.3) rootPart.CFrame = CFrame.new(otherRoot.Position.X, Y, otherRoot.Position.Z) wait(0.3) end if not humanoidLoopRunning then humanoidLoopRunning = true spawn(function() while player.Character == character do recreateHumanoid(character, tool) wait(0.3) end humanoidLoopRunning = false end) end end end end local function setupCharacter(character) for _, part in ipairs(character:GetChildren()) do if part:IsA("BasePart") then part.Touched:Connect(onTouched) end end end if player.Character then setupCharacter(player.Character) end player.CharacterAdded:Connect(setupCharacter)