Facebook
From ethz, 2 Weeks ago, written in Lua.
Embed
Download Paste or View Raw
Hits: 143
  1. getgenv().Settings = {
  2.     rewrittenmain = {
  3.         Enabled = true,
  4.         DOT = true,
  5.         AIRSHOT = true,
  6.         NOTIF = true,
  7.         AUTOPRED = true,
  8.         FOV = math.huge,
  9.         RESOVLER = true,
  10.     }
  11. }
  12.  
  13. local SelectedPart = "HumanoidRootPart"
  14. local Prediction = true
  15. getgenv().PredictionValue = 0.1413
  16.  getgenv().AntiGroundShots = true
  17.  
  18. local Tool = Instance.new("Tool")
  19. Tool.RequiresHandle = false
  20. Tool.Name = "Destiny"
  21. Tool.Parent = game.Players.LocalPlayer.Backpack
  22.  
  23. local player = game.Players.LocalPlayer
  24.  
  25. local function connectCharacterAdded()
  26.     player.CharacterAdded:Connect(onCharacterAdded)
  27. end
  28.  
  29. connectCharacterAdded()
  30.  
  31. player.CharacterRemoving:Connect(function()
  32.     Tool.Parent = game.Players.LocalPlayer.Backpack
  33. end)
  34.  
  35.     local AnchorCount = 0
  36.     local MaxAnchor = 50
  37.  
  38.     local CC = game:GetService"Workspace".CurrentCamera
  39.     local Plr;
  40.     local enabled = false
  41.     local mouse = game.Players.LocalPlayer:GetMouse()
  42.     local placemarker = Instance.new("Part", game.Workspace)
  43.  
  44.     function makemarker(Parent, Adornee, Color, Size, Size2)
  45.         local e = Instance.new("BillboardGui", Parent)
  46.         e.Name = "PP"
  47.         e.Adornee = Adornee
  48.         e.Size = UDim2.new(Size, Size2, Size, Size2)
  49.         e.AlwaysOnTop = Settings.rewrittenmain.DOT
  50.         local a = Instance.new("Frame", e)
  51.         if Settings.rewrittenmain.DOT == true then
  52.         a.Size = UDim2.new(1, 0, 1, 0)
  53.         else
  54.         a.Size = UDim2.new(0, 0, 0, 0)
  55.         end
  56.         if Settings.rewrittenmain.DOT == true then
  57.         a.Transparency = 0
  58.         a.BackgroundTransparency = 0
  59.         else
  60.         a.Transparency = 1
  61.         a.BackgroundTransparency = 1
  62.         end
  63.         a.BackgroundColor3 = Color
  64.         local g = Instance.new("UICorner", a)
  65.         if Settings.rewrittenmain.DOT == false then
  66.         g.CornerRadius = UDim.new(0, 0)
  67.         else
  68.         g.CornerRadius = UDim.new(1, 1)
  69.         end
  70.         return(e)
  71.     end
  72.  
  73.  
  74.     local data = game.Players:GetPlayers()
  75.     function noob(player)
  76.         local character
  77.         repeat wait() until player.Character
  78.         local handler = makemarker(guimain, player.Character:WaitForChild(SelectedPart), Color3.fromRGB(107, 184, 255), 0.3, 3)
  79.         handler.Name = player.Name
  80.         player.CharacterAdded:connect(function(Char) handler.Adornee = Char:WaitForChild(SelectedPart) end)
  81.  
  82.  
  83.         spawn(function()
  84.             while wait() do
  85.                 if player.Character then
  86.                 end
  87.             end
  88.         end)
  89.     end
  90.  
  91.     for i = 1, #data do
  92.         if data[i] ~= game.Players.LocalPlayer then
  93.             noob(data[i])
  94.         end
  95.     end
  96.  
  97.     game.Players.PlayerAdded:connect(function(Player)
  98.         noob(Player)
  99.     end)
  100.  
  101.     spawn(function()
  102.         placemarker.Anchored = true
  103.         placemarker.CanCollide = false
  104.         if Settings.rewrittenmain.DOT == true then
  105.         placemarker.Size = Vector3.new(0.5, 0.5, 0.5)
  106.         else
  107.         placemarker.Size = Vector3.new(0.5, 0.5, 0.5)
  108.         end
  109.         placemarker.Transparency = -1
  110.         if Settings.rewrittenmain.DOT then
  111.         makemarker(placemarker, placemarker, Color3.fromRGB(255, 255, 255), 0.40, 0)
  112.         end
  113.     end)
  114.  
  115.     Tool.Activated:Connect(function()
  116.             if enabled == true then
  117.                 enabled = false
  118.                 if Settings.rewrittenmain.NOTIF == true then
  119.                     Plr = getClosestPlayerToCursor()
  120.                 game.StarterGui:SetCore("SendNotification", {
  121.                     Title = "Destiny";
  122.                     Text = "Unlocked",
  123.                     Duration = 5
  124.                 })
  125.             end
  126.             else
  127.                 Plr = getClosestPlayerToCursor()
  128.                 enabled = true
  129.                 if Settings.rewrittenmain.NOTIF == true then
  130.  
  131.                     game.StarterGui:SetCore("SendNotification", {
  132.                         Title = "Destiny";
  133.                         Text = "Target: "..tostring(Plr.Character.Humanoid.DisplayName),
  134.                         Duration = 5
  135.                     })
  136.  
  137.                 end
  138.         end
  139.     end)
  140.  
  141.     function getClosestPlayerToCursor()
  142.         local closestPlayer
  143.         local shortestDistance = getgenv().Settings.rewrittenmain.FOV
  144.  
  145.         for i, v in pairs(game.Players:GetPlayers()) do
  146.             if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") then
  147.                 local pos = CC:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  148.                 local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
  149.                 if magnitude < shortestDistance then
  150.                     closestPlayer = v
  151.                     shortestDistance = magnitude
  152.                 end
  153.             end
  154.         end
  155.         return closestPlayer
  156.     end
  157.  
  158.     local pingvalue = nil;
  159.     local split = nil;
  160.     local ping = nil;
  161.  
  162.     game:GetService("RunService").Stepped:connect(function()
  163.         if enabled and Plr.Character ~= nil and Plr.Character:FindFirstChild("HumanoidRootPart") then
  164.             placemarker.CFrame = CFrame.new(Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*getgenv().PredictionValue))
  165.         else
  166.             placemarker.CFrame = CFrame.new(0, 9999, 0)
  167.         end
  168.  
  169.         if getgenv().Settings.rewrittenmain.AUTOPRED == true then
  170.    local pingvalue = game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValueString()
  171.     local split = string.split(pingvalue,'(')
  172.     local ping = tonumber(split[1])
  173.     if ping > 300 then
  174.         getgenv().PredictionValue = 0.234
  175.     elseif ping > 290 then
  176.         getgenv().PredictionValue = 0.222
  177.     elseif ping > 280 then
  178.         getgenv().PredictionValue = 0.24
  179.     elseif ping > 270 then
  180.         getgenv().PredictionValue = 0.2385
  181.     elseif ping > 260 then
  182.         getgenv().PredictionValue = 0.2158
  183.     elseif ping > 250 then
  184.         getgenv().PredictionValue = 0.2148
  185.     elseif ping > 240 then
  186.         getgenv().PredictionValue = 0.24
  187.     elseif ping > 230 then
  188.         getgenv().PredictionValue = 0.23
  189.     elseif ping > 220 then
  190.         getgenv().PredictionValue = 0.2
  191.     elseif ping > 210 then
  192.         getgenv().PredictionValue = 0.19834398934
  193.     elseif ping > 200 then
  194.         getgenv().PredictionValue = 0.198439891120
  195.     elseif ping > 190 then
  196.         getgenv().PredictionValue = 0.194924892910
  197.     elseif ping > 180 then
  198.         getgenv().PredictionValue = 0.19291198328
  199.     elseif ping > 180 then
  200.         getgenv().PredictionValue = 0.19291198328
  201.     elseif ping > 170 then
  202.         getgenv().PredictionValue = 0.18
  203.     elseif ping > 160 then
  204.         getgenv().PredictionValue = 0.1754
  205.     elseif ping  >150 then
  206.         getgenv().PredictionValue = 0.171
  207.     elseif ping  >140 then
  208.         getgenv().PredictionValue = 0.17
  209.        elseif ping > 130 then
  210.         getgenv().PredictionValue = 0.157
  211.     elseif ping > 120 then
  212.         getgenv().PredictionValue = 0.166
  213.     elseif ping > 110 then
  214.         getgenv().PredictionValue = 0.1642271
  215.     elseif ping > 100 then
  216.         getgenv().PredictionValue = 0.1533
  217.     elseif ping > 90 then
  218.         getgenv().PredictionValue = 0.13573
  219.     elseif ping > 80 then
  220.         getgenv().PredictionValue = 0.165
  221.     elseif ping > 70 then
  222.         getgenv().PredictionValue = 0.142
  223.     elseif ping > 50 then
  224.         getgenv().PredictionValue = 0.1267
  225.     elseif ping > 40 then
  226.         getgenv().PredictionValue = 0.12
  227.     elseif ping > 30 then
  228.         getgenv().PredictionValue = 0.112
  229.    elseif ping > 20 then
  230.         getgenv().PredictionValue = 0.102
  231.    elseif ping > 10 then
  232.         getgenv().PredictionValue = 0.087
  233.             end
  234.         end
  235.     end)
  236.  
  237.     local mt = getrawmetatable(game)
  238.     local old = mt.__namecall
  239.     setreadonly(mt, false)
  240.     mt.__namecall = newcclosure(function(...)
  241.         local args = {...}
  242.         local sex = {"UpdateMousePos", "GetMousePos", "MousePos"}
  243.         if enabled and table.find(sex, args[2]) and getnamecallmethod() == "FireServer" and getgenv().Settings.rewrittenmain.Enabled and Plr.Character ~= nil then
  244.  
  245.             -- args[3] = Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*getgenv().PredictionValue)
  246.             --[[
  247.             if getgenv().Settings.rewrittenmain.AIRSHOT == true then
  248.                 if game.Workspace.Players[Plr.Name].Humanoid:GetState() == Enum.HumanoidStateType.Freefall then -- Plr.Character:WaitForChild("Humanoid"):GetState() == Enum.HumanoidStateType.Freefall
  249.  
  250.                     --// Airshot
  251.                     args[3] = Plr.Character.LeftFoot.Position+(Plr.Character.LeftFoot.Velocity*getgenv().PredictionValue)
  252.  
  253.                 else
  254.                     args[3] = Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*getgenv().PredictionValue)
  255.  
  256.                 end
  257.             else
  258.                     args[3] = Plr.Character.HumanoidRootPart.Position+(Plr.Character.HumanoidRootPart.Velocity*getgenv().PredictionValue)
  259.             end
  260.             ]]
  261.             if Prediction == true then
  262.  
  263.             args[3] = Plr.Character[SelectedPart].Position+(Plr.Character[SelectedPart].Velocity*getgenv().PredictionValue)
  264.  
  265.             else
  266.  
  267.             args[3] = Plr.Character[SelectedPart].Position
  268.  
  269.             end
  270.  
  271.             return old(unpack(args))
  272.         end
  273.         return old(...)
  274.     end)
  275.  
  276.     game:GetService("RunService").RenderStepped:Connect(function()
  277.         if getgenv().Settings.rewrittenmain.RESOVLER == true and Plr.Character ~= nil and enabled and getgenv().Settings.rewrittenmain.Enabled then
  278.         if getgenv().Settings.rewrittenmain.AIRSHOT == true and enabled and Plr.Character ~= nil then
  279.  
  280.             if game.Workspace.Players[Plr.Name].Humanoid:GetState() == Enum.HumanoidStateType.Freefall then -- Plr.Character:WaitForChild("Humanoid"):GetState() == Enum.HumanoidStateType.Freefall
  281.  
  282.                 --// Airshot
  283.  
  284.                 --// Anchor Check
  285.  
  286.                 if Plr.Character ~= nil and Plr.Character.HumanoidRootPart.Anchored == true then
  287.                     AnchorCount = AnchorCount + 1
  288.                     if AnchorCount >= MaxAnchor then
  289.                         Prediction = false
  290.                         wait(2)
  291.                         AnchorCount = 0;
  292.                     end
  293.                 else
  294.                     Prediction = true
  295.                     AnchorCount = 0;
  296.                 end
  297.  
  298.                 SelectedPart = "LeftFoot"
  299.  
  300.             else
  301.                 --// Anchor Check
  302.  
  303.                 if Plr.Character ~= nil and Plr.Character.HumanoidRootPart.Anchored == true then
  304.                     AnchorCount = AnchorCount + 1
  305.                     if AnchorCount >= MaxAnchor then
  306.                         Prediction = false
  307.                         wait(2)
  308.                         AnchorCount = 0;
  309.                     end
  310.                 else
  311.                     Prediction = true
  312.                     AnchorCount = 0;
  313.                 end
  314.  
  315.                 SelectedPart = "HumanoidRootPart"
  316.  
  317.             end
  318.             else
  319.  
  320.                 --// Anchor Check
  321.  
  322.                 if Plr.Character ~= nil and Plr.Character.HumanoidRootPart.Anchored == true then
  323.                     AnchorCount = AnchorCount + 1
  324.                     if AnchorCount >= MaxAnchor then
  325.                         Prediction = false
  326.                         wait(2)
  327.                         AnchorCount = 0;
  328.                     end
  329.                 else
  330.                     Prediction = true
  331.                     AnchorCount = 0;
  332.                 end
  333.  
  334.                 SelectedPart = "HumanoidRootPart"
  335.             end
  336.  
  337.         else
  338.                 SelectedPart = "HumanoidRootPart"
  339.         end
  340.     end)
  341.  
  342. game:GetService("RunService").RenderStepped:connect(function()
  343. if getgenv().AntiGroundShots == true and Plr.Character.Humanoid.Jump == true and Plr.Character.Humanoid.FloorMaterial == Enum.Material.Air then
  344.     pcall(function()
  345.         local TargetVelv5 = Plr.Character.HumanoidRootPart
  346. TargetVelv5.Velocity = Vector3.new(TargetVelv5.Velocity.X, math.abs(TargetVelv5.Velocity.Y * 0.36),
  347.  TargetVelv5.Velocity.Z)
  348.         TargetVelv5.AssemblyLinearVelocity = Vector3.new(TargetVelv5.Velocity.X, math.abs(TargetVelv5.Velocity.Y * 0.36), TargetVelv5.Velocity.Z)
  349.     end)
  350.     end
  351. end)