Adam_Pxstebin

Phantom Forces Aimbot/Aimlock (hold LEFTCTRL to aim on ppl)

Apr 25th, 2019
973
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local api = {};
  2. local runService = game:GetService('RunService')
  3. local inputService = game:GetService('UserInputService')
  4. local ffc = game.FindFirstChild;
  5. local WorldToViewport = workspace.CurrentCamera.WorldToViewportPoint;
  6. local client = game:GetService("Players").LocalPlayer;
  7. local BLANK_VECTOR = Vector3.new();
  8. local reg = getreg or debug.getregistry;
  9. local isp = is_protected_closure or function() return false end
  10. local guv = secret953 or debug.getupvalues
  11. local islclosure = islclosure or function(f) return pcall(string.dump, f) end
  12.  
  13. for i, func in next, reg() do
  14. if type(func) == "function" and islclosure(func) and (not isp(func)) then
  15. local upv = select(2, pcall(guv, func))
  16. if type(upv) == "table" and upv.network then
  17. api.network = upv.network
  18. end
  19. end
  20. end
  21.  
  22. api.camera = guv(guv(api.network.add).funcs.killed).camera;
  23. api.hud = guv(guv(api.network.add).funcs.startvotekick).hud;
  24. api.char = guv(api.hud.fireradar).char;
  25.  
  26. local old_loadgun = api.char.loadgun;
  27. function api.char.loadgun(self, data, ...)
  28. data.camkickmin = BLANK_VECTOR;
  29. data.camkickmax = BLANK_VECTOR;
  30. data.aimcamkickmin = BLANK_VECTOR;
  31. data.aimcamkickmax = BLANK_VECTOR;
  32. data.aimtranskickmin = BLANK_VECTOR;
  33. data.aimtranskickmax = BLANK_VECTOR;
  34. data.transkickmin = BLANK_VECTOR;
  35. data.transkickmax = BLANK_VECTOR;
  36. data.rotkickmin = BLANK_VECTOR;
  37. data.rotkickmax = BLANK_VECTOR;
  38. data.aimrotkickmin = BLANK_VECTOR;
  39. data.aimrotkickmax = BLANK_VECTOR;
  40. data.hipfirespread = 0;
  41. data.hipfirestability = 0;
  42. data.swayamp = 0;
  43. data.swayspeed = 0;
  44. data.steadyspeed = 0;
  45. data.breathspeed = 0;
  46. return old_loadgun(self, data, ...)
  47. end
  48.  
  49.  
  50. local function findTarg()
  51. local _distance = math.huge
  52. local found_player = nil;
  53.  
  54. for _, player in next, game:GetService("Players"):GetPlayers() do
  55. if player ~= client and player.Team ~= client.Team and player.Character ~= nil then
  56. local vector, visible = WorldToViewport(workspace.CurrentCamera, ffc(player.Character, 'Head').CFrame.p);
  57. if ffc(player.Character, 'HumanoidRootPart') and (ffc(player.Character, 'HumanoidRootPart').Position - workspace.Lobby.Spawn1.Position).magnitude > 100 then
  58. if visible then
  59. local position_of_head = Vector2.new(vector.X, vector.Y)
  60. local center_of_screen = Vector2.new(api.camera.cframe.p.X, api.camera.cframe.p.Y)
  61. local distance_between_points = (center_of_screen - position_of_head).magnitude
  62.  
  63. local parts = workspace.CurrentCamera:GetPartsObscuringTarget({workspace.CurrentCamera.CFrame.p, ffc(player.Character, 'Head').Position}, {player.Character, workspace.Ignore, client.Character, workspace.CurrentCamera})
  64.  
  65. if (distance_between_points < _distance) and (#parts <= 0) then
  66. found_player = player;
  67. _distance = distance_between_points;
  68. end
  69. end
  70. end
  71. end
  72. end
  73.  
  74. return found_player
  75. end
  76.  
  77. local window = library:CreateWindow({underline = Color3.fromRGB(30, 30, 30), text = 'Phantom Forces', barcolor = Color3.fromRGB(234, 234, 234), bgcolor = Color3.fromRGB(80,80,80), txtcolor = Color3.fromRGB(0, 0, 0), bartextcolor = Color3.fromRGB(0, 0, 0)})
  78. window:AddToggle('Aimbot', function(a)
  79. api.aimbot = a
  80. end)
  81.  
  82. local last = tick()
  83. local targ;
  84. runService:BindToRenderStep("asd", 1, function()
  85. if tick() - last > 0.3 then
  86. targ = findTarg();
  87. last = tick();
  88. end
  89. end)
  90.  
  91. coroutine.wrap(function()
  92. while wait() do
  93. if targ and api.aimbot and inputService:IsKeyDown(Enum.KeyCode.LeftAlt) then
  94. if targ.Character and ffc(targ.Character,'Head') then
  95. api.camera:setlookvector(CFrame.new(api.camera.cframe.p, ffc(targ.Character,'Head').CFrame.p).lookVector)
  96. end
  97. end
  98. end
  99. end)()
RAW Paste Data