Advertisement
LookPlays

Aimbot Roblox

Feb 24th, 2025 (edited)
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 25.52 KB | Gaming | 0 0
  1. local VERSION = "v1.1.20"
  2.  
  3. if not getgenv().AimbotSettings then
  4.     getgenv().AimbotSettings = {
  5.         TeamCheck = true, -- Press ] to toggle
  6.         VisibleCheck = true,
  7.         IgnoreTransparency = true, -- if enabled, visible check will automatically filter transparent objects
  8.         IgnoredTransparency = 0.5, -- all parts with a transparency greater than this will be ignored (IgnoreTransparency has to be enabled)
  9.         RefreshRate = 10, -- how fast the aimbot updates (milliseconds)
  10.         Keybind = "MouseButton2",
  11.         ToggleKey = "RightShift",
  12.         MaximumDistance = 300, -- Set this to something lower if you dont wanna lock on some random person across the map
  13.         AlwaysActive = false,
  14.         Aimbot = {
  15.             Enabled = true,
  16.             TargetPart = "Head",
  17.             Use_mousemoverel = true,
  18.             Strength = 100, -- 1% - 200%
  19.             AimType = "Hold", -- "Hold" or "Toggle"
  20.             AimAtNearestPart = false
  21.         },
  22.         AimAssist = {
  23.             Enabled = false,
  24.             MinFov = 15,
  25.             MaxFov = 80,
  26.             DynamicFov = true,
  27.             ShowFov = false, -- Shows Min & Max fov
  28.             Strength = 55, -- 1% - 100%
  29.             SlowSensitivity = true,
  30.             SlowFactor = 1.75, -- 1% - 10%
  31.             RequireMovement = true
  32.         },
  33.         FovCircle = {
  34.             Enabled = true,
  35.             Dynamic = true,
  36.             Radius = 100,
  37.             Transparency = 1,
  38.             Color = Color3.fromRGB(255,255,255),
  39.             NumSides = 64,
  40.         },
  41.         TriggerBot = {
  42.             Enabled = false,
  43.             Delay = 60, -- how long it waits before clicking (milliseconds)
  44.             Spam = true, -- for semi-auto weapons
  45.             ClicksPerSecond = 10, -- set this to 0 to get anything higher than 37 cps
  46.             UseKeybind = false, -- if enabled, your keybind must be held to use trigger bot
  47.         },
  48.         Crosshair = {
  49.             Enabled = false,
  50.             Transparency = 1,
  51.             TransparencyKeybind = 1, -- when the keybind is held, the crosshair's transparency will be changed to this
  52.             Color = Color3.fromRGB(255, 0, 0),
  53.             RainbowColor = false,
  54.             Length = 15,
  55.             Thickness = 2,
  56.             Offset = 0
  57.         },
  58.         Prediction = {
  59.             Enabled = false,
  60.             Strength = 2
  61.         },
  62.         Priority = {},
  63.         Whitelisted = {}, -- Username or User ID
  64.         WhitelistFriends = true, -- Automatically adds friends to the whitelist
  65.         Ignore = {} -- Raycast Ignore
  66.     }
  67. end
  68.  
  69. if not AimbotSettings.IgnoredTransparency then
  70.     local bind = Instance.new("BindableFunction")
  71.     bind.OnInvoke = function()
  72.         setclipboard("https://pastebin.com/raw/ZDUt4skZ")
  73.     end
  74.     game:GetService("StarterGui"):SetCore("SendNotification",{
  75.         Title = "Universal Aimbot",
  76.         Text = "Please update your script!",
  77.         Duration = 5,
  78.         Button1 = "Get Latest Script",
  79.         Callback = bind
  80.     })
  81.     return
  82. end
  83.  
  84. local players = game:GetService("Players")
  85. local player = players.LocalPlayer
  86. local camera = workspace.CurrentCamera
  87. local uis = game:GetService("UserInputService")
  88. local RunService = game:GetService("RunService")
  89.  
  90. local mousemoverel = mousemoverel
  91. local mouse1press = mouse1press or mouse1down
  92. local mouse1release = mouse1release or mouse1up
  93. local Drawingnew = Drawing.new
  94. local Fonts = Drawing.Fonts
  95. local tableinsert = table.insert
  96. local WorldToViewportPoint = camera.WorldToViewportPoint
  97. local CFramenew = CFrame.new
  98. local Vector2new = Vector2.new
  99. local fromRGB = Color3.fromRGB
  100. local fromHSV = Color3.fromHSV
  101. local mathfloor = math.floor
  102. local mathclamp = math.clamp
  103. local mathhuge = math.huge
  104. local lower = string.lower
  105. local mouse = uis:GetMouseLocation()
  106. local osclock = os.clock
  107. local RaycastParamsnew = RaycastParams.new
  108. local taskwait = task.wait
  109. local taskspawn = task.spawn
  110.  
  111. local GameId = game.GameId
  112. local ss = getgenv().AimbotSettings
  113. local Aimbot = ss.Aimbot
  114. local AimAssist = ss.AimAssist
  115. local FovCircle = ss.FovCircle
  116. local Trigger = ss.TriggerBot
  117. local Mouse = player:GetMouse()
  118.  
  119. if GameId == (111958650 or 115797356 or 147332621) then -- arsenal, counter blox, typical colors 2
  120.     ss.Ignore = {workspace.Ray_Ignore}
  121. elseif GameId == 833423526 then -- strucid
  122.     ss.Ignore = {workspace.IgnoreThese}
  123. elseif GameId == 1168263273 then -- bad business
  124.     do end
  125. elseif GameId == 2162282815 then -- rush point
  126.     ss.Ignore = {camera, player.Character, workspace.RaycastIgnore, workspace.DroppedWeapons, workspace.MapFolder.Map.Ramps, workspace.MapFolder.Map.Walls.MapWalls}
  127. elseif workspace:FindFirstChild("Ignore") then
  128.     tableinsert(ss.Ignore, workspace.Ignore)
  129. elseif workspace:FindFirstChild("RaycastIgnore") then
  130.     tableinsert(ss.Ignore, workspace.RaycastIgnore)
  131. end
  132.  
  133. if UAIM then
  134.     UAIM:Destroy()
  135. end
  136.  
  137. local bodyparts = {
  138.     "Head","UpperTorso","LowerTorso","LeftUpperArm","LeftLowerArm","LeftHand","RightUpperArm","RightLowerArm","RightHand","LeftUpperLeg","LeftLowerLeg","LeftFoot","RightUpperLeg","RightLowerLeg","RightFoot",
  139.     "Torso","Left Arm","Right Arm","Left Leg","Right Leg",
  140.     "Chest","Hips","LeftArm","LeftForearm","RightArm","RightForearm","LeftLeg","LeftForeleg","RightLeg","RightForeleg"
  141. }
  142. local ads = false
  143. local olddelta = uis.MouseDeltaSensitivity
  144. local triggering = false
  145. local mousedown = false
  146. local Ignore = {camera}
  147. local gids = { -- game ids
  148.     ['arsenal'] = 111958650,
  149.     ['pf'] = 113491250,
  150.     ['pft'] = 115272207, -- pf test place
  151.     ['pfu'] = 1256867479, -- pf unstable branch
  152.     ['bb'] = 1168263273,
  153.     ['rp'] = 2162282815, -- rush point
  154.     ['mm2'] = 66654135
  155. }
  156. local getEntry, raycast, ts, characters, teams, rp
  157. if (GameId == gids.pf) or (GameId == gids.pft) or (GameId == gids.pfu) then
  158.     local require = rawget(getrenv().shared, "require")
  159.     if require == nil then
  160.         setclipboard('loadstring(game:HttpGet("https://raw.githubusercontent.com/Spoorloos/scripts/main/pf-actor-bypass.lua"))()')
  161.         local a = Instance.new("Message", game.CoreGui)
  162.         a.Text = "-- Universal Aimbot Notice --\n\nA script has been copied to your clipboard.\nPlease put this script in your exploit's autoexec folder and rejoin the game.\n(this script is required to bypass the new update)\n\nbypass was created by Spoorloos"
  163.         return
  164.     end
  165.     local _cache = rawget(debug.getupvalue(require, 1), "_cache")
  166.     local ReplicationInterface = rawget(rawget(_cache, "ReplicationInterface"), "module")
  167.     getEntry = rawget(ReplicationInterface, "getEntry")
  168. elseif GameId == gids.bb then
  169.     for _,v in next, getgc(true) do
  170.         if typeof(v) == "table" and rawget(v, "InitProjectile") and rawget(v, "TS") then
  171.             ts = rawget(v, "TS")
  172.             characters = ts.Characters
  173.             teams = ts.Teams
  174.         end
  175.     end
  176. elseif GameId == gids.rp then
  177.     rp = true
  178.     -- CREDIT TO THIS DUDE FOR CRASH FIX https://v3rmillion.net/showthread.php?pid=8248169#pid8248169
  179.     --loadstring(game:HttpGet("https://raw.githubusercontent.com/Github-Account-39021832/Rush-Point-Fix-Crash/main/src.lua"))()
  180. end
  181.  
  182. local rootpart = (getchar and "Torso") or (ts and "Chest") or "HumanoidRootPart"
  183.  
  184. local setidentity = setidentity or setthreadidentity or set_thread_identity or setthreadcontext or set_thread_context or (syn and syn.set_thread_identity) or nil
  185. function safecall(func, env, ...)
  186.     if not setidentity then
  187.         return func(...)
  188.     end
  189.  
  190.     local suc, env = pcall(getsenv, env)
  191.     return coroutine.wrap(function(...)
  192.         setidentity(2)
  193.         if suc then
  194.             setfenv(0, env)
  195.             setfenv(1, env)
  196.         end
  197.         return func(...)
  198.     end)(...)
  199. end
  200.  
  201. local oldfuncs = {}
  202.  
  203. function IsAlive(plr)
  204.     local char = plr.Character
  205.     local humanoid = char and char:FindFirstChild("Humanoid")
  206.     if humanoid and humanoid.Health > 0 then
  207.         return char
  208.     end
  209.     return false
  210. end
  211.  
  212. function GetChar(plr)
  213.     return plr.Character
  214. end
  215.  
  216. function GetTeam(plr)
  217.     return plr.Team
  218. end
  219.  
  220. function IsFFA()
  221.     local t = {}
  222.     for _,v in next, players:GetPlayers() do
  223.         local team = GetTeam(v)
  224.         if team == nil then
  225.             return true
  226.         end
  227.  
  228.         team = team.Name or team
  229.         if t[team] then
  230.             return true
  231.         else
  232.             tableinsert(t, team)
  233.         end
  234.     end
  235.     return #t == 1
  236. end
  237.  
  238. function ClosestPlayer()
  239.     mouse = uis:GetMouseLocation()
  240.     local plr = nil
  241.     local closest = mathhuge
  242.     local myteam = GetTeam(player)
  243.     for _,v in next, ss.Priority do
  244.         v = players:FindFirstChild(v)
  245.         if v and IsAlive(v) and InFov(v) then
  246.             return v
  247.         end
  248.     end
  249.     for _,v in next, players:GetPlayers() do
  250.         if v ~= player then
  251.             local char = GetChar(v)
  252.             if char ~= nil then
  253.                 local cf = char:GetPivot()
  254.                 local vector, inViewport = WorldToViewportPoint(camera, cf.Position)
  255.                 if inViewport then
  256.                     local mag = (Vector2new(mouse.X, mouse.Y) - Vector2new(vector.X, vector.Y)).Magnitude
  257.                     local team = GetTeam(v)
  258.                     if mag < closest and ((team ~= nil and team ~= myteam) or team == nil or not ss.TeamCheck) then
  259.                         plr = v
  260.                         closest = mag
  261.                     end
  262.                 end
  263.             end
  264.         end
  265.     end
  266.     return plr
  267. end
  268.  
  269. local params = RaycastParamsnew()
  270. params.FilterType = Enum.RaycastFilterType.Blacklist
  271. params.IgnoreWater = true
  272. function IsVisible(plr, character, mycharacter, cf, targetpos, valid)
  273.     local char = character or GetChar(plr)
  274.     if ss.VisibleCheck and (valid or IsAlive(plr) and char:FindFirstChild(Aimbot.TargetPart)) then
  275.         local mychar = mycharacter or GetChar(player)
  276.         tableinsert(Ignore, mychar)
  277.         params.FilterDescendantsInstances = Ignore
  278.         local cf = cf or camera.CFrame.Position
  279.         local targetpos = targetpos or char[Aimbot.TargetPart].Position
  280.         local result = workspace:Raycast(cf, (targetpos - cf).Unit * 500, params)
  281.         if result then
  282.             local ins = result.Instance
  283.             local isdes = ins:IsDescendantOf(char)
  284.             local model = ins:FindFirstAncestorOfClass("Model")
  285.             if ss.IgnoreTransparency then
  286.                 if ins.Transparency > ss.IgnoredTransparency and not (model ~= nil and model:FindFirstChildOfClass("Humanoid")) and not isdes then
  287.                     tableinsert(Ignore, ins)
  288.                     return IsVisible(plr, char, mychar, cf, targetpos, true)
  289.                 elseif isdes then
  290.                     return true
  291.                 end
  292.             elseif isdes then
  293.                 return true
  294.             end
  295.         end
  296.     elseif not ss.VisibleCheck and IsAlive(plr) then
  297.         return true
  298.     end
  299.     return false
  300. end
  301. task.spawn(function() -- update ignore list (i have no idea if i even need this but whatever)
  302.     while true do
  303.         if ss ~= nil and typeof(ss.Ignore) == "table" then
  304.             for _,v in next, ss.Ignore do
  305.                 tableinsert(Ignore, v)
  306.             end
  307.         end
  308.         taskwait(3)
  309.     end
  310. end)
  311.  
  312. local fov
  313. function InFov(plr,Fov)
  314.     mouse = uis:GetMouseLocation()
  315.     if IsAlive(plr) then
  316.         local char = GetChar(plr)
  317.         if ts and char:FindFirstChild("Body") then
  318.             char = char.Body
  319.         end
  320.         local target = char:FindFirstChild(Aimbot.TargetPart)
  321.         if target then
  322.             local _, inViewport = WorldToViewportPoint(camera, target.Position)
  323.             if (FovCircle.Enabled or AimAssist.Enabled) and inViewport then
  324.                 for _,v in next, char:GetChildren() do
  325.                     if table.find(bodyparts, v.Name) and v.ClassName:find("Part") then
  326.                         local vector2, inViewport2 = WorldToViewportPoint(camera, v.Position)
  327.                         if inViewport2 and (Vector2new(mouse.X, mouse.Y) - Vector2new(vector2.X, vector2.Y)).Magnitude <= (Fov or fov.Radius or FovCircle.Radius) then
  328.                             return true
  329.                         end
  330.                     end
  331.                 end
  332.             elseif not FovCircle.Enabled and IsAlive(plr) then
  333.                 return true
  334.             end
  335.         else
  336.             return false
  337.         end
  338.     end
  339.     return false
  340. end
  341.  
  342. do -- compatibility
  343.     if getEntry then -- phantom forces
  344.         local playercache = {}
  345.         local function GetPlayerObject(plr)
  346.             local cached = playercache[plr]
  347.             if cached then
  348.                 return cached
  349.             end
  350.  
  351.             local obj = getEntry(plr)
  352.             playercache[plr] = obj
  353.             return obj
  354.         end
  355.  
  356.         GetChar = function(plr)
  357.             if plr == player then return nil end
  358.             local obj = GetPlayerObject(plr)
  359.             if obj ~= nil then
  360.                 local thirdPersonObject = obj._thirdPersonObject
  361.                 if thirdPersonObject then
  362.                     return thirdPersonObject:getCharacterHash().head.Parent
  363.                 end
  364.             end
  365.             return nil
  366.         end
  367.         IsAlive = GetChar
  368.     end
  369.    
  370.     if ts then -- bad business
  371.         hookfunction(PluginManager, error) -- prevent crash
  372.         GetChar = function(plr)
  373.             return characters:GetCharacter(plr)
  374.         end
  375.         IsAlive = GetChar
  376.         GetTeam = function(plr)
  377.             return teams:GetPlayerTeam(plr, plr)
  378.         end
  379.     end
  380.  
  381.     if GameId == gids.arsenal then -- arsenal
  382.         local ffa = game:GetService("ReplicatedStorage"):WaitForChild("wkspc"):WaitForChild("FFA")
  383.         IsFFA = function()
  384.             return ffa.Value
  385.         end
  386.     end
  387.  
  388.     if rp then -- rush point
  389.         local mapfolder = workspace:WaitForChild("MapFolder")
  390.         local playerfolder = mapfolder:WaitForChild("Players")
  391.         local gamestats = mapfolder:WaitForChild("GameStats")
  392.         GetChar = function(plr)
  393.             return playerfolder:FindFirstChild(plr.Name)
  394.         end
  395.         IsAlive = GetChar
  396.         GetTeam = function(plr)
  397.             local char = GetChar(plr) if not char then return "" end
  398.             local team = char:FindFirstChild("Team") if not team then return "" end
  399.             return team.Value
  400.         end
  401.         IsFFA = function()
  402.             return gamestats.GameMode.Value == "Deathmatch"
  403.         end
  404.     end
  405.  
  406.     if GameId == gids.mm2 then
  407.         local sheriff = nil
  408.         local murderer = nil
  409.         GetTeam = function(plr)
  410.             local backpack = plr.Backpack
  411.             local char = GetChar(plr)
  412.             if (backpack and backpack:FindFirstChild("Gun")) or (char and char:FindFirstChild("Gun")) then
  413.                 sheriff = plr
  414.                 return "Sheriff"
  415.             elseif (backpack and backpack:FindFirstChild("Knife")) or (char and char:FindFirstChild("Knife")) then
  416.                 murderer = plr
  417.                 return "Murderer"
  418.             end
  419.             return sheriff == player and "Sheriff" or "Innocent"
  420.         end
  421.     end
  422. end
  423.  
  424. oldfuncs.alive = IsAlive
  425. oldfuncs.character = GetChar
  426. oldfuncs.team = GetTeam
  427. oldfuncs.ffa = IsFFA
  428. oldfuncs.closest = ClosestPlayer
  429. oldfuncs.visible = IsVisible
  430. oldfuncs.fov = InFov
  431.  
  432. function IsWhitelisted(plr)
  433.     if table.find(ss.Whitelisted, (plr.Name or plr.UserId)) then
  434.         return true
  435.     end
  436.     return false
  437. end
  438.  
  439. local uit = Enum.UserInputType
  440. local kc = Enum.KeyCode
  441. local mb1 = uit.MouseButton1
  442. local conn1 = uis.InputBegan:Connect(function(i,gp)
  443.     if gp then
  444.         return
  445.     end
  446.     local a = ss.Keybind:find("Mouse") and uit[ss.Keybind] or kc[ss.Keybind]
  447.     local b = kc[ss.ToggleKey] ~= nil and kc[ss.ToggleKey]
  448.     if i.UserInputType == a or i.KeyCode == a then
  449.         if Aimbot.AimType == "Toggle" then
  450.             ads = not ads
  451.         else
  452.             ads = true
  453.         end
  454.     elseif i.KeyCode == b then
  455.         Aimbot.Enabled = not Aimbot.Enabled
  456.         fov.Visible = Aimbot.Enabled
  457.         AimAssist.Enabled = not AimAssist.Enabled
  458.     end
  459.     if i.UserInputType == mb1 then
  460.         mousedown = true
  461.     end
  462. end)
  463. local conn2 = uis.InputEnded:Connect(function(i,gp)
  464.     if gp then
  465.         return
  466.     end
  467.     local a = ss.Keybind:find("Mouse") and uit[ss.Keybind] or kc[ss.Keybind]
  468.     if (i.UserInputType == a or i.KeyCode == a) and Aimbot.AimType == "Hold" then
  469.         ads = false
  470.     end
  471.     if i.UserInputType == mb1 then
  472.         mousedown = false
  473.     end
  474. end)
  475.  
  476. fov = Drawingnew("Circle")
  477. fov.Visible = true
  478. fov.Transparency = 1
  479. fov.Color = fromRGB(255,255,255)
  480. fov.Thickness = 1
  481. fov.NumSides = 64
  482. fov.Radius = 100
  483. fov.Filled = false
  484.  
  485. -- aim assist fov circles and labels
  486. local fov1, fov2, label1, label2 = Drawingnew("Circle"), Drawingnew("Circle"), Drawingnew("Text"), Drawingnew("Text")
  487. do
  488.     for _,v in next, {fov1, fov2} do
  489.         v.Visible = false
  490.         v.Transparency = 1
  491.         v.Thickness = 1
  492.         v.NumSides = 64
  493.         v.Radius = 100
  494.         v.Filled = false
  495.     end
  496.     fov1.Color = fromRGB(255,0,0)
  497.     fov2.Color = fromRGB(0, 0, 255)
  498.    
  499.     for _,v in next, {label1,label2} do
  500.         v.Visible = false
  501.         v.Transparency = 1
  502.         v.Size = 32
  503.         v.Center = true
  504.         v.Outline = true
  505.         v.OutlineColor = fromRGB(0,0,0)
  506.         v.Font = Fonts.UI
  507.     end
  508.     label1.Color = fromRGB(255,255,255)
  509.     label1.Text = "Aim Assist only works when the player is outside the Red circle and inside the Blue circle"
  510.     label2.Color = fromRGB(255,0,0)
  511.     label2.Text = "You cannot use Aimbot and Aim Assist at the same time!"
  512. end
  513. function removefov()
  514.     fov:Remove()
  515.     fov1:Remove()
  516.     fov2:Remove()
  517.     label1:Remove()
  518.     label2:Remove()
  519. end
  520.  
  521. -- crosshair
  522. local t, b, r, l, chdestroyed = Drawingnew("Line"), Drawingnew("Line"), Drawingnew("Line"), Drawingnew("Line"), false
  523. for _,v in next, {t, b, r, l} do
  524.     pcall(function()
  525.         v.ZIndex = 100
  526.     end)
  527. end
  528. function updatecrosshair(s)
  529.     for _,v in next, {t, b, r, l} do
  530.         v.Visible = s.Enabled
  531.     end
  532.     if chdestroyed or not s.Enabled then return end
  533.     local center = camera.ViewportSize / 2
  534.     center = Vector2new(mathfloor(center.X), mathfloor(center.Y))
  535.     local length = s.Length
  536.     local offset = s.Offset
  537.  
  538.     for _,v in next, {t, b, r, l} do
  539.         v.Transparency = ads and s.TransparencyKeybind or s.Transparency
  540.         v.Color = s.RainbowColor and fromHSV(tick() % 5 / 5, 1, 1) or s.Color
  541.         v.Thickness = s.Thickness
  542.     end
  543.  
  544.     t.From = Vector2new(center.X, center.Y - offset)
  545.     t.To   = Vector2new(center.X, center.Y - offset - length)
  546.  
  547.     b.From = Vector2new(center.X, center.Y + offset)
  548.     b.To   = Vector2new(center.X, center.Y + offset + length)
  549.  
  550.     r.From = Vector2new(center.X + offset, center.Y)
  551.     r.To   = Vector2new(center.X + offset + length, center.Y)
  552.  
  553.     l.From = Vector2new(center.X - offset, center.Y)
  554.     l.To   = Vector2new(center.X - offset - length, center.Y)
  555. end
  556. function removecrosshair()
  557.     t:Remove()
  558.     b:Remove()
  559.     r:Remove()
  560.     l:Remove()
  561.     chdestroyed = true
  562. end
  563. local defaultcrosshair = {
  564.     Enabled = false,
  565.     Transparency = 1,
  566.     TransparencyKeybind = 1,
  567.     Color = fromRGB(255, 0, 0),
  568.     RainbowColor = false,
  569.     Length = 15,
  570.     Thickness = 2,
  571.     Offset = 0
  572. }
  573. updatecrosshair(ss.Crosshair or defaultcrosshair)
  574.  
  575. local lastupdate = osclock()
  576. function update()
  577.     ss.RefreshRate = mathclamp(ss.RefreshRate, 0, mathhuge)
  578.     if osclock() - lastupdate < (ss.RefreshRate / 1000) then
  579.         return
  580.     end
  581.     lastupdate = osclock()
  582.  
  583.     mouse = uis:GetMouseLocation()
  584.     local min, max, dyn, size = AimAssist.MinFov, AimAssist.MaxFov, AimAssist.DynamicFov, camera.ViewportSize
  585.     local bot, assist = Aimbot.Enabled, AimAssist.Enabled
  586.  
  587.     local plr = ClosestPlayer()
  588.     local s = (bot and not assist and Aimbot) or (assist and not bot and AimAssist) or nil
  589.     if plr ~= nil and s ~= nil then
  590.         local char, mychar = GetChar(plr), GetChar(player)
  591.         local cf, ccf = char:GetBoundingBox(), camera.CFrame
  592.         local dist = (ccf.Position - cf.Position).Magnitude
  593.  
  594.         if (ads or ss.AlwaysActive) and dist <= ss.MaximumDistance then
  595.             if IsVisible(plr) and not IsWhitelisted(plr) then
  596.                 local str = mathclamp(s.Strength, 1, (bot and 200) or (assist and 100))
  597.                 local target = Aimbot.TargetPart
  598.                 if ts and char:FindFirstChild("Body") then
  599.                     char = char.Body
  600.                 end
  601.                 if s.AimAtNearestPart then
  602.                     mouse = uis:GetMouseLocation()
  603.                     local closest = mathhuge
  604.                     for _,v in next, bodyparts do
  605.                         local part = char:FindFirstChild(v)
  606.                         if part then
  607.                             local vector = WorldToViewportPoint(camera, part.Position)
  608.                             local mag = (mouse - Vector2new(vector.X, vector.Y)).Magnitude
  609.                             if mag < closest then
  610.                                 closest = mag
  611.                                 target = part
  612.                             end
  613.                         end
  614.                     end
  615.                 else
  616.                     target = char:FindFirstChild(target)
  617.                 end
  618.                 if bot then
  619.                     if InFov(plr) and target then
  620.                         local position = target.Position
  621.                         if ss.Prediction.Enabled then
  622.                             local str = mathclamp(ss.Prediction.Strength, 1, 20) / 10
  623.                             position += target.Velocity * str * (ccf.Position - target.Position).Magnitude / 100
  624.                         end
  625.                         local vector = WorldToViewportPoint(camera, position)
  626.                         if Aimbot.Use_mousemoverel then
  627.                             str /= 100
  628.                             mousemoverel((vector.X - mouse.X) * str, (vector.Y - mouse.Y) * str)
  629.                         else
  630.                             camera.CFrame = CFramenew(ccf.Position, char[target.Name].Position)
  631.                         end
  632.                     end
  633.                 end
  634.                 if assist then
  635.                     local inmaxfov = InFov(plr, max)
  636.                     if not InFov(plr, min) and inmaxfov then
  637.                         local factor = AimAssist.SlowFactor
  638.                         if AimAssist.SlowSensitivity then
  639.                             factor = mathclamp(factor, 1, 10)
  640.                             uis.MouseDeltaSensitivity = (inmaxfov and (olddelta / factor)) or olddelta
  641.                         end
  642.                         if (AimAssist.RequireMovement and mychar:FindFirstChild("Humanoid") and mychar.Humanoid.MoveDirection.Magnitude > 0) or not AimAssist.RequireMovement or getchar then
  643.                             local body = WorldToViewportPoint(camera, char[rootpart].Position)
  644.                             local head = WorldToViewportPoint(camera, char.Head.Position)
  645.                             local vector = body
  646.                             if (mouse - Vector2new(head.X, head.Y)).Magnitude < (mouse - Vector2new(body.X, body.Y)).Magnitude then
  647.                                 vector = head
  648.                             end
  649.        
  650.                             -- distance based strength
  651.                             local mag = (ccf.Position - char[rootpart].Position).Magnitude
  652.                             local mult = (mag <= 20 and 2) or (mag <= 40 and 1.4) or 1
  653.        
  654.                             if ads then
  655.                                 mult /= 1.8
  656.                             end
  657.                             if AimAssist.SlowSensitivity then
  658.                                 mult *= factor
  659.                             end
  660.        
  661.                             str *= mult
  662.                             str /= 1000
  663.                             mousemoverel((vector.X - mouse.X) * str, (vector.Y - mouse.Y) * str * 1.2)
  664.                         end
  665.                     elseif assist and not inmaxfov then
  666.                         uis.MouseDeltaSensitivity = olddelta
  667.                     end
  668.                 end
  669.             elseif assist and not InFov(plr, max) then
  670.                 uis.MouseDeltaSensitivity = olddelta
  671.             end
  672.         end
  673.  
  674.         local target = Mouse.Target
  675.         local usebind = Trigger.UseKeybind
  676.         if not triggering and Trigger.Enabled and target ~= nil and target:IsDescendantOf(char) and not mousedown then
  677.             taskspawn(function()
  678.                 triggering = true
  679.                 if Trigger.Delay > 0 then
  680.                     taskwait(Trigger.Delay / 1000)
  681.                 end
  682.                 target = Mouse.Target
  683.                 if target ~= nil and target:IsDescendantOf(char) then
  684.                     triggering = true
  685.                     local cps = Trigger.ClicksPerSecond
  686.                     local spam = Trigger.Spam
  687.                     if cps > 37 then
  688.                         cps = 0
  689.                     end
  690.                     local waitamount = cps == 0 and 0 or 1 / cps
  691.                    
  692.                     if (usebind and ads or not usebind) then
  693.                         mouse1press()
  694.                     end
  695.                     taskwait(waitamount)
  696.                     repeat
  697.                         target = Mouse.Target
  698.                         if spam and (usebind and ads or not usebind) and not mousedown then
  699.                             mouse1press()
  700.                         end
  701.                         taskwait(waitamount)
  702.                     until char == nil or Mouse.Target == nil or not Mouse.Target:IsDescendantOf(char)
  703.                     mouse1release()
  704.                     triggering = false
  705.                 else
  706.                     triggering = false
  707.                 end
  708.             end)
  709.         end
  710.     end
  711.  
  712.     if FovCircle.Enabled then
  713.         fov.Position = mouse
  714.         fov.NumSides = FovCircle.NumSides
  715.         fov.Radius = FovCircle.Radius
  716.         fov.Transparency = FovCircle.Transparency
  717.         fov.Color = FovCircle.Color
  718.         if FovCircle.Dynamic then
  719.             fov.Radius = FovCircle.Radius / (camera.FieldOfView / 80)
  720.         end
  721.     else
  722.         fov.Transparency = 0
  723.     end
  724.  
  725.     local showfov = AimAssist.ShowFov
  726.     max = (dyn and not ads and max) or (dyn and ads and max / (camera.FieldOfView / 100)) or max
  727.     fov1.Visible = showfov
  728.     fov2.Visible = showfov
  729.     label1.Visible = showfov
  730.     label2.Visible = bot and assist
  731.     if showfov then
  732.         fov1.Position = mouse
  733.         fov1.Radius = min
  734.  
  735.         fov2.Position = mouse
  736.         fov2.Radius = max
  737.  
  738.         label1.Position = Vector2new(size.X / 2, (size.Y / 2) + max + 10)
  739.     end
  740.     if bot and assist then
  741.         label2.Position = Vector2new(size.X / 2, (size.Y / 2) + max + 42)
  742.         return
  743.     end
  744.  
  745.     updatecrosshair(ss.Crosshair or defaultcrosshair)
  746. end
  747. --local conn3 = RunService.RenderStepped:Connect(update)
  748. local name = ""
  749. for _ = 1, math.random(16, 24) do
  750.     name ..= string.char(math.random(97, 122))
  751. end
  752. RunService:BindToRenderStep(name, 0, update)
  753. local conn4 = players.PlayerAdded:Connect(function(plr)
  754.     if ss.WhitelistFriends and player:IsFriendsWith(plr.UserId) then
  755.         tableinsert(ss.Whitelisted, plr.UserId)
  756.     end
  757. end)
  758. if typeof(ss.Keybind) == "EnumItem" then
  759.     ss.Keybind = ss.Keybind.Name
  760. end
  761. if typeof(ss.ToggleKey) == "EnumItem" then
  762.     ss.ToggleKey = ss.ToggleKey.Name
  763. end
  764.  
  765. local aimbot = {Version = VERSION}
  766. local destroyed = false
  767.  
  768. function ValidType(type)
  769.     return type == "Other" or ss[type] ~= nil
  770. end
  771. function ValidOption(type,option)
  772.     return (type == "Other" and ss[option] ~= nil) or ss[type][option] ~= nil
  773. end
  774. function aimbot:Toggle(type)
  775.     assert(ValidType(type),"Universal Aimbot: bad argument to #1 'Toggle' (Invalid Type)")
  776.     if type == ("Whitelisted" or "Ignore") then
  777.         ss[type] = not ss[type]
  778.     else
  779.         ss[type].Enabled = not ss[type].Enabled
  780.     end
  781. end
  782. function aimbot:Get(type,option)
  783.     assert(ValidType(type),"Universal Aimbot: bad argument to #1 'Get' (Invalid Type)")
  784.     assert(ValidOption(type,option),"Universal Aimbot: bad argument to #2 'Get' (Invalid Option)")
  785.     if type == "Other" then
  786.         return ss[option]
  787.     end
  788.     return ss[type][option]
  789. end
  790. function aimbot:Set(type,option,value)
  791.     assert(ValidType(type),"Universal Aimbot: bad argument to #1 'Set' (Invalid Type)")
  792.     assert(ValidOption(type,option),"Universal Aimbot: bad argument to #2 'Set' (Invalid Option)")
  793.     assert(value ~= nil,"Universal Aimbot: bad argument to #3 'Set'")
  794.     if type == "Other" then
  795.         ss[option] = value
  796.     else
  797.         ss[type][option] = value
  798.     end
  799. end
  800. function aimbot:SetFunction(a,f)
  801.     assert(typeof(a) == "string",("Universal Aimbot: bad argument to #1 'SetFunction' (string expected, got %s)"):format(typeof(a)))
  802.     assert(typeof(f) == "function",("Universal Aimbot: bad argument to #2 'SetFunction' (function expected, got %s)"):format(typeof(f)))
  803.     a = lower(a)
  804.     if a == "alive" then
  805.         IsAlive = f
  806.     elseif a == "character" then
  807.         GetChar = f
  808.     elseif a == "team" then
  809.         GetTeam = f
  810.     elseif a == "ffa" then
  811.         IsFFA = f
  812.     elseif a == "closest" then
  813.         ClosestPlayer = f
  814.     elseif a == "visible" then
  815.         IsVisible = f
  816.     end
  817. end
  818. function aimbot:ResetFunction(a)
  819.     assert(typeof(a) == "string",("Universal Aimbot: bad argument to #1 'ResetFunction' (string expected, got %s)"):format(typeof(a)))
  820.     a = lower(a)
  821.     assert(oldfuncs[a] ~= nil,"Universal Aimbot: bad argument to #1 'ResetFunction' (invalid function)")
  822.     local f = oldfuncs[a]
  823.     if a == "alive" then
  824.         IsAlive = f
  825.     elseif a == "character" then
  826.         GetChar = f
  827.     elseif a == "team" then
  828.         GetTeam = f
  829.     elseif a == "ffa" then
  830.         IsFFA = f
  831.     elseif a == "closest" then
  832.         ClosestPlayer = f
  833.     elseif a == "visible" then
  834.         IsVisible = f
  835.     end
  836. end
  837. function aimbot:Destroy()
  838.     if destroyed then return end
  839.     conn1:Disconnect()
  840.     conn2:Disconnect()
  841.     --conn3:Disconnect()
  842.     conn4:Disconnect()
  843.     RunService:UnbindFromRenderStep(name)
  844.     removefov()
  845.     removecrosshair()
  846.     uis.MouseDeltaSensitivity = olddelta
  847.     destroyed = true
  848. end
  849. getgenv().UAIM = aimbot
  850. return aimbot
Tags: robloxaimbot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement