Advertisement
Potato228

Best AimLock [Da Hood]

Oct 8th, 2022
9,842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 18.17 KB | None | 0 0
  1. local repo = 'https://raw.githubusercontent.com/wally-rblx/LinoriaLib/main/'
  2.  
  3. local Library = loadstring(game:HttpGet(repo .. 'Library.lua'))()
  4. local ThemeManager = loadstring(game:HttpGet(repo .. 'addons/ThemeManager.lua'))()
  5. local SaveManager = loadstring(game:HttpGet(repo .. 'addons/SaveManager.lua'))()
  6.  
  7. local Window = Library:CreateWindow({
  8.     -- Set Center to true if you want the menu to appear in the center
  9.     -- Set AutoShow to true if you want the menu to appear when it is created
  10.     -- Position and Size are also valid options here
  11.     -- but you do not need to define them unless you are changing them :)
  12.  
  13.     Title = 'Angel.lua',
  14.     Center = true,
  15.     AutoShow = true,
  16. })
  17.  
  18. -- You do not have to set your tabs & groups up this way, just a prefrence.
  19. local Tabs = {
  20.     -- Creates a new tab titled Main
  21.     Main = Window:AddTab('Target'),
  22.     Visual = Window:AddTab('Visual'),
  23.     ['UI Settings'] = Window:AddTab('UI Settings'),
  24. }
  25.  
  26. -- Groupbox and Tabbox inherit the same functions
  27. -- except Tabboxes you have to call the functions on a tab (Tabbox:AddTab(name))
  28. local LeftGroupBox = Tabs.Main:AddLeftGroupbox('Target')
  29. local RightGroupBox = Tabs.Main:AddRightGroupbox('Target Settings')
  30.  
  31. -- Tabboxes are a tiny bit different, but here's a basic example:
  32. --[[
  33.  
  34. local TabBox = Tabs.Main:AddLeftTabbox() -- Add Tabbox on left side
  35.  
  36. local Tab1 = TabBox:AddTab('Tab 1')
  37. local Tab2 = TabBox:AddTab('Tab 2')
  38.  
  39. -- You can now call AddToggle, etc on the tabs you added to the Tabbox
  40. ]]
  41.  
  42. -- Groupbox:AddToggle
  43. -- Arguments: Index, Options
  44.  
  45.  
  46. LeftGroupBox:AddToggle('Showdot', {
  47.     Text = 'ShowBox',
  48.     Default = true, -- Default value (true / false)
  49.     Tooltip = '', -- Information shown when you hover over the toggle
  50. });
  51.  
  52.  
  53. LeftGroupBox:AddToggle('Target', {
  54.     Text = 'Target',
  55.     Default = true, -- Default value (true / false)
  56.     Tooltip = '', -- Information shown when you hover over the toggle
  57. })
  58. Toggles.Target:OnChanged(function()
  59.     -- here we get our toggle object & then get its value
  60.     getgenv().Target = Toggles.Target.Value
  61. end)
  62.  
  63. -- This should print to the console: "My toggle state changed! New value: false"
  64. Toggles.Target:SetValue(false)
  65.  
  66. LeftGroupBox:AddToggle('Airshot', {
  67.     Text = 'Airshot',
  68.     Default = true, -- Default value (true / false)
  69.     Tooltip = '', -- Information shown when you hover over the toggle
  70. })
  71. Toggles.Airshot:OnChanged(function()
  72.     -- here we get our toggle object & then get its value
  73.     getgenv().AirshotFunccc = Toggles.Airshot.Value
  74. end)
  75.  
  76. -- This should print to the console: "My toggle state changed! New value: false"
  77. Toggles.Airshot:SetValue(false)
  78.  
  79.  
  80. LeftGroupBox:AddToggle('NotifMode', {
  81.     Text = 'Notification',
  82.     Default = true, -- Default value (true / false)
  83. })
  84.  
  85. LeftGroupBox:AddToggle('ChatMode', {
  86.     Text = 'Chat Mode',
  87.     Default = true, -- Default value (true / false)
  88.     Tooltip = '', -- Information shown when you hover over the toggle
  89. })
  90. Toggles.ChatMode:OnChanged(function()
  91.     -- here we get our toggle object & then get its value
  92.     getgenv().ChatMode = Toggles.ChatMode.Value
  93. end)
  94.  
  95. -- This should print to the console: "My toggle state changed! New value: false"
  96. Toggles.ChatMode:SetValue(false)
  97.  
  98.  
  99.  
  100. Toggles.NotifMode:OnChanged(function()
  101.     getgenv().NotifMode = Toggles.NotifMode.Value
  102. end)
  103.  
  104. -- This should print to the console: "My toggle state changed! New value: false"
  105. Toggles.NotifMode:SetValue(false)
  106.  
  107. LeftGroupBox:AddToggle('AutoPred', {
  108.     Text = 'Ping Based',
  109.     Default = true, -- Default value (true / false)
  110.     Tooltip = '', -- Information shown when you hover over the toggle
  111. })
  112. Toggles.AutoPred:OnChanged(function()
  113.     -- here we get our toggle object & then get its value
  114.     getgenv().AutoPrediction = Toggles.AutoPred.Value
  115. end)
  116.  
  117. -- This should print to the console: "My toggle state changed! New value: false"
  118. Toggles.AutoPred:SetValue(false)
  119.  
  120. -- Groupbox:AddInput
  121. -- Arguments: Idx, Info
  122. LeftGroupBox:AddInput('Prediction', {
  123.     Default = '0.1229',
  124.     Numeric = false, -- true / false, only allows numbers
  125.     Finished = false, -- true / false, only calls callback when you press enter
  126.  
  127.     Text = 'Prediction',
  128.     Tooltip = '', -- Information shown when you hover over the textbox
  129.  
  130.     Placeholder = 'Enter New Pred Here', -- placeholder text when the box is empty
  131.     -- MaxLength is also an option which is the max length of the text
  132. })
  133.  
  134. Options.Prediction:OnChanged(function()
  135.     getgenv().Prediction = Options.Prediction.Value
  136. end)
  137.  
  138. Options.Prediction:SetValue(0.1229)
  139.  
  140. -- Groupbox:AddDropdown
  141. -- Arguments: Idx, Info
  142.  
  143. LeftGroupBox:AddDropdown('MyDropdown', {
  144.     Values = { 'Head', 'UpperTorso', 'HumanoidRootPart', 'RightFoot' },
  145.     Default = 1, -- number index of the value / string
  146.     Multi = false, -- true / false, allows multiple choices to be selected
  147.  
  148.     Text = 'Hitpart',
  149.     Tooltip = 'This is a tooltip', -- Information shown when you hover over the textbox
  150. })
  151.  
  152. Options.MyDropdown:OnChanged(function()
  153.     getgenv().Partz = Options.MyDropdown.Value
  154. end)
  155.  
  156. Options.MyDropdown:SetValue('UpperTorso')
  157.  
  158.  
  159. RightGroupBox:AddDivider()
  160.  
  161. -- // Target Settings -- //
  162.  
  163.  
  164. RightGroupBox:AddLabel('Hitbox Color'):AddColorPicker('ColorPicker', {
  165.     Default = Color3.new(0, 1, 0), -- Bright green
  166.     Title = 'Hitbox Color', -- Optional. Allows you to have a custom color picker title (when you open it)
  167. });
  168.  
  169.  
  170. RightGroupBox:AddSlider('MySlider', {
  171.     Text = 'Hitbox Transparency',
  172.  
  173.     -- Text, Default, Min, Max, Rounding must be specified.
  174.     -- Rounding is the number of decimal places for precision.
  175.  
  176.     -- Example:
  177.     -- Rounding 0 - 5
  178.     -- Rounding 1 - 5.1
  179.     -- Rounding 2 - 5.15
  180.     -- Rounding 3 - 5.155
  181.  
  182.     Default = 0,
  183.     Min = 0,
  184.     Max = 1,
  185.     Rounding = 1,
  186.  
  187.     Compact = false, -- If set to true, then it will hide the label
  188. });
  189.  
  190. Options.MySlider:SetValue(0.3)
  191.  
  192. RightGroupBox:AddDivider()
  193.  
  194. RightGroupBox:AddToggle('FOVToggle', {
  195.     Text = 'FOV',
  196.     Default = true, -- Default value (true / false)
  197.     Tooltip = '', -- Information shown when you hover over the toggle
  198. });
  199.  
  200. RightGroupBox:AddToggle('FOVFilled', {
  201.     Text = 'FOV Filled',
  202.     Default = false, -- Default value (true / false)
  203.     Tooltip = '', -- Information shown when you hover over the toggle
  204. });
  205.  
  206. RightGroupBox:AddSlider('FOV', {
  207.     Text = 'FOV Radius',
  208.  
  209.     Default = 0,
  210.     Min = 0,
  211.     Max = 750,
  212.     Rounding = 0,
  213.  
  214.     Compact = false, -- If set to true, then it will hide the label
  215. });
  216.  
  217. Options.FOV:SetValue(280)
  218.  
  219. RightGroupBox:AddSlider('Thickness', {
  220.     Text = 'FOV Thickness',
  221.  
  222.     Default = 0,
  223.     Min = 0,
  224.     Max = 10,
  225.     Rounding = 1,
  226.  
  227.     Compact = false, -- If set to true, then it will hide the label
  228. });
  229.  
  230. Options.Thickness:SetValue(0)
  231.  
  232. RightGroupBox:AddSlider('FOVTrans', {
  233.     Text = 'FOV Transparency',
  234.  
  235.     -- Text, Default, Min, Max, Rounding must be specified.
  236.     -- Rounding is the number of decimal places for precision.
  237.  
  238.     -- Example:
  239.     -- Rounding 0 - 5
  240.     -- Rounding 1 - 5.1
  241.     -- Rounding 2 - 5.15
  242.     -- Rounding 3 - 5.155
  243.  
  244.     Default = 0.8,
  245.     Min = 0,
  246.     Max = 1,
  247.     Rounding = 1,
  248.  
  249.     Compact = false, -- If set to true, then it will hide the label
  250. });
  251.  
  252.  
  253. -- Library functions
  254. -- Sets the watermark visibility
  255. Library:SetWatermarkVisibility(true)
  256.  
  257. -- Sets the watermark text
  258. Library:SetWatermark('Angel.lua')
  259.  
  260. Library.KeybindFrame.Visible = true; -- todo: add a function for this
  261.  
  262. Library:OnUnload(function()
  263.     print('Unloaded!')
  264.     Library.Unloaded = true
  265. end)
  266.  
  267. -- UI Settings
  268. local MenuGroup = Tabs['UI Settings']:AddLeftGroupbox('Menu')
  269.  
  270. -- I set NoUI so it does not show up in the keybinds menu
  271. MenuGroup:AddButton('Unload', function() Library:Unload() end)
  272. MenuGroup:AddLabel('Menu bind'):AddKeyPicker('MenuKeybind', { Default = 'End', NoUI = true, Text = 'Menu keybind' })
  273.  
  274. Library.ToggleKeybind = Options.MenuKeybind -- Allows you to have a custom keybind for the menu
  275.  
  276. -- Addons:
  277. -- SaveManager (Allows you to have a configuration system)
  278. -- ThemeManager (Allows you to have a menu theme system)
  279.  
  280. -- Hand the library over to our managers
  281. ThemeManager:SetLibrary(Library)
  282. SaveManager:SetLibrary(Library)
  283.  
  284. -- Ignore keys that are used by ThemeManager.
  285. -- (we dont want configs to save themes, do we?)
  286. SaveManager:IgnoreThemeSettings()
  287.  
  288. -- Adds our MenuKeybind to the ignore list
  289. -- (do you want each config to have a different menu key? probably not.)
  290. SaveManager:SetIgnoreIndexes({ 'MenuKeybind' })
  291.  
  292. -- use case for doing it this way:
  293. -- a script hub could have themes in a global folder
  294. -- and game configs in a separate folder per game
  295. ThemeManager:SetFolder('MyScriptHub')
  296. SaveManager:SetFolder('MyScriptHub/specific-game')
  297.  
  298. -- Builds our config menu on the right side of our tab
  299. SaveManager:BuildConfigSection(Tabs['UI Settings'])
  300.  
  301. -- Builds our theme menu (with plenty of built in themes) on the left side
  302. -- NOTE: you can also call ThemeManager:ApplyToGroupbox to add it to a specific groupbox
  303. ThemeManager:ApplyToTab(Tabs['UI Settings'])
  304.  
  305. -- You can use the SaveManager:LoadAutoloadConfig() to load a config
  306. -- which has been marked to be one that auto loads!
  307.  
  308. --[[
  309.                          
  310.                                                                    
  311. ▀███▀▀▀██████▀   ▀███▀███▄   ▀███▀███▀   ▀██▀▀███▀▀▀██▄▀███▀   ▀██▀
  312.   ██    ▀███       █   ███▄    █   ███▄  ▄█    ██   ▀██▄ ███   ▄█  
  313.   ██   █  ██       █   █ ███   █    ▀██▄█▀     ██   ▄██   ███ ▄█  
  314.   ██▀▀██  ██       █   █  ▀██▄ █      ███      ███████     ████    
  315.   ██   █  ██       █   █   ▀██▄█    ▄█▀▀██▄    ██           ██    
  316.   ██      ██▄     ▄█   █     ███   ▄█   ▀██▄   ██           ██    
  317. ▄████▄     ▀██████▀▀ ▄███▄    ██ ▄██▄▄  ▄▄███▄████▄       ▄████▄  
  318.                                                                    
  319.                                                                    
  320.      
  321.  
  322. ]]
  323. -- Toggle
  324.     getgenv().ChatMode = false
  325.         getgenv().PartMode = true
  326.         getgenv().Key = Enum.KeyCode.E   --Тут меняй на какую кнопку будет таргетить аим лок
  327.     --
  328.    
  329.     --
  330.         _G.Types = {
  331.             Ball = Enum.PartType.Ball,
  332.             Block = Enum.PartType.Block,
  333.             Cylinder = Enum.PartType.Cylinder
  334.         }
  335.        
  336.         --variables                
  337.             local Tracer = Instance.new("Part", game.Workspace)
  338.         Tracer.Name = "gay"
  339.         Tracer.Anchored = true     
  340.         Tracer.CanCollide = false
  341.         Tracer.Parent = game.Workspace 
  342.         Tracer.Shape = _G.Types.Block
  343.         Tracer.Size = Vector3.new(7,7,7)
  344.         game:GetService("RunService").RenderStepped:Connect(function()
  345.         Tracer.Transparency = Options.MySlider.Value
  346.         Tracer.Color = Options.ColorPicker.Value
  347.         end)
  348.         --
  349.         local plr = game.Players.LocalPlayer
  350.     local mouse = plr:GetMouse()
  351.     local Runserv = game:GetService("RunService")
  352.    
  353.     circle = Drawing.new("Circle")
  354.     circle.Color = Color3.fromRGB(173,216,230)
  355.     circle.Thickness = 5
  356.     circle.NumSides = 732
  357.     circle.Transparency = 0.8
  358.     game:GetService("RunService").RenderStepped:Connect(function()
  359.     circle.Thickness = Options.Thickness.Value
  360.     circle.Radius = Options.FOV.Value
  361.     circle.Visible = Toggles.FOVToggle.Value
  362.     circle.Transparency = Options.FOVTrans.Value
  363.     circle.Filled = Toggles.FOVFilled.Value
  364.     end)
  365.    
  366.     Runserv.RenderStepped:Connect(function()
  367.         circle.Position = Vector2.new(mouse.X,mouse.Y+35)
  368.         if getgenv().AirshotFunccc == true then
  369.                 if Plr ~= nil then else return; end
  370.                 if Plr.Character.Humanoid.Jump == true and Plr.Character.Humanoid.FloorMaterial == Enum.Material.Air then
  371.                     getgenv().Partz = "RightFoot"
  372.                 else
  373.                     Plr.Character:WaitForChild("Humanoid").StateChanged:Connect(function(old,new)
  374.                         if new == Enum.HumanoidStateType.Freefall then
  375.                         getgenv().Partz = "RightFoot"
  376.                         else
  377.                             getgenv().Partz = "HumanoidRootPart"
  378.                         end
  379.                     end)
  380.                 end
  381.     end
  382.     end)
  383.        
  384.             local guimain = Instance.new("Folder", game.CoreGui)
  385.             local CC = game:GetService"Workspace".CurrentCamera
  386.         local LocalMouse = game.Players.LocalPlayer:GetMouse()
  387.             local Locking = false
  388.        
  389.            
  390.         --
  391.         if getgenv().valiansh == true then
  392.                             game.StarterGui:SetCore("SendNotification", {
  393.                        Title = "angel.lua",
  394.                        Text = "Already Loaded!",
  395.                        Duration = 5
  396.            
  397.                        })
  398.             return
  399.         end
  400.        
  401.         getgenv().valiansh = true
  402.        
  403.             local UserInputService = game:GetService("UserInputService")
  404.    
  405.         UserInputService.InputBegan:Connect(function(keygo,ok)
  406.                if (not ok) then
  407.                if (keygo.KeyCode == getgenv().Key) then
  408.                    if getgenv().Target == true then
  409.                    Locking = not Locking
  410.                    
  411.                    if Locking then
  412.                    Plr =  getClosestPlayerToCursor()
  413.                     if getgenv().ChatMode then
  414.             local A_1 = "Target: "..tostring(Plr.Character.Humanoid.DisplayName) local A_2 = "All" local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest Event:FireServer(A_1, A_2)
  415.                 end
  416.                    if getgenv().NotifMode then
  417.                     game.StarterGui:SetCore("SendNotification", {
  418.             Title = "angel.lua";
  419.             Text = "Target: "..tostring(Plr.Character.Humanoid.DisplayName);
  420.        
  421.         })
  422.         end
  423.         elseif not Locking then
  424.              if getgenv().ChatMode then
  425.             local A_1 = "Unlocked!" local A_2 = "All" local Event = game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest Event:FireServer(A_1, A_2)
  426.                 end
  427.             if getgenv().NotifMode then
  428.                             game.StarterGui:SetCore("SendNotification", {
  429.                        Title = "angel.lua",
  430.                        Text = "Unlocked",
  431.                        Duration = 5
  432.                    })
  433.                elseif getgenv().Target == false then
  434.                             game.StarterGui:SetCore("SendNotification", {
  435.                        Title = "angel.lua",
  436.                        Text = "Target left or died.",
  437.                        Duration = 5
  438.          
  439.                        })
  440.                    
  441.                    end
  442.                      
  443.      
  444.      end     end  
  445.     end
  446.     end
  447.     end)
  448.        
  449.         function getClosestPlayerToCursor()
  450.             local closestPlayer
  451.             local shortestDistance = circle.Radius
  452.    
  453.             for i, v in pairs(game.Players:GetPlayers()) do
  454.                 if v ~= game.Players.LocalPlayer and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("LowerTorso") then
  455.                     local pos = CC:WorldToViewportPoint(v.Character.PrimaryPart.Position)
  456.                     local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(LocalMouse.X, LocalMouse.Y)).magnitude
  457.                     if magnitude < shortestDistance then
  458.                         closestPlayer = v
  459.                         shortestDistance = magnitude
  460.                     end
  461.                 end
  462.             end
  463.             return closestPlayer
  464.         end
  465.     --
  466.     if getgenv().PartMode then
  467.         game:GetService"RunService".Stepped:connect(function()
  468.             if Locking and Plr.Character and Plr.Character:FindFirstChild("LowerTorso") then
  469.                 Tracer.CFrame = CFrame.new(Plr.Character.LowerTorso.Position+(Plr.Character.LowerTorso.Velocity*Prediction))
  470.             else
  471.                 Tracer.CFrame = CFrame.new(0, 9999, 0)
  472.             end
  473.         end)
  474.     end
  475.    
  476.        
  477.        
  478.         --
  479.         local rawmetatable = getrawmetatable(game)
  480.         local old = rawmetatable.__namecall
  481.         setreadonly(rawmetatable, false)
  482.         rawmetatable.__namecall = newcclosure(function(...)
  483.             local args = {...}
  484.             if Locking and getnamecallmethod() == "FireServer" and args[2] == "UpdateMousePos" then
  485.                 args[3] = Plr.Character[getgenv().Partz].Position+(Plr.Character[getgenv().Partz].Velocity*Prediction)
  486.                 return old(unpack(args))
  487.             end
  488.             return old(...)
  489.         end)
  490.     ---
  491.         while wait() do
  492.         if getgenv().AutoPrediction == true then
  493.             local pingvalue = game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValueString()
  494.             local split = string.split(pingvalue,'(')
  495.             local ping = tonumber(split[1])
  496.             if ping < 130 then
  497.                 getgenv().Prediction = 0.151
  498.             elseif ping < 125 then
  499.                 getgenv().Prediction = 0.149
  500.             elseif ping < 110 then
  501.                 getgenv().Prediction = 0.140
  502.             elseif ping < 105 then
  503.                 getgenv().Prediction = 0.133
  504.             elseif ping < 90 then
  505.                 getgenv().Prediction = 0.130
  506.             elseif ping < 80 then
  507.                 getgenv().Prediction = 0.128
  508.             elseif ping < 70 then
  509.                 getgenv().Prediction = 0.1230
  510.             elseif ping < 60 then
  511.                 getgenv().Prediction = 0.1229
  512.             elseif ping < 50 then
  513.                 getgenv().Prediction = 0.1225
  514.             elseif ping < 40 then
  515.                 getgenv().Prediction = 0.1256
  516.             end
  517.         end
  518.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement