specdo

Project-Phantom

Nov 26th, 2020 (edited)
759
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2. Project-Phantom v1.0.0
  3.  
  4.     IF YOUR SCREEN SHAKES WHEN YOU AIM LOCK ON SOMEONE, INCREASE THE SMOOTHNESS!
  5.     IF YOUR SCREEN SHAKES WHEN YOU AIM LOCK ON SOMEONE, INCREASE THE SMOOTHNESS!
  6.     IF YOUR SCREEN SHAKES WHEN YOU AIM LOCK ON SOMEONE, INCREASE THE SMOOTHNESS!
  7.     IF YOUR SCREEN SHAKES WHEN YOU AIM LOCK ON SOMEONE, INCREASE THE SMOOTHNESS!
  8.     IF YOUR SCREEN SHAKES WHEN YOU AIM LOCK ON SOMEONE, INCREASE THE SMOOTHNESS!
  9.     IF YOUR SCREEN SHAKES WHEN YOU AIM LOCK ON SOMEONE, INCREASE THE SMOOTHNESS!
  10.     IF YOUR SCREEN SHAKES WHEN YOU AIM LOCK ON SOMEONE, INCREASE THE SMOOTHNESS!
  11.  
  12.     This is a open source project made by PotatoScripts development team, we will be updating this regularly.
  13.     So check the loadstring for new updates.
  14.  
  15.     After Phantom Forces did some clever anti cheat that makes player.Character return nil, they patched regular Project-P.
  16.     So I bring you this Phantom Forces Exclusive Project-"Phantom" that works just as well as it use to :)
  17.    
  18.     Also bullet drop and bullet prediction is inverted, less = more lol. You need some skills to setup the aimbot correctly for each game/gun.
  19.     But I do asure you that with the right settings this aimbot is will hit 9/10 shots.
  20.  
  21. READ THIS
  22.     A lot of the comments are wrong right now because I've made a lot of changes so keep that in mind,
  23.     I will be rewriting all the comments in the next update or so.
  24.  
  25. Changelogs:
  26.     ! Fixed aimbot on Phantom Forces.
  27.     ! Cleaned up some code.
  28. Note:
  29.     hi =)
  30. ]]--
  31.  
  32.  
  33. --Decent settings for Phantom Forces
  34. _G.Settings = {
  35.     AimEnable = true,
  36.     AimAutoShoot = false, --not working (removed the part that do this cuz it wasn't good enough)
  37.     AimTeamCheck = true,
  38.     AimSmoothness = 3.75, --IF YOUR SCREEN SHAKES WHEN YOU AIM LOCK ON SOMEONE, INCREASE THE SMOOTHNESS!
  39.     AimFOV = 5,
  40.     AimDrawFOV = true,
  41.     AimWallCheck = false, --not working (removed the part that do this cuz it wasn't good enough)
  42.     AimBulletDrop = 145,
  43.     AimAimKey = Enum.UserInputType.MouseButton2,
  44.     AimBulletPrediction = 2,
  45.     --AimHitBox = "Head" -- /"HumanoidRootPart"/"Right Leg"/"Left Leg"/"Right Arm"/"Left Arm"/"Torso"/"Head"/
  46. }
  47.  
  48. --Variables.
  49. local userIS = game:GetService("UserInputService")
  50. local Camera = game:GetService('Workspace').Camera
  51. local Players = game:GetService("Players")
  52. local LocalPlayer = Players.LocalPlayer
  53. local Mouse = game:GetService("Players").LocalPlayer:GetMouse()
  54. local IsKeyDown = false
  55. local module = {};
  56. local drawings = {};
  57. local MenuPos = Vector2.new(0, 0)
  58.  
  59. --Functions.
  60. function module:DrawNew(name,type,props)
  61.     drawings[name] = Drawing.new(type)
  62.     for i,v in pairs(props) do
  63.         drawings[name][i] = v
  64.     end
  65.     return drawings[name]
  66. end
  67.  
  68. function DrawText(name,text,size,color,position)
  69.     module:DrawNew(name,"Text",{
  70.     Text = text,
  71.     Size = size,
  72.     Color = color,
  73.     Position = position + MenuPos,
  74.     Visible = true
  75.     });
  76. end
  77.  
  78. function isVisible(character)
  79.     local Ray = Ray.new(Camera.CFrame.p, (character.Head.Position - Camera.CFrame.p).unit * 2048)
  80.     local part = workspace:FindPartOnRayWithIgnoreList(Ray, {LocalPlayer.Character})
  81.     if part:IsDescendantOf(character) then return true else return false end
  82. end
  83.  
  84. function Calculate(distance)
  85.     return (1.01*math.pow(distance,4)+0.002*math.pow(distance,3)-0.07*math.pow(distance,2)+0.8*distance-2.05)
  86. end
  87.  
  88. function WorldToScreen(Position)
  89.     return Camera:WorldToViewportPoint(Position)
  90. end
  91.  
  92. function IsOnScreen(part)
  93.     local vector, onscreen = WorldToScreen(part.Position)
  94.     return (vector.Z > 0)
  95. end
  96.  
  97. function IsInFov(part)
  98.     if part then
  99.         if IsOnScreen(part) then
  100.             local pos = WorldToScreen(part.Position)
  101.             local dist = (Vector2.new(Mouse.X, Mouse.Y) - Vector2.new(pos.X, pos.Y)).magnitude
  102.             if dist <= workspace.CurrentCamera.ViewportSize.X / (90 / _G.Settings.AimFOV) and dist < math.huge then return true end
  103.         end
  104.     end
  105. end
  106.  
  107. function MyTeam()
  108.     if "Bright blue" == tostring(game.Players.LocalPlayer.TeamColor) then return "Phantoms" else return "Ghosts" end
  109. end
  110.  
  111. function GetClosestPhantom()
  112.     local TargetDistance = math.huge
  113.     local Target = nil
  114.     for i, v in pairs(game.Workspace.Players:GetDescendants()) do
  115.         if v.Name == "Player" and v:FindFirstChild('HumanoidRootPart') then
  116.             local TargetScreenPos = WorldToScreen(v.HumanoidRootPart.Position)
  117.             local mag = (Vector2.new(TargetScreenPos.X, TargetScreenPos.Y) - Vector2.new(userIS:GetMouseLocation().X, userIS:GetMouseLocation().Y)).magnitude
  118.             --local mag = (TargetScreenPos - userIS:GetMouseLocation()).magnitude
  119.             if IsInFov(v:FindFirstChild("Head")) then
  120.                 if _G.Settings.AimTeamCheck then
  121.                     if v.Parent.Name ~= MyTeam() then
  122.                         if mag < TargetDistance then
  123.                             TargetDistance = mag
  124.                             Target = v
  125.                         end
  126.                     end
  127.                 elseif mag < TargetDistance then
  128.                     TargetDistance = mag
  129.                     Target = v
  130.                 end
  131.             end
  132.         end
  133.     end
  134.     return Target
  135. end
  136.  
  137. userIS.InputBegan:Connect(function(Input)
  138.     if Input.UserInputType == _G.Settings.AimAimKey and _G.Settings.AimEnable then
  139.         IsKeyDown = true
  140.     end
  141. end)
  142.  
  143. userIS.InputEnded:Connect(function(Input)
  144.     if Input.UserInputType == _G.Settings.AimAimKey then
  145.         IsKeyDown = false
  146.     end
  147. end)
  148.  
  149. local target = nil
  150. local function aimbot()
  151.     target = GetClosestPhantom()
  152.     if target ~= nil then
  153.         local BulletPrediction = target.HumanoidRootPart.Velocity * (game:GetService('Players').LocalPlayer.Character.HumanoidRootPart.Position - target.HumanoidRootPart.Position).magnitude / 1200 / _G.Settings.AimBulletPrediction
  154.         local aimAt, visible = WorldToScreen(target.Head.Position + Vector3.new(0,Calculate((game:GetService('Players').LocalPlayer.Character.HumanoidRootPart.Position - target.HumanoidRootPart.Position).magnitude / _G.Settings.AimBulletDrop) / _G.Settings.AimBulletDrop,0) + BulletPrediction)
  155.         mousemoverel((aimAt.X - userIS:GetMouseLocation().X) / _G.Settings.AimSmoothness, (aimAt.Y - userIS:GetMouseLocation().Y) / _G.Settings.AimSmoothness)
  156.         print(target:GetFullName())
  157.     end
  158. end
  159.  
  160. --FOV Circle.
  161. module:DrawNew("Circle","Circle",{
  162.     Transparency = 1,
  163.     Thickness = 1.5,
  164.     NumSides = 16,
  165.     Filled = false,
  166.     Color = Color3.fromRGB(255,0,0),
  167.     Visible = false
  168. });
  169.  
  170. game:GetService("RunService").RenderStepped:connect(function()
  171.     if IsKeyDown then
  172.         aimbot()
  173.     end
  174.     drawings.Circle.Position = userIS:GetMouseLocation()
  175. end)
  176.  
  177. --Disable Arrow keys.
  178. local ContextActionService = game:GetService("ContextActionService")
  179.  
  180. ContextActionService:BindActionAtPriority("DisableArrowKeys", function()
  181.     return Enum.ContextActionResult.Sink
  182. end, false, Enum.ContextActionPriority.High.Value, Enum.KeyCode.Up, Enum.KeyCode.Down, Enum.KeyCode.Left, Enum.KeyCode.Right)
  183.  
  184. --Menu background.
  185. module:DrawNew("MenuBackground","Square",{
  186.     Transparency = 0.3,
  187.     Size = Vector2.new(215, 235),
  188.     Color = Color3.fromRGB(40,40,40),
  189.     Position = Vector2.new(15, 317) + MenuPos,
  190.     Thickness = 0,
  191.     Filled = true,
  192.     Visible = true
  193. });
  194.  
  195. --CreditsText
  196. DrawText("CreditsText","Project-P by PotatoScripts development team",16,Color3.fromRGB(255,255,255),Vector2.new(215, 5))
  197.  
  198. --Aimbot title.
  199. DrawText("AimTitle","Aim assist",24,Color3.fromRGB(255,255,255),Vector2.new(30, 320))
  200.  
  201. --Aimbot Enable.
  202. DrawText("AimEnable","Enable:",24,Color3.fromRGB(255,255,255),Vector2.new(45, 345))
  203. DrawText("AimEnableValue",nil,24,Color3.fromRGB(255,255,255),Vector2.new(103, 345))
  204.  
  205. --Aimbot Auto shoot.
  206. DrawText("AimAutoShoot","Auto shoot:",24,Color3.fromRGB(155,155,155),Vector2.new(45, 365))
  207. DrawText("AimAutoShootValue",nil,24,Color3.fromRGB(255,255,255),Vector2.new(134, 365))
  208.  
  209. --Aimbot Team check.
  210. DrawText("AimTeamCheck","Team check:",24,Color3.fromRGB(255,255,255),Vector2.new(45, 385))
  211. DrawText("AimTeamCheckValue",nil,24,Color3.fromRGB(255,255,255),Vector2.new(141, 385))
  212.  
  213. --Aimbot Smoothness.
  214. DrawText("AimSmoothness","Smoothness:",24,Color3.fromRGB(255,255,255),Vector2.new(45, 405))
  215. DrawText("AimSmoothnessValue",nil,24,Color3.fromRGB(255,255,255),Vector2.new(141, 405))
  216.  
  217. --Aimbot FOV.
  218. DrawText("AimFOV","FOV:",24,Color3.fromRGB(255,255,255),Vector2.new(45, 425))
  219. DrawText("AimFOVValue",nil,24,Color3.fromRGB(255,255,255),Vector2.new(81, 425))
  220.  
  221. --Aimbot DrawFOV.
  222. DrawText("AimDrawFOV","Draw FOV:",24,Color3.fromRGB(255,255,255),Vector2.new(45, 445))
  223. DrawText("AimDrawFOVValue",nil,24,Color3.fromRGB(255,255,255),Vector2.new(127, 445))
  224.  
  225. --Aimbot WallCheck.
  226. DrawText("AimWallCheck","Wall check:",24,Color3.fromRGB(155,155,155),Vector2.new(45, 465))
  227. DrawText("AimWallCheckValue",nil,24,Color3.fromRGB(255,255,255),Vector2.new(133, 465))
  228.  
  229. --Aimbot BulletDrop.
  230. DrawText("AimBulletDrop","Bullet Drop:",24,Color3.fromRGB(255,255,255),Vector2.new(45, 485))
  231. DrawText("AimBulletDropValue",nil,24,Color3.fromRGB(255,255,255),Vector2.new(136, 485))
  232.  
  233. --Aimbot AimKey.
  234. DrawText("AimAimKey","Aim key:",24,Color3.fromRGB(255,255,255),Vector2.new(45, 505))
  235. DrawText("AimAimKeyValue",nil,24,Color3.fromRGB(255,255,255),Vector2.new(112, 505))
  236.  
  237. --Aimbot AimKey.
  238. DrawText("AimBulletPrediction","Bullet Prediction:",24,Color3.fromRGB(255,255,255),Vector2.new(45, 525))
  239. DrawText("AimBulletPredictionValue",nil,24,Color3.fromRGB(255,255,255),Vector2.new(176, 525))
  240.  
  241. --Arrow Marker.
  242. DrawText("SelectedText",">",24,Color3.fromRGB(255,0,0),Vector2.new(30, 345))
  243.  
  244.  
  245. --Okay here the code starts to get messy again.
  246. spawn(function()
  247.     while wait() do
  248.         if _G.Settings.AimEnable then
  249.             drawings.AimEnableValue.Color = Color3.fromRGB(0,255,0)
  250.             drawings.AimEnableValue.Text = "true"
  251.         else
  252.             drawings.AimEnableValue.Color = Color3.fromRGB(255,0,0)
  253.             drawings.AimEnableValue.Text = "false"
  254.         end
  255.         if _G.Settings.AimAutoShoot then
  256.             drawings.AimAutoShootValue.Color = Color3.fromRGB(0,255,0)
  257.             drawings.AimAutoShootValue.Text = "true"
  258.         else
  259.             drawings.AimAutoShootValue.Color = Color3.fromRGB(255,0,0)
  260.             drawings.AimAutoShootValue.Text = "false"
  261.         end
  262.         if _G.Settings.AimTeamCheck then
  263.             drawings.AimTeamCheckValue.Color = Color3.fromRGB(0,255,0)
  264.             drawings.AimTeamCheckValue.Text = "true"
  265.         else
  266.             drawings.AimTeamCheckValue.Color = Color3.fromRGB(255,0,0)
  267.             drawings.AimTeamCheckValue.Text = "false"
  268.         end
  269.         drawings.AimFOVValue.Text = tostring(_G.Settings.AimFOV)
  270.         drawings.AimSmoothnessValue.Text = tostring(_G.Settings.AimSmoothness)
  271.         if _G.Settings.AimDrawFOV then
  272.             drawings.AimDrawFOVValue.Color = Color3.fromRGB(0,255,0)
  273.             drawings.AimDrawFOVValue.Text = "true"
  274.             drawings.Circle.Visible = true
  275.         else
  276.             drawings.AimDrawFOVValue.Color = Color3.fromRGB(255,0,0)
  277.             drawings.AimDrawFOVValue.Text = "false"
  278.             drawings.Circle.Visible = false
  279.         end
  280.         drawings.Circle.Radius = workspace.CurrentCamera.ViewportSize.X / (90 / _G.Settings.AimFOV)
  281.         if _G.Settings.AimWallCheck then
  282.             drawings.AimWallCheckValue.Color = Color3.fromRGB(0,255,0)
  283.             drawings.AimWallCheckValue.Text = "true"
  284.         else
  285.             drawings.AimWallCheckValue.Color = Color3.fromRGB(255,0,0)
  286.             drawings.AimWallCheckValue.Text = "false"
  287.         end
  288.         drawings.AimBulletDropValue.Text = tostring(_G.Settings.AimBulletDrop)
  289.         if _G.Settings.AimAimKey == Enum.UserInputType.MouseButton1 then
  290.             drawings.AimAimKeyValue.Text = "Mouse1"
  291.         else
  292.             drawings.AimAimKeyValue.Text = "Mouse2"
  293.         end
  294.         drawings.AimBulletPredictionValue.Text = tostring(_G.Settings.AimBulletPrediction)
  295.         if _G.Settings.AimBulletPrediction > 200 then
  296.             _G.SEttings.AimBulletPrediction = 999999
  297.             drawings.AimBulletPredictionValue.Text = "off (kinda)"
  298.         end
  299.     end
  300. end)
  301.  
  302. local pos = 1
  303. local ArrowPos = {
  304.     Vector2.new(30, 345) + MenuPos,
  305.     Vector2.new(30, 365) + MenuPos,
  306.     Vector2.new(30, 385) + MenuPos,
  307.     Vector2.new(30, 405) + MenuPos,
  308.     Vector2.new(30, 425) + MenuPos,
  309.     Vector2.new(30, 445) + MenuPos,
  310.     Vector2.new(30, 465) + MenuPos,
  311.     Vector2.new(30, 485) + MenuPos,
  312.     Vector2.new(30, 505) + MenuPos,
  313.     Vector2.new(30, 525) + MenuPos
  314. }
  315.  
  316. local function ArrowNextPos()
  317.     pos = math.clamp(pos + 1,1,#ArrowPos)
  318. end
  319. local function ArrowPrevPos()
  320.     pos = math.clamp(pos - 1,1,#ArrowPos)
  321. end
  322.  
  323. userIS.InputBegan:Connect(function(Input)
  324.     if Input.KeyCode == Enum.KeyCode.Up then
  325.         ArrowPrevPos()
  326.         drawings.SelectedText.Position = ArrowPos[pos]
  327.     end
  328. end)
  329.  
  330. userIS.InputBegan:Connect(function(Input)
  331.     if Input.KeyCode == Enum.KeyCode.Down then
  332.         ArrowNextPos()
  333.         drawings.SelectedText.Position = ArrowPos[pos]
  334.     end
  335. end)
  336.  
  337. local IsMenuOpen = true
  338. userIS.InputBegan:Connect(function(Input)
  339.     if Input.KeyCode == Enum.KeyCode.Insert then
  340.         if IsMenuOpen then
  341.             IsMenuOpen = false
  342.             for i,v in pairs(drawings) do
  343.                 drawings[i].Visible = false
  344.             end
  345.         else
  346.             IsMenuOpen = true
  347.             for i,v in pairs(drawings) do
  348.                 drawings[i].Visible = true
  349.             end
  350.         end
  351.     end
  352. end)
  353.  
  354. userIS.InputBegan:Connect(function(Input)
  355.     if Input.KeyCode == Enum.KeyCode.Left or Input.KeyCode == Enum.KeyCode.Right then
  356.         if ArrowPos[pos] == Vector2.new(30, 345) + MenuPos then
  357.             if _G.Settings.AimEnable then
  358.                 _G.Settings.AimEnable = false
  359.             else
  360.                 _G.Settings.AimEnable = true
  361.             end
  362.         end
  363.         if ArrowPos[pos] == Vector2.new(30, 365) + MenuPos then
  364.             if _G.Settings.AimAutoShoot then
  365.                 _G.Settings.AimAutoShoot = false
  366.             else
  367.                 _G.Settings.AimAutoShoot = true
  368.             end
  369.         end
  370.         if ArrowPos[pos] == Vector2.new(30, 385) + MenuPos then
  371.             if _G.Settings.AimTeamCheck then
  372.                 _G.Settings.AimTeamCheck = false
  373.             else
  374.                 _G.Settings.AimTeamCheck = true
  375.             end
  376.         end
  377.         if ArrowPos[pos] == Vector2.new(30, 445) + MenuPos then
  378.             if _G.Settings.AimDrawFOV then
  379.                 _G.Settings.AimDrawFOV = false
  380.             else
  381.                 _G.Settings.AimDrawFOV = true
  382.             end
  383.         end
  384.         if ArrowPos[pos] == Vector2.new(30, 465) + MenuPos then
  385.             if _G.Settings.AimWallCheck then
  386.                 _G.Settings.AimWallCheck = false
  387.             else
  388.                 _G.Settings.AimWallCheck = true
  389.             end
  390.         end
  391.     end
  392.     if Input.KeyCode == Enum.KeyCode.Left then
  393.         if ArrowPos[pos] == Vector2.new(30, 405) + MenuPos then
  394.             if _G.Settings.AimSmoothness >= 1.25 then
  395.                 _G.Settings.AimSmoothness = _G.Settings.AimSmoothness - 0.25
  396.             end
  397.         end
  398.         if ArrowPos[pos] == Vector2.new(30, 425) + MenuPos then
  399.             if _G.Settings.AimFOV >= 2 then
  400.                  _G.Settings.AimFOV = _G.Settings.AimFOV - 1
  401.             end
  402.         end
  403.         if ArrowPos[pos] == Vector2.new(30, 485) + MenuPos then
  404.             if _G.Settings.AimBulletDrop >= 3 then
  405.                 _G.Settings.AimBulletDrop = _G.Settings.AimBulletDrop - 1
  406.             end
  407.         end
  408.         if ArrowPos[pos] == Vector2.new(30, 505) + MenuPos then
  409.             if _G.Settings.AimAimKey == Enum.UserInputType.MouseButton1 then
  410.                 _G.Settings.AimAimKey = Enum.UserInputType.MouseButton2
  411.             elseif _G.Settings.AimAimKey == Enum.UserInputType.MouseButton2 then
  412.                 _G.Settings.AimAimKey = Enum.UserInputType.MouseButton1
  413.             end
  414.         end
  415.         if ArrowPos[pos] == Vector2.new(30, 525) + MenuPos then
  416.             if _G.Settings.AimBulletPrediction >= 0.1 then
  417.                 _G.Settings.AimBulletPrediction = _G.Settings.AimBulletPrediction - 0.1
  418.             end
  419.         end
  420.     end
  421.     if Input.KeyCode == Enum.KeyCode.Right then
  422.         if ArrowPos[pos] == Vector2.new(30, 405) + MenuPos then
  423.             if _G.Settings.AimSmoothness <= 29.75 then
  424.                 _G.Settings.AimSmoothness = _G.Settings.AimSmoothness + 0.25
  425.             end
  426.         end
  427.         if ArrowPos[pos] == Vector2.new(30, 425) + MenuPos then
  428.             if _G.Settings.AimFOV <= 29 then
  429.                  _G.Settings.AimFOV = _G.Settings.AimFOV + 1
  430.             end
  431.         end
  432.         if ArrowPos[pos] == Vector2.new(30, 485) + MenuPos then
  433.             if _G.Settings.AimBulletDrop <= 200 then
  434.                 _G.Settings.AimBulletDrop = _G.Settings.AimBulletDrop + 1
  435.             end
  436.         end
  437.         if ArrowPos[pos] == Vector2.new(30, 505) + MenuPos then
  438.             if _G.Settings.AimAimKey == Enum.UserInputType.MouseButton2 then
  439.                 _G.Settings.AimAimKey = Enum.UserInputType.MouseButton1
  440.             elseif _G.Settings.AimAimKey == Enum.UserInputType.MouseButton1 then
  441.                 _G.Settings.AimAimKey = Enum.UserInputType.MouseButton2
  442.             end
  443.         end
  444.         if ArrowPos[pos] == Vector2.new(30, 525) + MenuPos then
  445.             if _G.Settings.AimBulletPrediction <= 9.9 then
  446.                 _G.Settings.AimBulletPrediction = _G.Settings.AimBulletPrediction + 0.1
  447.             end
  448.         end
  449.     end  
  450. end)
  451.  
  452. messagebox("successfully loaded.", "Project-Phantom remastered v1.0.0", 0)
RAW Paste Data