
Key Required

local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ChestOpenerGui"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui
-- Variables
local isRunning = false
local chestsOpened = 0
local totalValue = 0
local startTime = tick()
-- Positions des coffres (à ajuster selon ton jeu)
local chestPositions = {
Bronze = CFrame.new(0, 0, 0), -- Position à définir
Silver = CFrame.new(0, 0, 0), -- Position à définir
Gold = CFrame.new(0, 0, 0), -- Position à définir
}
-- Bouton d'ouverture (en haut au milieu)
local toggleButton = Instance.new("TextButton")
toggleButton.Size = UDim2.new(0, 200, 0, 50)
toggleButton.Position = UDim2.new(0.5, -100, 0, 10)
toggleButton.BackgroundColor3 = Color3.fromRGB(40, 40, 60)
toggleButton.BorderSizePixel = 0
toggleButton.Font = Enum.Font.GothamBold
toggleButton.Text = "📦 CHEST OPENER"
toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleButton.TextSize = 16
toggleButton.Parent = screenGui
local toggleCorner = Instance.new("UICorner")
toggleCorner.CornerRadius = UDim.new(0, 10)
toggleCorner.Parent = toggleButton
-- Frame principale
local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 450, 0, 550)
mainFrame.Position = UDim2.new(0.5, -225, 0.5, -275)
mainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 35)
mainFrame.BorderSizePixel = 0
mainFrame.Visible = false
mainFrame.Parent = screenGui
local mainCorner = Instance.new("UICorner")
mainCorner.CornerRadius = UDim.new(0, 15)
mainCorner.Parent = mainFrame
-- Titre
local mainTitle = Instance.new("TextLabel")
mainTitle.Size = UDim2.new(1, -50, 0, 50)
mainTitle.Position = UDim2.new(0, 0, 0, 0)
mainTitle.BackgroundColor3 = Color3.fromRGB(35, 35, 50)
mainTitle.BorderSizePixel = 0
mainTitle.Font = Enum.Font.GothamBold
mainTitle.Text = "📦 AUTO CHEST OPENER"
mainTitle.TextColor3 = Color3.fromRGB(255, 200, 100)
mainTitle.TextSize = 20
mainTitle.Parent = mainFrame
local titleCorner = Instance.new("UICorner")
titleCorner.CornerRadius = UDim.new(0, 15)
titleCorner.Parent = mainTitle
-- Bouton fermeture
local closeButton = Instance.new("TextButton")
closeButton.Size = UDim2.new(0, 50, 0, 50)
closeButton.Position = UDim2.new(1, -50, 0, 0)
closeButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
closeButton.BorderSizePixel = 0
closeButton.Font = Enum.Font.GothamBold
closeButton.Text = "✕"
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
closeButton.TextSize = 24
closeButton.Parent = mainFrame
local closeCorner = Instance.new("UICorner")
closeCorner.CornerRadius = UDim.new(0, 15)
closeCorner.Parent = closeButton
-- Frame des statistiques
local statsFrame = Instance.new("Frame")
statsFrame.Size = UDim2.new(0.9, 0, 0, 130)
statsFrame.Position = UDim2.new(0.05, 0, 0, 65)
statsFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 45)
statsFrame.BorderSizePixel = 0
statsFrame.Parent = mainFrame
local statsCorner = Instance.new("UICorner")
statsCorner.CornerRadius = UDim.new(0, 12)
statsCorner.Parent = statsFrame
local statsTitle = Instance.new("TextLabel")
statsTitle.Size = UDim2.new(1, 0, 0, 30)
statsTitle.BackgroundTransparency = 1
statsTitle.Font = Enum.Font.GothamBold
statsTitle.Text = "📊 STATISTIQUES"
statsTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
statsTitle.TextSize = 16
statsTitle.Parent = statsFrame
local chestsLabel = Instance.new("TextLabel")
chestsLabel.Size = UDim2.new(1, -20, 0, 30)
chestsLabel.Position = UDim2.new(0, 10, 0, 35)
chestsLabel.BackgroundTransparency = 1
chestsLabel.Font = Enum.Font.Gotham
chestsLabel.Text = "📦 Coffres ouverts: 0"
chestsLabel.TextColor3 = Color3.fromRGB(255, 200, 100)
chestsLabel.TextSize = 16
chestsLabel.TextXAlignment = Enum.TextXAlignment.Left
chestsLabel.Parent = statsFrame
local valueLabel = Instance.new("TextLabel")
valueLabel.Size = UDim2.new(1, -20, 0, 30)
valueLabel.Position = UDim2.new(0, 10, 0, 70)
valueLabel.BackgroundTransparency = 1
valueLabel.Font = Enum.Font.Gotham
valueLabel.Text = "💎 Valeur totale: $0"
valueLabel.TextColor3 = Color3.fromRGB(100, 255, 100)
valueLabel.TextSize = 16
valueLabel.TextXAlignment = Enum.TextXAlignment.Left
valueLabel.Parent = statsFrame
local timeLabel = Instance.new("TextLabel")
timeLabel.Size = UDim2.new(1, -20, 0, 30)
timeLabel.Position = UDim2.new(0, 10, 0, 100)
timeLabel.BackgroundTransparency = 1
timeLabel.Font = Enum.Font.Gotham
timeLabel.Text = "⏱️ Temps: 00:00:00"
timeLabel.TextColor3 = Color3.fromRGB(150, 150, 255)
timeLabel.TextSize = 16
timeLabel.TextXAlignment = Enum.TextXAlignment.Left
timeLabel.Parent = statsFrame
-- Frame de sélection des coffres
local chestSelectFrame = Instance.new("Frame")
chestSelectFrame.Size = UDim2.new(0.9, 0, 0, 210)
chestSelectFrame.Position = UDim2.new(0.05, 0, 0, 210)
chestSelectFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 45)
chestSelectFrame.BorderSizePixel = 0
chestSelectFrame.Parent = mainFrame
local chestSelectCorner = Instance.new("UICorner")
chestSelectCorner.CornerRadius = UDim.new(0, 12)
chestSelectCorner.Parent = chestSelectFrame
local chestSelectTitle = Instance.new("TextLabel")
chestSelectTitle.Size = UDim2.new(1, 0, 0, 30)
chestSelectTitle.BackgroundTransparency = 1
chestSelectTitle.Font = Enum.Font.GothamBold
chestSelectTitle.Text = "🎯 SÉLECTION DES COFFRES"
chestSelectTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
chestSelectTitle.TextSize = 16
chestSelectTitle.Parent = chestSelectFrame
-- Checkboxes pour les coffres
local chestTypes = {"BronzeChest", "IronChest", "GoldChest", "DiamondChest"}
local chestEnabled = {true, true, true, true}
local chestButtons = {}
for i, chestName in ipairs(chestTypes) do
local checkFrame = Instance.new("Frame")
checkFrame.Size = UDim2.new(0.9, 0, 0, 35)
checkFrame.Position = UDim2.new(0.05, 0, 0, 30 + (i - 1) * 40)
checkFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 55)
checkFrame.BorderSizePixel = 0
checkFrame.Parent = chestSelectFrame
local checkCorner = Instance.new("UICorner")
checkCorner.CornerRadius = UDim.new(0, 8)
checkCorner.Parent = checkFrame
local checkbox = Instance.new("TextButton")
checkbox.Size = UDim2.new(0, 30, 0, 30)
checkbox.Position = UDim2.new(0, 5, 0.5, -15)
checkbox.BackgroundColor3 = Color3.fromRGB(0, 200, 100)
checkbox.BorderSizePixel = 0
checkbox.Font = Enum.Font.GothamBold
checkbox.Text = "✓"
checkbox.TextColor3 = Color3.fromRGB(255, 255, 255)
checkbox.TextSize = 20
checkbox.Parent = checkFrame
local boxCorner = Instance.new("UICorner")
boxCorner.CornerRadius = UDim.new(0, 6)
boxCorner.Parent = checkbox
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, -45, 1, 0)
label.Position = UDim2.new(0, 45, 0, 0)
label.BackgroundTransparency = 1
label.Font = Enum.Font.GothamBold
label.Text = chestName:gsub("Chest", " Chest")
label.TextColor3 = Color3.fromRGB(255, 255, 255)
label.TextSize = 15
label.TextXAlignment = Enum.TextXAlignment.Left
label.Parent = checkFrame
chestButtons[i] = checkbox
checkbox.MouseButton1Click:Connect(function()
chestEnabled[i] = not chestEnabled[i]
if chestEnabled[i] then
checkbox.BackgroundColor3 = Color3.fromRGB(0, 200, 100)
checkbox.Text = "✓"
else
checkbox.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
checkbox.Text = ""
end
end)
end
-- Frame de contrôle
local controlFrame = Instance.new("Frame")
controlFrame.Size = UDim2.new(0.9, 0, 0, 110)
controlFrame.Position = UDim2.new(0.05, 0, 0, 435)
controlFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 45)
controlFrame.BorderSizePixel = 0
controlFrame.Parent = mainFrame
local controlCorner = Instance.new("UICorner")
controlCorner.CornerRadius = UDim.new(0, 12)
controlCorner.Parent = controlFrame
local startButton = Instance.new("TextButton")
startButton.Size = UDim2.new(0.9, 0, 0, 45)
startButton.Position = UDim2.new(0.05, 0, 0, 10)
startButton.BackgroundColor3 = Color3.fromRGB(0, 200, 100)
startButton.BorderSizePixel = 0
startButton.Font = Enum.Font.GothamBold
startButton.Text = "▶ DÉMARRER"
startButton.TextColor3 = Color3.fromRGB(255, 255, 255)
startButton.TextSize = 20
startButton.Parent = controlFrame
local startCorner = Instance.new("UICorner")
startCorner.CornerRadius = UDim.new(0, 10)
startCorner.Parent = startButton
local stopButton = Instance.new("TextButton")
stopButton.Size = UDim2.new(0.9, 0, 0, 45)
stopButton.Position = UDim2.new(0.05, 0, 0, 60)
stopButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
stopButton.BorderSizePixel = 0
stopButton.Font = Enum.Font.GothamBold
stopButton.Text = "⏹ ARRÊTER"
stopButton.TextColor3 = Color3.fromRGB(255, 255, 255)
stopButton.TextSize = 20
stopButton.Parent = controlFrame
local stopCorner = Instance.new("UICorner")
stopCorner.CornerRadius = UDim.new(0, 10)
stopCorner.Parent = stopButton
-- Crédit
local creditLabel = Instance.new("TextLabel")
creditLabel.Size = UDim2.new(1, 0, 0, 20)
creditLabel.Position = UDim2.new(0, 0, 1, -25)
creditLabel.BackgroundTransparency = 1
creditLabel.Font = Enum.Font.GothamBold
creditLabel.Text = "Éditeur: jecheatpaspromisje"
creditLabel.TextColor3 = Color3.fromRGB(100, 200, 255)
creditLabel.TextSize = 12
creditLabel.Parent = mainFrame
-- Fonctions
local function formatTime(seconds)
local hours = math.floor(seconds / 3600)
local minutes = math.floor((seconds % 3600) / 60)
local secs = math.floor(seconds % 60)
return string.format("%02d:%02d:%02d", hours, minutes, secs)
end
local function getCharacter()
return player.Character or player.CharacterAdded:Wait()
end
local function clickChestButton(chestName)
local chestBillboard = playerGui:FindFirstChild("ChestBillboard")
if chestBillboard then
-- Chercher le Money qui correspond au coffre
for _, moneyGui in pairs(chestBillboard:GetChildren()) do
if moneyGui.Name:match("Money") then
local imageButton = moneyGui:FindFirstChild("ImageButton")
if imageButton then
local frame = imageButton:FindFirstChild("Frame")
if frame then
local moneyLabel = frame:FindFirstChild("Money")
-- Cliquer sur l'ImageButton
for _, connection in pairs(getconnections(imageButton.MouseButton1Click)) do
connection:Fire()
end
print("Cliqué sur coffre: " .. chestName)
return true
end
end
end
end
end
return false
end
local function startAutoOpen()
if isRunning then return end
isRunning = true
startTime = tick()
startButton.BackgroundColor3 = Color3.fromRGB(0, 255, 150)
startButton.Text = "⏳ EN COURS..."
task.spawn(function()
while isRunning do
for i, chestName in ipairs(chestTypes) do
if not isRunning then break end
if chestEnabled[i] then
-- Chercher TOUS les coffres de ce type dans le workspace
local chestFolder = workspace:FindFirstChild("ActiveChests")
if chestFolder then
local chestsOfType = {}
-- Collecter tous les coffres de ce type
for _, chest in pairs(chestFolder:GetChildren()) do
if chest.Name == chestName and chest:IsA("Model") then
table.insert(chestsOfType, chest)
end
end
-- Choisir un coffre aléatoire de ce type
if #chestsOfType > 0 then
local randomChest = chestsOfType[math.random(1, #chestsOfType)]
-- Trouver la partie principale pour se téléporter
local main = randomChest:FindFirstChild("Main") or randomChest:FindFirstChildWhichIsA("BasePart")
if main then
local char = getCharacter()
local hrp = char:FindFirstChild("HumanoidRootPart")
if hrp then
-- Téléporter proche du coffre
hrp.CFrame = main.CFrame * CFrame.new(0, 5, 5)
task.wait(1)
-- Attendre que le GUI local apparaisse et cliquer
task.wait(0.5)
if clickChestButton(chestName) then
chestsOpened = chestsOpened + 1
chestsLabel.Text = "📦 Coffres ouverts: " .. chestsOpened
end
task.wait(1)
end
end
end
end
end
end
task.wait(2)
end
end)
end
local function stopAutoOpen()
isRunning = false
startButton.BackgroundColor3 = Color3.fromRGB(0, 200, 100)
startButton.Text = "▶ DÉMARRER"
end
-- Mise à jour du temps
task.spawn(function()
while true do
if isRunning then
local elapsed = tick() - startTime
timeLabel.Text = "⏱️ Temps: " .. formatTime(elapsed)
end
task.wait(1)
end
end)
-- Events
toggleButton.MouseButton1Click:Connect(function()
mainFrame.Visible = true
toggleButton.Visible = false
end)
closeButton.MouseButton1Click:Connect(function()
mainFrame.Visible = false
toggleButton.Visible = true
end)
toggleButton.MouseEnter:Connect(function()
toggleButton.BackgroundColor3 = Color3.fromRGB(60, 60, 90)
end)
toggleButton.MouseLeave:Connect(function()
toggleButton.BackgroundColor3 = Color3.fromRGB(40, 40, 60)
end)
closeButton.MouseEnter:Connect(function()
closeButton.BackgroundColor3 = Color3.fromRGB(255, 70, 70)
end)
closeButton.MouseLeave:Connect(function()
closeButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
end)
startButton.MouseEnter:Connect(function()
if not isRunning then
startButton.BackgroundColor3 = Color3.fromRGB(0, 230, 120)
end
end)
startButton.MouseLeave:Connect(function()
if not isRunning then
startButton.BackgroundColor3 = Color3.fromRGB(0, 200, 100)
end
end)
stopButton.MouseEnter:Connect(function()
stopButton.BackgroundColor3 = Color3.fromRGB(255, 80, 80)
end)
stopButton.MouseLeave:Connect(function()
stopButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
end)
startButton.MouseButton1Click:Connect(startAutoOpen)
stopButton.MouseButton1Click:Connect(stopAutoOpen)No comments yet for this script.



