getgenv().keytoclick = "Q" tool = Instance.new("Tool") tool.RequiresHandle = false tool.Name = keytoclick tool.Activated:connect(function() local vim = game:service("VirtualInputManager") vim:SendKeyEvent(true, keytoclick, false, game) end) tool.Parent = game.Players.LocalPlayer.Backpack game.StarterGui:SetCore("SendNotification", { Title = "backupalt#3386 .gg/productions"; Text = "join .gg/productions"; }) local player = game.Players.LocalPlayer local function connectCharacterAdded() player.CharacterAdded:Connect(onCharacterAdded) end connectCharacterAdded() player.CharacterRemoving:Connect(function() tool.Parent = game.Players.LocalPlayer.Backpack end) getgenv().Key = Enum.KeyCode.Q getgenv().Prediction = 0.1413 getgenv().Partz = "UpperTorso" -- LowerTorso, HumanoidRootPart,Head,UpperTorso local Locking = false local Draw = Drawing.new local Square = Drawing.new("Square") Square.Visible = true Square.Color = Color3.fromRGB(255, 0, 0) Square.Thickness = 5 Square.Size = Vector2.new(8,8) Square.Filled = true game:GetService("UserInputService").InputBegan:Connect(function(keygo,ok) if (not ok) then if (keygo.KeyCode == getgenv().Key) then Locking = not Locking if Locking then Plr = getClosestPlayerToCursor() elseif not Locking then end end end end) function getClosestPlayerToCursor() local closestPlayer local shortestDistance = math.huge for i, v in pairs(game.Players:GetPlayers()) do if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("LowerTorso") then local pos = game:GetService"Workspace".CurrentCamera:WorldToViewportPoint(v.Character.PrimaryPart.Position) local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new( game.Players.LocalPlayer:GetMouse().X, game.Players.LocalPlayer:GetMouse().Y)).magnitude if magnitude < shortestDistance then closestPlayer = v shortestDistance = magnitude end end end return closestPlayer end local rawmetatable = getrawmetatable(game) local old = rawmetatable.__namecall setreadonly(rawmetatable, false) rawmetatable.__namecall = newcclosure(function(...) local args = {...} if Locking and getnamecallmethod() == "FireServer" and args[2] == "GetMousePos" then args[3] = Plr.Character[getgenv().Partz].Position+(Plr.Character[getgenv().Partz].Velocity*Prediction) return old(unpack(args)) end return old(...) end) game.RunService.Stepped:Connect(function() if Plr ~= nil and Locking then local Vector, OnScreen = workspace.CurrentCamera:worldToViewportPoint(Plr.Character[getgenv().Partz].Position+(Plr.Character[getgenv().Partz].Velocity*Prediction)) if OnScreen then Square.Visible = true Square.Position = Vector2.new(Vector.X,Vector.Y) end elseif not Locking then Square.Visible = false end end)