local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()
local executor = identifyexecutor and identifyexecutor() or "Unknown Executor"

local customTheme = {
   TextColor = Color3.fromRGB(0, 255, 0),
   Background = Color3.fromRGB(10, 10, 10),
   Topbar = Color3.fromRGB(0, 0, 0),
   Shadow = Color3.fromRGB(30, 30, 30),
   NotificationBackground = Color3.fromRGB(15, 15, 15),
   NotificationActionsBackground = Color3.fromRGB(20, 20, 20),
   TabBackground = Color3.fromRGB(10, 10, 10),
   TabStroke = Color3.fromRGB(0, 255, 0),
   TabBackgroundSelected = Color3.fromRGB(20, 20, 20),
   TabTextColor = Color3.fromRGB(100, 255, 100),
   SelectedTabTextColor = Color3.fromRGB(0, 255, 0),
   ElementBackground = Color3.fromRGB(15, 15, 15),
   ElementBackgroundHover = Color3.fromRGB(25, 25, 25),
   SecondaryElementBackground = Color3.fromRGB(20, 20, 20),
   ElementStroke = Color3.fromRGB(0, 255, 0),
   SecondaryElementStroke = Color3.fromRGB(0, 255, 0),
   SliderBackground = Color3.fromRGB(30, 30, 30),
   SliderProgress = Color3.fromRGB(0, 255, 0),
   SliderStroke = Color3.fromRGB(0, 255, 0),
   ToggleBackground = Color3.fromRGB(25, 25, 25),
   ToggleEnabled = Color3.fromRGB(0, 255, 0),
   ToggleDisabled = Color3.fromRGB(80, 80, 80),
   ToggleEnabledStroke = Color3.fromRGB(0, 255, 0),
   ToggleDisabledStroke = Color3.fromRGB(80, 80, 80),
   ToggleEnabledOuterStroke = Color3.fromRGB(0, 255, 0),
   ToggleDisabledOuterStroke = Color3.fromRGB(50, 50, 50),
   DropdownSelected = Color3.fromRGB(30, 30, 30),
   DropdownUnselected = Color3.fromRGB(20, 20, 20),
   InputBackground = Color3.fromRGB(10, 10, 10),
   InputStroke = Color3.fromRGB(0, 255, 0),
   PlaceholderColor = Color3.fromRGB(0, 255, 0),
   KeyInputBackground = Color3.fromRGB(10, 10, 10),
   KeyInputTextColor = Color3.fromRGB(0, 255, 0)
}

local Window = Rayfield:CreateWindow({
   Name = "X-Dk V2 | Tha Bronx | " .. executor,
   Icon = nil,
   LoadingTitle = "",
   LoadingSubtitle = "",
   Theme = customTheme,
   DisableRayfieldPrompts = false,
   DisableBuildWarnings = false,
   ConfigurationSaving = {
      Enabled = false,
      FolderName = "GreenBlackThemeHub",
      FileName = "BigHub"
   },
   Discord = {
      Enabled = false,
      Invite = "",
      RememberJoins = true
   },
   KeySystem = false,
   KeySettings = {
      Title = "",
      Subtitle = "Authentication Required",
      Note = "Get your key at: discord.gg/dkshub",
      FileName = "jc_hub_key",
      SaveKey = true,
      GrabKeyFromSite = false,
      Key = {""},
      Theme = customTheme
   }
})

local HomeTab = Window:CreateTab("Home", "notebook-text")
local HomeSection = HomeTab:CreateSection("Welcome!")


HomeTab:CreateParagraph({Title = "Welcome!", Content = "Thank you for using X-Dk."})

HomeTab:CreateSection("User Information")

local player = game.Players.LocalPlayer
local username = player.Name
HomeTab:CreateLabel("Player: " .. username)

local userId = player.UserId
HomeTab:CreateLabel("User Id: " .. userId)

HomeTab:CreateSection("Game and Executor")

local gameName = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Name
HomeTab:CreateLabel("Game: " .. gameName)

local executor = identifyexecutor and identifyexecutor() or "Unknown Executor"
HomeTab:CreateLabel("Executor: " .. executor)

HomeTab:CreateSection("Hardware")

local function getHWID()
    if syn and syn.request then
        return syn.crypt and syn.crypt.hash or "Synapse HWID Unavailable"
    elseif identifyexecutor and identifyexecutor():lower():find("scriptware") then
        return "ScriptWare HWID is not publicly accessible"
    elseif gethwid then
        return gethwid()
    elseif fluxus and fluxus.gethwid then
        return fluxus.gethwid()
    elseif isexecutorenv and isexecutorenv() then
        return getgenv().KRNL_ID or "KRNL HWID Unavailable"
    end
    return "Not Supported"
end

local hwid = getHWID()
HomeTab:CreateLabel("HWID: " .. hwid)

HomeTab:CreateSection("Date + Time")

local currentDate = os.date("%Y-%m-%d")
HomeTab:CreateLabel("Date: " .. currentDate)

local currentTime = os.date("%H:%M:%S")
HomeTab:CreateLabel("Time: " .. currentTime)

HomeTab:CreateSection("Credits")

HomeTab:CreateButton({
    Name = "Join Discord!", 
    Callback = function()
        if setclipboard then
            setclipboard("https://[Log in to view URL]")
            print("Copied to clipboard!")
        else
            print("Your executor does not support setclipboard.")
        end

        Rayfield:Notify({
            Title = "Link Copied!",
            Content = "The Discord link has been copied to your clipboard.",
            Duration = 8.5
        })
    end,
})

HomeTab:CreateLabel("Credits: XDkdev | Read Bio before @")

local MainTab = Window:CreateTab("Main", "box")
local MainSection1 = MainTab:CreateSection("Inf Money/ Money Dupe")

local Paragraph = MainTab:CreateParagraph({Title = "READ BEFORE USE", Content = "This is are new inf money / dupe this is how to do please cook kool aid then when finshed please fill the cup then hold it out then click button inf money / money dupe then wait 2 secs u will have max dirty money PLEASE DO NOT MOVE when clicked button."})

MainTab:CreateButton({
   Name = "Inf Money / Money Dupe",
   Callback = function()
      local player = game.Players.LocalPlayer
      if not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") then
         return
      end

      local originalCFrame = player.Character.HumanoidRootPart.CFrame

      local blackScreen = Instance.new("ScreenGui")
      blackScreen.IgnoreGuiInset = true
      blackScreen.ResetOnSpawn = false
      blackScreen.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
      blackScreen.DisplayOrder = 9999
      blackScreen.Name = "BlackoutScreen"
      blackScreen.Parent = game:GetService("CoreGui")

      local frame = Instance.new("Frame")
      frame.AnchorPoint = Vector2.new(0, 0)
      frame.Position = UDim2.new(0, 0, 0, 0)
      frame.Size = UDim2.new(1, 0, 1, 0)
      frame.BackgroundColor3 = Color3.new(0, 0, 0)
      frame.BorderSizePixel = 0
      frame.Parent = blackScreen

      local label = Instance.new("TextLabel")
      label.Size = UDim2.new(0, 300, 0, 50)
      label.Position = UDim2.new(0.5, -150, 0.5, -25)
      label.BackgroundTransparency = 1
      label.Text = "Dkshub #1 Undetected"
      label.TextColor3 = Color3.fromRGB(0, 255, 0)
      label.TextScaled = true
      label.Font = Enum.Font.GothamBold
      label.Parent = blackScreen

      local SellPart = workspace:FindFirstChild("IceFruit Sell")
      local SellPrompt = SellPart and SellPart:FindFirstChild("ProximityPrompt")
      if not (SellPart and SellPrompt) then
         blackScreen:Destroy()
         return
      end

      player.Character.HumanoidRootPart.CFrame = CFrame.new(SellPart.Position)
      task.wait(0.25)

      for _ = 1, 2000 do
         local success, err = pcall(function()
            fireproximityprompt(SellPrompt, 0)
         end)
         if not success then
            break
         end
      end

      player.Character.HumanoidRootPart.CFrame = originalCFrame

      task.wait(0.5)
      blackScreen:Destroy()
   end
})

local SharedStorage = game.ReplicatedStorage

local function InvokeServer(Remote, ...)
    return Remote:InvokeServer(...)
end

local function FindItem(Item)
    return game.Players.LocalPlayer.Backpack:FindFirstChild(Item) or game.Players.LocalPlayer.Character:FindFirstChild(Item)
end

local function AutoBuySupplies()
    local Items = {
        "Ice-Fruit Bag",
        "Ice-Fruit Cupz",
        "FijiWater",
        "FreshWater",
    }

    for _, item in ipairs(Items) do
        local ItemStock = SharedStorage.ExoticStock:FindFirstChild(item)
        if not ItemStock or ItemStock.Value == 0 then
            warn("Item out of stock:", item)
            return false
        end
    end

    for _, item in ipairs(Items) do
        InvokeServer(SharedStorage.ExoticShopRemote, item)
        task.wait(1.25)
    end

    for _, item in ipairs(Items) do
        if not FindItem(item) then
            warn("Failed to acquire:", item)
            return false
        end
    end

    return true
end

MainTab:CreateButton({
    Name = "Purchase ice-fruit items",
    Callback = function()
        local success = AutoBuySupplies()
        if success then
            print("All items successfully purchased and found.")
        else
            warn("Purchase failed or items missing.")
        end
    end,
})

MainTab:CreateSection("Safe Dupe")

local v12 = 0
local v13 = 35

MainTab:CreateButton({
    Name = "Gun Dupe (Safe Method)",
    Callback = function()
        local v164 = os.time()
        if ((v164 - v12) < v13) then
            Rayfield:Notify({
                Title = "Dupe Gun",
                Content = "Please wait " .. v13 .. " seconds!",
                Duration = 3
            })
            return
        end

        v12 = v164
        Rayfield:Notify({
            Title = "Dupe Gun",
            Content = "Processing...",
            Duration = 5
        })

        local function v165()
            local guiService = game:GetService("CoreGui")

            local blackout = Instance.new("ScreenGui")
            blackout.Name = "TeleportBlackout"
            blackout.IgnoreGuiInset = true
            blackout.ResetOnSpawn = false
            blackout.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
            blackout.Parent = guiService

            local frame = Instance.new("Frame")
            frame.Size = UDim2.new(1, 0, 1, 0)
            frame.Position = UDim2.new(0, 0, 0, 0)
            frame.BackgroundColor3 = Color3.new(0, 0, 0)
            frame.BackgroundTransparency = 0
            frame.ZIndex = 1000
            frame.Parent = blackout

            local title = Instance.new("TextLabel")
            title.Size = UDim2.new(1, 0, 0, 50)
            title.Position = UDim2.new(0, 0, 0.3, 0)
            title.Text = "Dkshub #1 Undetected"
            title.TextColor3 = Color3.fromRGB(0, 255, 0)
            title.BackgroundTransparency = 1
            title.Font = Enum.Font.SourceSansBold
            title.TextSize = 36
            title.TextStrokeTransparency = 0.5
            title.TextWrapped = true
            title.ZIndex = 1001
            title.Parent = frame

            local link = Instance.new("TextLabel")
            link.Size = UDim2.new(1, 0, 0, 60)
            link.Position = UDim2.new(0, 0, 0.5, 0)
            link.Text = "https://[Log in to view URL]"
            link.TextColor3 = Color3.fromRGB(0, 255, 0)
            link.BackgroundTransparency = 1
            link.Font = Enum.Font.SourceSans
            link.TextSize = 36
            link.TextStrokeTransparency = 0.5
            link.TextWrapped = true
            link.ZIndex = 1001
            link.Parent = frame

            task.delay(1.5, function()
                if blackout then blackout:Destroy() end
            end)

            return blackout
        end

        v165()

        local replicatedStorage = game:GetService("ReplicatedStorage")
        local players = game:GetService("Players")
        local workspace = game:GetService("Workspace")

        local function getCharacter()
            return players.LocalPlayer.Character
        end

        local function teleportTo(position)
            getCharacter().HumanoidRootPart.CFrame = CFrame.new(position.Position.X + 2, position.Position.Y, position.Position.Z)
        end

        local inventory = replicatedStorage:WaitForChild("Inventory")
        local backpackRemote = replicatedStorage:WaitForChild("BackpackRemote")

        if getCharacter():FindFirstChildOfClass("Tool") then
            local step = 0
            local toolName
            local safe
            local originalCFrame

            while true do
                if step == 4 then
                    task.wait(0.5)
                    teleportTo(originalCFrame)
                    Rayfield:Notify({
                        Title = "Dupe Gun",
                        Content = "Duplication Complete!",
                        Duration = 5
                    })
                    break
                end
                if step == 2 then
                    task.spawn(function()
                        backpackRemote:InvokeServer("Store", toolName)
                    end)
                    task.spawn(function()
                        inventory:FireServer("Change", toolName, "Backpack", safe)
                    end)
                    task.wait(1.5)
                    step = 3
                end
                if step == 3 then
                    teleportTo(originalCFrame)
                    task.wait(1)
                    backpackRemote:InvokeServer("Grab", toolName)
                    step = 4
                end
                if step == 0 then
                    toolName = getCharacter():FindFirstChildOfClass("Tool").Name
                    getCharacter():FindFirstChildOfClass("Humanoid"):UnequipTools()
                    safe = workspace["1# Map"]["2 Crosswalks"].Safes:GetChildren()[1]
                    step = 1
                end
                if step == 1 then
                    originalCFrame = getCharacter():FindFirstChild("HumanoidRootPart").CFrame
                    teleportTo(safe.Union.CFrame)
                    task.wait(0.5)
                    step = 2
                end
            end
        else
            Rayfield:Notify({
                Title = "Dupe Gun",
                Content = "No Tool Found!",
                Duration = 5
            })
        end
    end
})

MainTab:CreateSection("Teleports")

local teleportLocations = {
    {Name = "🧥 Dripstore", Position = CFrame.new(67459, 10489, 551)},
    {Name = "🏦 Bank", Position = CFrame.new(-204, 284, -1223)},
    {Name = "🧊 Ice Box", Position = CFrame.new(-193, 284, -1169)},
    {Name = "🏙️ Roof", Position = CFrame.new(-384, 340, -557)},
    {Name = "🇯🇲 Jamaican Food", Position = CFrame.new(-670, 254, -810)},
    {Name = "🥪 Deli and Grill", Position = CFrame.new(-746, 254, -906)},
    {Name = "🍗 Chicken and Wings", Position = CFrame.new(964, 254, -813)},
    {Name = "🔫 Gunstore 1", Position = CFrame.new(-1003, 254, -817)},
    {Name = "💰 Pawnshop", Position = CFrame.new(-1051, 254, -815)},
    {Name = "🧺 Laundermat", Position = CFrame.new(-990, 254, -686)},
    {Name = "🎒 Backpack", Position = CFrame.new(-670, 254, -681)},
    {Name = "🖋️ Tatoo", Position = CFrame.new(-637, 254, -591)},
}

local locationNames = {}
for _, location in ipairs(teleportLocations) do
    table.insert(locationNames, location.Name)
end

MainTab:CreateDropdown({
    Name = "Teleport",
    Options = locationNames,
    CurrentOption = {locationNames[1]},
    MultipleOptions = false,
    Flag = "TeleportDropdown",
    Callback = function(Options)
        for _, location in ipairs(teleportLocations) do
            if location.Name == Options[1] then
                local player = game.Players.LocalPlayer
                if player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
                    player.Character.HumanoidRootPart.CFrame = location.Position
                else
                    warn("Teleport failed: Missing character or HumanoidRootPart")
                end
                break
            end
        end
    end
})


local CombatTab = Window:CreateTab("Combat", "swords")
CombatTab:CreateSection("Weapon Modifications")

CombatTab:CreateToggle({
    Name = "Instant Equip",
    CurrentValue = false,
    Callback = function(Value)
        local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
        if tool and tool:FindFirstChild("Setting") then
            local setting = require(tool.Setting)
            if Value then
                setting.EquipTime = 0
            else
                setting.EquipTime = 0.5 -- Default equip time, adjust if needed
            end
        end
    end
})

CombatTab:CreateToggle({
    Name = "Instant Reload",
    CurrentValue = false,
    Callback = function(Value)
        local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
        if tool and tool:FindFirstChild("Setting") then
            local setting = require(tool.Setting)

            if Value then
                setting.ReloadTime = 0
            else
                setting.ReloadTime = 1.5 
            end
        end
    end
})

CombatTab:CreateToggle({
    Name = "No Jam",
    CurrentValue = false,
    Callback = function(Value)
        local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
        if tool and tool:FindFirstChild("Setting") then
            local setting = require(tool.Setting)
            if Value then
                setting.JamChance = 0
            else
                setting.JamChance = 0.1
            end
        end
    end
})

CombatTab:CreateToggle({
    Name = "No Recoil",
    CurrentValue = false,
    Callback = function(Value)
        local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
        if tool and tool:FindFirstChild("Settings") then
            local settings = require(tool.Settings)
            settings.Recoil = Value and 0 or 1
        end
    end
})

CombatTab:CreateToggle({
    Name = "No Spread",
    CurrentValue = false,
    Callback = function(Value)
        local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
        if tool and tool:FindFirstChild("Setting") then
            local setting = require(tool.Setting)
            if Value then
                setting.Spread = 0
            else
                setting.Spread = 1
            end
        end
    end
})

CombatTab:CreateToggle({
    Name = "Full Auto",
    CurrentValue = false,
    Callback = function(Value)
        local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
        if tool and tool:FindFirstChild("Setting") then
            local setting = require(tool.Setting)
            setting.Auto = Value
        end
    end
})

CombatTab:CreateToggle({
    Name = "Infinite Ammo",
    CurrentValue = false,
    Callback = function(Value)
        local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
        if tool and tool:FindFirstChild("Setting") then
            local setting = require(tool.Setting)
            setting.LimitedAmmoEnabled = not Value
            if Value then
                setting.MaxAmmo = 9e9
                setting.AmmoPerMag = 9e9
                setting.Ammo = 9e9
            end
        end
    end
})

CombatTab:CreateToggle({
    Name = "LifeSteal",
    CurrentValue = false,
    Callback = function(Value)
        local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
        if tool and tool:FindFirstChild("Setting") then
            local setting = require(tool.Setting)
            if Value then
                setting.LifeSteal = true
            else
                setting.LifeSteal = false
            end
        end
    end
})

CombatTab:CreateToggle({
    Name = "1 Tap",
    CurrentValue = false,
    Callback = function(Value)
        local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
        if tool and tool:FindFirstChild("Setting") then
            local setting = require(tool.Setting)
            setting.BaseDamage = Value and 9e9 or 25
        end
    end
})

local AimbotTab = Window:CreateTab("Aimbot", "skull") -- Title, Image
local AimbotSection1 = AimbotTab:CreateSection("Aim-Lock")

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local camera = workspace.CurrentCamera
local localPlayer = Players.LocalPlayer

local MAX_DISTANCE = 100
local MAX_ANGLE = 45
local aimLockEnabled = false
local lockPartName = "Head"


AimbotTab:CreateToggle({
    Name = "Enable Aimbot",
    CurrentValue = false,
    Callback = function(value)
        aimLockEnabled = value
    end,
})


AimbotTab:CreateSlider({
    Name = "Aimbot Distance",
    Range = {10, 500},
    Increment = 5,
    Suffix = " studs",
    CurrentValue = MAX_DISTANCE,
    Callback = function(value)
        MAX_DISTANCE = value
    end,
})


local function getNearestTarget()
    local nearest = nil
    local shortestDistance = MAX_DISTANCE

    for _, player in pairs(Players:GetPlayers()) do
        if player ~= localPlayer and player.Character then
            local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
            if humanoid and humanoid.Health > 0 then
                local targetPart = player.Character:FindFirstChild(lockPartName)
                if targetPart then
                    local direction = (targetPart.Position - camera.CFrame.Position).Unit
                    local angle = math.deg(math.acos(camera.CFrame.LookVector:Dot(direction)))
                    local distance = (targetPart.Position - camera.CFrame.Position).Magnitude

                    if angle <= MAX_ANGLE and distance < shortestDistance then
                        shortestDistance = distance
                        nearest = targetPart
                    end
                end
            end
        end
    end

    return nearest
end

RunService.RenderStepped:Connect(function()
    if not aimLockEnabled then return end

    local target = getNearestTarget()
    if target then
        local newCFrame = CFrame.new(camera.CFrame.Position, target.Position)
        camera.CFrame = newCFrame
    end
end)

AimbotTab:CreateSection("Enable")

local partSize = 55
local partColor = Color3.new(0.3921568627, 0.3921568627, 1)
local partTransparency = 0.8
local toggleEnabled = false

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

local function ApplyEffect()
    for _, player in pairs(Players:GetPlayers()) do
        if player ~= LocalPlayer and player.Character then
            local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
            if humanoid and humanoid.Health > 0 then
                local rootPart = player.Character:FindFirstChild("HumanoidRootPart")
                if rootPart then
                    rootPart.Size = Vector3.new(partSize, partSize, partSize)
                    rootPart.Transparency = partTransparency
                    rootPart.Color = partColor
                    rootPart.CanCollide = false  -- Always no collision so you can walk through
                end
            end
        end
    end
end

local function ResetEffect()
    for _, player in pairs(Players:GetPlayers()) do
        if player ~= LocalPlayer and player.Character then
            local rootPart = player.Character:FindFirstChild("HumanoidRootPart")
            if rootPart then
                rootPart.Size = Vector3.new(2, 2, 1) -- Default R15 root size
                rootPart.Transparency = 0
                rootPart.Color = Color3.new(1, 1, 1)
                rootPart.CanCollide = true
            end
        end
    end
end

AimbotTab:CreateToggle({
    Name = "Enable Hitbox Expander",
    CurrentValue = false,
    Flag = "ToggleGiant",
    Callback = function(Value)
        toggleEnabled = Value
        if Value then
            ApplyEffect()
        else
            ResetEffect()
        end
    end,
})

AimbotTab:CreateColorPicker({
    Name = "Hitbox Color Picker",
    Color = partColor,
    Flag = "ColorPicker",
    Callback = function(Value)
        partColor = Value
        if toggleEnabled then ApplyEffect() end
    end,
})

AimbotTab:CreateSection("Settings")

AimbotTab:CreateInput({
    Name = "Hitbox Size (1-100)",
    PlaceholderText = "25",
    RemoveTextAfterFocusLost = true,
    Callback = function(Text)
        local newSize = tonumber(Text)
        if newSize then
            partSize = newSize
            if toggleEnabled then ApplyEffect() end
        end
    end,
})

AimbotTab:CreateInput({
    Name = "Hitbox Transparency (0-1)",
    PlaceholderText = "0.8",
    RemoveTextAfterFocusLost = true,
    Callback = function(Text)
        local newTrans = tonumber(Text)
        if newTrans and newTrans >= 0 and newTrans <= 1 then
            partTransparency = newTrans
            if toggleEnabled then ApplyEffect() end
        end
    end,
})

AimbotTab:CreateSection("Feild of view")

local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local localPlayer = Players.LocalPlayer
local mouse = localPlayer:GetMouse()

local aimCircleRadius = 100
local aimCircleThickness = 2 -- Still needed for Drawing properties
local circleColor = Color3.fromRGB(128, 0, 128)
local aimCircle = nil
local fovEnabled = false

local function createAimCircle()
    if not aimCircle then
        aimCircle = Drawing.new("Circle")
        aimCircle.Visible = true
        aimCircle.Filled = false
        aimCircle.Color = circleColor
        aimCircle.Thickness = aimCircleThickness
    end
    aimCircle.Radius = aimCircleRadius
end

RunService.RenderStepped:Connect(function()
    if fovEnabled then
        if not aimCircle then
            createAimCircle()
        end
        aimCircle.Position = Vector2.new(mouse.X, mouse.Y + 40)
        aimCircle.Visible = true
    else
        if aimCircle then
            aimCircle.Visible = false
        end
    end
end)

AimbotTab:CreateToggle({
    Name = "Enable FOV Circle",
    CurrentValue = false,
    Callback = function(Value)
        fovEnabled = Value
        if fovEnabled and not aimCircle then
            createAimCircle()
        end
    end,
})

AimbotTab:CreateSlider({
    Name = "FOV Circle Radius",
    Range = {50, 500},
    Increment = 10,
    Suffix = "px",
    CurrentValue = aimCircleRadius,
    Callback = function(Value)
        aimCircleRadius = Value
        if aimCircle then
            aimCircle.Radius = aimCircleRadius
        end
    end,
})

AimbotTab:CreateColorPicker({
    Name = "FOV Color picker",
    Color = circleColor,
    Callback = function(Value)
        circleColor = Value
        if aimCircle then
            aimCircle.Color = circleColor
        end
    end,
})

local EspTab = Window:CreateTab("ESP", "eye") -- Use a valid Roblox asset ID or nil if not needed
EspTab:CreateSection("Player ESP")


local settings = {
    defaultcolor = Color3.fromRGB(255, 0, 0),
    teamcolor = true,
    espEnabled = false,
    healthbarEnabled = false, -- New toggle setting for healthbars
    filledBoxEnabled = false -- New toggle setting for filling the box with light green
}

local runService = game:GetService("RunService")
local players = game:GetService("Players")
local localPlayer = players.LocalPlayer
local camera = workspace.CurrentCamera

local newVector2, newColor3, newDrawing = Vector2.new, Color3.new, Drawing.new
local tan, rad = math.tan, math.rad
local round = function(...) local a = {}; for i,v in next, table.pack(...) do a[i] = math.round(v); end return unpack(a); end
local wtvp = function(...) local a, b = camera.WorldToViewportPoint(camera, ...) return newVector2(a.X, a.Y), b, a.Z end

local espCache = {}

local function createEsp(player)
    local drawings = {}
    drawings.box = newDrawing("Square")
    drawings.box.Thickness = 1
    drawings.box.Filled = false
    drawings.box.Color = settings.defaultcolor
    drawings.box.Visible = false
    drawings.box.ZIndex = 2
    drawings.box.Transparency = 0.5 -- Make the box semi-transparent by default

    drawings.boxoutline = newDrawing("Square")
    drawings.boxoutline.Thickness = 3
    drawings.boxoutline.Filled = false
    drawings.boxoutline.Color = newColor3()
    drawings.boxoutline.Visible = false
    drawings.boxoutline.ZIndex = 1

    drawings.healthbar = newDrawing("Line")
    drawings.healthbar.Thickness = 2
    drawings.healthbar.Color = Color3.fromRGB(0, 255, 0)
    drawings.healthbar.Visible = false
    drawings.healthbar.ZIndex = 3

    drawings.healthbaroutline = newDrawing("Line")
    drawings.healthbaroutline.Thickness = 4
    drawings.healthbaroutline.Color = Color3.fromRGB(0, 0, 0)
    drawings.healthbaroutline.Visible = false
    drawings.healthbaroutline.ZIndex = 2

    espCache[player] = drawings
end

local function removeEsp(player)
    if rawget(espCache, player) then
        for _, drawing in next, espCache[player] do
            drawing:Remove()
        end
        espCache[player] = nil
    end
end

local function updateEsp(player, esp)
   
    if player == localPlayer then
        return
    end

    local character = player and player.Character
    local humanoid = character and character:FindFirstChildWhichIsA("Humanoid")
    if character and humanoid then
        local cframe = character:GetModelCFrame()
        local position, visible, depth = wtvp(cframe.Position)

        esp.box.Visible = settings.espEnabled and visible
        esp.boxoutline.Visible = settings.espEnabled and visible
        esp.healthbar.Visible = settings.healthbarEnabled and visible
        esp.healthbaroutline.Visible = settings.healthbarEnabled and visible

        if settings.filledBoxEnabled then
            esp.box.Filled = true
            esp.box.Color = Color3.fromRGB(144, 238, 144) -- Light green color
        else
            esp.box.Filled = false
            esp.box.Color = settings.teamcolor and player.TeamColor.Color or settings.defaultcolor
        end

        if cframe and visible then
            local scaleFactor = 1 / (depth * tan(rad(camera.FieldOfView / 2)) * 2) * 1000
            local width, height = round(4 * scaleFactor, 5 * scaleFactor)
            local x, y = round(position.X, position.Y)

            local boxPos = newVector2(round(x - width / 2, y - height / 2))
            local boxSize = newVector2(width, height)

            esp.box.Size = boxSize
            esp.box.Position = boxPos

            esp.boxoutline.Size = boxSize
            esp.boxoutline.Position = boxPos

            if settings.healthbarEnabled then
                local hpRatio = math.clamp(humanoid.Health / humanoid.MaxHealth, 0, 1)
                local barHeight = height * hpRatio
                local xOffset = boxPos.X - 6

                esp.healthbar.From = newVector2(xOffset, boxPos.Y + height)
                esp.healthbar.To = newVector2(xOffset, boxPos.Y + height - barHeight)
                esp.healthbar.Color = Color3.fromRGB(255 * (1 - hpRatio), 255 * hpRatio, 0)

                esp.healthbaroutline.From = newVector2(xOffset, boxPos.Y)
                esp.healthbaroutline.To = newVector2(xOffset, boxPos.Y + height)
            end
        end
    else
        esp.box.Visible = false
        esp.boxoutline.Visible = false
        esp.healthbar.Visible = false
        esp.healthbaroutline.Visible = false
    end
end

EspTab:CreateToggle({
    Name = "Boxes",
    CurrentValue = settings.espEnabled,
    Flag = "espToggle",
    Callback = function(value)
        settings.espEnabled = value
    end
})

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Camera = workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer

local skeletonESPEnabled = false
local skeletonColor = Color3.fromRGB(255, 255, 255)

local function createLine()
    local line = Drawing.new("Line")
    line.Thickness = 1
    line.Color = skeletonColor
    line.Transparency = 1
    line.Visible = false
    return line
end

local skeletons = {}

local function setupPlayer(player)
    if player == LocalPlayer then return end
    skeletons[player] = {
        headToTorso = createLine(),
        torsoToLeftArm = createLine(),
        torsoToRightArm = createLine(),
        torsoToLeftLeg = createLine(),
        torsoToRightLeg = createLine(),
    }
end

local function removePlayer(player)
    if skeletons[player] then
        for _, line in pairs(skeletons[player]) do
            line:Remove()
        end
        skeletons[player] = nil
    end
end

for _, player in pairs(Players:GetPlayers()) do
    setupPlayer(player)
end

Players.PlayerAdded:Connect(setupPlayer)
Players.PlayerRemoving:Connect(removePlayer)

RunService.RenderStepped:Connect(function()
    if not skeletonESPEnabled then return end

    for player, lines in pairs(skeletons) do
        local char = player.Character
        if char and char:FindFirstChild("HumanoidRootPart") and char:FindFirstChild("Head") then
            local parts = {
                head = char:FindFirstChild("Head"),
                torso = char:FindFirstChild("HumanoidRootPart"),
                leftArm = char:FindFirstChild("LeftUpperArm") or char:FindFirstChild("Left Arm"),
                rightArm = char:FindFirstChild("RightUpperArm") or char:FindFirstChild("Right Arm"),
                leftLeg = char:FindFirstChild("LeftUpperLeg") or char:FindFirstChild("Left Leg"),
                rightLeg = char:FindFirstChild("RightUpperLeg") or char:FindFirstChild("Right Leg"),
            }

            local function toScreen(part)
                local pos, onScreen = Camera:WorldToViewportPoint(part.Position)
                return Vector2.new(pos.X, pos.Y), onScreen
            end

            local headPos, onScreen1 = toScreen(parts.head)
            local torsoPos, onScreen2 = toScreen(parts.torso)

            lines.headToTorso.Visible = onScreen1 and onScreen2
            if lines.headToTorso.Visible then
                lines.headToTorso.From = headPos
                lines.headToTorso.To = torsoPos
            end

            local function connectLimb(line, from, to)
                if from and to then
                    local fromPos, onScreenFrom = toScreen(from)
                    local toPos, onScreenTo = toScreen(to)
                    line.Visible = onScreenFrom and onScreenTo
                    if line.Visible then
                        line.From = fromPos
                        line.To = toPos
                    end
                else
                    line.Visible = false
                end
            end

            connectLimb(lines.torsoToLeftArm, parts.torso, parts.leftArm)
            connectLimb(lines.torsoToRightArm, parts.torso, parts.rightArm)
            connectLimb(lines.torsoToLeftLeg, parts.torso, parts.leftLeg)
            connectLimb(lines.torsoToRightLeg, parts.torso, parts.rightLeg)
        else
            for _, line in pairs(lines) do
                line.Visible = false
            end
        end
    end
end)

EspTab:CreateToggle({
    Name = "Skeleton",
    CurrentValue = false,
    Flag = "SkeletonESPEnabled",
    Callback = function(state)
        skeletonESPEnabled = state
        for _, lines in pairs(skeletons) do
            for _, line in pairs(lines) do
                line.Visible = state
            end
        end
    end
})

EspTab:CreateToggle({
    Name = "Filled",
    CurrentValue = settings.filledBoxEnabled,
    Flag = "filledBoxToggle",
    Callback = function(value)
        settings.filledBoxEnabled = value
    end
})

local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer

local espEnabled = false
local nameTags = {}

local function createNameTag(character, name)
    local head = character:FindFirstChild("Head")
    if not head then return end
    if head:FindFirstChild("N") then head.N:Destroy() end

    local b = Instance.new("BillboardGui", head)
    b.Name = "N"
    b.Adornee = head
    b.AlwaysOnTop = true
    b.Size = UDim2.new(0, 60, 0, 15)
    b.StudsOffset = Vector3.new(0, 1.2, 0)

    local t = Instance.new("TextLabel", b)
    t.Size = UDim2.new(1, 0, 1, 0)
    t.BackgroundTransparency = 1
    t.Text = name
    t.TextColor3 = Color3.new(1, 1, 1)
    t.TextStrokeColor3 = Color3.new(0, 0, 0)
    t.TextStrokeTransparency = 0
    t.Font = Enum.Font.SourceSansBold
    t.TextScaled = true

    return b
end

local function removeNameTag(character)
    local head = character and character:FindFirstChild("Head")
    if head and head:FindFirstChild("N") then
        head.N:Destroy()
    end
end

local function toggleESP(state)
    espEnabled = state

    if not espEnabled then
       
        for player, _ in pairs(nameTags) do
            if player.Character then
                removeNameTag(player.Character)
            end
        end
        nameTags = {}
    else
        
        for _, player in pairs(Players:GetPlayers()) do
            if player ~= localPlayer and player.Character then
                nameTags[player] = createNameTag(player.Character, player.Name)
            end
        end
    end
end

local function onCharacterAdded(character, player)
    if espEnabled then
        nameTags[player] = createNameTag(character, player.Name)
    end

    
    character.AncestryChanged:Connect(function()
        if not character:IsDescendantOf(game) then
            nameTags[player] = nil
        end
    end)
end

local function setupPlayer(player)
    if player == localPlayer then return end
    if player.Character then
        onCharacterAdded(player.Character, player)
    end
    player.CharacterAdded:Connect(function(c)
        onCharacterAdded(c, player)
    end)
end

for _, player in pairs(Players:GetPlayers()) do
    setupPlayer(player)
end

Players.PlayerAdded:Connect(setupPlayer)


EspTab:CreateToggle({
    Name = "Names",
    CurrentValue = false,
    Flag = "ESPToggle",
    Callback = function(value)
        toggleESP(value)
    end
})

EspTab:CreateToggle({
    Name = "Health Bars",
    CurrentValue = settings.healthbarEnabled,
    Flag = "healthbarToggle",
    Callback = function(value)
        settings.healthbarEnabled = value
    end
})

runService.Heartbeat:Connect(function()
    for _, player in ipairs(players:GetPlayers()) do
        if player.Character then
            if not espCache[player] then
                createEsp(player)
            end
            updateEsp(player, espCache[player])
        end
    end
end)

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

local espEnabled = false

-- Function to add ESP to a player's character
local function addESP(char)
    local head = char:FindFirstChild("Head")
    local hum = char:FindFirstChild("Humanoid")
    if not head or not hum then return end

    if head:FindFirstChild("HealthESP") then
        head.HealthESP:Destroy()
    end

    local esp = Instance.new("BillboardGui")
    esp.Name = "HealthESP"
    esp.Adornee = head
    esp.Size = UDim2.new(0, 40, 0, 12)
    esp.StudsOffset = Vector3.new(0, 2.2, 0)
    esp.AlwaysOnTop = true
    esp.Parent = head

    local label = Instance.new("TextLabel", esp)
    label.Size = UDim2.new(1, 0, 1, 0)
    label.BackgroundTransparency = 1
    label.TextColor3 = Color3.fromRGB(255, 255, 255)
    label.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
    label.TextStrokeTransparency = 0.2
    label.TextScaled = true
    label.Font = Enum.Font.ArialBold
    label.Text = "100%"

    local function update()
        local hp = math.floor((hum.Health / hum.MaxHealth) * 100)
        label.Text = hp .. "%"
    end

    hum:GetPropertyChangedSignal("Health"):Connect(update)
    update()
end

-- Function to toggle ESP on or off
local function toggleESP(value)
    espEnabled = value
    if espEnabled then
        for _, p in ipairs(Players:GetPlayers()) do
            if p ~= LocalPlayer then
                if p.Character then addESP(p.Character) end
                p.CharacterAdded:Connect(addESP)
            end
        end
    else
        for _, p in ipairs(Players:GetPlayers()) do
            if p ~= LocalPlayer then
                local head = p.Character and p.Character:FindFirstChild("Head")
                if head and head:FindFirstChild("HealthESP") then
                    head.HealthESP:Destroy()
                end
            end
        end
    end
end

EspTab:CreateToggle({
    Name = "Health Text",
    CurrentValue = espEnabled,
    Flag = "ESPEnabled",
    Callback = toggleESP
})

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer

local ESPEnabled = false

-- Remove all ESP tags
function removeAllBillboards()
    for _, player in ipairs(Players:GetPlayers()) do
        if player.Character and player.Character:FindFirstChild("Head") then
            local tag = player.Character.Head:FindFirstChild("DistanceESP")
            if tag then
                tag:Destroy()
            end
        end
    end
end

-- Create ESP tag on player's head
function createBillboard(player)
    if player == LocalPlayer then return end
    local character = player.Character
    if not character then return end

    local head = character:FindFirstChild("Head")
    if not head or head:FindFirstChild("DistanceESP") then return end

    local billboard = Instance.new("BillboardGui")
    billboard.Name = "DistanceESP"
    billboard.Size = UDim2.new(0, 100, 0, 20)
    billboard.StudsOffset = Vector3.new(0, 2, 0)
    billboard.Adornee = head
    billboard.AlwaysOnTop = true
    billboard.Parent = head

    local label = Instance.new("TextLabel")
    label.Size = UDim2.new(1, 0, 1, 0)
    label.BackgroundTransparency = 1
    label.TextColor3 = Color3.new(1, 1, 1)
    label.TextStrokeTransparency = 0.5
    label.TextScaled = true
    label.Name = "StudsLabel"
    label.Text = "[ ... studs ]"
    label.Parent = billboard
end

-- Update all distances every frame
RunService.RenderStepped:Connect(function()
    if not ESPEnabled then return end

    for _, player in ipairs(Players:GetPlayers()) do
        if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Head") then
            createBillboard(player)
            local head = player.Character.Head
            local billboard = head:FindFirstChild("DistanceESP")
            if billboard then
                local label = billboard:FindFirstChild("StudsLabel")
                if label then
                    local distance = (head.Position - LocalPlayer.Character.Head.Position).Magnitude
                    label.Text = string.format("[ %.0f studs ]", distance)
                end
            end
        end
    end
end)

-- Toggle UI
EspTab:CreateToggle({
    Name = "Distance",
    CurrentValue = false,
    Callback = function(Value)
        ESPEnabled = Value
        if not Value then
            removeAllBillboards()
        end
    end,
})

-- Handle new players joining
Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function()
        if ESPEnabled then
            task.wait(1) -- Wait for character to fully load
            createBillboard(player)
        end
    end)
end)



local Players = game:GetService("Players")

local toggleEnabled = false

EspTab:CreateToggle({
    Name = "Weapon",
    CurrentValue = toggleEnabled,
    Flag = "ToolLabelToggle",
    Callback = function(value)
        toggleEnabled = value
        -- Enable/disable all current billboards immediately
        for _, player in pairs(Players:GetPlayers()) do
            local char = player.Character
            if char then
                local head = char:FindFirstChild("Head")
                if head then
                    local billboard = head:FindFirstChild("ToolBillboard")
                    if billboard then
                        billboard.Enabled = toggleEnabled
                    end
                end
            end
        end
    end,
})

local function createBillboardGui(head)
    local billboard = Instance.new("BillboardGui")
    billboard.Name = "ToolBillboard"
    billboard.Adornee = head
    billboard.Size = UDim2.new(0, 80, 0, 20)
    billboard.StudsOffset = Vector3.new(0, 2, 0)
    billboard.AlwaysOnTop = true
    billboard.ResetOnSpawn = false

    local textLabel = Instance.new("TextLabel")
    textLabel.Name = "ToolLabel"
    textLabel.BackgroundTransparency = 1
    textLabel.Size = UDim2.new(1, 0, 1, 0)
    textLabel.TextColor3 = Color3.new(1, 1, 1)
    textLabel.TextStrokeTransparency = 0
    textLabel.Font = Enum.Font.SourceSansBold
    textLabel.TextScaled = true
    textLabel.TextSize = 14
    textLabel.Parent = billboard

    billboard.Parent = head

    return billboard, textLabel
end

local function updateToolLabel(player, tool)
    local character = player.Character
    if not character then return end

    local head = character:FindFirstChild("Head")
    if not head then return end

    local billboard = head:FindFirstChild("ToolBillboard")
    local textLabel

    if not billboard then
        billboard, textLabel = createBillboardGui(head)
    else
        textLabel = billboard:FindFirstChild("ToolLabel")
    end

    if tool and tool.Name then
        textLabel.Text = "[ " .. tool.Name .. " ]"
        billboard.Enabled = toggleEnabled
    else
        textLabel.Text = "[ None ]"
        billboard.Enabled = toggleEnabled
    end
end

local function getEquippedTool(character)
    for _, item in pairs(character:GetChildren()) do
        if item:IsA("Tool") and item.Parent == character then
            return item
        end
    end
    return nil
end

local function onCharacterAdded(character)
    local player = Players:GetPlayerFromCharacter(character)
    if not player then return end

    local equippedTool = getEquippedTool(character)
    updateToolLabel(player, equippedTool)

    local function onToolAdded(tool)
        if tool:IsA("Tool") then
            tool.Equipped:Connect(function()
                updateToolLabel(player, tool)
            end)
            tool.Unequipped:Connect(function()
                updateToolLabel(player, nil)
            end)
        end
    end

    for _, tool in pairs(character:GetChildren()) do
        onToolAdded(tool)
    end

    character.ChildAdded:Connect(onToolAdded)

    local humanoid = character:FindFirstChildOfClass("Humanoid")
    if humanoid then
        humanoid.Died:Connect(function()
            updateToolLabel(player, nil)
        end)
    end
end

Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(onCharacterAdded)
    if player.Character then
        onCharacterAdded(player.Character)
    end
end)

for _, player in pairs(Players:GetPlayers()) do
    if player.Character then
        onCharacterAdded(player.Character)
    end
    player.CharacterAdded:Connect(onCharacterAdded)
end

local ESPObjects = {}
local TracerEnabled = false

EspTab:CreateToggle({
    Name = "Tracers",
    CurrentValue = false,
    Callback = function(Value)
        TracerEnabled = Value
    end,
})

local function worldToScreen(pos)
    local screenPos, onScreen = camera:WorldToViewportPoint(pos)
    return Vector2.new(screenPos.X, screenPos.Y), onScreen
end

local function createTracer(v)
    if ESPObjects[v] then return end

    local tracer = Drawing.new("Line")
    tracer.Thickness = 1
    tracer.Color = Color3.fromRGB(255, 255, 255)
    tracer.Visible = false

    ESPObjects[v] = tracer
end

local function removeTracer(v)
    if ESPObjects[v] then
        ESPObjects[v]:Remove()
        ESPObjects[v] = nil
    end
end

runService.RenderStepped:Connect(function()
    for _, v in pairs(players:GetPlayers()) do
        if v ~= localPlayer and v.Character and v.Character:FindFirstChild("HumanoidRootPart") then
            local tracer = ESPObjects[v]
            if not tracer then
                createTracer(v)
                tracer = ESPObjects[v]
            end

            local rootPart = v.Character.HumanoidRootPart
            local screenPos, onScreen = worldToScreen(rootPart.Position)

            if TracerEnabled and onScreen then
                local screenBottom = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y - 10)
                tracer.From = screenBottom
                tracer.To = screenPos
                tracer.Color = v.TeamColor and v.TeamColor.Color or Color3.fromRGB(255, 255, 255)
                tracer.Visible = true
            else
                tracer.Visible = false
            end
        else
            removeTracer(v)
        end
    end
end)

players.PlayerRemoving:Connect(removeTracer)

yers = game:GetService("Players")
local localPlayer = Players.LocalPlayer

local highlights = {}
local highlightEnabled = false

local function createHighlight(character)
    if highlights[character] then
        highlights[character]:Destroy()
        highlights[character] = nil
    end

    local highlight = Instance.new("Highlight")
    highlight.Adornee = character
    highlight.FillColor = Color3.new(1, 1, 1)       -- White fill
    highlight.OutlineColor = Color3.new(1, 1, 1)    -- White outline
    highlight.FillTransparency = 0.5
    highlight.OutlineTransparency = 0
    highlight.Parent = workspace

    highlights[character] = highlight
end

local function removeHighlight(character)
    if highlights[character] then
        highlights[character]:Destroy()
        highlights[character] = nil
    end
end

local function setupPlayer(player)
    if player == localPlayer then return end

    local function onCharacterAdded(character)
        if highlightEnabled then
            createHighlight(character)
        end

        character.AncestryChanged:Connect(function(_, parent)
            if not parent then
                removeHighlight(character)
            end
        end)
    end

    if player.Character then
        onCharacterAdded(player.Character)
    end
    player.CharacterAdded:Connect(onCharacterAdded)
end

local function toggleHighlights(state)
    highlightEnabled = state

    if not highlightEnabled then
      
        for character, _ in pairs(highlights) do
            removeHighlight(character)
        end
    else
        
        for _, player in pairs(Players:GetPlayers()) do
            if player ~= localPlayer and player.Character then
                createHighlight(player.Character)
            end
        end
    end
end

for _, player in pairs(Players:GetPlayers()) do
    setupPlayer(player)
end

Players.PlayerAdded:Connect(setupPlayer)

Players.PlayerRemoving:Connect(function(player)
    if player.Character then
        removeHighlight(player.Character)
    end
end)

EspTab:CreateToggle({
    Name = "Chams",
    CurrentValue = false,
    Flag = "HighlightToggle",
    Callback = function(value)
        toggleHighlights(value)
    end
})


local PlayersTab = Window:CreateTab("Players", "wand")
local PlayersSection = PlayersTab:CreateSection("Players")



local PlayersSection = PlayersTab:CreateSection("In-Game")

PlayersTab:CreateToggle({
    Name = "Anti Knockback",
    CurrentValue = false,
    Flag = "AntiKnockback",
    Callback = function(Value)
        getgenv().knc = Value

        if Value then
            task.spawn(function()
                while getgenv().knc do
                    task.wait(0.1)
                    pcall(function()
                        for _, v in ipairs(game.Players.LocalPlayer.Character:GetDescendants()) do
                            if v:IsA("BodyVelocity") or v:IsA("LinearVelocity") or v:IsA("VectorForce") then
                                v:Destroy()
                            end
                        end
                    end)
                end
            end)

            if game.ReplicatedStorage:FindFirstChild("AE") then
                game.ReplicatedStorage.AE:Destroy()
            end

            game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart").ChildAdded:Connect(function(des)
                if getgenv().knc then
                    if des:IsA("BodyVelocity") or des:IsA("LinearVelocity") or des:IsA("VectorForce") then
                        des:Destroy()
                    end
                end
            end)
        else
            for _, v in ipairs(game.Players.LocalPlayer.Character:GetDescendants()) do
                if v:IsA("BodyVelocity") or v:IsA("LinearVelocity") or v:IsA("VectorForce") then
                    v:Destroy()
                end
            end
        end
    end,
})

PlayersTab:CreateToggle({
    Name = "Anti JumpCooldown",
    CurrentValue = false,
    Flag = "AntiJumpCooldown",
    Callback = function(Value)
        getgenv().noJumpCooldown = Value

        if Value then
            task.spawn(function()
                while getgenv().noJumpCooldown do
                    task.wait(0.2)
                    pcall(function()
                        local playerGui = game:GetService("Players").LocalPlayer:FindFirstChild("PlayerGui")
                        if playerGui then
                            local debounce = playerGui:FindFirstChild("JumpDebounce")
                            if debounce then
                                debounce:Destroy()
                            end
                        end
                    end)
                end
            end)
        end
    end,
})

local AntiRentPayEnabled = false
PlayersTab:CreateToggle({
    Name = "Anti Rent Pay",
    CurrentValue = false,
    Callback = function(Value)
        AntiRentPayEnabled = Value
        if Value then
            task.spawn(function()
                while AntiRentPayEnabled do
                    task.wait(1)
                    local player = game.Players.LocalPlayer
                    local rentGui = player:FindFirstChild("PlayerGui") and player.PlayerGui:FindFirstChild("RentGui")
                    if rentGui then
                        local rentScript = rentGui:FindFirstChild("LocalScript")
                        if rentScript then
                            rentScript.Disabled = true
                            rentScript:Destroy()
                        end
                    end
                end
            end)
        end
    end
})

PlayersTab:CreateToggle({
    Name = "Anti Jail",
    CurrentValue = false,
    Callback = function(Value)
        local jailRemote = ReplicatedStorage:FindFirstChild("JailRemote")
        if Value then
            if jailRemote then
                jailRemote:Destroy()
            end
        end
    end,
})


local AntiSleepEnabled = false
PlayersTab:CreateToggle({
    Name = "Infinite Sleep",
    CurrentValue = false,
    Callback = function(Value)
        AntiSleepEnabled = Value
        if Value then
            task.spawn(function()
                while AntiSleepEnabled do
                    task.wait(1)
                    local player = game.Players.LocalPlayer
                    if player and player:FindFirstChild("PlayerGui") then
                        local sleepGui = player.PlayerGui:FindFirstChild("SleepGui")
                        if sleepGui then
                            local sleepScript = sleepGui:FindFirstChild("Frame") 
                                and sleepGui.Frame:FindFirstChild("sleep") 
                                and sleepGui.Frame.sleep:FindFirstChild("SleepBar") 
                                and sleepGui.Frame.sleep.SleepBar:FindFirstChild("sleepScript")
                            if sleepScript then
                                sleepScript.Disabled = true
                            end
                        end
                    end
                end
            end)
        end
    end
})

local AntiHungerEnabled = false
PlayersTab:CreateToggle({
    Name = "Infinite Hunger",
    CurrentValue = false,
    Callback = function(Value)
        AntiHungerEnabled = Value
        if Value then
            task.spawn(function()
                while AntiHungerEnabled do
                    task.wait(1)
                    local player = game.Players.LocalPlayer
                    if player and player:FindFirstChild("PlayerGui") then
                        local hungerGui = player.PlayerGui:FindFirstChild("Hunger")
                        if hungerGui then
                            local hungerScript = hungerGui:FindFirstChild("Frame") 
                                and hungerGui.Frame:FindFirstChild("Frame") 
                                and hungerGui.Frame.Frame:FindFirstChild("Frame") 
                                and hungerGui.Frame.Frame.Frame:FindFirstChild("HungerBarScript")
                            if hungerScript then
                                hungerScript.Disabled = true
                            end
                        end
                    end
                end
            end)
        end
    end
})

local AntiStaminaEnabled = false
PlayersTab:CreateToggle({
    Name = "Infinite Stamina",
    CurrentValue = false,
    Callback = function(Value)
        AntiStaminaEnabled = Value
        if Value then
            task.spawn(function()
                while AntiStaminaEnabled do
                    task.wait(1)
                    local player = game.Players.LocalPlayer
                    if player and player:FindFirstChild("PlayerGui") then
                        local staminaScript = player.PlayerGui:FindFirstChild("Run") 
                            and player.PlayerGui.Run:FindFirstChild("Frame") 
                            and player.PlayerGui.Run.Frame:FindFirstChild("Frame") 
                            and player.PlayerGui.Run.Frame.Frame:FindFirstChild("Frame") 
                            and player.PlayerGui.Run.Frame.Frame.Frame:FindFirstChild("StaminaBarScript")
                        if staminaScript then
                            staminaScript.Disabled = true
                        end
                    end
                end
            end)
        end
    end
})

PlayersTab:CreateToggle({
    Name = "Instant Interact",
    Default = false,
    Callback = function(Value)
        local Workspace = game:GetService("Workspace")
        local function updateProximityPrompts()
            for i, v in ipairs(Workspace:GetDescendants()) do
                if v.ClassName == "ProximityPrompt" then
                    v.HoldDuration = Value and 0 or 1
                end
            end
        end
        updateProximityPrompts()
        Workspace.DescendantAdded:Connect(function(descendant)
            if descendant.ClassName == "ProximityPrompt" then
                descendant.HoldDuration = Value and 0 or 1
            end
        end)
    end,
})

local AntiCameraShakeEnabled = false
local AntiCameraShakeToggle = PlayersTab:CreateToggle({
    Name = "No Camera Bobbing",
    CurrentValue = false,
    Callback = function(Value)
        AntiCameraShakeEnabled = Value
        if Value then
            task.spawn(function()
                while AntiCameraShakeEnabled do
                    task.wait(1)
                    local player = game.Players.LocalPlayer
                    if player and player.Character then
                        local cameraBobbing = player.Character:FindFirstChild("CameraBobbing")
                        if cameraBobbing then
                            cameraBobbing:Destroy()
                        end
                    end
                end
            end)
        end
    end
})

local bloodRemoved = false

local MyToggle = PlayersTab:CreateToggle({
	Name = "Disable Blood",
	CurrentValue = false,
	Flag = "RemoveBloodToggle",
	Callback = function(Value)
		bloodRemoved = Value
		local playerGui = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")

		if bloodRemoved then
			local bloodGui = playerGui:FindFirstChild("BloodGui")
			if bloodGui then
				bloodGui.ResetOnSpawn = false
				bloodGui:Destroy()
			end
		else
			-- Optional: Add logic to re-enable the BloodGui if needed
			warn("Re-enabling blood is not supported in this toggle unless you add spawn logic.")
		end
	end,
})

local Toggle = PlayersTab:CreateToggle({
	Name = "Instant Respawn",
	CurrentValue = false,
	Flag = "FasterRespawn",
	Callback = function(Value)
		_G.respawn = Value

		if Value then
			task.spawn(function()
				while _G.respawn and task.wait(1) do
					local player = game:GetService("Players").LocalPlayer
					local character = player.Character
					local humanoid = character and character:FindFirstChildWhichIsA("Humanoid")

					if humanoid and humanoid.Health <= 0 then
						game:GetService("ReplicatedStorage"):WaitForChild("RespawnRE"):FireServer()
					end
				end
			end)
		end
	end,
})

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local lastPosition
local respawnConnection
local deathConnection

PlayersTab:CreateToggle({
    Name = "Respawn Where You Died",
    CurrentValue = false,
    Flag = "RespawnWhereDied",
    Callback = function(state)
        if state then
            local function setup()
                local character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
                local humanoid = character:WaitForChild("Humanoid")
                local root = character:WaitForChild("HumanoidRootPart")

                deathConnection = humanoid.Died:Connect(function()
                    if root then
                        lastPosition = root.CFrame
                    end
                end)

                respawnConnection = LocalPlayer.CharacterAdded:Connect(function(char)
                    local newRoot = char:WaitForChild("HumanoidRootPart")
                    if lastPosition then
                        newRoot.CFrame = lastPosition
                    end
                    setup()
                end)
            end

            setup()
        else
            if respawnConnection then
                respawnConnection:Disconnect()
                respawnConnection = nil
            end
            if deathConnection then
                deathConnection:Disconnect()
                deathConnection = nil
            end
        end
    end,
})


local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local mouse = LocalPlayer:GetMouse()

-- Utility Section
local PlayersSection = PlayersTab:CreateSection("Walkspeed")

-- Key Options
local keyOptions = {}
for i = 65, 90 do
    table.insert(keyOptions, string.char(i))
end

-- Speed Control
local speedValue = 100
local isSpeedEnabled = false
local speedKey = "F"

local function setWalkSpeed()
    if isSpeedEnabled and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then
        LocalPlayer.Character.Humanoid.WalkSpeed = speedValue
    end
end

PlayersTab:CreateToggle({
    Name = "Enable Speed",
    CurrentValue = false,
    Flag = "2134534",
    Callback = function(Value)
        isSpeedEnabled = Value
        if Value then
            setWalkSpeed()
        elseif LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then
            LocalPlayer.Character.Humanoid.WalkSpeed = 16
        end
    end
})

PlayersTab:CreateInput({
    Name = "Speed (1-300)",
    PlaceholderText = "100",
    RemoveTextAfterFocusLost = true,
    Callback = function(Value)
        local num = tonumber(Value)
        if num then
            speedValue = math.clamp(num, 1, 300)
            setWalkSpeed()
        end
    end
})

PlayersTab:CreateDropdown({
    Name = "Speed Keybind",
    Options = keyOptions,
    CurrentOption = "F",
    Flag = "75",
    Callback = function(Value)
        speedKey = Value:upper()
    end
})

local PlayersSection = PlayersTab:CreateSection("Jump Power")

local jumpPowerValue = 100
local isJumpPowerEnabled = false
local jumpPowerKey = "F"

local function setJumpPower()
    if isJumpPowerEnabled and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then
        LocalPlayer.Character.Humanoid.JumpPower = jumpPowerValue
    end
end

PlayersTab:CreateToggle({
    Name = "Enable Jump Power",
    CurrentValue = false,
    Flag = "2",
    Callback = function(Value)
        isJumpPowerEnabled = Value
        if Value then
            setJumpPower()
        elseif LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then
            LocalPlayer.Character.Humanoid.JumpPower = 50
        end
    end
})

PlayersTab:CreateInput({
    Name = "Jump Power (1-300)",
    PlaceholderText = "100",
    RemoveTextAfterFocusLost = true,
    Callback = function(Value)
        local num = tonumber(Value)
        if num then
            jumpPowerValue = math.clamp(num, 1, 300)
            setJumpPower()
        end
    end
})

PlayersTab:CreateDropdown({
    Name = "Jump Power Keybind",
    Options = keyOptions,
    CurrentOption = "F",
    Flag = "76",
    Callback = function(Value)
        jumpPowerKey = Value:upper()
    end
})

-- Combined Key Handler
UserInputService.InputBegan:Connect(function(input, gp)
    if gp then return end
    if input.UserInputType == Enum.UserInputType.Keyboard then
        local key = input.KeyCode.Name

        -- Speed toggle key
        if isSpeedEnabled and key == speedKey and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then
            local hum = LocalPlayer.Character.Humanoid
            hum.WalkSpeed = (hum.WalkSpeed == 16) and speedValue or 16
        end

        -- Jump power toggle key
        if isJumpPowerEnabled and key == jumpPowerKey and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then
            local hum = LocalPlayer.Character.Humanoid
            hum.JumpPower = (hum.JumpPower == 50) and jumpPowerValue or 50
        end
    end
end)

local PlayersSection = PlayersTab:CreateSection("Inf Jump")

local jumpEnabled = false
_G.JumpHeight = 50

PlayersTab:CreateToggle({
    Name = "Enable Inf Jump",
    CurrentValue = false,
    Flag = "1",
    Callback = function(Value)
        jumpEnabled = Value
    end
})

PlayersTab:CreateInput({
    Name = "Jump Power (1-200)",
    PlaceholderText = "50",
    RemoveTextAfterFocusLost = true,
    Callback = function(Value)
        local num = tonumber(Value)
        if num then _G.JumpHeight = math.clamp(num, 1, 200) end
    end
})

UserInputService.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.Keyboard and jumpEnabled and input.KeyCode == Enum.KeyCode.Space then
        local char = LocalPlayer.Character
        if char and char:FindFirstChild("Humanoid") and char:FindFirstChild("HumanoidRootPart") then
            char.HumanoidRootPart.Velocity = Vector3.new(0, _G.JumpHeight, 0)
        end
    end
end)

-- Flight System
PlayersTab:CreateSection("Flight")
local flyspeed = 100
local flying = false
local flyEnabled = false
local flyKey = "E"
local flycontrol = {F = 0, B = 0, R = 0, L = 0, U = 0, D = 0}
local controls = {front = "w", back = "s", right = "d", left = "a", up = " ", down = "q"}

local function fly()
    local char = LocalPlayer.Character
    local hrp = char and char:FindFirstChild("HumanoidRootPart")
    local hum = char and char:FindFirstChildWhichIsA("Humanoid")
    if not hrp or not hum then return end

    flying = true

    local bv = Instance.new("BodyVelocity", hrp)
    local bg = Instance.new("BodyGyro", hrp)
    bv.MaxForce = Vector3.new(9e4, 9e4, 9e4)
    bg.MaxTorque = Vector3.new(9e4, 9e4, 9e4)
    bg.P = 9e4

    local con
    con = RunService.Stepped:Connect(function()
        if not flying then
            con:Disconnect()
            bv:Destroy()
            bg:Destroy()
            hum.PlatformStand = false
        else
            hum.PlatformStand = true
            bv.Velocity = (
                workspace.Camera.CFrame.LookVector * (flycontrol.F - flycontrol.B) +
                workspace.Camera.CFrame.RightVector * (flycontrol.R - flycontrol.L) +
                workspace.Camera.CFrame.UpVector * (flycontrol.U - flycontrol.D)
            ) * flyspeed
            bg.CFrame = workspace.Camera.CFrame
        end
    end)
end

PlayersTab:CreateToggle({
    Name = "Enable Fly",
    CurrentValue = false,
    Flag = "3",
    Callback = function(Value)
        flyEnabled = Value
        if flyEnabled then fly() else flying = false end
    end
})

PlayersTab:CreateInput({
    Name = "Fly Speed (1-300)",
    PlaceholderText = "100",
    RemoveTextAfterFocusLost = true,
    Callback = function(Value)
        flyspeed = math.clamp(tonumber(Value) or 100, 1, 300)
    end
})

PlayersTab:CreateDropdown({
    Name = "Fly Keybind",
    Options = keyOptions,
    CurrentOption = "E",
    Flag = "77",
    Callback = function(Value)
        flyKey = Value:upper()
    end
})

UserInputService.InputBegan:Connect(function(input, gp)
    if gp then return end
    if input.UserInputType == Enum.UserInputType.Keyboard then
        local key = input.KeyCode.Name
        if flyEnabled and key == flyKey then
            flying = not flying
            if flying then fly() end
        end
        if flying then
            if key:lower() == controls.front then flycontrol.F = 1 end
            if key:lower() == controls.back then flycontrol.B = 1 end
            if key:lower() == controls.left then flycontrol.L = 1 end
            if key:lower() == controls.right then flycontrol.R = 1 end
            if key == "Space" then flycontrol.U = 1 end
            if key:lower() == controls.down then flycontrol.D = 1 end
        end
    end
end)

UserInputService.InputEnded:Connect(function(input)
    local key = input.KeyCode.Name
    if key:lower() == controls.front then flycontrol.F = 0 end
    if key:lower() == controls.back then flycontrol.B = 0 end
    if key:lower() == controls.left then flycontrol.L = 0 end
    if key:lower() == controls.right then flycontrol.R = 0 end
    if key == "Space" then flycontrol.U = 0 end
    if key:lower() == controls.down then flycontrol.D = 0 end
end)

LocalPlayer.CharacterAdded:Connect(function()
    flying = false
end)


PlayersTab:CreateSection("Other")
local noClipEnabled = false
local toggleEnabled = false

local function toggleNoClip(state)
    noClipEnabled = state
end

RunService.Stepped:Connect(function()
    if noClipEnabled and LocalPlayer.Character then
        for _, part in ipairs(LocalPlayer.Character:GetDescendants()) do
            if part:IsA("BasePart") then
                part.CanCollide = false
            end
        end
    end
end)

PlayersTab:CreateToggle({
    Name = "Enable No-Clip",
    CurrentValue = false,
    Flag = "4",
    Callback = function(Value)
        toggleNoClip(Value)
    end
})


local TeleportEnabled = false

PlayersTab:CreateToggle({
    Name = "Enable Click To TP",
    CurrentValue = false,
    Flag = "5",
    Callback = function(Value)
        TeleportEnabled = Value
    end
})

mouse.Button1Down:Connect(function()
    if TeleportEnabled and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
        local pos = mouse.Hit.Position + Vector3.new(0, 2.5, 0)
        LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(pos)
    end
end)

local FarmsTab = Window:CreateTab("Farms", "tractor" ) -- Title, Image
FarmsTab:CreateSection("Jobs")

FarmsTab:CreateToggle({
	Name = "Search Trashbags",
	CurrentValue = false,
	Flag = "LootTrashToggle",
	Callback = function(Value)
		getgenv().loottrash = Value
		if Value then
			for _, v in pairs(workspace:GetDescendants()) do
				if v:IsA("ProximityPrompt") and v.Name == "ProximityPrompt" and v.Parent.Name == "DumpsterPromt" then
					v.HoldDuration = 0
					v.RequiresLineOfSight = false
				end
			end

			task.spawn(function()
				while getgenv().loottrash do
					task.wait()
					for _, v in pairs(workspace:GetDescendants()) do
						if v:IsA("ProximityPrompt") and v.Name == "ProximityPrompt" and v.Parent.Name == "DumpsterPromt" then
							local hrp = game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
							if hrp then
								hrp.CFrame = CFrame.new(v.Parent.Position.X, v.Parent.Position.Y + 0.2, v.Parent.Position.Z + 3)
							end
							workspace.CurrentCamera.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position, v.Parent.Position)
							task.wait(0.3)
							for _ = 1, 10 do fireproximityprompt(v) end
							task.wait(0.1)
							if not getgenv().loottrash then break end
						end
					end
				end
			end)
		end
	end
})

FarmsTab:CreateToggle({
	Name = "Auto Sell Pawned items",
	CurrentValue = false,
	Flag = "AutoSellToggle",
	Callback = function(Value)
		getgenv().autoSellEnabled = Value
		if Value then
			task.spawn(function()
				while getgenv().autoSellEnabled do
					for _, frame in ipairs(game.Players.LocalPlayer.PlayerGui["Bronx PAWNING"].Frame.Holder.List:GetChildren()) do
						if frame:IsA("Frame") then
							local itemName = frame.Item.Text
							while game.Players.LocalPlayer.Backpack:FindFirstChild(itemName) do
								game.ReplicatedStorage.PawnRemote:FireServer(itemName)
								task.wait(0.05)
							end
						end
					end
					task.wait(1)
				end
			end)
		end
	end
})

FarmsTab:CreateToggle({
	Name = "Construction Job",
	CurrentValue = false,
	Flag = "ConstructionFarm",
	Callback = function(Value)
		getgenv().constructionFarm = Value
		local player = game.Players.LocalPlayer
		local char = player.Character or player.CharacterAdded:Wait()
		local bp = player:WaitForChild("Backpack")

		local function hasPlyWood()
			return (bp and bp:FindFirstChild("PlyWood")) or (char and char:FindFirstChild("PlyWood"))
		end

		local function equipPlyWood()
			local wood = bp:FindFirstChild("PlyWood")
			if wood then wood.Parent = char end
		end

		local function firePrompt(prompt)
			if prompt and prompt:IsA("ProximityPrompt") then
				fireproximityprompt(prompt)
			end
		end

		local function grabWood()
			char:SetPrimaryPartCFrame(CFrame.new(-1727, 371, -1178))
			task.wait(0.1)
			while getgenv().constructionFarm and not hasPlyWood() do
				firePrompt(workspace.ConstructionStuff["Grab Wood"]:FindFirstChildOfClass("ProximityPrompt"))
				task.wait(0.1)
				equipPlyWood()
			end
		end

		local function buildWall(name, pos)
			local prompt = workspace.ConstructionStuff[name]:FindFirstChildOfClass("ProximityPrompt")
			while getgenv().constructionFarm and prompt and prompt.Enabled do
				char:SetPrimaryPartCFrame(pos)
				task.wait(0.01)
				firePrompt(prompt)
				task.wait()
				if not hasPlyWood() then grabWood() end
			end
		end

		if Value then
			char:SetPrimaryPartCFrame(CFrame.new(-1728, 371, -1172))
			task.wait(0.2)
			firePrompt(workspace.ConstructionStuff["Start Job"]:FindFirstChildOfClass("ProximityPrompt"))
			task.wait(0.5)

			task.spawn(function()
				while getgenv().constructionFarm do
					if not hasPlyWood() then grabWood() end
					buildWall("Wall2 Prompt", CFrame.new(-1705, 368, -1151))
					buildWall("Wall3 Prompt", CFrame.new(-1732, 368, -1152))
					buildWall("Wall4 Prompt2", CFrame.new(-1772, 368, -1152))
					buildWall("Wall1 Prompt3", CFrame.new(-1674, 368, -1166))
					break
				end
			end)
		end
	end
})

FarmsTab:CreateSection("robberies")

FarmsTab:CreateToggle({
	Name = "Ro On The Radar Studio",
	CurrentValue = false,
	Flag = "RobStudioToggle",
	Callback = function(Value)
		if Value then
			local player = game.Players.LocalPlayer
			local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
			if not hrp then return end

			local cam = workspace.CurrentCamera
			local origCF = hrp.CFrame

			for _, v in pairs(workspace.StudioPay.Money:GetDescendants()) do
				if v:IsA("ProximityPrompt") and v.Name == "Prompt" and v.Enabled then
					v.HoldDuration = 0
					v.RequiresLineOfSight = false
					hrp.CFrame = CFrame.new(v.Parent.Position.X, v.Parent.Position.Y + 2, v.Parent.Position.Z)
					cam.CFrame = CFrame.new(cam.CFrame.Position, v.Parent.Position)
					task.wait(0.25)
					repeat task.wait(0.3) fireproximityprompt(v) until not v.Enabled or not Value
					if not Value then break end
				end
			end

			if Value then
				hrp.CFrame = origCF
				Library:Notify("[SleepyHub] - No money left", 2)
			end
		end
	end
})

FarmsTab:CreateToggle({
	Name = "Rob Houses",
	CurrentValue = false,
	Flag = "RobHouseToggle",
	Callback = function(Value)
		getgenv().robhouses = Value
		if Value then
			task.spawn(function()
				while getgenv().robhouses do
					for _, v in pairs(workspace.Robberys:GetDescendants()) do
						if v:IsA("ProximityPrompt") and v.Name == "Prompt" and v.Enabled then
							v.HoldDuration = 0
							v.RequiresLineOfSight = false
							local hrp = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
							if hrp then
								hrp.CFrame = CFrame.new(v.Parent.Position + Vector3.new(0, 0.5, 2))
								workspace.CurrentCamera.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position, v.Parent.Position)
								task.wait(0.25)
								for _ = 1, 10 do fireproximityprompt(v) end
								task.wait(0.2)
								if not getgenv().robhouses then break end
							end
						end
					end
					task.wait(0.5)
				end
			end)
		end
	end
})


FarmsTab:CreateSection("Pickups")
FarmsTab:CreateToggle({
	Name = "Pick Up Dropped Cash",
	CurrentValue = false,
	Flag = "PickupCashToggle",
	Callback = function(Value)
		getgenv().stealm = Value
		if Value then
			task.spawn(function()
				while getgenv().stealm do
					for _, v in pairs(workspace:GetDescendants()) do
						if v:IsA("ProximityPrompt") and v.Name == "ProximityPrompt" and v.Parent and v.Parent.Name == "Money" then
							v.HoldDuration = 0
							v.RequiresLineOfSight = false
							local hrp = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
							if hrp then
								hrp.CFrame = CFrame.new(v.Parent.Position + Vector3.new(0, 0.2, 2))
								workspace.CurrentCamera.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position, v.Parent.Position)
								task.wait(0.25)
								fireproximityprompt(v)
								task.wait(0.1)
								if not getgenv().stealm then break end
							end
						end
					end
					task.wait(1)
				end
			end)
		end
	end
})

local MiscTab = Window:CreateTab("Misc", "puzzle" ) -- Title, Image
MiscTab:CreateSection("Servers")

MiscTab:CreateButton({
    Name = "Find a dead server",
    Callback = function()
        local HttpService = game:GetService("HttpService")
        local TeleportService = game:GetService("TeleportService")
        local PlaceId = game.PlaceId
        local Player = game.Players.LocalPlayer

        local function findDeadServer()
            local cursor = ""
            while true do
                local url = "https://[Log in to view URL]"..PlaceId.."/servers/Public?sortOrder=Asc&limit=100"..(cursor ~= "" and "&cursor="..cursor or "")
                local response = syn and syn.request({
                    Url = url,
                    Method = "GET"
                }) or http_request({
                    Url = url,
                    Method = "GET"
                })

                local body = HttpService:JSONDecode(response.Body)
                for _, server in pairs(body.data) do
                    if server.playing < server.maxPlayers and server.id ~= game.JobId then
                        return server.id
                    end
                end

                if not body.nextPageCursor then break end
                cursor = body.nextPageCursor
                task.wait(0.2)
            end
            return nil
        end

        Rayfield:Notify({
            Title = "Searching...",
            Content = "Looking for a low-pop server...",
            Duration = 4
        })

        local serverId = findDeadServer()
        if serverId then
            Rayfield:Notify({
                Title = "Found!",
                Content = "Teleporting to dead server...",
                Duration = 4
            })
            TeleportService:TeleportToPlaceInstance(PlaceId, serverId, Player)
        else
            Rayfield:Notify({
                Title = "Error",
                Content = "No empty server found.",
                Duration = 5
            })
        end
    end,
})

MiscTab:CreateButton({
    Name = "Server Hop",
    Callback = function()
        local HttpService = game:GetService("HttpService")
        local TeleportService = game:GetService("TeleportService")
        local PlaceId = game.PlaceId
        local Player = game.Players.LocalPlayer

        local function serverHop()
            local cursor = ""
            while true do
                local url = "https://[Log in to view URL]"..PlaceId.."/servers/Public?limit=100"..(cursor ~= "" and "&cursor="..cursor or "")
                local response = syn and syn.request({
                    Url = url,
                    Method = "GET"
                }) or http_request({
                    Url = url,
                    Method = "GET"
                })

                local body = HttpService:JSONDecode(response.Body)
                for _, server in pairs(body.data) do
                    if server.playing < server.maxPlayers and server.id ~= game.JobId then
                        Rayfield:Notify({
                            Title = "Server Hop",
                            Content = "Teleporting to server "..server.id,
                            Duration = 3
                        })
                        TeleportService:TeleportToPlaceInstance(PlaceId, server.id, Player)
                        return
                    end
                end

                if not body.nextPageCursor then break end
                cursor = body.nextPageCursor
                task.wait(0.2)
            end

            Rayfield:Notify({
                Title = "Server Hop",
                Content = "No available servers found.",
                Duration = 5
            })
        end

        serverHop()
    end,
})

MiscTab:CreateButton({
    Name = "Rejoin Server",
    Callback = function()
        local TeleportService = game:GetService("TeleportService")
        local PlaceId = game.PlaceId
        local JobId = game.JobId
        local Player = game.Players.LocalPlayer

        Rayfield:Notify({
            Title = "Rejoin Server",
            Content = "Rejoining current server...",
            Duration = 3
        })

        TeleportService:TeleportToPlaceInstance(PlaceId, JobId, Player)
    end,
})

MiscTab:CreateButton({
    Name = "Join VC Servers",
    Callback = function()
        game:GetService("TeleportService"):Teleport(18642421777, game.Players.LocalPlayer)
    end,
})

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: