local wait = not game:IsLoaded() repeat task.wait() until game:IsLoaded() if wait then task.wait(7) end local isfile = isfile or function(file) local suc, res = pcall(function() return readfile(file) end) return suc and res ~= nil and res ~= "" end local delfile = delfile or function(file) writefile(file, "") end if shared.VoidDev then shared.VapeDeveloper = shared.VoidDev end local CEMode if shared.CheatEngineMode ~= nil then CEMode = shared.CheatEngineMode end getgenv().global = setmetatable({}, { __index = function(self, key) key = tostring(key) return getgenv()[key] end, __newindex = function(self, key, val) key = tostring(key) rawset(self, key, val) getgenv()[key] = val return val end, __call = function(self) return setmetatable({}, { __index = self, __newindex = function(_, key, val) rawset(self, key, val) getgenv()[key] = val shared[key] = val return val end, }) end, __tostring = function() return "VOIDWARE_INTERNAL_GLOBAL_ENV" end, }) local CE_EXECUTORS = shared.CE_EXECUTORS or { "solara", "cryptic", "xeno", "ember", "ronix", } local DEBUG_CHECK_TABLE = { type = "table", funcs = { "getupvalue", "getupvalues", "getconstants", "getproto", }, } local AEB_EXECUTORS = shared.AEB_EXECUTORS or { "xeno", } local function checkAutoExecute() local executor = "UNKNOWN" local res = select( 2, pcall(function() return string.lower(tostring(identifyexecutor())) end) ) if not res then return true end executor = res if table.find(AEB_EXECUTORS, executor) then shared.FORCE_DISABLED_QUEUE_ON_TELEPORT = true end end pcall(checkAutoExecute) local function checkExecutor() if CEMode ~= nil then return CEMode end if (not getgenv) or (getgenv and type(getgenv) ~= "function") then return true end local global = getgenv() if getgenv and not global.shared then global.shared = {} return true end if getgenv and not global.debug then global.debug = { traceback = function(string) return string end, } return true end if getgenv and not global.require then return true end if getgenv and global.require and type(global.require) ~= "function" then return true end local executor = "UNKNOWN" local res = select( 2, pcall(function() return string.lower(tostring(identifyexecutor())) end) ) if not res then return true end executor = res if table.find(CE_EXECUTORS, executor) then return true end if type(debug) ~= DEBUG_CHECK_TABLE.type then return true else for i, v in pairs(DEBUG_CHECK_TABLE.funcs) do if not debug[v] or (debug[v] and type(debug[v]) ~= "function") then return true else --[[local suc, res = pcall(debug[v]) if tostring(res) == "Not Implemented" then return true end--]] end end end return false end local suc, res = pcall(checkExecutor) if suc and res ~= nil then CEMode = res else CEMode = true warn(`Failure checking executor {tostring(res)}!`) end if CEMode then getgenv().cloneref = function(a) return a end local old = setthreadidentity if old then getgenv().setthreadidentity = function(...) local args = { ... } local suc, err = pcall(old, unpack(args)) return suc and err end else getgenv().setthreadidentity = function() end end warn(`[CEMode]: Voidware Cheat Engine mode overwrite done`) end shared.CheatEngineMode = CEMode local function wipeFolder(path) if shared.VoidDev then return end if not isfolder(path) then return end for _, file in listfiles(path) do if file:find("loader") then continue end if isfile(file) then delfile(file) end end end local smf = function(id, core) id = tostring(id) local suc, err = pcall(makefolder, id) if (not suc or not isfolder(id)) and core then pcall(function() local RESULT_HANDLER = Instance.new("BindableFunction") RESULT_HANDLER.OnInvoke = function(text: string) if text ~= "Join Discord Server" then return end pcall(function() setclipboard("discord.gg/voidware") game:GetService("StarterGui"):SetCore("SendNotification", { Title = "Voidware Bedwars", Text = "discord.gg/voidware copied to your clipboard!", Duration = 5, }) end) end game:GetService("StarterGui"):SetCore("SendNotification", { Title = "Voidware Bedwars", Text = "Your executor's file system doesn't work! Try reinstalling it or join the discord server for support :c", Button1 = "Join Discord Server", Button2 = "Ok", Duration = 15, Callback = RESULT_HANDLER, }) end) error("Executor File System Error") end end for _, corefolder in { "vape", "vwmeta" } do if not isfolder(corefolder) then smf(corefolder, true) end end for _, folder in { "vape/games", "vape/profiles", "vape/assets", "vape/libraries", "vape/guis" } do if not isfolder(folder) then smf(folder) end end --if not shared.VapeDeveloper then local TESTING_COMMIT = "master" local PRODUCTION_COMMIT = "df1507ca3679a67920955cbf2ebf267330d0c398" local commit = shared.CustomCommit or (shared.TestingMode or shared.StagingMode) and TESTING_COMMIT or PRODUCTION_COMMIT shared.VOIDWARE_SCRIPT_TYPE = "BEDWARS_REWRITE_NEW" shared.META_COMMIT = "a109a0a4441e42d497fa7e3cdc04d770dd853a04" if (isfile("vape/profiles/commit.txt") and readfile("vape/profiles/commit.txt") or "") ~= commit then wipeFolder("vape") wipeFolder("vape/games") wipeFolder("vape/guis") wipeFolder("vape/libraries") end writefile("vape/profiles/commit.txt", commit) --end local SAVE_BLACKLISTED = setmetatable({ "main", __cache = {}, }, { __call = function(self, key) if shared.VoidDev then return false end if self.__cache[key] then return self.__cache[key] end for _, v in ipairs(self) do if type(v) == "table" then continue end if string.find(string.lower(tostring(key)), string.lower(v)) then self.__cache[key] = true return true end end self.__cache[key] = false return false end, }) local function downloadFile(path, func) if not isfile(path) or SAVE_BLACKLISTED(path) then if shared.VoidwareBedwarsLoadingDebug then warn( "downloadFile", path, "https://raw.githubusercontent.com/VapeVoidware/VWRewrite/" .. readfile("vape/profiles/commit.txt") .. "/" .. select(1, path:gsub("vape/", "")) ) end local suc, res = pcall(function() return game:HttpGet( "https://raw.githubusercontent.com/VapeVoidware/VWRewrite/" .. readfile("vape/profiles/commit.txt") .. "/" .. select(1, path:gsub("vape/", "")), true ) end) if not suc or res == "404: Not Found" then error(res) end if SAVE_BLACKLISTED(path) then pcall(function() if isfile(path) then delfile(path) end end) return res end writefile(path, res) end return (func or readfile)(path) end if shared.VoidDev then shared.DEBUG_COUNT = shared.DEBUG_COUNT or 0 shared.DEBUG_COUNT = shared.DEBUG_COUNT + 1 warn(`DEBUG COUNT: {tostring(shared.DEBUG_COUNT)}`) end getgenv().pload = function(name, id, found) local part = ".lua" if name:find(".lua") or name:find(".json") then part = "" end if shared.VoidwareBedwarsObfuscationDebug and shared.VoidDev then if name:find("/") then local parts = name:split("/") local last = parts[#parts] if last then parts[#parts] = "obfuscated_" .. last end local resolved = "" for i, v in parts do resolved = resolved .. v .. (i == #parts and "" or "/") end if isfile(`vape/{resolved}{part}`) then warn(`[Obfuscation-Debug]: [1] Loading file ({tostring(resolved)}{part})!`) name = resolved end else local resolved = "obfuscated_" .. name if isfile(`vape/{resolved}{part}`) then warn(`[Obfuscation-Debug]: [2] Loading file ({tostring(resolved)}{part})!`) name = resolved end end end if shared.VoidwareBedwarsLoadingDebug then print(`vape/{name}{part}`) end local suc, download = pcall(function() return downloadFile(`vape/{name}{part}`), (id or name) end) if not suc and found then warn(`Load Error: [{tostring(id or name)}] {download}`) error(`Failure Loading {tostring(id or name)} [1]`) end local func, err = loadstring(download) if not (func ~= nil and type(func) == "function") and found then warn(`Load Error: [{tostring(id or name)}] {err}`) if shared.ACTIVE_LOADER then shared.ACTIVE_LOADER:Abort(`Couldn't load {(id or name)} [2] :c`) if shared.vape then pcall(function() shared.vape:DisableSaving() end) end end error(`Failure Loading {tostring(id or name)} [2]`) end local suc, res = pcall(function() return func() end) if not suc and found then warn(`Load Error: [{tostring(id or name)}] {res}`) if shared.ACTIVE_LOADER then shared.ACTIVE_LOADER:Abort(`Couldn't load {(id or name)} [3] :c \n {tostring(res)}`) if shared.vape then pcall(function() shared.vape:DisableSaving() end) end end error(`Failure Loading {tostring(id or name)} [3]`) end if shared.VoidwareBedwarsLoadingDebug then print(name, suc, res) end return suc and res end local function getExecutor() local executor = "UNKNOWN" local res = select( 2, pcall(function() return tostring(identifyexecutor()) end) ) if res then executor = res end return string.lower(executor) end local LOADER_LIB_BLACKLISTED = false local suc, executor = pcall(getExecutor) if suc and table.find({ "moon" }, executor) then LOADER_LIB_BLACKLISTED = true end local __def_table = setmetatable({}, { __index = function(self) return self end, __call = function(self) return self end, __newindex = function(self) return self end, }) local loaderFile = not shared.LOADER_LIB_DISABLED and not LOADER_LIB_BLACKLISTED and pload("libraries/loader", "loader", true) or __def_table loaderFile.Colors.Gradient = { ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(0.5, Color3.fromHex("#c41e3a")), ColorSequenceKeypoint.new(1, Color3.fromHex("#165b33")), } local loader = loaderFile:Loader() pcall(function() shared.ACTIVE_LOADER:Destroy() end) shared.ACTIVE_LOADER = loader loader:Update("Booting Up...", 0) loader:Update("Loading main.lua", 10) return pload("main")