local LibraryUrl = "https://raw.githubusercontent.com/Vovabro46/trash/refs/heads/main/Test.lua" local Success, Library = pcall(function() return loadstring(game:HttpGet(LibraryUrl))() end) if not Success or not Library then return warn("Error loading UI library!") end local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local CoreGui = game:GetService("CoreGui") local Camera = workspace.CurrentCamera local LocalPlayer = Players.LocalPlayer if game.PlaceId ~= 328028363 then warn("ONLY TC2.") end local Config = { Aimbot = { Enabled = false, MobileMode = false, AimPart = "Head", FOV = 120, ShowFOV = true, RainbowFOV = false, FOVColor = Color3.fromRGB(255, 255, 255), Smoothness = 0, WallCheck = true, Key = Enum.UserInputType.MouseButton2, IsAiming = false }, ESP = { Enabled = false, Boxes = false, Names = false, Health = false, Tracers = false, TeamCheck = true, TextSize = 14, MaxDistance = 1500, BoxColor = Color3.fromRGB(255, 255, 255), TracerColor = Color3.fromRGB(255, 255, 255) }, Chams = { Enabled = false, FillColor = Color3.fromRGB(255, 0, 0), OutlineColor = Color3.fromRGB(255, 255, 255), Transparency = 0.5, AlwaysOnTop = true } } Library:Watermark("TC2: ULTIMATE") local Window = Library:Window("TC2: DinasHub") Window:Section("Combat & Visuals") local CombatTab = Window:Tab("Combat", "sword") local VisualsTab = Window:Tab("Visuals", "eye") Window:Section("Configuration") local SettingsTab = Window:Tab("Settings", "settings") local AimbotPage = CombatTab:SubTab("Aimbot") local ESPPage = VisualsTab:SubTab("ESP & Chams") local SettingsPage = SettingsTab:SubTab("Configs") local AimMainGroup = AimbotPage:Groupbox("Main Logic", "Left") local AimSettingsGroup = AimbotPage:Groupbox("Aim Settings", "Right") local ESPMainGroup = ESPPage:Groupbox("ESP Features", "Left") local ChamsGroup = ESPPage:Groupbox("Chams & Colors", "Right") local ThemeGroup = SettingsPage:Groupbox("Theme Manager", "Right") local UIControlGroup = SettingsPage:Groupbox("UI Control", "Left") AimMainGroup:AddToggle({ Title = "Enable Aimbot", Default = false, Callback = function(Value) Config.Aimbot.Enabled = Value end }) AimMainGroup:AddToggle({ Title = "Mobile / Auto Aim", Default = false, Description = "Aim automatically without holding buttons", Callback = function(Value) Config.Aimbot.MobileMode = Value end }) AimMainGroup:AddToggle({ Title = "Wall Check", Default = true, Description = "Don't aim through walls", Callback = function(Value) Config.Aimbot.WallCheck = Value end }) AimMainGroup:AddDropdown({ Title = "Target Part", Values = {"Head", "Torso"}, Default = "Head", Multi = false, Callback = function(Value) Config.Aimbot.AimPart = Value end }) AimSettingsGroup:AddToggle({ Title = "Show FOV Circle", Default = true, Callback = function(Value) Config.Aimbot.ShowFOV = Value end }) AimSettingsGroup:AddToggle({ Title = "Rainbow FOV", Default = false, Callback = function(Value) Config.Aimbot.RainbowFOV = Value end }) AimSettingsGroup:AddSlider({ Title = "FOV Radius", Min = 10, Max = 800, Default = 120, Rounding = 0, Callback = function(Value) Config.Aimbot.FOV = Value end }) AimSettingsGroup:AddSlider({ Title = "Smoothness", Min = 0, Max = 1, Default = 0, Rounding = 1, Suffix = "%", Description = "0 = Instant Lock", Callback = function(Value) Config.Aimbot.Smoothness = Value end }) ESPMainGroup:AddToggle({ Title = "Master ESP Toggle", Default = false, Callback = function(Value) Config.ESP.Enabled = Value end }) ESPMainGroup:AddToggle({ Title = "Show Boxes", Default = false, Callback = function(Value) Config.ESP.Boxes = Value end }) ESPMainGroup:AddToggle({ Title = "Show Names", Default = false, Callback = function(Value) Config.ESP.Names = Value end }) ESPMainGroup:AddToggle({ Title = "Show Health", Default = false, Callback = function(Value) Config.ESP.Health = Value end }) ESPMainGroup:AddToggle({ Title = "Show Tracers", Default = false, Callback = function(Value) Config.ESP.Tracers = Value end }) ESPMainGroup:AddSlider({ Title = "Max Distance", Min = 100, Max = 5000, Default = 1500, Rounding = 0, Suffix = " studs", Callback = function(Value) Config.ESP.MaxDistance = Value end }) -- [[ ESP - RIGHT SIDE ]] ChamsGroup:AddToggle({ Title = "Enable Chams", Default = false, Callback = function(Value) Config.Chams.Enabled = Value end }) ChamsGroup:AddToggle({ Title = "Chams Always On Top", Default = true, Callback = function(Value) Config.Chams.AlwaysOnTop = Value end }) ChamsGroup:AddColorPicker({ Title = "Chams Color", Default = Color3.fromRGB(255, 0, 0), Callback = function(Value) Config.Chams.FillColor = Value end }) ChamsGroup:AddColorPicker({ Title = "ESP Box Color", Default = Color3.fromRGB(255, 255, 255), Callback = function(Value) Config.ESP.BoxColor = Value end }) UIControlGroup:AddButton({ Title = "Unload Script", Callback = function() Library:Notify("System", "Script Unloaded", 2) local gui = game:GetService("CoreGui"):FindFirstChild("RedOnyx") or game:GetService("CoreGui"):FindFirstChild("Window") if gui then gui:Destroy() end end }) local ThemeList = {} if Library.ThemePresets then for ThemeName, _ in pairs(Library.ThemePresets) do table.insert(ThemeList, ThemeName) end table.sort(ThemeList) ThemeGroup:AddDropdown({ Title = "Preset Theme", Values = ThemeList, Default = "Default", Multi = false, Callback = function(Value) if Library.SetTheme then Library:SetTheme(Value) end end }) end local FOV_ScreenGui = Instance.new("ScreenGui") FOV_ScreenGui.Name = "TC2_FOV_Render" FOV_ScreenGui.IgnoreGuiInset = true FOV_ScreenGui.ResetOnSpawn = false if pcall(function() FOV_ScreenGui.Parent = CoreGui end) then FOV_ScreenGui.Parent = CoreGui else FOV_ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") end local FOV_Frame = Instance.new("Frame") FOV_Frame.Parent = FOV_ScreenGui FOV_Frame.BackgroundColor3 = Color3.new(1, 1, 1) FOV_Frame.BackgroundTransparency = 1 FOV_Frame.AnchorPoint = Vector2.new(0.5, 0.5) FOV_Frame.Position = UDim2.new(0.5, 0, 0.5, 0) FOV_Frame.Size = UDim2.new(0, 0, 0, 0) FOV_Frame.Visible = false local FOV_Stroke = Instance.new("UIStroke") FOV_Stroke.Parent = FOV_Frame FOV_Stroke.Color = Color3.fromRGB(255, 255, 255) FOV_Stroke.Thickness = 2 FOV_Stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border local FOV_Corner = Instance.new("UICorner") FOV_Corner.Parent = FOV_Frame FOV_Corner.CornerRadius = UDim.new(1, 0) local ESP_Storage = {} local Chams_Storage = {} local function IsTeammate(player) if not Config.ESP.TeamCheck then return false end if player.Team == nil then return false end return player.Team == LocalPlayer.Team end local function IsVisible(part) if not Config.Aimbot.WallCheck then return true end local origin = Camera.CFrame.Position local direction = (part.Position - origin).Unit * (part.Position - origin).Magnitude local rayParams = RaycastParams.new() rayParams.FilterDescendantsInstances = {LocalPlayer.Character, Camera} rayParams.FilterType = Enum.RaycastFilterType.Exclude local hit = workspace:Raycast(origin, direction, rayParams) return hit == nil or hit.Instance:IsDescendantOf(part.Parent) end local function GetTargetPart(char) if Config.Aimbot.AimPart == "Head" then return char:FindFirstChild("Head") end return char:FindFirstChild("UpperTorso") or char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Head") end local function GetClosestToCrosshair() local closestPlayer = nil local shortestDist = Config.Aimbot.FOV local centerScreen = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer and not IsTeammate(player) then local char = player.Character if char and char:FindFirstChild("Humanoid") and char.Humanoid.Health > 0 then local part = GetTargetPart(char) if part then local screenPos, onScreen = Camera:WorldToViewportPoint(part.Position) if onScreen then local dist = (Vector2.new(screenPos.X, screenPos.Y) - centerScreen).Magnitude if dist < shortestDist then if IsVisible(part) then shortestDist = dist closestPlayer = part end end end end end end end return closestPlayer end local function CreateDrawing(type, props) local obj = Drawing.new(type) for k, v in pairs(props) do obj[k] = v end return obj end local function AddESP(player) if ESP_Storage[player] then return end ESP_Storage[player] = { Box = CreateDrawing("Square", {Thickness = 1.5, Filled = false, ZIndex = 2, Visible = false}), BoxOutline = CreateDrawing("Square", {Thickness = 2.5, Color = Color3.new(0,0,0), Filled = false, ZIndex = 1, Visible = false}), Name = CreateDrawing("Text", {Center = true, Size = 13, Outline = true, Color = Color3.new(1,1,1), ZIndex = 3, Visible = false}), HealthBar = CreateDrawing("Square", {Filled = true, ZIndex = 2, Visible = false}), Tracer = CreateDrawing("Line", {Thickness = 1, ZIndex = 1, Visible = false}) } end local function RemoveESP(player) if ESP_Storage[player] then for _, obj in pairs(ESP_Storage[player]) do obj:Remove() end ESP_Storage[player] = nil end end local function UpdateChams(player) if not player.Character then return end if Chams_Storage[player] and (not Config.Chams.Enabled or IsTeammate(player)) then Chams_Storage[player]:Destroy() Chams_Storage[player] = nil return end if not Config.Chams.Enabled then return end if IsTeammate(player) then return end local char = player.Character if not char:FindFirstChild("HumanoidRootPart") then return end if not Chams_Storage[player] or Chams_Storage[player].Parent ~= char then local highlight = Instance.new("Highlight") highlight.Name = "TC2Cham" highlight.Adornee = char highlight.Parent = char Chams_Storage[player] = highlight end local hl = Chams_Storage[player] hl.FillColor = Config.Chams.FillColor hl.OutlineColor = Config.Chams.OutlineColor hl.FillTransparency = Config.Chams.Transparency hl.OutlineTransparency = 0 hl.DepthMode = Config.Chams.AlwaysOnTop and Enum.HighlightDepthMode.AlwaysOnTop or Enum.HighlightDepthMode.Occluded end UserInputService.InputBegan:Connect(function(input) if input.UserInputType == Config.Aimbot.Key then Config.Aimbot.IsAiming = true end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Config.Aimbot.Key then Config.Aimbot.IsAiming = false end end) RunService.RenderStepped:Connect(function() if Config.Aimbot.Enabled and Config.Aimbot.ShowFOV then FOV_Frame.Visible = true FOV_Frame.Size = UDim2.new(0, Config.Aimbot.FOV * 2, 0, Config.Aimbot.FOV * 2) if Config.Aimbot.RainbowFOV then local hue = tick() % 5 / 5 FOV_Stroke.Color = Color3.fromHSV(hue, 1, 1) else FOV_Stroke.Color = Config.Aimbot.FOVColor end else FOV_Frame.Visible = false end if Config.Aimbot.Enabled then if Config.Aimbot.IsAiming or Config.Aimbot.MobileMode then local target = GetClosestToCrosshair() if target then local currentCF = Camera.CFrame local targetCF = CFrame.new(currentCF.Position, target.Position) if Config.Aimbot.Smoothness <= 0 then Camera.CFrame = targetCF else Camera.CFrame = currentCF:Lerp(targetCF, 1 - Config.Aimbot.Smoothness) end end end end for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer then UpdateChams(player) if not ESP_Storage[player] then AddESP(player) end local objects = ESP_Storage[player] local char = player.Character local hrp = char and char:FindFirstChild("HumanoidRootPart") local show = false if Config.ESP.Enabled and char and hrp and not IsTeammate(player) then local hum = char:FindFirstChild("Humanoid") if hum and hum.Health > 0 then local vector, onScreen = Camera:WorldToViewportPoint(hrp.Position) local dist = (Camera.CFrame.Position - hrp.Position).Magnitude if onScreen and dist <= Config.ESP.MaxDistance then show = true local size = (Camera:WorldToViewportPoint(hrp.Position - Vector3.new(0, 3, 0)).Y - Camera:WorldToViewportPoint(hrp.Position + Vector3.new(0, 2.6, 0)).Y) / 2 local width = size / 1.5 local currentPos = Vector2.new(vector.X - width / 2, vector.Y - size / 2) if Config.ESP.Boxes then objects.Box.Visible = true; objects.BoxOutline.Visible = true objects.Box.Size = Vector2.new(width, size * 2.2) objects.Box.Position = currentPos objects.BoxOutline.Size = objects.Box.Size objects.BoxOutline.Position = objects.Box.Position objects.Box.Color = Config.ESP.BoxColor else objects.Box.Visible = false; objects.BoxOutline.Visible = false end if Config.ESP.Names then objects.Name.Visible = true objects.Name.Text = player.Name objects.Name.Position = Vector2.new(vector.X, currentPos.Y - 14) else objects.Name.Visible = false end if Config.ESP.Health then local h = hum.Health / hum.MaxHealth objects.HealthBar.Visible = true objects.HealthBar.Size = Vector2.new(2, (size * 2.2) * h) objects.HealthBar.Position = Vector2.new(currentPos.X - 5, currentPos.Y + (size * 2.2) - objects.HealthBar.Size.Y) objects.HealthBar.Color = Color3.fromHSV(h*0.3, 1, 1) else objects.HealthBar.Visible = false end if Config.ESP.Tracers then objects.Tracer.Visible = true objects.Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y) objects.Tracer.To = Vector2.new(vector.X, vector.Y + size) objects.Tracer.Color = Config.ESP.TracerColor else objects.Tracer.Visible = false end end end end if not show then for _, o in pairs(objects) do o.Visible = false end end end end end) Players.PlayerRemoving:Connect(function(plr) RemoveESP(plr) if Chams_Storage[plr] then Chams_Storage[plr]:Destroy() Chams_Storage[plr] = nil end end)