-- Create the Tool local tool = Instance.new("Tool") tool.Name = "Grab Tool" tool.RequiresHandle = false tool.Parent = game.Players.LocalPlayer:WaitForChild("Backpack") -- Variables local player = game.Players.LocalPlayer local mouse = player:GetMouse() local grabbedPart = nil local holding = false local grabbedCharacter = nil -- Function to grab a part local function grabPart(target) if target and not target.Anchored and not holding and target:IsA("BasePart") then grabbedPart = target holding = true -- Create a BodyPosition to smoothly move the part local bodyPosition = Instance.new("BodyPosition") bodyPosition.MaxForce = Vector3.new(1e6, 1e6, 1e6) -- High force for larger parts bodyPosition.P = 3000 -- Responsiveness bodyPosition.D = 100 -- Damping bodyPosition.Position = player.Character.HumanoidRootPart.Position + Vector3.new(0, 5, -5) bodyPosition.Parent = grabbedPart -- Make the part massless and disable collisions grabbedPart.Massless = true grabbedPart.CanCollide = false end end -- Function to grab the player (yourself) local function grabCharacter() if not holding then local character = player.Character or player.CharacterAdded:Wait() local root = character:FindFirstChild("HumanoidRootPart") if not root then return end -- Create a BodyPosition to control the character's movement local bodyPosition = Instance.new("BodyPosition") bodyPosition.MaxForce = Vector3.new(1e6, 1e6, 1e6) bodyPosition.P = 3000 bodyPosition.D = 100 bodyPosition.Position = root.Position + Vector3.new(0, 5, -5) -- Adjust offset bodyPosition.Parent = root -- Make the character massless and disable collisions character:BreakJoints() -- To avoid any unwanted movement character.HumanoidRootPart.CanCollide = false character.HumanoidRootPart.Massless = true grabbedCharacter = character holding = true end end -- Function to throw a part local function throwPart() if grabbedPart and holding then -- Restore the part's properties grabbedPart.Massless = false grabbedPart.CanCollide = true -- Create a BodyVelocity to throw the part local bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.MaxForce = Vector3.new(1e6, 1e6, 1e6) -- High force for throwing bodyVelocity.Velocity = mouse.UnitRay.Direction * 100 -- Faster throw bodyVelocity.Parent = grabbedPart -- Clean up the BodyPosition and BodyVelocity if grabbedPart:FindFirstChildOfClass("BodyPosition") then grabbedPart:FindFirstChildOfClass("BodyPosition"):Destroy() end game:GetService("Debris"):AddItem(bodyVelocity, 2) grabbedPart = nil holding = false end end -- Function to throw the character (yourself) local function throwCharacter() if holding and grabbedCharacter then local root = grabbedCharacter:FindFirstChild("HumanoidRootPart") if not root then return end -- Restore character's properties grabbedCharacter.HumanoidRootPart.CanCollide = true grabbedCharacter.HumanoidRootPart.Massless = false -- Add BodyVelocity to throw the character local bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.MaxForce = Vector3.new(1e6, 1e6, 1e6) bodyVelocity.Velocity = mouse.UnitRay.Direction * 100 -- Speed of throw bodyVelocity.Parent = root -- Clean up BodyPosition and BodyVelocity game:GetService("Debris"):AddItem(bodyVelocity, 2) grabbedCharacter = nil holding = false end end -- Tool activation logic tool.Activated:Connect(function() local target = mouse.Target if holding then -- If holding a part, throw it if grabbedPart then throwPart() elseif grabbedCharacter then throwCharacter() end else if target then -- Try to grab a part first grabPart(target) else -- If no part is targeted, grab the player (yourself) grabCharacter() end end end)