lib.callback.register('projectx-ammunationrobbery-prompt:client:Minigames', function(Step)
local p = promise.new()
if Step == "Fusebox" then
if not exports['projectx-bridge']:MinigameCheck("boii_minigames") then p:resolve(false) return Citizen.Await(p) end
exports['boii_minigames']:wire_cut({style = 'default', timer = 60000}, function(success)
p:resolve(success)
end)
elseif Step == "Register" then
if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
local success = exports["bl_ui"]:CircleShake(1, 50, 2)
p:resolve(success)
elseif Step == "Computer1" then
if not exports['projectx-bridge']:MinigameCheck("boii_minigames") then p:resolve(false) return Citizen.Await(p) end
exports['boii_minigames']:chip_hack({style = 'default', loading_time = 8000, chips = 2, timer = 30000}, function(success)
p:resolve(success)
end)
elseif Step == "Computer2" then
if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
local success = exports["bl_ui"]:Untangle(1, {numberOfNodes = 10, duration = 15000})
p:resolve(success)
elseif Step == "GunCrate" then
if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
local success = exports["bl_ui"]:RapidLines(2, 50, 4)
p:resolve(success)
elseif Step == "ExplosivesCrate" then
if not exports['projectx-bridge']:MinigameCheck("boii_minigames") then p:resolve(false) return Citizen.Await(p) end
exports['boii_minigames']:pincode({style = 'default', difficulty = 1, guesses = 10}, function(success)
p:resolve(success)
end)
elseif Step == "ArmorCrate" then
if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
local success = exports["bl_ui"]:CircleProgress(3, 75)
p:resolve(success)
elseif Step == "ElectricBox" then
if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
local success = exports["bl_ui"]:MineSweeper(3, {grid = 7, duration = 10000, target = 10, previewDuration = 2000})
p:resolve(success)
elseif Step == "Timer" then
if not exports['projectx-bridge']:MinigameCheck("boii_minigames") then p:resolve(false) return Citizen.Await(p) end
exports['boii_minigames']:safe_crack({style = 'default', difficulty = 1}, function(success)
p:resolve(success)
end)
elseif Step == "OfficeDoor" then
if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
local success = exports["bl_ui"]:CircleShake(1, 25, 1)
p:resolve(success)
elseif Step == "Gun" then
local success = lib.skillCheck({'easy', 'easy', 'medium', 'hard'}, {'w', 'a', 's', 'd'})
p:resolve(success)
elseif Step == "Ammo" then
if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
local success = exports["bl_ui"]:KeySpam(2, 50)
p:resolve(success)
elseif Step == "Keypad" then
if not exports['projectx-bridge']:MinigameCheck("pure-minigames") then p:resolve(false) return Citizen.Await(p) end
local gameData = {totalNumbers = 20, seconds = 20, timesToChangeNumbers = 4, amountOfGames = 1, incrementByAmount = 5}
local success = exports['pure-minigames']:numberCounter(gameData)
p:resolve(success)
elseif Step == "Code" then
if not exports['projectx-bridge']:MinigameCheck("SN-Hacking") then p:resolve(false) return Citizen.Await(p) end
local success = exports['SN-Hacking']:SkillBar({2000, 3000}, 10, 2)
p:resolve(success)
end
return Citizen.Await(p)
end)