Advertisement
caestus6809

enuxys aimbot v3 humanoidrootpart

Mar 22nd, 2025
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.18 KB | None | 0 0
  1. --[[
  2.  
  3.     Universal Aimbot Module by Exunys © CC0 1.0 Universal (2023 - 2024)
  4.     https://github.com/Exunys
  5.  
  6. ]]
  7.  
  8. --// Cache
  9.  
  10. local game, workspace = game, workspace
  11. local getrawmetatable, getmetatable, setmetatable, pcall, getgenv, next, tick = getrawmetatable, getmetatable, setmetatable, pcall, getgenv, next, tick
  12. local Vector2new, Vector3zero, CFramenew, Color3fromRGB, Color3fromHSV, Drawingnew, TweenInfonew = Vector2.new, Vector3.zero, CFrame.new, Color3.fromRGB, Color3.fromHSV, Drawing.new, TweenInfo.new
  13. local getupvalue, mousemoverel, tablefind, tableremove, stringlower, stringsub, mathclamp = debug.getupvalue, mousemoverel or (Input and Input.MouseMove), table.find, table.remove, string.lower, string.sub, math.clamp
  14.  
  15. local GameMetatable = getrawmetatable and getrawmetatable(game) or {
  16.     -- Auxillary functions - if the executor doesn't support "getrawmetatable".
  17.  
  18.     __index = function(self, Index)
  19.         return self[Index]
  20.     end,
  21.  
  22.     __newindex = function(self, Index, Value)
  23.         self[Index] = Value
  24.     end
  25. }
  26.  
  27. local __index = GameMetatable.__index
  28. local __newindex = GameMetatable.__newindex
  29.  
  30. local getrenderproperty, setrenderproperty = getrenderproperty or __index, setrenderproperty or __newindex
  31.  
  32. local GetService = __index(game, "GetService")
  33.  
  34. --// Services
  35.  
  36. local RunService = GetService(game, "RunService")
  37. local UserInputService = GetService(game, "UserInputService")
  38. local TweenService = GetService(game, "TweenService")
  39. local Players = GetService(game, "Players")
  40.  
  41. --// Service Methods
  42.  
  43. local LocalPlayer = __index(Players, "LocalPlayer")
  44. local Camera = __index(workspace, "CurrentCamera")
  45.  
  46. local FindFirstChild, FindFirstChildOfClass = __index(game, "FindFirstChild"), __index(game, "FindFirstChildOfClass")
  47. local GetDescendants = __index(game, "GetDescendants")
  48. local WorldToViewportPoint = __index(Camera, "WorldToViewportPoint")
  49. local GetPartsObscuringTarget = __index(Camera, "GetPartsObscuringTarget")
  50. local GetMouseLocation = __index(UserInputService, "GetMouseLocation")
  51. local GetPlayers = __index(Players, "GetPlayers")
  52.  
  53. --// Variables
  54.  
  55. local RequiredDistance, Typing, Running, ServiceConnections, Animation, OriginalSensitivity = 2000, false, false, {}
  56. local Connect, Disconnect = __index(game, "DescendantAdded").Connect
  57.  
  58. --[[
  59. local Degrade = false
  60.  
  61. do
  62.     xpcall(function()
  63.         local TemporaryDrawing = Drawingnew("Line")
  64.         getrenderproperty = getupvalue(getmetatable(TemporaryDrawing).__index, 4)
  65.         setrenderproperty = getupvalue(getmetatable(TemporaryDrawing).__newindex, 4)
  66.         TemporaryDrawing.Remove(TemporaryDrawing)
  67.     end, function()
  68.         Degrade, getrenderproperty, setrenderproperty = true, function(Object, Key)
  69.             return Object[Key]
  70.         end, function(Object, Key, Value)
  71.             Object[Key] = Value
  72.         end
  73.     end)
  74.  
  75.     local TemporaryConnection = Connect(__index(game, "DescendantAdded"), function() end)
  76.     Disconnect = TemporaryConnection.Disconnect
  77.     Disconnect(TemporaryConnection)
  78. end
  79. ]]
  80.  
  81. --// Checking for multiple processes
  82.  
  83. if ExunysDeveloperAimbot and ExunysDeveloperAimbot.Exit then
  84.     ExunysDeveloperAimbot:Exit()
  85. end
  86.  
  87. --// Environment
  88.  
  89. getgenv().ExunysDeveloperAimbot = {
  90.     DeveloperSettings = {
  91.         UpdateMode = "RenderStepped",
  92.         TeamCheckOption = "TeamColor",
  93.         RainbowSpeed = 1 -- Bigger = Slower
  94.     },
  95.  
  96.     Settings = {
  97.         Enabled = true,
  98.  
  99.         TeamCheck = false,
  100.         AliveCheck = true,
  101.         WallCheck = true,
  102.  
  103.         OffsetToMoveDirection = false,
  104.         OffsetIncrement = 15,
  105.  
  106.         Sensitivity = 0, -- Animation length (in seconds) before fully locking onto target
  107.         Sensitivity2 = 3.5, -- mousemoverel Sensitivity
  108.  
  109.         LockMode = 1, -- 1 = CFrame; 2 = mousemoverel
  110.         LockPart = "HumanoidRootPart", -- Body part to lock on
  111.  
  112.         TriggerKey = Enum.UserInputType.MouseButton2,
  113.         Toggle = false
  114.     },
  115.  
  116.     FOVSettings = {
  117.         Enabled = true,
  118.         Visible = true,
  119.  
  120.         Radius = 90,
  121.         NumSides = 60,
  122.  
  123.         Thickness = 1,
  124.         Transparency = 1,
  125.         Filled = false,
  126.  
  127.         RainbowColor = false,
  128.         RainbowOutlineColor = false,
  129.         Color = Color3fromRGB(255, 255, 255),
  130.         OutlineColor = Color3fromRGB(0, 0, 0),
  131.         LockedColor = Color3fromRGB(255, 150, 150)
  132.     },
  133.  
  134.     Blacklisted = {},
  135.     FOVCircleOutline = Drawingnew("Circle"),
  136.     FOVCircle = Drawingnew("Circle")
  137. }
  138.  
  139. local Environment = getgenv().ExunysDeveloperAimbot
  140.  
  141. setrenderproperty(Environment.FOVCircle, "Visible", false)
  142. setrenderproperty(Environment.FOVCircleOutline, "Visible", false)
  143.  
  144. --// Core Functions
  145.  
  146. local FixUsername = function(String)
  147.     local Result
  148.  
  149.     for _, Value in next, GetPlayers(Players) do
  150.         local Name = __index(Value, "Name")
  151.  
  152.         if stringsub(stringlower(Name), 1, #String) == stringlower(String) then
  153.             Result = Name
  154.         end
  155.     end
  156.  
  157.     return Result
  158. end
  159.  
  160. local GetRainbowColor = function()
  161.     local RainbowSpeed = Environment.DeveloperSettings.RainbowSpeed
  162.  
  163.     return Color3fromHSV(tick() % RainbowSpeed / RainbowSpeed, 1, 1)
  164. end
  165.  
  166. local ConvertVector = function(Vector)
  167.     return Vector2new(Vector.X, Vector.Y)
  168. end
  169.  
  170. local CancelLock = function()
  171.     Environment.Locked = nil
  172.  
  173.     local FOVCircle = Environment.FOVCircle--Degrade and Environment.FOVCircle or Environment.FOVCircle.__OBJECT
  174.  
  175.     setrenderproperty(FOVCircle, "Color", Environment.FOVSettings.Color)
  176.     __newindex(UserInputService, "MouseDeltaSensitivity", OriginalSensitivity)
  177.  
  178.     if Animation then
  179.         Animation:Cancel()
  180.     end
  181. end
  182.  
  183. local GetClosestPlayer = function()
  184.     local Settings = Environment.Settings
  185.     local LockPart = Settings.LockPart
  186.  
  187.     if not Environment.Locked then
  188.         RequiredDistance = Environment.FOVSettings.Enabled and Environment.FOVSettings.Radius or 2000
  189.  
  190.         for _, Value in next, GetPlayers(Players) do
  191.             local Character = __index(Value, "Character")
  192.             local Humanoid = Character and FindFirstChildOfClass(Character, "Humanoid")
  193.  
  194.             if Value ~= LocalPlayer and not tablefind(Environment.Blacklisted, __index(Value, "Name")) and Character and FindFirstChild(Character, LockPart) and Humanoid then
  195.                 local PartPosition, TeamCheckOption = __index(Character[LockPart], "Position"), Environment.DeveloperSettings.TeamCheckOption
  196.  
  197.                 if Settings.TeamCheck and __index(Value, TeamCheckOption) == __index(LocalPlayer, TeamCheckOption) then
  198.                     continue
  199.                 end
  200.  
  201.                 if Settings.AliveCheck and __index(Humanoid, "Health") <= 0 then
  202.                     continue
  203.                 end
  204.  
  205.                 if Settings.WallCheck then
  206.                     local BlacklistTable = GetDescendants(__index(LocalPlayer, "Character"))
  207.  
  208.                     for _, Value in next, GetDescendants(Character) do
  209.                         BlacklistTable[#BlacklistTable + 1] = Value
  210.                     end
  211.  
  212.                     if #GetPartsObscuringTarget(Camera, {PartPosition}, BlacklistTable) > 0 then
  213.                         continue
  214.                     end
  215.                 end
  216.  
  217.                 local Vector, OnScreen, Distance = WorldToViewportPoint(Camera, PartPosition)
  218.                 Vector = ConvertVector(Vector)
  219.                 Distance = (GetMouseLocation(UserInputService) - Vector).Magnitude
  220.  
  221.                 if Distance < RequiredDistance and OnScreen then
  222.                     RequiredDistance, Environment.Locked = Distance, Value
  223.                 end
  224.             end
  225.         end
  226.     elseif (GetMouseLocation(UserInputService) - ConvertVector(WorldToViewportPoint(Camera, __index(__index(__index(Environment.Locked, "Character"), LockPart), "Position")))).Magnitude > RequiredDistance then
  227.         CancelLock()
  228.     end
  229. end
  230.  
  231. local Load = function()
  232.     OriginalSensitivity = __index(UserInputService, "MouseDeltaSensitivity")
  233.  
  234.     local Settings, FOVCircle, FOVCircleOutline, FOVSettings, Offset = Environment.Settings, Environment.FOVCircle, Environment.FOVCircleOutline, Environment.FOVSettings
  235.  
  236.     --[[
  237.     if not Degrade then
  238.         FOVCircle, FOVCircleOutline = FOVCircle.__OBJECT, FOVCircleOutline.__OBJECT
  239.     end
  240.     ]]
  241.  
  242.     ServiceConnections.RenderSteppedConnection = Connect(__index(RunService, Environment.DeveloperSettings.UpdateMode), function()
  243.         local OffsetToMoveDirection, LockPart = Settings.OffsetToMoveDirection, Settings.LockPart
  244.  
  245.         if FOVSettings.Enabled and Settings.Enabled then
  246.             for Index, Value in next, FOVSettings do
  247.                 if Index == "Color" then
  248.                     continue
  249.                 end
  250.  
  251.                 if pcall(getrenderproperty, FOVCircle, Index) then
  252.                     setrenderproperty(FOVCircle, Index, Value)
  253.                     setrenderproperty(FOVCircleOutline, Index, Value)
  254.                 end
  255.             end
  256.  
  257.             setrenderproperty(FOVCircle, "Color", (Environment.Locked and FOVSettings.LockedColor) or FOVSettings.RainbowColor and GetRainbowColor() or FOVSettings.Color)
  258.             setrenderproperty(FOVCircleOutline, "Color", FOVSettings.RainbowOutlineColor and GetRainbowColor() or FOVSettings.OutlineColor)
  259.  
  260.             setrenderproperty(FOVCircleOutline, "Thickness", FOVSettings.Thickness + 1)
  261.             setrenderproperty(FOVCircle, "Position", GetMouseLocation(UserInputService))
  262.             setrenderproperty(FOVCircleOutline, "Position", GetMouseLocation(UserInputService))
  263.         else
  264.             setrenderproperty(FOVCircle, "Visible", false)
  265.             setrenderproperty(FOVCircleOutline, "Visible", false)
  266.         end
  267.  
  268.         if Running and Settings.Enabled then
  269.             GetClosestPlayer()
  270.  
  271.             Offset = OffsetToMoveDirection and __index(FindFirstChildOfClass(__index(Environment.Locked, "Character"), "Humanoid"), "MoveDirection") * (mathclamp(Settings.OffsetIncrement, 1, 30) / 10) or Vector3zero
  272.  
  273.             if Environment.Locked then
  274.                 local LockedPosition_Vector3 = __index(__index(Environment.Locked, "Character")[LockPart], "Position")
  275.                 local LockedPosition = WorldToViewportPoint(Camera, LockedPosition_Vector3 + Offset)
  276.  
  277.                 if Environment.Settings.LockMode == 2 then
  278.                     mousemoverel((LockedPosition.X - GetMouseLocation(UserInputService).X) / Settings.Sensitivity2, (LockedPosition.Y - GetMouseLocation(UserInputService).Y) / Settings.Sensitivity2)
  279.                 else
  280.                     if Settings.Sensitivity > 0 then
  281.                         Animation = TweenService:Create(Camera, TweenInfonew(Environment.Settings.Sensitivity, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {CFrame = CFramenew(Camera.CFrame.Position, LockedPosition_Vector3)})
  282.                         Animation:Play()
  283.                     else
  284.                         __newindex(Camera, "CFrame", CFramenew(Camera.CFrame.Position, LockedPosition_Vector3 + Offset))
  285.                     end
  286.  
  287.                     __newindex(UserInputService, "MouseDeltaSensitivity", 0)
  288.                 end
  289.  
  290.                 setrenderproperty(FOVCircle, "Color", FOVSettings.LockedColor)
  291.             end
  292.         end
  293.     end)
  294.  
  295.     ServiceConnections.InputBeganConnection = Connect(__index(UserInputService, "InputBegan"), function(Input)
  296.         local TriggerKey, Toggle = Settings.TriggerKey, Settings.Toggle
  297.  
  298.         if Typing then
  299.             return
  300.         end
  301.  
  302.         if Input.UserInputType == Enum.UserInputType.Keyboard and Input.KeyCode == TriggerKey or Input.UserInputType == TriggerKey then
  303.             if Toggle then
  304.                 Running = not Running
  305.  
  306.                 if not Running then
  307.                     CancelLock()
  308.                 end
  309.             else
  310.                 Running = true
  311.             end
  312.         end
  313.     end)
  314.  
  315.     ServiceConnections.InputEndedConnection = Connect(__index(UserInputService, "InputEnded"), function(Input)
  316.         local TriggerKey, Toggle = Settings.TriggerKey, Settings.Toggle
  317.  
  318.         if Toggle or Typing then
  319.             return
  320.         end
  321.  
  322.         if Input.UserInputType == Enum.UserInputType.Keyboard and Input.KeyCode == TriggerKey or Input.UserInputType == TriggerKey then
  323.             Running = false
  324.             CancelLock()
  325.         end
  326.     end)
  327. end
  328.  
  329. --// Typing Check
  330.  
  331. ServiceConnections.TypingStartedConnection = Connect(__index(UserInputService, "TextBoxFocused"), function()
  332.     Typing = true
  333. end)
  334.  
  335. ServiceConnections.TypingEndedConnection = Connect(__index(UserInputService, "TextBoxFocusReleased"), function()
  336.     Typing = false
  337. end)
  338.  
  339. --// Functions
  340.  
  341. function Environment.Exit(self) -- METHOD | ExunysDeveloperAimbot:Exit(<void>)
  342.     assert(self, "EXUNYS_AIMBOT-V3.Exit: Missing parameter #1 \"self\" <table>.")
  343.  
  344.     for Index, _ in next, ServiceConnections do
  345.         Disconnect(ServiceConnections[Index])
  346.     end
  347.  
  348.     Load = nil; ConvertVector = nil; CancelLock = nil; GetClosestPlayer = nil; GetRainbowColor = nil; FixUsername = nil
  349.  
  350.     self.FOVCircle:Remove()
  351.     self.FOVCircleOutline:Remove()
  352.     getgenv().ExunysDeveloperAimbot = nil
  353. end
  354.  
  355. function Environment.Restart() -- ExunysDeveloperAimbot.Restart(<void>)
  356.     for Index, _ in next, ServiceConnections do
  357.         Disconnect(ServiceConnections[Index])
  358.     end
  359.  
  360.     Load()
  361. end
  362.  
  363. function Environment.Blacklist(self, Username) -- METHOD | ExunysDeveloperAimbot:Blacklist(<string> Player Name)
  364.     assert(self, "EXUNYS_AIMBOT-V3.Blacklist: Missing parameter #1 \"self\" <table>.")
  365.     assert(Username, "EXUNYS_AIMBOT-V3.Blacklist: Missing parameter #2 \"Username\" <string>.")
  366.  
  367.     Username = FixUsername(Username)
  368.  
  369.     assert(self, "EXUNYS_AIMBOT-V3.Blacklist: User "..Username.." couldn't be found.")
  370.  
  371.     self.Blacklisted[#self.Blacklisted + 1] = Username
  372. end
  373.  
  374. function Environment.Whitelist(self, Username) -- METHOD | ExunysDeveloperAimbot:Whitelist(<string> Player Name)
  375.     assert(self, "EXUNYS_AIMBOT-V3.Whitelist: Missing parameter #1 \"self\" <table>.")
  376.     assert(Username, "EXUNYS_AIMBOT-V3.Whitelist: Missing parameter #2 \"Username\" <string>.")
  377.  
  378.     Username = FixUsername(Username)
  379.  
  380.     assert(Username, "EXUNYS_AIMBOT-V3.Whitelist: User "..Username.." couldn't be found.")
  381.  
  382.     local Index = tablefind(self.Blacklisted, Username)
  383.  
  384.     assert(Index, "EXUNYS_AIMBOT-V3.Whitelist: User "..Username.." is not blacklisted.")
  385.  
  386.     tableremove(self.Blacklisted, Index)
  387. end
  388.  
  389. function Environment.GetClosestPlayer() -- ExunysDeveloperAimbot.GetClosestPlayer(<void>)
  390.     GetClosestPlayer()
  391.     local Value = Environment.Locked
  392.     CancelLock()
  393.  
  394.     return Value
  395. end
  396.  
  397. Environment.Load = Load -- ExunysDeveloperAimbot.Load()
  398.  
  399. setmetatable(Environment, {__call = Load})
  400.  
  401. return Environment
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement