Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait(1/60)
- Aimbotsettings={["bring"]=false,["lerp"]=false}
- --Setting AimbotAll true
- game:GetService("UserInputService").InputBegan:Connect(function(input)
- if input.KeyCode==Enum.KeyCode.B then
- if Aimbotsettings["bring"]==false then
- Aimbotsettings["bring"]=true
- else
- Aimbotsettings["bring"]=false
- end
- end
- if input.KeyCode==Enum.KeyCode.L then
- if Aimbotsettings["lerp"]==false then
- Aimbotsettings["lerp"]=true
- else
- Aimbotsettings["lerp"]=false
- end
- end
- end)
- function findNearestTorso(pos, maxDistance, randomSelect)
- local list = game.Workspace:GetChildren()
- local torsos = {}
- for x=1, #list do
- if (list[x].className == "Model") and (list[x] ~= game.Players.LocalPlayer.Character) then
- local torso = list[x]:findFirstChild("Head")
- local human = list[x]:findFirstChild("Humanoid")
- if torso ~= nil and human ~= nil and human.ClassName == "Humanoid" and human.Health > 0 then
- for i=1,#torsos do
- if (torso.Position - pos).magnitude < torsos[i][2] then
- table.insert(torsos, i, {torso, (torso.Position - pos).magnitude})
- break
- end
- if i == #torsos and (maxDistance == nil or (torso.Position - pos).magnitude < maxDistance) then
- table.insert(torsos, {torso, (torso.Position - pos).magnitude})
- end
- end
- if torsos[1] == nil and (maxDistance == nil or (torso.Position - pos).magnitude < maxDistance) then
- torsos[1] = {torso, (torso.Position - pos).magnitude}
- end
- end
- end
- end
- if randomSelect == nil then
- return torsos[1][1], torsos[1][2]
- else
- if randomSelect > #torsos then randomSelect = #torsos end
- local selection = math.random(1, randomSelect)
- return torsos[selection][1], torsos[selection][2]
- end
- end
- local ibelerpin=nil
- game:GetService("UserInputService").InputBegan:Connect(function(input)
- if input.KeyCode==Enum.KeyCode.LeftAlt then
- if aimbot==true then
- aimbot=false
- else
- aimbot=true
- spawn(function()
- if Aimbotsettings["bring"]==false then
- local ev= game:GetService("RunService").RenderStepped:Connect(function()
- if aimbot==true then
- if Aimbotsettings["lerp"]==true then
- if ibelerpin~=findNearestTorso(game.Players.LocalPlayer.Character.Head.Position,math.huge) then
- for i=0,1,0.1 do
- if ibelerpin~=findNearestTorso(game.Players.LocalPlayer.Character.Head.Position,math.huge) then
- wait()
- workspace.CurrentCamera.CFrame= workspace.CurrentCamera.CFrame:Lerp(CFrame.new(workspace.CurrentCamera.CFrame.p,findNearestTorso(game.Players.LocalPlayer.Character.Head.Position,math.huge)),i)
- else ibelerpin=findNearestTorso(game.Players.LocalPlayer.Character.Head.Position,math.huge)
- ibelerpin=findNearestTorso(game.Players.LocalPlayer.Character.Head.Position,math.huge)
- break
- end
- end
- ibelerpin=findNearestTorso(game.Players.LocalPlayer.Character.Head.Position,math.huge)
- end
- end
- workspace.CurrentCamera.CFrame=CFrame.new(workspace.CurrentCamera.CFrame.p,findNearestTorso(game.Players.LocalPlayer.Character.Head.Position,math.huge).Position)
- end
- end)
- else
- local ev= game:GetService("RunService").RenderStepped:Connect(function()
- if Aimbotsettings["bring"]==true then
- game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(findNearestTorso(game.Players.LocalPlayer.Character.Head.Position,math.huge).CFrame+Vector3.new(0,0,5))
- workspace.CurrentCamera.CFrame=CFrame.new(workspace.CurrentCamera.CFrame.p,findNearestTorso(game.Players.LocalPlayer.Character.Head.Position,math.huge).Position)
- end
- end)
- end
- end)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement