probanana

Phantom Forces Aimbot

Jan 5th, 2023
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. local function find_by_name(t, name) for _, v in pairs(t) do if v.name == name then return v end end end
  2.  
  3. local actor = find_by_name(getactors(), 'lol')
  4.  
  5. -- ESP
  6. loadstring(game:HttpGet("https://pastehub.net/raw.php?p=f51adc3eb0c", true))()
  7.  
  8. -- aimbot
  9. syn.run_on_actor(actor, [[if not getgenv or not mousemoverel then
  10. game:GetService("Players").LocalPlayer:Kick("Your exploit is not supported!")
  11. end
  12.  
  13. getgenv().AIMBOT_SETTINGS = {
  14. smoothness = 2,
  15. FOV = 400,
  16. VisibleCheck = true,
  17. }
  18.  
  19. -- services
  20. local players = game:GetService("Players")
  21. local RunService = game:GetService("RunService")
  22. local UserInputService = game:GetService("UserInputService")
  23.  
  24. -- variables
  25. local client = players.LocalPlayer
  26. local shared = getrenv().shared
  27. local camera = workspace.CurrentCamera
  28. local mouseLocation = UserInputService.GetMouseLocation
  29. local WorldToViewportPoint = camera.WorldToViewportPoint
  30.  
  31. -- modules
  32. local replicationObject = shared.require("ReplicationObject")
  33. local replicationInterface = shared.require("ReplicationInterface")
  34.  
  35. -- functions
  36. local function isAlive(entry)
  37. return replicationObject.isAlive(entry)
  38. end
  39.  
  40. local function isVisible(p, ...)
  41. if not getgenv().AIMBOT_SETTINGS.VisibleCheck then
  42. return true
  43. end
  44.  
  45. return #camera:GetPartsObscuringTarget({ p }, { camera, client.Character, workspace.Ignore, ... }) == 0
  46. end
  47.  
  48. local function get_closest(fov: number)
  49. local targetPos: Vector3 = nil
  50. local magnitude: number = fov or math.huge
  51. for _, player in pairs(players:GetPlayers()) do
  52. if player == client or player.Team == client.Team then
  53. continue
  54. end
  55.  
  56. local entry = replicationInterface.getEntry(player)
  57. local character = entry and replicationObject.getThirdPersonObject(entry)
  58.  
  59. if character and isAlive(entry) then
  60. local body_parts = character:getCharacterHash()
  61.  
  62. local screen_pos, on_screen = WorldToViewportPoint(camera, body_parts.head.Position)
  63. local screen_pos_2D = Vector2.new(screen_pos.X, screen_pos.Y)
  64. local new_magnitude = (screen_pos_2D - mouseLocation(UserInputService)).Magnitude
  65. if
  66. on_screen
  67. and new_magnitude < magnitude
  68. and isVisible(body_parts.head.Position, body_parts.torso.Parent)
  69. then
  70. magnitude = new_magnitude
  71. targetPos = body_parts.head.Position
  72. end
  73. end
  74. end
  75. return targetPos
  76. end
  77. local mouse = client:GetMouse()
  78. local function aimAt(pos, smooth)
  79. local targetPos = camera:WorldToScreenPoint(pos)
  80. local mousePos = camera:WorldToScreenPoint(mouse.Hit.p)
  81. mousemoverel((targetPos.X - mousePos.X) / smooth, (targetPos.Y - mousePos.Y) / smooth)
  82. end
  83. local circle = Drawing.new("Circle")
  84. circle.Thickness = 2
  85. circle.NumSides = 12
  86. circle.Radius = 350
  87. circle.Filled = false
  88. circle.Transparency = 1
  89. circle.Color = Color3.new(1, 0.5, 0)
  90. circle.Visible = true
  91.  
  92. RunService.RenderStepped:Connect(function()
  93. if UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
  94. local _pos = get_closest(getgenv().AIMBOT_SETTINGS.FOV)
  95. if _pos then
  96. aimAt(_pos, getgenv().AIMBOT_SETTINGS.smoothness)
  97. end
  98. end
  99. if circle.__OBJECT_EXISTS then
  100. circle.Position = mouseLocation(UserInputService)
  101. circle.Radius = getgenv().AIMBOT_SETTINGS.FOV
  102. end
  103. end)]])
Add Comment
Please, Sign In to add comment