local player = game.Players.LocalPlayer local gui = Instance.new("ScreenGui") gui.Parent = player:WaitForChild("PlayerGui") local safeDoors = {} -- SafeDoor nesnelerini saklamak için bir tablo local espEnabled = false -- ESP özelliğini kontrol etmek için bir bayrak local menuFrame -- Menü çerçevesi (daha sonra oluşturulacak) -- SafeDoor'ları sırala ve tabloya ekle local function sortSafeDoors() safeDoors = {} for _, object in pairs(workspace:GetDescendants()) do if object:IsA("BasePart") and object.Name == "SafeDoor" then table.insert(safeDoors, object) end end table.sort(safeDoors, function(a, b) return a.Position.Y < b.Position.Y -- Yüksekliğe göre sırala end) end -- Menü oluşturma local function createMenu() if menuFrame then menuFrame:Destroy() -- Eğer menü zaten varsa önce yok et end menuFrame = Instance.new("Frame") menuFrame.Size = UDim2.new(0, 200, 0, 300) menuFrame.Position = UDim2.new(0, 10, 0, 150) menuFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) menuFrame.Visible = false -- Menü varsayılan olarak kapalı menuFrame.Parent = gui local layout = Instance.new("UIListLayout") layout.Padding = UDim.new(0, 5) layout.Parent = menuFrame for index, safeDoor in ipairs(safeDoors) do local button = Instance.new("TextButton") button.Size = UDim2.new(1, 0, 0, 30) button.Text = "SafeDoor " .. index button.TextColor3 = Color3.fromRGB(255, 255, 255) button.BackgroundColor3 = Color3.fromRGB(0, 128, 0) button.TextScaled = true button.Parent = menuFrame -- Butona tıklanma işlevi button.MouseButton1Click:Connect(function() if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then -- SafeDoor'un pozisyonuna 2 birim yukarıya ışınlan local teleportPosition = safeDoor.Position + Vector3.new(0, 2, 0) player.Character.HumanoidRootPart.CFrame = CFrame.new(teleportPosition) end end) end end -- ESP oluştur veya sil local function toggleESP() espEnabled = not espEnabled for _, safeDoor in ipairs(safeDoors) do local existingESP = safeDoor:FindFirstChild("ESP") if espEnabled then -- Eğer ESP aktif değilse, ESP oluştur if not existingESP then local billboard = Instance.new("BillboardGui") billboard.Name = "ESP" billboard.Size = UDim2.new(0, 100, 0, 50) billboard.Adornee = safeDoor billboard.AlwaysOnTop = true billboard.Parent = safeDoor local textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.BackgroundTransparency = 1 textLabel.Text = "SafeDoor " .. table.find(safeDoors, safeDoor) textLabel.TextColor3 = Color3.fromRGB(255, 255, 255) textLabel.TextScaled = true textLabel.Parent = billboard end else -- Eğer ESP aktifse, mevcut ESP'leri sil if existingESP then existingESP:Destroy() end end end end -- ESP Butonu local espButton = Instance.new("TextButton") espButton.Size = UDim2.new(0, 150, 0, 50) espButton.Position = UDim2.new(0, 10, 0, 10) espButton.Text = "ESP" espButton.TextColor3 = Color3.fromRGB(255, 255, 255) espButton.BackgroundColor3 = Color3.fromRGB(0, 128, 0) espButton.TextScaled = true espButton.Parent = gui espButton.MouseButton1Click:Connect(toggleESP) -- Menü Aç Butonu local menuButton = Instance.new("TextButton") menuButton.Size = UDim2.new(0, 150, 0, 50) menuButton.Position = UDim2.new(0, 10, 0, 70) menuButton.Text = "Menü Aç" menuButton.TextColor3 = Color3.fromRGB(255, 255, 255) menuButton.BackgroundColor3 = Color3.fromRGB(0, 0, 128) menuButton.TextScaled = true menuButton.Parent = gui menuButton.MouseButton1Click:Connect(function() if not menuFrame then createMenu() -- Menü çerçevesi oluştur end menuFrame.Visible = not menuFrame.Visible end) -- Yeni SafeDoor eklenince veya silinince otomatik güncelleme workspace.DescendantAdded:Connect(function(descendant) if descendant:IsA("BasePart") and descendant.Name == "SafeDoor" then sortSafeDoors() -- SafeDoor'ları yeniden sırala createMenu() -- Menü ve ESP'yi yeniden oluştur if espEnabled then toggleESP() -- Mevcut ESP'yi sil toggleESP() -- Yeniden oluştur end end end) workspace.DescendantRemoving:Connect(function(descendant) if descendant:IsA("BasePart") and descendant.Name == "SafeDoor" then sortSafeDoors() -- SafeDoor'ları yeniden sırala createMenu() -- Menü ve ESP'yi yeniden oluştur if espEnabled then toggleESP() -- Mevcut ESP'yi sil toggleESP() -- Yeniden oluştur end end end) -- SafeDoor'ları yükle ve düzenle sortSafeDoors() createMenu() -- Menü başlangıçta oluşturulur