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", "folder")
local HomeSection1 = HomeTab:CreateSection("Welcome!")

local Paragraph1 = 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)

local HomeSection3 = 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
})

local MainSection = 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)

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", "pencil")
local EspSection = EspTab:CreateSection("Player ESP")

local settings = {
    defaultcolor = Color3.fromRGB(255, 0, 0),
    teamcolor = true,
    espEnabled = false
}

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.boxoutline = newDrawing("Square")
    drawings.boxoutline.Thickness = 3
    drawings.boxoutline.Filled = false
    drawings.boxoutline.Color = newColor3()
    drawings.boxoutline.Visible = false
    drawings.boxoutline.ZIndex = 1

    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)
    local character = player and player.Character
    if character then
        local cframe = character:GetModelCFrame()
        local position, visible, depth = wtvp(cframe.Position)
        esp.box.Visible = visible and settings.espEnabled
        esp.boxoutline.Visible = visible and settings.espEnabled

        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)

            esp.box.Size = newVector2(width, height)
            esp.box.Position = newVector2(round(x - width / 2, y - height / 2))
            esp.box.Color = settings.teamcolor and player.TeamColor.Color or settings.defaultcolor

            esp.boxoutline.Size = esp.box.Size
            esp.boxoutline.Position = esp.box.Position
        end
    else
        esp.box.Visible = false
        esp.boxoutline.Visible = false
    end
end

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

for _, player in next, players:GetPlayers() do
    if player ~= localPlayer then
        createEsp(player)
    end
end

players.PlayerAdded:Connect(function(player)
    createEsp(player)
end)

players.PlayerRemoving:Connect(function(player)
    removeEsp(player)
end)

runService:BindToRenderStep("esp", Enum.RenderPriority.Camera.Value, function()
    for player, drawings in next, espCache do
        if drawings and player ~= localPlayer then
            updateEsp(player, drawings)
        end
    end
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 = " Enable 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
})


local Players = 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 = "Enable Chams",
    CurrentValue = false,
    Flag = "HighlightToggle",
    Callback = function(value)
        toggleHighlights(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 = "Enable Name",
    CurrentValue = false,
    Flag = "ESPToggle",
    Callback = function(value)
        toggleESP(value)
    end
})

local ESPObjects = {}
local TracerEnabled = false

EspTab:CreateToggle({
    Name = "Enable 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)


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

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

local playerList = {}
local SelectedPlayer = nil

local BringConnection = nil
local BringActive = false
local SpectateRunning = false
local SpectateConnection = nil

for _, player in ipairs(Players:GetPlayers()) do
    if player ~= LocalPlayer then
        table.insert(playerList, player.Name)
    end
end

local TeleportDropdown = PlayersTab:CreateDropdown({
    Name = "Select Player",
    Options = playerList,
    CurrentOption = {},
    MultipleOptions = false,
    Flag = "PlayerDropdown",
    Callback = function(Options)
        SelectedPlayer = Options[1]
    end,
})

local function RefreshPlayerList()
    playerList = {}
    for _, player in ipairs(Players:GetPlayers()) do
        if player ~= LocalPlayer then
            table.insert(playerList, player.Name)
        end
    end
    TeleportDropdown:Set(playerList)
end

PlayersTab:CreateButton({
    Name = "Refresh Player List",
    Callback = RefreshPlayerList,
})

local PlayersSection = PlayersTab:CreateSection("Actions")

PlayersTab:CreateButton({
    Name = "Bring Player",
    Callback = function()
        if BringActive then
            if BringConnection then
                BringConnection:Disconnect()
                BringConnection = nil
            end
            BringActive = false
        else
            if SelectedPlayer then
                if BringConnection then BringConnection:Disconnect() end
                BringConnection = RunService.RenderStepped:Connect(function()
                    local targetPlayer = Players:FindFirstChild(SelectedPlayer)
                    local localChar = LocalPlayer.Character
                    if targetPlayer and targetPlayer.Character and localChar and localChar:FindFirstChild("HumanoidRootPart") and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
                        local frontCFrame = localChar.HumanoidRootPart.CFrame * CFrame.new(0, 0, -5)
                        targetPlayer.Character.HumanoidRootPart.CFrame = frontCFrame
                    end
                end)
                BringActive = true
            else
                warn("No player selected.")
            end
        end
    end,
})

PlayersTab:CreateButton({
    Name = "Teleport to Player",
    Callback = function()
        if SelectedPlayer then
            local targetPlayer = Players:FindFirstChild(SelectedPlayer)
            local localChar = LocalPlayer.Character
            if targetPlayer and targetPlayer.Character and localChar and localChar:FindFirstChild("HumanoidRootPart") and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
                localChar.HumanoidRootPart.CFrame = targetPlayer.Character.HumanoidRootPart.CFrame
            else
                warn("Teleport failed: Player or HumanoidRootPart not found.")
            end
        else
            warn("No player selected.")
        end
    end,
})

PlayersTab:CreateButton({
    Name = "Spectate Player",
    Callback = function()
        if SpectateRunning then
            if SpectateConnection then
                SpectateConnection:Disconnect()
                SpectateConnection = nil
            end
            Camera.CameraType = Enum.CameraType.Custom
            SpectateRunning = false
        else
            if SelectedPlayer then
                if SpectateConnection then SpectateConnection:Disconnect() end
                SpectateConnection = RunService.RenderStepped:Connect(function()
                    local targetPlayer = Players:FindFirstChild(SelectedPlayer)
                    if targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
                        Camera.CameraType = Enum.CameraType.Scriptable
                        Camera.CFrame = targetPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 5, 10)
                    else
                        Camera.CameraType = Enum.CameraType.Custom
                    end
                end)
                SpectateRunning = true
            else
                warn("No player selected to spectate.")
            end
        end
    end,
})

local PlayersSection = PlayersTab:CreateSection("Spy")

PlayersTab:CreateButton({
    Name = "Show Wallet",
    Callback = function()
        if SelectedPlayer then
            local TargetPlayer = Players:FindFirstChild(SelectedPlayer)
            if TargetPlayer and TargetPlayer:FindFirstChild("stored") and TargetPlayer.stored:FindFirstChild("Money") then
                local amount = TargetPlayer.stored.Money.Value
                Rayfield:Notify({
                    Title = "Wallet",
                    Content = SelectedPlayer .. " has $" .. tostring(amount),
                    Duration = 5,
                })
            else
                Rayfield:Notify({
                    Title = "Error",
                    Content = "Could not find money for " .. SelectedPlayer,
                    Duration = 4,
                })
            end
        else
            Rayfield:Notify({
                Title = "No Player Selected",
                Content = "Please select a player first.",
                Duration = 3,
            })
        end
    end,
})

PlayersTab:CreateButton({
    Name = "Show Bank Account",
    Callback = function()
        if SelectedPlayer then
            local TargetPlayer = Players:FindFirstChild(SelectedPlayer)
            if TargetPlayer and TargetPlayer:FindFirstChild("stored") and TargetPlayer.stored:FindFirstChild("Bank") then
                local bank = TargetPlayer.stored.Bank.Value
                Rayfield:Notify({
                    Title = "Bank",
                    Content = SelectedPlayer .. " has $" .. tostring(bank) .. " in their bank.",
                    Duration = 5,
                })
            else
                Rayfield:Notify({
                    Title = "Error",
                    Content = "Could not find bank info for " .. SelectedPlayer,
                    Duration = 4,
                })
            end
        else
            Rayfield:Notify({
                Title = "No Player Selected",
                Content = "Please select a player first.",
                Duration = 3,
            })
        end
    end,
})

PlayersTab:CreateButton({
    Name = "Show Safe Items",
    Callback = function()
        if SelectedPlayer then
            local TargetPlayer = Players:FindFirstChild(SelectedPlayer)
            if TargetPlayer and TargetPlayer:FindFirstChild("InvData") then
                local inv = TargetPlayer.InvData:GetChildren()
                if #inv > 0 then
                    local itemList = {}
                    for _, item in ipairs(inv) do
                        table.insert(itemList, item.Name)
                    end
                    Rayfield:Notify({
                        Title = "Safe Items",
                        Content = SelectedPlayer .. " has: " .. table.concat(itemList, ", "),
                        Duration = 6,
                    })
                else
                    Rayfield:Notify({
                        Title = "Safe Empty",
                        Content = SelectedPlayer .. " has no items in their safe.",
                        Duration = 4,
                    })
                end
            else
                Rayfield:Notify({
                    Title = "Error",
                    Content = "Could not access safe for " .. SelectedPlayer,
                    Duration = 4,
                })
            end
        else
            Rayfield:Notify({
                Title = "No Player Selected",
                Content = "Please select a player first.",
                Duration = 3,
            })
        end
    end,
})

local PlayersSection = PlayersTab:CreateSection("Self Player Mods")

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)

-- Noclip
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
})

-- Click to Teleport
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")
local FarmsSection = FarmsTab:CreateSection("Jobs")

local loottrash = false

local function LootTrashPrompt()
	for i, v in pairs(workspace:GetDescendants()) do
		if v:IsA("ProximityPrompt") and v.Name == "ProximityPrompt" then
			if v.Parent.Name == "DumpsterPromt" then
				v.HoldDuration = 0
				v.RequiresLineOfSight = false
			end
		end
	end
end

FarmsTab:CreateToggle({
	Name = "Search Trashbags",
	CurrentValue = false,
	Flag = "LootTrashToggle",
	Callback = function(Value)
		loottrash = Value
		if loottrash then
			LootTrashPrompt()

			task.spawn(function()
				while loottrash do
					task.wait()

					for i, 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
								-- Normal Teleport
								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 i = 1, 10 do
								fireproximityprompt(v)
							end

							task.wait(0.1)

							if not loottrash then break end
						end
					end
				end
			end)
		end
	end
})

local autoSellEnabled = false

FarmsTab:CreateToggle({
	Name = "Auto Sell Pawned items",
	CurrentValue = false,
	Flag = "AutoSellToggle",
	Callback = function(Value)
		autoSellEnabled = Value

		if autoSellEnabled then
			task.spawn(function()
				while 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:GetService("ReplicatedStorage").PawnRemote:FireServer(itemName)
								task.wait(0.05)
							end
						end
					end
					task.wait(1) -- Add delay to prevent excessive firing
				end
			end)
		end
	end
})

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

local function getCharacter()
    return speaker.Character or speaker.CharacterAdded:Wait()
end

local function getBackpack()
    return speaker:FindFirstChild("Backpack")
end

local function hasPlyWood()
    local backpack = getBackpack()
    local character = getCharacter()
    return (backpack and backpack:FindFirstChild("PlyWood")) or (character and character:FindFirstChild("PlyWood"))
end

local function equipPlyWood()
    local backpack = getBackpack()
    if backpack then
        local plyWood = backpack:FindFirstChild("PlyWood")
        if plyWood then
            plyWood.Parent = getCharacter()
        end
    end
end

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

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

local function buildWall(wallPromptName, wallPosition)
    local prompt = workspace.ConstructionStuff[wallPromptName]:FindFirstChildOfClass("ProximityPrompt")
    
    while getgenv().constructionFarm and prompt and prompt.Enabled do
        getCharacter():SetPrimaryPartCFrame(wallPosition)
        task.wait(0.01)
        fireProximityPrompt(prompt)
        task.wait()

        if not hasPlyWood() then
            grabWood()
        end
    end
end

FarmsTab:CreateToggle({
    Name = "Construction Job",
    CurrentValue = false,
    Flag = "ConstructionFarm",
    Callback = function(Value)
        getgenv().constructionFarm = Value

        if Value then
            getCharacter():SetPrimaryPartCFrame(CFrame.new(-1728, 371, -1172))
            task.wait(0.2)
            fireProximityPrompt(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))

                    print("[Construction] All walls complete.")
                    break
                end
            end)
        else
            print("[Construction] Stopped.")
        end
    end
})

local FarmsSection = FarmsTab:CreateSection("robberies")

local camera = workspace.CurrentCamera

function stuidoprompt()
	for _, v in pairs(workspace.StudioPay.Money:GetDescendants()) do
		if v:IsA("ProximityPrompt") and v.Name == "Prompt" then
			v.HoldDuration = 0
			v.RequiresLineOfSight = false
		end
	end
end

FarmsTab:CreateToggle({
	Name = "Ro On The Radar Studio",
	CurrentValue = false,
	Flag = "RobStudioToggle",
	Callback = function(Value)
		local robstudio = Value

		if robstudio then
			local player = game.Players.LocalPlayer
			local root = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
			if not root then return end

			local originalCFrame = root.CFrame
			stuidoprompt()

			for _, v in pairs(workspace.StudioPay.Money:GetDescendants()) do
				if v:IsA("ProximityPrompt") and v.Name == "Prompt" and v.Enabled then
					-- Normal teleport
					root.CFrame = CFrame.new(
						v.Parent.Position.X,
						v.Parent.Position.Y + 2,
						v.Parent.Position.Z
					)

					camera.CFrame = CFrame.new(camera.CFrame.Position, v.Parent.Position)
					task.wait(0.25)

					repeat
						task.wait(0.3)
						fireproximityprompt(v)
					until v.Enabled == false or not robstudio

					if not robstudio then break end
				end
			end

			-- Return to original position
			if robstudio then
				root.CFrame = originalCFrame
			end

			-- Optional UI feedbac
			if robstudio then
				Library:Notify("[SleepyHub] - No money left", 2)
			end
		end
	end
})


local Houseleft = {}
local Houseright = {}

local targetPosition = Vector3.new(-615, 254, -695)
local tolerance = 1

local RobHouse = false

local function updateDoors()
    table.clear(Houseleft)
    table.clear(Houseright)

    for _, v in pairs(workspace.HouseRobb:GetDescendants()) do
        if (v.Name == "WoodenDoor" or v.Name == "HardDoor") and v:IsA("BasePart") and v:FindFirstChild("ProximityPrompt") then
            if (v.Position - targetPosition).Magnitude <= 10 then
                Houseright[v.Name] = v
            else
                Houseleft[v.Name] = v
            end
        end
    end
end

local function HouseRobPrompts()
    for _, v in pairs(workspace.HouseRobb:GetDescendants()) do
        if v:IsA("ProximityPrompt") and v.Name == "ProximityPrompt" then
            v.HoldDuration = 0
            v.RequiresLineOfSight = false
            v.Enabled = false
        end
    end
end

FarmsTab:CreateToggle({
    Name = "Rob Houses",
    CurrentValue = false,
    Flag = "RobHouseToggle",
    Callback = function(value)
        RobHouse = value
        local player = game.Players.LocalPlayer
        local OldCframe = player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character.HumanoidRootPart.CFrame

        if RobHouse then
            HouseRobPrompts()
        end

        task.spawn(function()
            while RobHouse do
                task.wait(1) -- slower loop to reduce spam
                updateDoors()

                if not RobHouse then break end

                local house1Robbed = Houseleft["HardDoor"] and Houseleft["HardDoor"].Transparency == 1
                local moneyParts = Houseleft["HardDoor"] and Houseleft["HardDoor"].Parent.Parent:FindFirstChild("TakeMoney")
                local moneyFound = false

                if house1Robbed and moneyParts then
                    for _, part in pairs(moneyParts:GetChildren()) do
                        if part.Name == "MoneyGrab" and part.Transparency == 0 then
                            moneyFound = true
                            break
                        end
                    end
                end

                if house1Robbed and not moneyFound then
                   print("House 1 already robbed or no money left,")
                elseif not house1Robbed then
                    print("Robbing House 1")

                    for _, v in pairs(Houseleft["HardDoor"]:GetDescendants()) do
                        if v:IsA("ProximityPrompt") and v.Name == "ProximityPrompt" then
                            v.Enabled = true
                            if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
                                player.Character.HumanoidRootPart.CFrame = CFrame.new(v.Parent.CFrame.Position.X - 1.5, v.Parent.CFrame.Position.Y, v.Parent.CFrame.Position.Z)
                                task.wait(0.5)  -- wait half a second after teleporting
                            end
                            Camera.CFrame = CFrame.new(Camera.CFrame.Position, v.Parent.CFrame.Position)
                            repeat 
                                task.wait(0.5)
                                fireproximityprompt(v) 
                            until Houseleft["HardDoor"].Transparency == 1
                        end
                    end

                    for _, v in pairs(Houseleft["HardDoor"].Parent.Parent:GetDescendants()) do
                        if v:IsA("ProximityPrompt") and v.Name == "ProximityPrompt" then
                            HouseRobPrompts()

                            local parentPart = v.Parent
                            local targetCFrame = parentPart.CFrame * CFrame.new(0, 0, -3)

                            if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
                                player.Character.HumanoidRootPart.CFrame = targetCFrame
                                task.wait(0.5)  -- wait after teleporting
                            end

                            Camera.CFrame = CFrame.new(Camera.CFrame.Position, v.Parent.CFrame.Position)
                            v.Enabled = true
                            repeat
                                fireproximityprompt(v)
                                task.wait(0.5)
                            until v.Parent.Transparency == 1
                            v.Enabled = false
                        end
                    end
                end

                local house2Robbed = Houseright["WoodenDoor"] and Houseright["WoodenDoor"].Transparency == 1
                local moneyParts2 = Houseright["WoodenDoor"] and Houseright["WoodenDoor"].Parent.Parent:FindFirstChild("TakeMoney")
                local moneyFound2 = false

                if house2Robbed and moneyParts2 then
                    for _, part in pairs(moneyParts2:GetChildren()) do
                        if part.Name == "MoneyGrab" and part.Transparency == 0 then
                            moneyFound2 = true
                            break
                        end
                    end
                end

                if house2Robbed and not moneyFound2 then
                    print("House 2 already robbed or no money left, skipping...")
                elseif not house2Robbed then
                    print("Robbing House 2")

                    for _, v in pairs(Houseright["WoodenDoor"]:GetDescendants()) do
                        if v:IsA("ProximityPrompt") and v.Name == "ProximityPrompt" then
                            v.Enabled = true
                            if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
                                player.Character.HumanoidRootPart.CFrame = CFrame.new(v.Parent.CFrame.Position.X - 1.5, v.Parent.CFrame.Position.Y, v.Parent.CFrame.Position.Z)
                                task.wait(0.5) -- wait after teleporting
                            end
                            Camera.CFrame = CFrame.new(Camera.CFrame.Position, v.Parent.CFrame.Position)
                            repeat 
                                task.wait(0.5)
                                fireproximityprompt(v) 
                            until Houseright["WoodenDoor"].Transparency == 1
                        end
                    end

                    for _, v in pairs(Houseright["WoodenDoor"].Parent.Parent:GetDescendants()) do
                        if v:IsA("ProximityPrompt") and v.Name == "ProximityPrompt" then
                            HouseRobPrompts()

                            local targetPart = v.Parent
                            local targetCFrame = targetPart.CFrame * CFrame.new(0, 0, -3)

                            if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
                                player.Character.HumanoidRootPart.CFrame = targetCFrame
                                task.wait(0.5) -- wait after teleporting
                            end

                            Camera.CFrame = CFrame.new(Camera.CFrame.Position, v.Parent.CFrame.Position)
                            v.Enabled = true
                            repeat
                                fireproximityprompt(v)
                                task.wait(0.5)
                            until targetPart.Transparency == 1
                            v.Enabled = false
                        end
                    end
                end

                print("Completed Robbing...")
                if OldCframe and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
                    player.Character.HumanoidRootPart.CFrame = OldCframe
                end
                RobHouse = false
            end
        end)
    end
})

local FarmsSection = FarmsTab:CreateSection("Pickups")

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

local function TeleportToPosition(cframe)
    local character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
    local hrp = character:FindFirstChild("HumanoidRootPart")
    if hrp then
        hrp.CFrame = cframe
    end
end

local function StealMoneyPrompt()

end

FarmsTab:CreateToggle({
    Name = "Collect Dropped Cash",
    CurrentValue = false,
    Flag = "Droppercadh",
    Callback = function(enabled)
        getgenv().stealm = enabled

        if enabled then
            StealMoneyPrompt()
            task.spawn(function()
                while getgenv().stealm do
                    task.wait()
                    local dollas = workspace:FindFirstChild("Dollas")
                    if dollas then
                        for _, part in pairs(dollas:GetDescendants()) do
                            if part:IsA("ProximityPrompt") and part.Name == "ProximityPrompt" and getgenv().stealm then
                                StealMoneyPrompt()
                                -- Face the money part with camera
                                Camera.CFrame = CFrame.new(Camera.CFrame.Position, part.Parent.CFrame.Position)
                                -- Teleport player normally
                                TeleportToPosition(part.Parent.CFrame)
                                task.wait(0.25)
                                fireproximityprompt(part)
                            end
                        end
                    end
                end
            end)
        end
    end
})

Embed on website

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