--by Rylvns --edited 4/19/26 shared.CONFIGS = {}; shared.CONFIGS.SAVING = {--doesnt work atm FileName = "universal", SaveConfig = false, LoadConfig = false, }; shared.CONFIGS.AIMBOT = { Enabled = true, Part = "Head", FFA = false, Predictions = true, PredictionMethod = 2, --1: velocity only (ping compensation) --2: simple ballistics (velocity + bullet travel) AccelerationPrediction = true, AccelerationThreshold = 50,--only predict acceleration if moving faster than this (studs/s) IgnoreWalls = true, UseScreenDistance = true,--false: uses 3D world distance instead TargetNearest = false, RequireFirstPerson = true, MouseEmulation = false, --moves OS cursor instead, of camera (requires unlocked mouse) --requirements: RequireFirstPerson = false & Aimbot keybind = Enum.KeyCode AutoRetarget = true, Smoothing = 0, }; shared.VISUALS = {}; shared.VISUALS.ALL = { UseTeamColors = false, Color = Color3.new(1, 1, 1), RainbowColor = false, RainbowSpeed = 20, }; shared.VISUALS.BOX = { Enabled = true, AdaptiveMode = false, Mode = 1,--1: box, 2: 2d, 3: 3d _2DStyle = 1,--1: normal, 2: skeleton _BoxStyle = 1,--1: box, 2: scifi-1, 3: scifi-2 HealthBar = { Enabled = false, ColorFallback = false,--tints ESP color red->green when health bar cant display _BoxPosition = 4,--1: left, 2: right, 3: top, 4: bottom _BoxFilled = true, _BoxBackground = true, }, }; shared.VISUALS.PREDICTION = { Enabled = true, Color = Color3.fromRGB(255, 255, 0), Transparency = 0.5, Size = 6, OutlineSize = 8, }; shared.VISUALS.TRACERS = { Enabled = false, FadeByDistance = false,--can be laggy Origin = {--1: true, 0: false. only put a single 1 for x and y 0, 1, 0,--x [0, 1/2, 1] 0, 0, 1,--y [0, 1/2, 1] }, OriginRadius = 50, }; shared.VISUALS.PROXIMITY = { Enabled = true, ShowBehind = true,--only show enemies behind you MaxDistance = 500,--studs DetectLookingAtYou = true, LookAngleThreshold = 45,--degrees from their forward to you Style = 3,--1: triangle, 2: dot, 3: chevron Size = 10, EdgeOffset = 100,--pixels from screen edge ScaleByDistance = true, PulseWhenLooking = true, PulseSpeed = 6, AlertEnabled = true,--shows if looking at you AlertShowOnScreen = true, AlertColor = Color3.fromRGB(255, 50, 50), AlertPulseSpeed = 8, AlertSize = 5, }; shared.VISUALS.HIGHLIGHTS = { Enabled = false, }; shared.KEYBINDS = { Aimbot = Enum.UserInputType.MouseButton2,--hold to aim ToggleAimbot = Enum.KeyCode.F, ToggleBox = Enum.KeyCode.H, TogglePrediction = Enum.KeyCode.P, ToggleTracers = Enum.KeyCode.J, ToggleProximity = Enum.KeyCode.K, ToggleHighlights = Enum.KeyCode.L, Uninject = Enum.KeyCode.B, }; shared.WEAPONS = { [118367369949006] = {--place id ["HK416"] = {--if youre experienced then use dex explorer to view your gun stats when equipped (should be a module script then look at the code to see stats) BulletSpeed = 1500, BulletDrop = 0.25, Keybind = Enum.KeyCode.One, Enabled = false, }, ["M4A1"] = { BulletSpeed = 1500, BulletDrop = 0.25, Keybind = Enum.KeyCode.One, Enabled = true, }, ["Mk20 SSR"] = { BulletSpeed = 1500, BulletDrop = 0.25, Keybind = Enum.KeyCode.One, Enabled = false, }, ["R700"] = { BulletSpeed = 1872, BulletDrop = 0.5, Keybind = Enum.KeyCode.Two, Enabled = false, }, ["AWM"] = { BulletSpeed = 2000, BulletDrop = 0.5, Keybind = Enum.KeyCode.Two, Enabled = true, }, ["RPG-7"] = { BulletSpeed = 400, BulletDrop = 0.45, Keybind = Enum.KeyCode.Four, Enabled = true, }, }, [31490825] = { ["AK-12"] = { BulletSpeed = 910, BulletDrop = 0.2, Keybind = Enum.KeyCode.One, Enabled = false, }, ["Honey"] = { BulletSpeed = 900, BulletDrop = 0.2, Keybind = Enum.KeyCode.One, Enabled = true, }, ["AK-47"] = { BulletSpeed = 1500, BulletDrop = 0.25, Keybind = Enum.KeyCode.Two, Enabled = false, }, ["R700"] = { BulletSpeed = 1872, BulletDrop = 0.5, Keybind = Enum.KeyCode.Two, Enabled = false, }, ["Barrett"] = { BulletSpeed = 1000, BulletDrop = 0.5, Keybind = Enum.KeyCode.Two, Enabled = true, }, ["RPG-7"] = { BulletSpeed = 400, BulletDrop = 0.5, Keybind = Enum.KeyCode.Four, Enabled = true, }, }, }; --by Rylvns --edited 4/19/26 local self = { Targeting = nil, Characters = {}, Objects = { Box = {}, Prediction = {}, Tracers = {}, Proximity = {}, Highlights = {}, }, LastPositions = setmetatable({}, {__mode = "k"}), CharacterPartsCache = setmetatable({}, {__mode = "k"}), KalmanFilters = setmetatable({}, {__mode = "k"}), Toggles = { Aimbot = true, Box = true, Prediction = true, Tracers = true, Proximity = true, Highlights = true, }, SelectedWeapon = nil, Signals = {Global = {}, Index = {}}, }; local HttpService = game:GetService("HttpService"); local StatsService = game:GetService("Stats"); local UserInputService = game:GetService("UserInputService"); local RunService = game:GetService("RunService"); local Players = game:GetService("Players"); local Player = Players.LocalPlayer; local Mouse = Player:GetMouse(); local Camera = workspace.CurrentCamera; local ReplicatedStorage = game:GetService("ReplicatedStorage"); local Draw = Drawing.new; local DrawDefaults = { Line = { Thickness = 1, Transparency = 1, Visible = true, }, Quad = { Thickness = 1, Transparency = 1, Filled = false, Visible = true, }, Circle = { Radius = 5, Filled = false, NumSides = 10, Transparency = 1, Visible = true, }, }; local DrawPropertyMap = { Line = {"From", "To"}, Quad = {"PointA", "PointB", "PointC", "PointD"}, Circle = {"Position"}, }; local function Or(A, ...) for _, Value in {...} do if Value ~= A then continue end; return true; end; return false; end; local function AddSignal(Signal, Index) if Index then if not self.Signals.Index[Index] then self.Signals.Index[Index] = {}; end; table.insert(self.Signals.Index[Index], Signal); return; end; table.insert(self.Signals.Global, Signal); end; local function DisconnectIndexSignals(Index) local Signals = self.Signals.Index[Index]; if not Signals then return end; for _, Signal in ipairs(Signals) do Signal:Disconnect(); end; self.Signals.Index[Index] = nil; end; local function LerpColors(Value, Stops) for i = 1, #Stops-1 do if Value >= Stops[i][1] and Value <= Stops[i+1][1] then local Alpha = (Value-Stops[i][1])/(Stops[i+1][1]-Stops[i][1]); return Stops[i][2]:Lerp(Stops[i+1][2], Alpha); end; end; return Value <= Stops[1][1] and Stops[1][2] or Stops[#Stops][2]; end; local function DrawShape(Cache, Index, ShapeType, Properties, ...) local Shape = Cache[Index]; local Args = {...}; if not Shape then Shape = Draw(ShapeType); Cache[Index] = Shape; local Defaults = DrawDefaults[ShapeType]; if Defaults then for Property, Value in pairs(Defaults) do Shape[Property] = Value; end; end; end; local PropNames = DrawPropertyMap[ShapeType]; if PropNames then for i, PropName in ipairs(PropNames) do if Args[i] then Shape[PropName] = Args[i]; end; end; end; if Properties then for Property, Value in pairs(Properties) do Shape[Property] = Value; end; end; if not Properties or Properties.Visible == nil then Shape.Visible = true; end; return Shape; end; local function DrawLine(Cache, Index, From, To, Properties) return DrawShape(Cache, Index, "Line", Properties, From, To); end; local function DrawQuad(Cache, Index, PointA, PointB, PointC, PointD, Properties) return DrawShape(Cache, Index, "Quad", Properties, PointA, PointB, PointC, PointD); end; local function DrawCircle(Cache, Index, Position, Properties) return DrawShape(Cache, Index, "Circle", Properties, Position); end; local function PredictWithAcceleration(Object, BaseVelocity, PredictionTime) if not CONFIGS.AIMBOT.AccelerationPrediction then return BaseVelocity; end; if BaseVelocity.Magnitude < CONFIGS.AIMBOT.AccelerationThreshold then return BaseVelocity; end; if not self.LastPositions[Object] or not self.LastPositions[Object].Acceleration then return BaseVelocity; end; local Data = self.LastPositions[Object]; local Accel = Data.Acceleration; if Accel.Magnitude < 3 then return BaseVelocity; end; local VelDirection = BaseVelocity.Magnitude > 1 and BaseVelocity.Unit or Vector3.zero; local AccelDirection = Accel.Unit; local EffectivePredictionTime = math.min(PredictionTime, 0.5); if VelDirection.Magnitude > 0 then local DotProduct = VelDirection:Dot(AccelDirection); if DotProduct > 0.5 then local SpeedFactor = math.clamp(1-(BaseVelocity.Magnitude/200), 0.2, 1); local FutureVel = BaseVelocity+(Accel*EffectivePredictionTime*SpeedFactor); local MaxSpeed = 250; if FutureVel.Magnitude > MaxSpeed then FutureVel = FutureVel.Unit*MaxSpeed; end; return FutureVel; elseif DotProduct <-0.5 then local FutureVel = BaseVelocity+(Accel*EffectivePredictionTime); if BaseVelocity:Dot(FutureVel) < 0 then return Vector3.zero; end; return FutureVel; end; end; if Accel.Magnitude > 10 then local TurnPredictionTime = math.min(PredictionTime, 0.3); local FutureVel = BaseVelocity+(Accel*TurnPredictionTime*0.4); return FutureVel; end; return BaseVelocity; end; local function CreateKalmanFilter() return { X = Vector3.zero, V = Vector3.zero, A = Vector3.zero, P_pos = 1.0, P_vel = 1.0, P_acc = 1.0, Q_pos = 0.01, Q_vel = 0.1, Q_acc = 2.0, R_pos = 0.5, R_vel = 2.0, }; end; local function UpdateKalmanFilter(Filter, MeasuredPosition, MeasuredVelocity, DeltaTime) local dt = math.max(DeltaTime, 0.001); local dt2 = dt*dt; local X_pred = Filter.X+Filter.V*dt+Filter.A*(0.5*dt2); local V_pred = Filter.V+Filter.A*dt; local A_pred = Filter.A; local P_pos_pred = Filter.P_pos+Filter.Q_pos; local P_vel_pred = Filter.P_vel+Filter.Q_vel; local P_acc_pred = Filter.P_acc+Filter.Q_acc; local K_pos = P_pos_pred/(P_pos_pred+Filter.R_pos); local K_vel = P_vel_pred/(P_vel_pred+Filter.R_vel); Filter.X = X_pred+(MeasuredPosition-X_pred)*K_pos; Filter.V = V_pred+(MeasuredVelocity-V_pred)*K_vel; local MeasuredAccel = (MeasuredVelocity-Filter.V)/dt; if MeasuredAccel.Magnitude > 100 then MeasuredAccel = MeasuredAccel.Unit*100; end; local K_acc = P_acc_pred/(P_acc_pred+Filter.Q_acc); Filter.A = A_pred+(MeasuredAccel-A_pred)*K_acc; Filter.P_pos = (1-K_pos)*P_pos_pred; Filter.P_vel = (1-K_vel)*P_vel_pred; Filter.P_acc = (1-K_acc)*P_acc_pred; return Filter; end; local function PredictKalman(Filter, PredictionTime, MaxTime) local t = math.min(PredictionTime, MaxTime or 0.3); local t2 = t*t; local FuturePos = Filter.X+Filter.V*t+Filter.A*(0.5*t2); local FutureVel = Filter.V+Filter.A*t; FutureVel = Vector3.new(FutureVel.X, FutureVel.Y*0.85, FutureVel.Z); if FutureVel.Magnitude > 300 then FutureVel = FutureVel.Unit*300; end; return FuturePos, FutureVel; end; AddSignal(RunService.Heartbeat:Connect(function(Delta) for Object, Data in pairs(self.LastPositions) do if Object and Object.Parent then local NewPos = Object.Position; local NewVel = (NewPos-Data.Position)/math.max(Delta, 1e-4); if not self.KalmanFilters[Object] then self.KalmanFilters[Object] = CreateKalmanFilter(); self.KalmanFilters[Object].X = NewPos; self.KalmanFilters[Object].V = NewVel; end; local Filter = UpdateKalmanFilter( self.KalmanFilters[Object], NewPos, NewVel, Delta ); self.KalmanFilters[Object] = Filter; Data.Velocity = Filter.V; Data.Acceleration = Filter.A; Data.Position = NewPos; else self.LastPositions[Object] = nil; self.KalmanFilters[Object] = nil; end; end; end)); local function GetPredictionOf(Object) if not Object or not Object:IsA("BasePart") then return Object and Object.Position or nil end; if not CONFIGS.AIMBOT.Predictions then return Object.Position end; local Method = CONFIGS.AIMBOT.PredictionMethod; local RawPing = StatsService.Network.ServerStatsItem["Data Ping"]:GetValue()/1000; self.SmoothedPing = (self.SmoothedPing or RawPing)*0.9+RawPing*0.1; local Ping = self.SmoothedPing; local TargetPos = Object.Position; if not self.LastPositions[Object] then self.LastPositions[Object] = { Position = TargetPos, Velocity = Object.AssemblyLinearVelocity, Acceleration = Vector3.zero, }; end; local UseKalman = self.KalmanFilters[Object] ~= nil; local TargetVel = self.LastPositions[Object].Velocity; local Character = Player.Character; local Root = Character and Character.PrimaryPart; local ShooterPos = Vector3.zero; if Root then ShooterPos = Root.Position; end; local Distance = Root and (TargetPos-ShooterPos).Magnitude or 0; local IsCloseRange = Distance < 200; local RawPrediction; if Method == 1 then if UseKalman then local MaxTime = math.clamp(Ping, 0.05, 0.3); local PredPos, _ = PredictKalman(self.KalmanFilters[Object], Ping, MaxTime); RawPrediction = PredPos; else if IsCloseRange then RawPrediction = TargetPos+(TargetVel*Ping); else local PredictedVel = PredictWithAcceleration(Object, TargetVel, Ping); RawPrediction = TargetPos+(PredictedVel*Ping); end; end; else local Weapon = self.SelectedWeapon; if not Weapon or not Weapon.BulletSpeed then if UseKalman then local MaxTime = math.clamp(Ping, 0.05, 0.3); local PredPos, _ = PredictKalman(self.KalmanFilters[Object], Ping, MaxTime); RawPrediction = PredPos; else if IsCloseRange then RawPrediction = TargetPos+(TargetVel*Ping); else local PredictedVel = PredictWithAcceleration(Object, TargetVel, Ping); RawPrediction = TargetPos+(PredictedVel*Ping); end; end; elseif not Root then RawPrediction = TargetPos; else local BulletSpeed = Weapon.BulletSpeed; local BulletDropRate = Weapon.BulletDrop; local Gravity = workspace.Gravity; if Method == 2 then local TimeToHit = Distance/BulletSpeed; if UseKalman then local MaxPredTime = math.clamp(Distance/BulletSpeed, 0.05, 0.5); local PredPos1, _ = PredictKalman(self.KalmanFilters[Object], TimeToHit+Ping, MaxPredTime); local Dist2 = (PredPos1-ShooterPos).Magnitude; local TimeToHit2 = Dist2/BulletSpeed; local MaxPredTime2 = math.clamp(Dist2/BulletSpeed, 0.05, 0.5); local FinalPredPos, _ = PredictKalman(self.KalmanFilters[Object], TimeToHit2+Ping, MaxPredTime2); local FinalDist = (FinalPredPos-ShooterPos).Magnitude; local FinalTimeToHit = FinalDist/BulletSpeed; local DropAmount = 0.5*Gravity*BulletDropRate*(FinalTimeToHit^2); RawPrediction = FinalPredPos+Vector3.new(0, DropAmount, 0); else local TotalTime = TimeToHit+Ping; local PredictedVel = TargetVel; if not IsCloseRange then PredictedVel = PredictWithAcceleration(Object, TargetVel, TotalTime); end; local PredictedPos = TargetPos+(PredictedVel*TotalTime); Distance = (PredictedPos-ShooterPos).Magnitude; TimeToHit = Distance/BulletSpeed; local FinalPredictedPos = TargetPos+(PredictedVel*(TimeToHit+Ping)); local FinalDist = (FinalPredictedPos-ShooterPos).Magnitude; local FinalTimeToHit = FinalDist/BulletSpeed; local DropAmount = 0.5*Gravity*BulletDropRate*(FinalTimeToHit^2); RawPrediction = FinalPredictedPos+Vector3.new(0, DropAmount, 0); end; else RawPrediction = TargetPos; end; end; end; return RawPrediction; end; local function FindClosestPlayer(UseScreenDistance) if not Player.Character or not Player.Character:FindFirstChild("HumanoidRootPart") then return nil, math.huge; end; local ClosestPlayer = nil; local ClosestDistance = math.huge; local CameraPos = Camera.CFrame.Position; local RootPos = Player.Character.HumanoidRootPart.Position; for _, _Player in ipairs(Players:GetPlayers()) do if _Player == Player then continue end; local Character = self.Characters[_Player]; if not Character then continue end; if not Character:FindFirstChild(CONFIGS.AIMBOT.Part) then continue end; if not Character:FindFirstChild("Humanoid") then continue end; if not Character:FindFirstChild("HumanoidRootPart") then continue end; local Humanoid = Character.Humanoid; if Humanoid.Health <= 0 then continue end; local TargetPart = Character[CONFIGS.AIMBOT.Part]; if not CONFIGS.AIMBOT.FFA and _Player.Team == Player.Team then continue end; if not CONFIGS.AIMBOT.IgnoreWalls then local RayParams = RaycastParams.new(); RayParams.FilterDescendantsInstances = {Player.Character, Character}; RayParams.FilterType = Enum.RaycastFilterType.Exclude; local RayDirection = TargetPart.Position-CameraPos; local RayResult = workspace:Raycast(CameraPos, RayDirection, RayParams); local PassedWallCheck = not RayResult or RayResult.Instance:IsDescendantOf(Character); if not PassedWallCheck then continue end; end; local Distance; if UseScreenDistance then local ScreenPos, OnScreen = Camera:WorldToViewportPoint(TargetPart.Position); if not OnScreen or ScreenPos.Z <= 0 then continue end; local MousePos = CONFIGS.AIMBOT.MouseEmulation and Vector2.new(Mouse.X, Mouse.Y) or Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y/2); Distance = (Vector2.new(ScreenPos.X, ScreenPos.Y)-MousePos).Magnitude; else Distance = (RootPos-Character.HumanoidRootPart.Position).Magnitude; end; if Distance < ClosestDistance then ClosestDistance = Distance; ClosestPlayer = _Player; end; end; return ClosestPlayer, ClosestDistance; end; local function DrawBoundingBoxFor(Character, SignalKey) local _Player = Players:GetPlayerFromCharacter(Character); local OldMode = VISUALS.BOX.Mode; local BoxPositions = {}; local AllScreenVectors = {}; local CornersX = {}; local CornersY = {}; local UserId = tostring(_Player.UserId); local DrawingKeys = {}; local function GetDrawingKey(Suffix) if not DrawingKeys[Suffix] then DrawingKeys[Suffix] = UserId.."_"..Suffix; end; return DrawingKeys[Suffix]; end; local function RemoveAllDrawingsFromUser() for i, v in pairs(self.Objects.Box) do if string.find(i, UserId, 1, true) then pcall(function() v:Remove() end); self.Objects.Box[i] = nil; end; end; end; local function HideAllDrawingsFromUser() for i, v in pairs(self.Objects.Box) do if string.find(i, UserId, 1, true) then v.Visible = false; end; end; end; local function GetCachedParts(Character) if not self.CharacterPartsCache[Character] then local Parts = {}; for _, Part in pairs(Character:GetChildren()) do if Part.Name ~= "HumanoidRootPart" and Or(Part.ClassName, "Part", "MeshPart") then table.insert(Parts, Part); end; end; self.CharacterPartsCache[Character] = Parts; end; return self.CharacterPartsCache[Character]; end; AddSignal(RunService.Heartbeat:Connect(function() if not CONFIGS.AIMBOT.FFA and _Player.Team == Player.Team then RemoveAllDrawingsFromUser(); self.CharacterPartsCache[Character] = nil; return; end; Character = self.Characters[_Player]; if not Character or not Character:FindFirstChild("HumanoidRootPart") then RemoveAllDrawingsFromUser(); if Character then self.CharacterPartsCache[Character] = nil; end; return; end; local Humanoid = Character:FindFirstChild("Humanoid"); if not Humanoid or Humanoid.Health <= 0 or not self.Toggles.Box or not VISUALS.BOX.Enabled then RemoveAllDrawingsFromUser(); self.CharacterPartsCache[Character] = nil; return; end; local RootPos = Character.HumanoidRootPart.Position; local ScreenPos, OnScreenCheck = Camera:WorldToViewportPoint(RootPos); if not OnScreenCheck or ScreenPos.Z <= 0 then HideAllDrawingsFromUser(); return; end; table.clear(BoxPositions); table.clear(CornersX); table.clear(CornersY); local CameraToRootDistance = (Camera.CFrame.Position-Character.HumanoidRootPart.Position).Magnitude; local Mode = VISUALS.BOX.AdaptiveMode and (CameraToRootDistance > 220 and 1 or CameraToRootDistance > 100 and 2 or 3) or VISUALS.BOX.Mode; local Color = VISUALS.ALL.UseTeamColors and _Player.TeamColor.Color or (VISUALS.ALL.RainbowColor and Color3.fromHSV(tick()*VISUALS.ALL.RainbowSpeed%255/255, 1, 1) or VISUALS.ALL.Color); if Mode ~= OldMode then OldMode = Mode; RemoveAllDrawingsFromUser(); end; if Or(Mode, 1, 3) or (Mode == 2 and VISUALS.BOX._2DStyle == 1) then local CachedParts = GetCachedParts(Character); for _, Part in ipairs(CachedParts) do if not Part.Parent then self.CharacterPartsCache[Character] = nil; CachedParts = GetCachedParts(Character); break; end; local PartCFrame = Part.CFrame; local HalfSizeX = Part.Size.X/2; local HalfSizeY = Part.Size.Y/2; local HalfSizeZ = Part.Size.Z/2; local S1 = Camera:WorldToViewportPoint(PartCFrame*Vector3.new(-HalfSizeX, HalfSizeY, HalfSizeZ)); local S2 = Camera:WorldToViewportPoint(PartCFrame*Vector3.new(-HalfSizeX,-HalfSizeY, HalfSizeZ)); local S3 = Camera:WorldToViewportPoint(PartCFrame*Vector3.new(-HalfSizeX, HalfSizeY,-HalfSizeZ)); local S4 = Camera:WorldToViewportPoint(PartCFrame*Vector3.new(-HalfSizeX,-HalfSizeY,-HalfSizeZ)); local S5 = Camera:WorldToViewportPoint(PartCFrame*Vector3.new(HalfSizeX, HalfSizeY,-HalfSizeZ)); local S6 = Camera:WorldToViewportPoint(PartCFrame*Vector3.new(HalfSizeX,-HalfSizeY,-HalfSizeZ)); local S7 = Camera:WorldToViewportPoint(PartCFrame*Vector3.new(HalfSizeX, HalfSizeY, HalfSizeZ)); local S8 = Camera:WorldToViewportPoint(PartCFrame*Vector3.new(HalfSizeX,-HalfSizeY, HalfSizeZ)); local ScreenPositions = {S1, S2, S3, S4, S5, S6, S7, S8}; local OnScreen = S1.Z > 0; local PartColor = Part.Name == CONFIGS.AIMBOT.Part and Color3.fromRGB(255, 255, 0) or Color; if Mode == 2 and VISUALS.BOX._2DStyle == 1 then if not OnScreen then continue end; table.clear(AllScreenVectors); for i = 1, #ScreenPositions do table.insert(AllScreenVectors, Vector2.new(ScreenPositions[i].X, ScreenPositions[i].Y)); end; local CenterPos = Camera:WorldToViewportPoint(Part.Position); local Center = Vector2.new(CenterPos.X, CenterPos.Y); local LeftTopCorner, LeftBottomCorner, RightTopCorner, RightBottomCorner; for _, Corner in ipairs(AllScreenVectors) do if Corner.X <= Center.X and Corner.Y <= Center.Y then LeftTopCorner = Corner; elseif Corner.X <= Center.X and Corner.Y >= Center.Y then LeftBottomCorner = Corner; elseif Corner.X >= Center.X and Corner.Y <= Center.Y then RightTopCorner = Corner; elseif Corner.X >= Center.X and Corner.Y >= Center.Y then RightBottomCorner = Corner; end; end; if LeftTopCorner and LeftBottomCorner and RightTopCorner and RightBottomCorner then DrawQuad(self.Objects.Box, GetDrawingKey(Part.Name), LeftTopCorner, LeftBottomCorner, RightBottomCorner, RightTopCorner, {Color = PartColor}); end; elseif Mode == 1 then if OnScreen then for i = 1, #ScreenPositions do table.insert(BoxPositions, Vector2.new(ScreenPositions[i].X, ScreenPositions[i].Y)); end; end; elseif Mode == 3 then if not OnScreen then continue end; DrawQuad(self.Objects.Box, GetDrawingKey(Part.Name.."_1"), Vector2.new(S1.X, S1.Y), Vector2.new(S2.X, S2.Y), Vector2.new(S8.X, S8.Y), Vector2.new(S7.X, S7.Y), {Color = PartColor}); DrawQuad(self.Objects.Box, GetDrawingKey(Part.Name.."_2"), Vector2.new(S1.X, S1.Y), Vector2.new(S2.X, S2.Y), Vector2.new(S4.X, S4.Y), Vector2.new(S3.X, S3.Y), {Color = PartColor}); DrawQuad(self.Objects.Box, GetDrawingKey(Part.Name.."_3"), Vector2.new(S3.X, S3.Y), Vector2.new(S4.X, S4.Y), Vector2.new(S6.X, S6.Y), Vector2.new(S5.X, S5.Y), {Color = PartColor}); DrawQuad(self.Objects.Box, GetDrawingKey(Part.Name.."_4"), Vector2.new(S5.X, S5.Y), Vector2.new(S6.X, S6.Y), Vector2.new(S8.X, S8.Y), Vector2.new(S7.X, S7.Y), {Color = PartColor}); end; end; end; if Mode == 2 and VISUALS.BOX._2DStyle == 2 then local function ToScreen(Position) local ScreenPosition = Camera:WorldToViewportPoint(Position); return Vector2.new(ScreenPosition.X, ScreenPosition.Y), ScreenPosition.Z > 0; end; local Lines = {}; if Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then local H = Character:FindFirstChild("Head"); local T = Character:FindFirstChild("Torso"); local LA = Character:FindFirstChild("Left Arm"); local RA = Character:FindFirstChild("Right Arm"); local LL = Character:FindFirstChild("Left Leg"); local RL = Character:FindFirstChild("Right Leg"); if H and T and LA and RA and LL and RL then Lines = { {H.FaceFrontAttachment.WorldCFrame.Position, H.FaceCenterAttachment.WorldCFrame.Position}, {H.FaceCenterAttachment.WorldCFrame.Position, T.NeckAttachment.WorldCFrame.Position}, {T.NeckAttachment.WorldCFrame.Position, T.WaistCenterAttachment.WorldCFrame.Position}, {T.NeckAttachment.WorldCFrame.Position, LA.LeftShoulderAttachment.WorldCFrame.Position}, {T.NeckAttachment.WorldCFrame.Position, RA.RightShoulderAttachment.WorldCFrame.Position}, {LA.LeftShoulderAttachment.WorldCFrame.Position, LA.LeftGripAttachment.WorldCFrame.Position}, {RA.RightShoulderAttachment.WorldCFrame.Position, RA.RightGripAttachment.WorldCFrame.Position}, {T.WaistCenterAttachment.WorldCFrame.Position, LL.LeftFootAttachment.WorldCFrame*Vector3.new(0, LL.Size.Y, 0)}, {T.WaistCenterAttachment.WorldCFrame.Position, RL.RightFootAttachment.WorldCFrame*Vector3.new(0, RL.Size.Y, 0)}, {LL.LeftFootAttachment.WorldCFrame*Vector3.new(0, LL.Size.Y, 0), LL.LeftFootAttachment.WorldCFrame.Position}, {RL.RightFootAttachment.WorldCFrame*Vector3.new(0, RL.Size.Y, 0), RL.RightFootAttachment.WorldCFrame.Position}, }; end; elseif Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then local H = Character:FindFirstChild("Head"); local UT = Character:FindFirstChild("UpperTorso"); local LT = Character:FindFirstChild("LowerTorso"); local LUA = Character:FindFirstChild("LeftUpperArm"); local LLA = Character:FindFirstChild("LeftLowerArm"); local LH = Character:FindFirstChild("LeftHand"); local RUA = Character:FindFirstChild("RightUpperArm"); local RLA = Character:FindFirstChild("RightLowerArm"); local RH = Character:FindFirstChild("RightHand"); local LUL = Character:FindFirstChild("LeftUpperLeg"); local LLL = Character:FindFirstChild("LeftLowerLeg"); local LF = Character:FindFirstChild("LeftFoot"); local RUL = Character:FindFirstChild("RightUpperLeg"); local RLL = Character:FindFirstChild("RightLowerLeg"); local RF = Character:FindFirstChild("RightFoot"); if H and UT and LT and LUA and LLA and LH and RUA and RLA and RH and LUL and LLL and LF and RUL and RLL and RF then Lines = { {H.FaceFrontAttachment.WorldCFrame.Position, H.FaceCenterAttachment.WorldCFrame.Position}, {H.FaceCenterAttachment.WorldCFrame.Position, UT.NeckAttachment.WorldCFrame.Position}, {UT.NeckAttachment.WorldCFrame.Position, UT.WaistRigAttachment.WorldCFrame.Position}, {UT.NeckAttachment.WorldCFrame.Position, LUA.LeftShoulderAttachment.WorldCFrame.Position}, {LUA.LeftShoulderAttachment.WorldCFrame.Position, LUA.LeftElbowRigAttachment.WorldCFrame.Position}, {LUA.LeftElbowRigAttachment.WorldCFrame.Position, LLA.LeftWristRigAttachment.WorldCFrame.Position}, {LLA.LeftWristRigAttachment.WorldCFrame.Position, LH.LeftGripAttachment.WorldCFrame.Position}, {UT.NeckAttachment.WorldCFrame.Position, RUA.RightShoulderAttachment.WorldCFrame.Position}, {RUA.RightShoulderAttachment.WorldCFrame.Position, RUA.RightElbowRigAttachment.WorldCFrame.Position}, {RUA.RightElbowRigAttachment.WorldCFrame.Position, RLA.RightWristRigAttachment.WorldCFrame.Position}, {RLA.RightWristRigAttachment.WorldCFrame.Position, RH.RightGripAttachment.WorldCFrame.Position}, {UT.WaistRigAttachment.WorldCFrame.Position, LT.WaistCenterAttachment.WorldCFrame.Position}, {LT.WaistCenterAttachment.WorldCFrame.Position, LT.LeftHipRigAttachment.WorldCFrame.Position}, {LT.WaistCenterAttachment.WorldCFrame.Position, LT.RightHipRigAttachment.WorldCFrame.Position}, {LT.LeftHipRigAttachment.WorldCFrame.Position, LUL.LeftKneeRigAttachment.WorldCFrame.Position}, {LUL.LeftKneeRigAttachment.WorldCFrame.Position, LLL.LeftAnkleRigAttachment.WorldCFrame.Position}, {LLL.LeftAnkleRigAttachment.WorldCFrame.Position, LF.LeftFootAttachment.WorldCFrame.Position}, {LT.RightHipRigAttachment.WorldCFrame.Position, RUL.RightKneeRigAttachment.WorldCFrame.Position}, {RUL.RightKneeRigAttachment.WorldCFrame.Position, RLL.RightAnkleRigAttachment.WorldCFrame.Position}, {RLL.RightAnkleRigAttachment.WorldCFrame.Position, RF.RightFootAttachment.WorldCFrame.Position}, }; end; end; for i, Line in ipairs(Lines) do local From, FromVis = ToScreen(Line[1]); local To, ToVis = ToScreen(Line[2]); if FromVis and ToVis then DrawLine(self.Objects.Box, GetDrawingKey("skel_"..i), From, To, {Color = Color, Thickness = 2}); end; end; end; if Mode == 1 and #BoxPositions > 0 then for i = 1, #BoxPositions do CornersX[i] = BoxPositions[i].X; CornersY[i] = BoxPositions[i].Y; end; local MinX, MaxX = math.huge,-math.huge; local MinY, MaxY = math.huge,-math.huge; for i = 1, #CornersX do local X, Y = CornersX[i], CornersY[i]; if X < MinX then MinX = X end; if X > MaxX then MaxX = X end; if Y < MinY then MinY = Y end; if Y > MaxY then MaxY = Y end; end; local LeftTopCorner = Vector2.new(MinX, MinY); local LeftBottomCorner = Vector2.new(MinX, MaxY); local RightTopCorner = Vector2.new(MaxX, MinY); local RightBottomCorner = Vector2.new(MaxX, MaxY); local Width = (LeftTopCorner-RightTopCorner).Magnitude; local Height = (LeftTopCorner-LeftBottomCorner).Magnitude; if VISUALS.BOX._BoxStyle == 1 or Width <= 20 or Height <= 20 then DrawQuad(self.Objects.Box, GetDrawingKey("1"), LeftTopCorner, LeftBottomCorner, RightBottomCorner, RightTopCorner, {Color = Color}); elseif VISUALS.BOX._BoxStyle == 2 then DrawLine(self.Objects.Box, GetDrawingKey("1"), LeftTopCorner, LeftTopCorner+Vector2.new(20, 0), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("2"), LeftTopCorner, LeftTopCorner+Vector2.new(0, 20), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("3"), LeftBottomCorner, LeftBottomCorner+Vector2.new(20, 0), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("4"), LeftBottomCorner, LeftBottomCorner-Vector2.new(0, 20), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("5"), RightTopCorner, RightTopCorner-Vector2.new(20, 0), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("6"), RightTopCorner, RightTopCorner+Vector2.new(0, 20), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("7"), RightBottomCorner, RightBottomCorner-Vector2.new(20, 0), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("8"), RightBottomCorner, RightBottomCorner-Vector2.new(0, 20), {Color = Color}); elseif VISUALS.BOX._BoxStyle == 3 then DrawLine(self.Objects.Box, GetDrawingKey("1"), LeftTopCorner+Vector2.new(5, 0), LeftTopCorner+Vector2.new(15, 0), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("2"), LeftTopCorner+Vector2.new(0, 5), LeftTopCorner+Vector2.new(0, 15), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("3"), LeftTopCorner+Vector2.new(5, 0), LeftTopCorner+Vector2.new(0, 5), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("4"), LeftBottomCorner+Vector2.new(5, 0), LeftBottomCorner+Vector2.new(15, 0), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("5"), LeftBottomCorner-Vector2.new(0, 5), LeftBottomCorner-Vector2.new(0, 15), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("6"), LeftBottomCorner+Vector2.new(5, 0), LeftBottomCorner-Vector2.new(0, 5), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("7"), RightTopCorner-Vector2.new(5, 0), RightTopCorner-Vector2.new(15, 0), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("8"), RightTopCorner+Vector2.new(0, 5), RightTopCorner+Vector2.new(0, 15), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("9"), RightTopCorner-Vector2.new(5, 0), RightTopCorner+Vector2.new(0, 5), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("10"), RightBottomCorner-Vector2.new(5, 0), RightBottomCorner-Vector2.new(15, 0), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("11"), RightBottomCorner-Vector2.new(0, 5), RightBottomCorner-Vector2.new(0, 15), {Color = Color}); DrawLine(self.Objects.Box, GetDrawingKey("12"), RightBottomCorner-Vector2.new(5, 0), RightBottomCorner-Vector2.new(0, 5), {Color = Color}); end; if VISUALS.BOX.HealthBar.Enabled and Humanoid then local Health = math.clamp(Humanoid.Health, 0, 100); local HealthColor = VISUALS.BOX.HealthBar.ColorFallback and LerpColors(Health, {{0, Color3.fromRGB(255, 47, 47)}, {50, Color3.fromRGB(238, 255, 47)}, {100, Color3.fromRGB(47, 255, 130)}}) or Color; local BarStart = RightBottomCorner+Vector2.new(4, 0); local BarEnd = RightTopCorner+Vector2.new(4, 0); local HealthEnd = BarStart:Lerp(BarEnd, Health/100); if VISUALS.BOX.HealthBar._BoxBackground then DrawLine(self.Objects.Box, GetDrawingKey("_bg"), BarStart, BarEnd, {Color = Color3.new(0, 0, 0), Thickness = 2}); end; DrawLine(self.Objects.Box, GetDrawingKey("_hp"), BarStart, HealthEnd, {Color = HealthColor, Thickness = 2}); end; end; end), SignalKey); end; AddSignal(RunService.RenderStepped:Connect(function() if not CONFIGS.AIMBOT.Enabled or not self.Toggles.Aimbot then self.Targeting = nil; return; end; local IsAiming = (KEYBINDS.Aimbot == Enum.UserInputType.MouseButton2 and UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2)) or (KEYBINDS.Aimbot.EnumType == Enum.KeyCode and UserInputService:IsKeyDown(KEYBINDS.Aimbot)); if not IsAiming then self.Targeting = nil; return; end; self.Targeting = self.Targeting or FindClosestPlayer(CONFIGS.AIMBOT.UseScreenDistance); if not self.Targeting or not self.Targeting.Parent then return end; local Character = self.Targeting.Character; if not Character then return end; if not Character:FindFirstChild(CONFIGS.AIMBOT.Part) then return end; if not Character:FindFirstChild("Humanoid") then return end; local Humanoid = Character.Humanoid; if Humanoid.Health <= 0 then if CONFIGS.AIMBOT.AutoRetarget then self.Targeting = nil; end; return; end; if CONFIGS.AIMBOT.RequireFirstPerson and Player.Character.Head.LocalTransparencyModifier ~= 1 then return; end; local TargetPart = Character[CONFIGS.AIMBOT.Part]; local AimPosition = GetPredictionOf(TargetPart); if CONFIGS.AIMBOT.MouseEmulation then local ScreenPos, OnScreen = Camera:WorldToViewportPoint(AimPosition); if OnScreen then local DeltaX = ScreenPos.X-Mouse.X; local DeltaY = ScreenPos.Y-Mouse.Y; mousemoverel(DeltaX, DeltaY); end; else local TargetCFrame = CFrame.new(Camera.CFrame.Position, AimPosition); Camera.CFrame = CONFIGS.AIMBOT.Smoothing > 0 and Camera.CFrame:Lerp(TargetCFrame, 1/CONFIGS.AIMBOT.Smoothing) or TargetCFrame; end; end)); if VISUALS.PREDICTION.Enabled then AddSignal(RunService.Heartbeat:Connect(function() if not VISUALS.PREDICTION.Enabled or not self.Toggles.Prediction then for _Player, Drawings in pairs(self.Objects.Prediction) do if Drawings and type(Drawings) == "table" then for _, Drawing in pairs(Drawings) do if Drawing and Drawing.Remove then Drawing:Remove(); end; end; end; end; table.clear(self.Objects.Prediction); return; end; for _Player, Drawings in pairs(self.Objects.Prediction) do if not _Player.Parent then if Drawings and type(Drawings) == "table" then for _, Drawing in pairs(Drawings) do if Drawing and Drawing.Remove then Drawing:Remove(); end; end; end; self.Objects.Prediction[_Player] = nil; end; end; for _, _Player in ipairs(Players:GetPlayers()) do if _Player == Player then continue end; if not CONFIGS.AIMBOT.FFA and _Player.Team == Player.Team then if self.Objects.Prediction[_Player] then for _, Drawing in pairs(self.Objects.Prediction[_Player]) do if Drawing and Drawing.Remove then Drawing:Remove(); end; end; self.Objects.Prediction[_Player] = nil; end; continue; end; local Character = self.Characters[_Player]; if not Character or not Character:FindFirstChild(CONFIGS.AIMBOT.Part) then if self.Objects.Prediction[_Player] then for _, Drawing in pairs(self.Objects.Prediction[_Player]) do if Drawing and Drawing.Remove then Drawing:Remove(); end; end; self.Objects.Prediction[_Player] = nil; end; continue; end; if not Character:FindFirstChild("Humanoid") or Character.Humanoid.Health <= 0 then if self.Objects.Prediction[_Player] then for _, Drawing in pairs(self.Objects.Prediction[_Player]) do if Drawing and Drawing.Remove then Drawing:Remove(); end; end; self.Objects.Prediction[_Player] = nil; end; continue; end; local TargetPart = Character[CONFIGS.AIMBOT.Part]; local PredictedPos = GetPredictionOf(TargetPart); local ScreenPos = Camera:WorldToViewportPoint(PredictedPos); if ScreenPos.Z > 0 then if not self.Objects.Prediction[_Player] then self.Objects.Prediction[_Player] = {}; end; local Pos = Vector2.new(ScreenPos.X, ScreenPos.Y); DrawCircle(self.Objects.Prediction[_Player], "outline", Pos, { Color = VISUALS.PREDICTION.Color, Radius = VISUALS.PREDICTION.OutlineSize, Transparency = VISUALS.PREDICTION.Transparency/2, Filled = false, }); DrawCircle(self.Objects.Prediction[_Player], "inner", Pos, { Color = VISUALS.PREDICTION.Color, Radius = VISUALS.PREDICTION.Size, Transparency = VISUALS.PREDICTION.Transparency, Filled = true, }); else if self.Objects.Prediction[_Player] then for _, Drawing in pairs(self.Objects.Prediction[_Player]) do Drawing.Visible = false; end; end; end; end; end)); end; if VISUALS.TRACERS.Enabled then AddSignal(RunService.Heartbeat:Connect(function() if not VISUALS.TRACERS.Enabled or not self.Toggles.Tracers then for _, v in pairs(self.Objects.Tracers) do v:Remove(); end; table.clear(self.Objects.Tracers); return; end; for _Player, Tracer in pairs(self.Objects.Tracers) do if not _Player.Parent then Tracer:Remove(); self.Objects.Tracers[_Player] = nil; end; end; local ClosestDistance = math.huge; local FarthestDistance = 0; if VISUALS.TRACERS.FadeByDistance then for _, _Player in ipairs(Players:GetPlayers()) do if _Player == Player then continue end; if not CONFIGS.AIMBOT.FFA and _Player.Team == Player.Team then continue end; local Character = self.Characters[_Player]; if Character and Character:FindFirstChild("HumanoidRootPart") then local Distance = (Player.Character.HumanoidRootPart.Position-Character.HumanoidRootPart.Position).Magnitude; if Distance < ClosestDistance then ClosestDistance = Distance end; if Distance > FarthestDistance then FarthestDistance = Distance end; end; end; end; for _, _Player in ipairs(Players:GetPlayers()) do if _Player == Player then continue end; if not CONFIGS.AIMBOT.FFA and _Player.Team == Player.Team then if self.Objects.Tracers[_Player] then self.Objects.Tracers[_Player]:Remove(); self.Objects.Tracers[_Player] = nil; end; continue; end; local Character = self.Characters[_Player]; if not Character then if self.Objects.Tracers[_Player] then self.Objects.Tracers[_Player]:Remove(); self.Objects.Tracers[_Player] = nil; end; continue; end; if not Character:FindFirstChild(CONFIGS.AIMBOT.Part) or not Character:FindFirstChild("Humanoid") or Character.Humanoid.Health <= 0 or not Character:FindFirstChild("HumanoidRootPart") then if self.Objects.Tracers[_Player] then self.Objects.Tracers[_Player]:Remove(); self.Objects.Tracers[_Player] = nil; end; continue; end; local Tracer = self.Objects.Tracers[_Player]; if not Tracer then Tracer = Draw("Line"); Tracer.Thickness = 2; Tracer.Transparency = 0.5; self.Objects.Tracers[_Player] = Tracer; end; local OriginMatrix = VISUALS.TRACERS.Origin; local ViewportSize = Camera.ViewportSize; local OriginX = OriginMatrix[1]*0+OriginMatrix[2]*(ViewportSize.X/2)+OriginMatrix[3]*ViewportSize.X; local OriginY = OriginMatrix[4]*0+OriginMatrix[5]*(ViewportSize.Y/2)+OriginMatrix[6]*ViewportSize.Y; local Origin = Vector2.new(OriginX, OriginY); local TargetPos, OnScreen = Camera:WorldToViewportPoint(Character[CONFIGS.AIMBOT.Part].Position); if not OnScreen or TargetPos.Z <= 0 then Tracer.Visible = false; continue; end; local Target = Vector2.new(TargetPos.X, TargetPos.Y); if VISUALS.TRACERS.OriginRadius > 0 then local Angle = math.atan2(Target.Y-Origin.Y, Target.X-Origin.X); Origin = Vector2.new(Origin.X+math.cos(Angle)*VISUALS.TRACERS.OriginRadius, Origin.Y+math.sin(Angle)*VISUALS.TRACERS.OriginRadius); end; Tracer.From = Origin; Tracer.To = Target; local Color = VISUALS.ALL.UseTeamColors and _Player.TeamColor.Color or (VISUALS.ALL.RainbowColor and Color3.fromHSV(tick()*VISUALS.ALL.RainbowSpeed%255/255, 1, 1) or VISUALS.ALL.Color); if VISUALS.TRACERS.FadeByDistance and FarthestDistance > ClosestDistance then local Distance = (Player.Character.HumanoidRootPart.Position-Character.HumanoidRootPart.Position).Magnitude; local FadeFactor = (Distance-ClosestDistance)/(FarthestDistance-ClosestDistance); Color = Color:Lerp(Color3.new(0, 0, 0), FadeFactor*0.7); end; Tracer.Color = Color; Tracer.Visible = true; end; end)); end; if VISUALS.PROXIMITY.Enabled then function RemoveProximityDrawings(_Player) if self.Objects.Proximity[_Player] then for _, Object in pairs(self.Objects.Proximity[_Player]) do if not Object then continue end; if typeof(Object) == "Instance" and Object.Remove then Object:Remove(); elseif typeof(Object) ~= "string" then pcall(function() Object:Remove() end); end; end; self.Objects.Proximity[_Player] = nil; end; end; AddSignal(RunService.Heartbeat:Connect(function() if not VISUALS.PROXIMITY.Enabled or not self.Toggles.Proximity then for _Player, Objects in pairs(self.Objects.Proximity) do RemoveProximityDrawings(_Player); end; table.clear(self.Objects.Proximity); return; end; if not Player.Character or not Player.Character:FindFirstChild("HumanoidRootPart") then return; end; for _Player, Objects in pairs(self.Objects.Proximity) do if not _Player.Parent then RemoveProximityDrawings(_Player); end; end; local MyRoot = Player.Character.HumanoidRootPart; local MyPos = MyRoot.Position; local MyCFrame = MyRoot.CFrame; local MyLookVector = MyCFrame.LookVector; for _, _Player in ipairs(Players:GetPlayers()) do if _Player == Player then continue end; if not CONFIGS.AIMBOT.FFA and _Player.Team == Player.Team then RemoveProximityDrawings(_Player); continue; end; local Character = self.Characters[_Player]; if not Character then RemoveProximityDrawings(_Player); continue; end; if not Character:FindFirstChild("HumanoidRootPart") or not Character:FindFirstChild("Humanoid") or Character.Humanoid.Health <= 0 then RemoveProximityDrawings(_Player); continue; end; local EnemyRoot = Character.HumanoidRootPart; local EnemyPos = EnemyRoot.Position; local Distance = (MyPos-EnemyPos).Magnitude; local EnemyLookVector = EnemyRoot.CFrame.LookVector; local DirectionToMe = (MyPos-EnemyPos).Unit; local LookDot = EnemyLookVector:Dot(DirectionToMe); local LookAngle = math.deg(math.acos(math.clamp(LookDot,-1, 1))); local IsLookingAtYou = VISUALS.PROXIMITY.DetectLookingAtYou and LookAngle < VISUALS.PROXIMITY.LookAngleThreshold; if not self.Objects.Proximity[_Player] then self.Objects.Proximity[_Player] = {}; end; if not IsLookingAtYou then if self.Objects.Proximity[_Player]["alert_main"] then self.Objects.Proximity[_Player]["alert_main"]:Remove(); self.Objects.Proximity[_Player]["alert_main"] = nil; end; if self.Objects.Proximity[_Player]["alert_ring"] then self.Objects.Proximity[_Player]["alert_ring"]:Remove(); self.Objects.Proximity[_Player]["alert_ring"] = nil; end; end; if VISUALS.PROXIMITY.AlertEnabled and VISUALS.PROXIMITY.AlertShowOnScreen and IsLookingAtYou then local TargetPart = Character:FindFirstChild(CONFIGS.AIMBOT.Part); if TargetPart then local AlertScreenPos, AlertOnScreen = Camera:WorldToViewportPoint(TargetPart.Position); if AlertOnScreen and AlertScreenPos.Z > 0 then local AlertPos = Vector2.new(AlertScreenPos.X, AlertScreenPos.Y); local PulseTime = tick()*VISUALS.PROXIMITY.AlertPulseSpeed; local PulseScale = 1+math.sin(PulseTime*math.pi*2)*0.5; local AlertRadius = VISUALS.PROXIMITY.AlertSize*PulseScale; local FlashAlpha = (math.sin(PulseTime*math.pi*2)+1)/2; local AlertTransparency = 0.3+(FlashAlpha*0.7); DrawCircle(self.Objects.Proximity[_Player], "alert_main", AlertPos, { Color = VISUALS.PROXIMITY.AlertColor, Radius = AlertRadius, Filled = true, Transparency = AlertTransparency, NumSides = 20, }); DrawCircle(self.Objects.Proximity[_Player], "alert_ring", AlertPos, { Color = VISUALS.PROXIMITY.AlertColor, Radius = AlertRadius+3, Filled = false, Thickness = 2, Transparency = AlertTransparency*0.7, NumSides = 20, }); end; end; end; if Distance > VISUALS.PROXIMITY.MaxDistance then if self.Objects.Proximity[_Player] then if self.Objects.Proximity[_Player]["arrow1"] then self.Objects.Proximity[_Player]["arrow1"]:Remove(); self.Objects.Proximity[_Player]["arrow1"] = nil; end; if self.Objects.Proximity[_Player]["arrow2"] then self.Objects.Proximity[_Player]["arrow2"]:Remove(); self.Objects.Proximity[_Player]["arrow2"] = nil; end; if self.Objects.Proximity[_Player]["arrow3"] then self.Objects.Proximity[_Player]["arrow3"]:Remove(); self.Objects.Proximity[_Player]["arrow3"] = nil; end; if self.Objects.Proximity[_Player]["dot"] then self.Objects.Proximity[_Player]["dot"]:Remove(); self.Objects.Proximity[_Player]["dot"] = nil; end; if self.Objects.Proximity[_Player]["chevron1"] then self.Objects.Proximity[_Player]["chevron1"]:Remove(); self.Objects.Proximity[_Player]["chevron1"] = nil; end; if self.Objects.Proximity[_Player]["chevron2"] then self.Objects.Proximity[_Player]["chevron2"]:Remove(); self.Objects.Proximity[_Player]["chevron2"] = nil; end; end; continue; end; local DirectionToEnemy = (EnemyPos-MyPos).Unit; local DotProduct = MyLookVector:Dot(DirectionToEnemy); local IsBehind = DotProduct < 0; if VISUALS.PROXIMITY.ShowBehind and not IsBehind then RemoveProximityDrawings(_Player); continue; end; local ScreenPos, OnScreen = Camera:WorldToViewportPoint(EnemyPos); local ViewportSize = Camera.ViewportSize; local CenterX = ViewportSize.X/2; local CenterY = ViewportSize.Y/2; local EdgeOffset = VISUALS.PROXIMITY.EdgeOffset; local EdgePos; if OnScreen and ScreenPos.Z > 0 then local DirX = ScreenPos.X-CenterX; local DirY = ScreenPos.Y-CenterY; local Angle = math.atan2(DirY, DirX); local TanAngle = math.tan(Angle); local HalfWidth = CenterX-EdgeOffset; local HalfHeight = CenterY-EdgeOffset; if math.abs(DirX)/HalfWidth > math.abs(DirY)/HalfHeight then local EdgeX = DirX > 0 and (ViewportSize.X-EdgeOffset) or EdgeOffset; local EdgeY = CenterY+(EdgeX-CenterX)*TanAngle; EdgePos = Vector2.new(EdgeX, EdgeY); else local EdgeY = DirY > 0 and (ViewportSize.Y-EdgeOffset) or EdgeOffset; local EdgeX = CenterX+(EdgeY-CenterY)/TanAngle; EdgePos = Vector2.new(EdgeX, EdgeY); end; else local DirX = ScreenPos.X-CenterX; local DirY = ScreenPos.Y-CenterY; if ScreenPos.Z <= 0 then DirX*=-1; DirY*=-1; end; local Angle = math.atan2(DirY, DirX); local TanAngle = math.tan(Angle); local HalfWidth = CenterX-EdgeOffset; local HalfHeight = CenterY-EdgeOffset; if math.abs(DirX)/HalfWidth > math.abs(DirY)/HalfHeight then local EdgeX = DirX > 0 and (ViewportSize.X-EdgeOffset) or EdgeOffset; local EdgeY = CenterY+(EdgeX-CenterX)*TanAngle; EdgePos = Vector2.new(EdgeX, EdgeY); else local EdgeY = DirY > 0 and (ViewportSize.Y-EdgeOffset) or EdgeOffset; local EdgeX = CenterX+(EdgeY-CenterY)/TanAngle; EdgePos = Vector2.new(EdgeX, EdgeY); end; end; local Color = VISUALS.ALL.UseTeamColors and _Player.TeamColor.Color or (VISUALS.ALL.RainbowColor and Color3.fromHSV(tick()*VISUALS.ALL.RainbowSpeed%255/255, 1, 1) or VISUALS.ALL.Color); local Scale = 1; if VISUALS.PROXIMITY.ScaleByDistance then Scale = math.max(0.1, 1-(Distance/VISUALS.PROXIMITY.MaxDistance)*0.9); end; local PulseScale = 1; if VISUALS.PROXIMITY.PulseWhenLooking and IsLookingAtYou then PulseScale = 1+math.sin(tick()*VISUALS.PROXIMITY.PulseSpeed*math.pi*2)*0.3; end; local FinalScale = Scale*PulseScale*(VISUALS.PROXIMITY.Size or 1); if VISUALS.PROXIMITY.Style == 1 then local ArrowSize = 15*FinalScale; local ArrowThickness = 3*FinalScale; local AngleToEnemy = math.atan2(CenterY-EdgePos.Y, CenterX-EdgePos.X); local Tip = EdgePos; local BaseLeft = Vector2.new( Tip.X+math.cos(AngleToEnemy+math.rad(150))*ArrowSize, Tip.Y+math.sin(AngleToEnemy+math.rad(150))*ArrowSize ); local BaseRight = Vector2.new( Tip.X+math.cos(AngleToEnemy-math.rad(150))*ArrowSize, Tip.Y+math.sin(AngleToEnemy-math.rad(150))*ArrowSize ); DrawLine(self.Objects.Proximity[_Player], "arrow1", Tip, BaseLeft, {Color = Color, Thickness = ArrowThickness}); DrawLine(self.Objects.Proximity[_Player], "arrow2", Tip, BaseRight, {Color = Color, Thickness = ArrowThickness}); DrawLine(self.Objects.Proximity[_Player], "arrow3", BaseLeft, BaseRight, {Color = Color, Thickness = ArrowThickness}); elseif VISUALS.PROXIMITY.Style == 2 then local DotRadius = FinalScale; DrawCircle(self.Objects.Proximity[_Player], "dot", EdgePos, {Color = Color, Radius = DotRadius, Filled = true}); elseif VISUALS.PROXIMITY.Style == 3 then local ChevronSize = 12*FinalScale; local ChevronThickness = 3*FinalScale; local AngleToCenter = math.atan2(CenterY-EdgePos.Y, CenterX-EdgePos.X); local Chevron1Start = Vector2.new( EdgePos.X+math.cos(AngleToCenter-math.rad(45))*ChevronSize, EdgePos.Y+math.sin(AngleToCenter-math.rad(45))*ChevronSize); local Chevron2Start = Vector2.new( EdgePos.X+math.cos(AngleToCenter+math.rad(45))*ChevronSize, EdgePos.Y+math.sin(AngleToCenter+math.rad(45))*ChevronSize); DrawLine(self.Objects.Proximity[_Player], "chevron1", Chevron1Start, EdgePos, {Color = Color, Thickness = ChevronThickness}); DrawLine(self.Objects.Proximity[_Player], "chevron2", Chevron2Start, EdgePos, {Color = Color, Thickness = ChevronThickness}); end; end; end)); end; if VISUALS.HIGHLIGHTS.Enabled then AddSignal(RunService.Heartbeat:Connect(function() if not VISUALS.HIGHLIGHTS.Enabled or not self.Toggles.Highlights then for _Player, Highlight in pairs(self.Objects.Highlights) do Highlight:Destroy(); end; table.clear(self.Objects.Highlights); return; end; for _Player, Highlight in pairs(self.Objects.Highlights) do if not _Player.Parent then Highlight:Destroy(); self.Objects.Highlights[_Player] = nil; end; end; for _, _Player in ipairs(Players:GetPlayers()) do if _Player == Player then continue end; if not CONFIGS.AIMBOT.FFA and _Player.Team == Player.Team then if self.Objects.Highlights[_Player] then self.Objects.Highlights[_Player]:Destroy(); self.Objects.Highlights[_Player] = nil; end; continue; end; local Character = self.Characters[_Player]; if not Character then if self.Objects.Highlights[_Player] then self.Objects.Highlights[_Player]:Destroy(); self.Objects.Highlights[_Player] = nil; end; continue; end; if not Character:FindFirstChild("Humanoid") or Character.Humanoid.Health <= 0 then if self.Objects.Highlights[_Player] then self.Objects.Highlights[_Player]:Destroy(); self.Objects.Highlights[_Player] = nil; end; continue; end; local Highlight = self.Objects.Highlights[_Player]; if not Highlight then Highlight = Instance.new("Highlight"); Highlight.Name = ""; Highlight.Parent = Player.PlayerGui; Highlight.Adornee = Character; Highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop; Highlight.FillTransparency = 0.8; Highlight.OutlineTransparency = 0; self.Objects.Highlights[_Player] = Highlight; end; local Color = VISUALS.ALL.UseTeamColors and _Player.TeamColor.Color or (VISUALS.ALL.RainbowColor and Color3.fromHSV(tick()*VISUALS.ALL.RainbowSpeed%255/255, 1, 1) or VISUALS.ALL.Color); Highlight.Adornee = Character; Highlight.FillColor = Color; Highlight.OutlineColor = Color; end; end)); end; local function Uninject() for _, Signal in pairs(self.Signals.Global) do if not Signal.Connected then continue end; Signal:Disconnect(); end; for _, Signals in pairs(self.Signals.Index) do for _, Signal in pairs(Signals) do if not Signal.Connected then continue end; Signal:Disconnect(); end; end; table.clear(self.Signals.Global); table.clear(self.Signals.Index); for _, v in pairs(self.Objects.Box) do v:Remove(); end; for _, v in pairs(self.Objects.Tracers) do v:Remove(); end; for _, ObjectTable in pairs(self.Objects) do for k, Drawing in pairs(ObjectTable) do if type(Drawing) == "table" then for _, SubDrawing in pairs(Drawing) do if typeof(SubDrawing) == "string" then continue end; SubDrawing:Remove(); end; else Drawing:Remove(); end; end; end; table.clear(self.Objects); table.clear(self.Characters); table.clear(self.LastPositions); table.clear(self.CharacterPartsCache); table.clear(self.KalmanFilters); self.SmoothedPing = nil; self.Targeting = nil; end; local function RegisterPlayer(_Player) local UserId = tostring(_Player.UserId); AddSignal(_Player.CharacterAdded:Connect(function(Character) self.Characters[_Player] = Character; if VISUALS.BOX.Enabled and self.Toggles.Box then if CONFIGS.AIMBOT.FFA or _Player.Team ~= Player.Team then local Key = UserId.."_char"; if self.Signals.Index[Key] then DisconnectIndexSignals(Key); end; DrawBoundingBoxFor(Character, Key); end; end; end), UserId); AddSignal(_Player.CharacterRemoving:Connect(function() self.CharacterPartsCache[self.Characters[_Player]] = nil; DisconnectIndexSignals(UserId.."_char"); self.Characters[_Player] = nil; end), UserId); local Character = _Player.Character; if Character then self.Characters[_Player] = Character; if VISUALS.BOX.Enabled and self.Toggles.Box then if CONFIGS.AIMBOT.FFA or _Player.Team ~= Player.Team then local Key = UserId.."_char"; if self.Signals.Index[Key] then DisconnectIndexSignals(Key); end; DrawBoundingBoxFor(Character, Key); end; end; end; end; CONFIGS.SAVING.FileName = string.gsub(CONFIGS.SAVING.FileName, "[\\/:*?\"<>|.]", "_"); AddSignal(Players.PlayerAdded:Connect(RegisterPlayer)); AddSignal(Players.PlayerRemoving:Connect(function(_Player) local UserId = tostring(_Player.UserId); self.Characters[_Player] = nil; for i, v in pairs(self.Objects.Box) do if string.find(i, UserId, 1, true) then v:Remove(); self.Objects.Box[i] = nil; end; end; if self.Objects.Proximity[_Player] then RemoveProximityDrawings(_Player); end; if self.Objects.Tracers[_Player] then self.Objects.Tracers[_Player]:Remove(); self.Objects.Tracers[_Player] = nil; end; if self.Objects.Highlights[_Player] then self.Objects.Highlights[_Player]:Destroy(); self.Objects.Highlights[_Player] = nil; end; DisconnectIndexSignals(UserId); end)); for _, _Player in Players:GetPlayers() do if _Player == Player then continue end; RegisterPlayer(_Player); end; AddSignal(UserInputService.InputBegan:Connect(function(Input, GameProcessed) if GameProcessed then return end; local GameWeapons = WEAPONS[game.PlaceId]; if GameWeapons then for WeaponName, WeaponData in pairs(GameWeapons) do if not WeaponData.Enabled then continue end; if Input.KeyCode == WeaponData.Keybind then self.SelectedWeapon = WeaponData; return; end; end; end; if Input.KeyCode == KEYBINDS.ToggleAimbot then self.Toggles.Aimbot = not self.Toggles.Aimbot; elseif Input.KeyCode == KEYBINDS.ToggleBox then self.Toggles.Box = not self.Toggles.Box; elseif Input.KeyCode == KEYBINDS.TogglePrediction then self.Toggles.Prediction = not self.Toggles.Prediction; elseif Input.KeyCode == KEYBINDS.ToggleTracers then self.Toggles.Tracers = not self.Toggles.Tracers; elseif Input.KeyCode == KEYBINDS.ToggleProximity then self.Toggles.Proximity = not self.Toggles.Proximity; elseif Input.KeyCode == KEYBINDS.ToggleHighlights then self.Toggles.Highlights = not self.Toggles.Highlights; elseif Input.KeyCode == KEYBINDS.Uninject then Uninject(); end; end));