_G.MagnetizeToTarget = _G.MagnetizeToTarget or "" --Put the target's username inside the quotes if not _G.MagnetizeRunning and _G.MagnetizeToTarget then _G.MagnetizeRunning = true game:GetService('RunService').Stepped:connect(function() for i,v in pairs (game:GetService("Players").LocalPlayer.Character:GetChildren()) do if v:IsA("BasePart") then v.CanCollide = false end end end) -- Function to check for exact and partial matches local function findPlayerByPriority(targetName) local exactUsernameMatch, exactDisplayNameMatch = nil, nil local partialUsernameMatch, partialDisplayNameMatch = nil, nil for _, player in pairs(game:GetService("Players"):GetPlayers()) do if player.Name == targetName then exactUsernameMatch = player elseif player.DisplayName == targetName then exactDisplayNameMatch = player elseif string.find(player.Name:lower(), targetName:lower()) then partialUsernameMatch = player elseif string.find(player.DisplayName:lower(), targetName:lower()) then partialDisplayNameMatch = player end end return exactUsernameMatch or exactDisplayNameMatch or partialUsernameMatch or partialDisplayNameMatch end b = Instance.new("RocketPropulsion") b.Parent = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart b.TurnP = 20000 b.MaxThrust = 20000 b.MaxSpeed = 1000 b.ThrustP = 13000 b:Fire() while true do wait(0.1) if findPlayerByPriority(_G.MagnetizeToTarget) and findPlayerByPriority(_G.MagnetizeToTarget).Character and findPlayerByPriority(_G.MagnetizeToTarget).Character:FindFirstChild("HumanoidRootPart") then b.Target = findPlayerByPriority(_G.MagnetizeToTarget).Character.HumanoidRootPart end end end