
KeylessUniversal

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local mouse = player:GetMouse()
-- Grab function
local function grabTarget(target)
if not target then return end
if target:IsA("BasePart") and not target.Anchored then
grabbed = target
elseif target.Parent:FindFirstChild("HumanoidRootPart") then
grabbed = target.Parent.HumanoidRootPart
end
if grabbed then
bodyPos = Instance.new("BodyPosition")
bodyPos.MaxForce = Vector3.new(1e6,1e6,1e6)
bodyPos.D = 500
bodyPos.P = 30000
bodyPos.Parent = grabbed
bodyGyro = Instance.new("BodyGyro")
bodyGyro.MaxTorque = Vector3.new(1e6,1e6,1e6)
bodyGyro.D = 500
bodyGyro.P = 3000
bodyGyro.Parent = grabbed
end
end
local function releaseTarget()
if grabbed then
if bodyPos then bodyPos:Destroy() end
if bodyGyro then bodyGyro:Destroy() end
end
grabbed = nil
bodyPos = nil
bodyGyro = nil
end
mouse.Button1Down:Connect(function()
if holding then return end
holding = true
grabTarget(mouse.Target)
end)
mouse.Button1Up:Connect(function()
holding = false
releaseTarget()
end)
RunService.RenderStepped:Connect(function()
if grabbed and bodyPos then
local targetPos = mouse.Hit.p + Vector3.new(0,2,0)
bodyPos.Position = targetPos
bodyGyro.CFrame = CFrame.new(grabbed.Position, mouse.Hit.p)
end
end)No comments yet for this script.



