Advertisement
DangerKillerTH

aimbot

Apr 28th, 2022
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.92 KB | None | 0 0
  1. if not syn or not protectgui then
  2. getgenv().protectgui = function()end
  3. end
  4. local Library = loadstring(game:HttpGet('https://lindseyhost.com/UI/LinoriaLib.lua'))()
  5. Library:SetWatermark("HEE FF")
  6.  
  7. local Camera = workspace.CurrentCamera
  8. local Players = game:GetService("Players")
  9. local RunService = game:GetService("RunService")
  10. local GuiService = game:GetService("GuiService")
  11.  
  12. local LocalPlayer = Players.LocalPlayer
  13. local Mouse = LocalPlayer:GetMouse()
  14.  
  15. local GetChildren = game.GetChildren
  16. local WorldToScreen = Camera.WorldToScreenPoint
  17. local WorldToViewportPoint = Camera.WorldToViewportPoint
  18. local GetPartsObscuringTarget = Camera.GetPartsObscuringTarget
  19. local FindFirstChild = game.FindFirstChild
  20. local RenderStepped = RunService.RenderStepped
  21. local GuiInset = GuiService.GetGuiInset
  22.  
  23. local resume = coroutine.resume
  24. local create = coroutine.create
  25.  
  26. local ValidTargetParts = {"Head", "HumanoidRootPart"};
  27.  
  28. local function getPositionOnScreen(Vector)
  29. local Vec3, OnScreen = WorldToScreen(Camera, Vector)
  30. return Vector2.new(Vec3.X, Vec3.Y), OnScreen
  31. end
  32.  
  33. local function ValidateArguments(Args, RayMethod)
  34. local Matches = 0
  35. if #Args < RayMethod.ArgCountRequired then
  36. return false
  37. end
  38. for Pos, Argument in next, Args do
  39. if typeof(Argument) == RayMethod.Args[Pos] then
  40. Matches = Matches + 1
  41. end
  42. end
  43. return Matches >= RayMethod.ArgCountRequired
  44. end
  45.  
  46. local function getDirection(Origin, Position)
  47. return (Position - Origin).Unit * 1000
  48. end
  49.  
  50. local function getMousePosition()
  51. return Vector2.new(Mouse.X, Mouse.Y)
  52. end
  53.  
  54. local function IsPlayerVisible(Player)
  55. local PlayerCharacter = Player.Character
  56. local LocalPlayerCharacter = LocalPlayer.Character
  57.  
  58. if not (PlayerCharacter or LocalPlayerCharacter) then return end
  59.  
  60. local PlayerRoot = FindFirstChild(PlayerCharacter, Options.TargetPart.Value) or FindFirstChild(PlayerCharacter, "HumanoidRootPart")
  61.  
  62. if not PlayerRoot then return end
  63.  
  64. local CastPoints, IgnoreList = {PlayerRoot.Position, LocalPlayerCharacter, PlayerCharacter}, {LocalPlayerCharacter, PlayerCharacter}
  65. local ObscuringObjects = #GetPartsObscuringTarget(Camera, CastPoints, IgnoreList)
  66.  
  67. return ((ObscuringObjects == 0 and true) or (ObscuringObjects > 0 and false))
  68. end
  69.  
  70. local function getClosestPlayer()
  71. if not Options.TargetPart.Value then return end
  72. local Closest
  73. local DistanceToMouse
  74. for _, Player in next, GetChildren(Players) do
  75. if Player == LocalPlayer then continue end
  76. if Toggles.TeamCheck.Value and Player.Team == LocalPlayer.Team then continue end
  77.  
  78. local Character = Player.Character
  79. if not Character then continue end
  80.  
  81. if Toggles.VisibleCheck.Value and not IsPlayerVisible(Player) then continue end
  82.  
  83. local HumanoidRootPart = FindFirstChild(Character, "HumanoidRootPart")
  84. local Humanoid = FindFirstChild(Character, "Humanoid")
  85.  
  86. if not HumanoidRootPart or not Humanoid or Humanoid and Humanoid.Health <= 0 then continue end
  87.  
  88. local ScreenPosition, OnScreen = getPositionOnScreen(HumanoidRootPart.Position)
  89.  
  90. if not OnScreen then continue end
  91.  
  92. local Distance = (getMousePosition() - ScreenPosition).Magnitude
  93. if Distance <= (DistanceToMouse or (Toggles.fov_Enabled.Value and Options.Radius.Value) or 2000) then
  94. Closest = ((Options.TargetPart.Value == "Random" and Character[ValidTargetParts[math.random(1, #ValidTargetParts)]]) or Character[Options.TargetPart.Value])
  95. DistanceToMouse = Distance
  96. end
  97. end
  98. return Closest
  99. end
  100.  
  101. local Window = Library:CreateWindow("HEE aimbot :0 ez dog im nothuman")
  102.  
  103. local GeneralTab = Window:AddTab("General")
  104. local MainBOX = GeneralTab:AddLeftTabbox("Main")
  105. do
  106. local Main = MainBOX:AddTab("Main")
  107. Main:AddToggle("aim_Enabled", {Text = "Enabled"})
  108. Main:AddToggle("TeamCheck", {Text = "Team Check"})
  109. Main:AddToggle("VisibleCheck", {Text = "Visible Check"})
  110. Main:AddDropdown("TargetPart", {Text = "Target Part", Default = 1, Values = {
  111. "Head", "HumanoidRootPart", "Random"
  112. }})
  113. Main:AddDropdown("Method", {Text = "Silent Aim Method", Default = 1, Values = {
  114. "Raycast","FindPartOnRay",
  115. "FindPartOnRayWithWhitelist",
  116. "FindPartOnRayWithIgnoreList",
  117. "Mouse.Hit/Target"
  118. }})
  119. end
  120.  
  121. local FieldOfViewBOX = GeneralTab:AddLeftTabbox("Field Of View")
  122. local MiscellaneousBOX = GeneralTab:AddLeftTabbox("Miscellaneous")
  123.  
  124. local fov_circle = Drawing.new("Circle")
  125. fov_circle.Thickness = 1
  126. fov_circle.NumSides = 100
  127. fov_circle.Radius = 180
  128. fov_circle.Filled = false
  129. fov_circle.Visible = false
  130. fov_circle.ZIndex = 999
  131. fov_circle.Transparency = 1
  132. fov_circle.Color = Color3.fromRGB(54, 57, 241)
  133.  
  134. local mouse_box = Drawing.new("Square")
  135. mouse_box.Visible = true
  136. mouse_box.ZIndex = 999
  137. mouse_box.Color = Color3.fromRGB(54, 57, 241)
  138. mouse_box.Thickness = 20
  139. mouse_box.Size = Vector2.new(20, 20)
  140. mouse_box.Filled = true
  141.  
  142. local PredictionAmount = 0.165
  143.  
  144. do
  145. local Main = FieldOfViewBOX:AddTab("Field Of View")
  146. Main:AddToggle("fov_Enabled", {Text = "Enabled"})
  147. Main:AddSlider("Radius", {Text = "Radius", Min = 0, Max = 360, Default = 180, Rounding = 0}):OnChanged(function()
  148. fov_circle.Radius = Options.Radius.Value
  149. end)
  150. Main:AddToggle("Visible", {Text = "Visible"}):AddColorPicker("Color", {Default = Color3.fromRGB(54, 57, 241)}):OnChanged(function()
  151. fov_circle.Visible = Toggles.Visible.Value
  152. end)
  153. Main:AddToggle("MousePosition", {Text = "Show Fake Mouse Position"}):AddColorPicker("MouseVisualizeColor", {Default = Color3.fromRGB(54, 57, 241)}):OnChanged(function()
  154. mouse_box.Visible = Toggles.MousePosition.Value
  155. end)
  156.  
  157. local PredictionTab = MiscellaneousBOX:AddTab("Prediction")
  158. PredictionTab:AddToggle("Prediction", {Text = "Mouse.Hit/Target Prediction"})
  159. PredictionTab:AddSlider("Amount", {Text = "Prediction Amount", Min = 0.165, Max = 1, Default = 0.165, Rounding = 3}):OnChanged(function()
  160. PredictionAmount = Options.Amount.Value
  161. end)
  162. end
  163.  
  164. resume(create(function()
  165. RenderStepped:Connect(function()
  166. if Toggles.MousePosition.Value then
  167. if Toggles.aim_Enabled.Value == true and Options.Method.Value == "Mouse.Hit/Target" then
  168. mouse_box.Color = Options.MouseVisualizeColor.Value
  169.  
  170. mouse_box.Visible = ((getClosestPlayer() and true) or false)
  171. mouse_box.Position = ((getClosestPlayer() and Vector2.new(WorldToViewportPoint(Camera, getClosestPlayer().Parent.PrimaryPart.Position).X, WorldToViewportPoint(Camera, getClosestPlayer().Parent.PrimaryPart.Position).Y)) or Vector2.new(-9000, -9000)) -- I am too lazy to write this differently - xaxa
  172. end
  173. end
  174.  
  175. if Toggles.Visible.Value then
  176. fov_circle.Visible = Toggles.Visible.Value
  177. fov_circle.Color = Options.Color.Value
  178. fov_circle.Position = getMousePosition() + Vector2.new(0, 36)
  179. end
  180. end)
  181. end))
  182.  
  183. local ExpectedArguments = {
  184. FindPartOnRayWithIgnoreList = {
  185. ArgCountRequired = 3,
  186. Args = {
  187. "Instance", "Ray", "table", "boolean", "boolean"
  188. }
  189. },
  190. FindPartOnRayWithWhitelist = {
  191. ArgCountRequired = 3,
  192. Args = {
  193. "Instance", "Ray", "table", "boolean"
  194. }
  195. },
  196. FindPartOnRay = {
  197. ArgCountRequired = 2,
  198. Args = {
  199. "Instance", "Ray", "Instance", "boolean", "boolean"
  200. }
  201. },
  202. Raycast = {
  203. ArgCountRequired = 3,
  204. Args = {
  205. "Instance", "Vector3", "Vector3", "RaycastParams"
  206. }
  207. }
  208. }
  209.  
  210. local oldNamecall
  211. oldNamecall = hookmetamethod(game, "__namecall", function(...)
  212. local Method = getnamecallmethod()
  213. local Arguments = {...}
  214. local self = Arguments[1]
  215.  
  216. if Toggles.aim_Enabled.Value and self == workspace then
  217. if Method == "FindPartOnRayWithIgnoreList" and Options.Method.Value == Method then
  218. if ValidateArguments(Arguments, ExpectedArguments.FindPartOnRayWithIgnoreList) then
  219. local A_Ray = Arguments[2]
  220.  
  221. local HitPart = getClosestPlayer()
  222. if HitPart then
  223. local Origin = A_Ray.Origin
  224. local Direction = getDirection(Origin, HitPart.Position)
  225. Arguments[2] = Ray.new(Origin, Direction)
  226.  
  227. return oldNamecall(unpack(Arguments))
  228. end
  229. end
  230. elseif Method == "FindPartOnRayWithWhitelist" and Options.Method.Value == Method then
  231. if ValidateArguments(Arguments, ExpectedArguments.FindPartOnRayWithWhitelist) then
  232. local A_Ray = Arguments[2]
  233.  
  234. local HitPart = getClosestPlayer()
  235. if HitPart then
  236. local Origin = A_Ray.Origin
  237. local Direction = getDirection(Origin, HitPart.Position)
  238. Arguments[2] = Ray.new(Origin, Direction)
  239.  
  240. return oldNamecall(unpack(Arguments))
  241. end
  242. end
  243. elseif (Method == "FindPartOnRay" or Method == "findPartOnRay") and Options.Method.Value:lower() == Method:lower() then
  244. if ValidateArguments(Arguments, ExpectedArguments.FindPartOnRay) then
  245. local A_Ray = Arguments[2]
  246.  
  247. local HitPart = getClosestPlayer()
  248. if HitPart then
  249. local Origin = A_Ray.Origin
  250. local Direction = getDirection(Origin, HitPart.Position)
  251. Arguments[2] = Ray.new(Origin, Direction)
  252.  
  253. return oldNamecall(unpack(Arguments))
  254. end
  255. end
  256. elseif Method == "Raycast" and Options.Method.Value == Method then
  257. if ValidateArguments(Arguments, ExpectedArguments.Raycast) then
  258. local A_Origin = Arguments[2]
  259.  
  260. local HitPart = getClosestPlayer()
  261. if HitPart then
  262. Arguments[3] = getDirection(A_Origin, HitPart.Position)
  263.  
  264. return oldNamecall(unpack(Arguments))
  265. end
  266. end
  267. end
  268. end
  269. return oldNamecall(...)
  270. end)
  271.  
  272. local oldIndex = nil
  273. oldIndex = hookmetamethod(game, "__index", function(self, Index)
  274. if self == Mouse and (Index == "Hit" or Index == "Target") then
  275. if Toggles.aim_Enabled.Value == true and Options.Method.Value == "Mouse.Hit/Target" and getClosestPlayer() then
  276. local HitPart = getClosestPlayer()
  277.  
  278. return ((Index == "Hit" and ((Toggles.Prediction.Value == false and HitPart.CFrame) or (Toggles.Prediction.Value == true and (HitPart.CFrame + (HitPart.Velocity * PredictionAmount))))) or (Index == "Target" and HitPart))
  279. end
  280. end
  281.  
  282. return oldIndex(self, Index)
  283. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement