From 5fb61f5c7d0a5a93adcad1ec0ff2d70026648066 Mon Sep 17 00:00:00 2001 From: ccuser44 <68124053+ccuser44@users.noreply.github.com> Date: Sun, 27 Apr 2025 23:58:10 +0300 Subject: [PATCH 1/5] Create ADONIS_CRITICAL_INCIDENT.lua --- .../Plugins/ADONIS_CRITICAL_INCIDENT.lua | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua diff --git a/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua b/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua new file mode 100644 index 0000000000..76015d50b3 --- /dev/null +++ b/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua @@ -0,0 +1,101 @@ +return function(Vargs) + local service = Vargs.Service + local server = Vargs.Server + local settings = server.Settings + + local Core = server.Core + local Admin = server.Admin + local Remote = server.Remote + local Logs = server.Logs + + if server.CriticalMode or Core.DebugMode and Core.PanicMode then + end + + local function onPlayerAdded(p: Player) + local data = Core.GetPlayer(p) + + if Admin.GetLevel(p) > 0 then + Remote.MakeGui(p,"Notification",{ + Title = "Adonis Restricted Mode"; + Message = "Click to view more information."; + Icon = "rbxassetid://7467273592"; + Time = 900; + OnClick = Core.Bytecode("client.Remote.Send('ProcessCommand', ':aciminfo')"); + }) + end + end + + settings.Theme = "Default" + settings.MobileTheme = "Default" + settings.DefaultTheme = "Default" + settings.SaveAdmins = false + settings.FunCommands = false + settings.PlayerCommands = true + settings.CommandFeedback = true + settings.CrossServerCommands = false + settings.ChatCommands = true + settings.CodeExecution = false + settings.SilentCommandDenials = false + settings.Console = false + settings.Console_AdminsOnly = false + settings.HelpSystem = false + settings.HelpButton = false + settings.DonorCapes = false + settings.DonorCommands = false + settings.LocalCapes = false + settings.Detection = false + settings.CheckClients = false + settings.ExploitNotifications = false + settings.CharacterCheckLogs = false + settings.AntiNoclip = false + settings.AntiRootJointDeletion = false + settings.AntiMultiTool = false + settings.AntiGod = false + settings.AntiSpeed = false + settings.AntiBuildingTools = false + settings.AntiAntiIdle = false + settings.ExploitGuiDetection = false + settings.Notification = false + settings.G_API = false + settings.G_Access = false + + Logs.AddLog("Errors", { + Text = `ADONIS CRITICAL INCIDENT`; + Desc = "Adonis MainModule has failed to load. Resorted to backup."; + }) + + Logs.AddLog("Script", { + Text = `ADONIS CRITICAL INCIDENT`; + Desc = "Adonis MainModule has failed to load. Resorted to backup."; + }) + + if Core.Panic then -- TODO: Maybe re-add panic mode?!?!? Lol + Core.Panic("ADONIS WAS STARTED IN CRITICAL MODE!") + end + + ACIMInfo = { + Prefix = Settings.Prefix; + Commands = {"ACIMInfo"}; + Args = {}; + Description = "Show a list of functionality loss."; + AdminLevel = 1; + Hidden = false; + Function = function(plr: Player, args: {string}, data) + Remote.MakeGui(plr, "List", { + Title = "Adonis Critical Incident", + Icon = "rbxassetid://7467273592", + Table = require(server.Dependencies.ACIMInfo), + Font = "Code", + PageSize = 100; + Size = {750, 400}, + PagesEnabled = false; + Dots = true; + Sanitize = false; + Stacking = true; + RichText = true; + }) + end + }; + + service.Events.PlayerAdded:Connect(onPlayerAdded) +end From f4cc823a840a522836d07384fcdeb9a051f764a9 Mon Sep 17 00:00:00 2001 From: ccuser44 <68124053+ccuser44@users.noreply.github.com> Date: Sun, 23 Nov 2025 19:28:24 +0200 Subject: [PATCH 2/5] Update ADONIS_CRITICAL_INCIDENT.lua --- .../Plugins/ADONIS_CRITICAL_INCIDENT.lua | 263 +++++++++++++----- 1 file changed, 191 insertions(+), 72 deletions(-) diff --git a/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua b/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua index 76015d50b3..7cf434526c 100644 --- a/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua +++ b/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua @@ -1,90 +1,209 @@ +local SETTINGS_OVERRIDE = { -- Why do these need to be overriden in the first place. + Theme = "Default"; -- Should the settings override be removed?? I think so, but I'll leave it for now. + MobileTheme = "Default"; + DefaultTheme = "Default"; + SaveAdmins = false; + FunCommands = false; + PlayerCommands = true; + CommandFeedback = true; + CrossServerCommands = false; + ChatCommands = true; + CodeExecution = false; + SilentCommandDenials = false; + Console = false; + Console_AdminsOnly = false; + HelpSystem = false; + HelpButton = false; + DonorCapes = false; + DonorCommands = false; + LocalCapes = false; + Detection = false; + CheckClients = false; + ExploitNotifications = false; + CharacterCheckLogs = false; + AntiNoclip = false; + AntiRootJointDeletion = false; + AntiMultiTool = false; + AntiGod = false; + AntiSpeed = false; + AntiBuildingTools = false; + AntiAntiIdle = false; + ExploitGuiDetection = false; + Notification = false; + G_API = false; + G_Access = false; +} + +local ACMI_HEADER = { + ""; + "ADONIS CRITICAL INCIDENT"; + ""; + "Adonis is currently running in restricted mode."; + "Most features have been removed and Adonis can now only use core functions limited to basic user moderation functionality."; + "A service failure event has occured, and Adonis has had to fall back to the backup. Error code: 1A.Rx503."; + "Scroll down for a list of functionality losses."; + ""; + "We are working hard to resolve the issue and normal operations will hopefully resume soon."; + "See our offical group for more information."; + ""; + "https://www.roblox.com/groups/886423/Epix-Incorporated"; + ""; + "Adonis functionality changes:"; +} + +local ACMI_FOOTER = { + ""; + "Core"; + ""; + "Server Plugins [Services remain operational.]"; + "Client Plugins [Services remain operational.]"; + ""; + "AntiExploit [Loss of services.]"; + "(SERVER)AntiCheat [Loss of services.]"; + "(CLIENT)AntiCheat [Loss of services.]"; + "HelpSystem [Loss of services.]"; + "WebPanel [Loss of services.]"; + "CrossServer Functions [Loss of services.]"; + "_G Services [Loss of services.]"; + "TrelloAPI [Services remain operational.]"; + "DataStore [Services remain operational.]"; + ""; + "Client:"; + ""; + "UI Themes [Loss of services.]"; +} + +local AVAILABLE_COMMAND_MODULES = { "Donors", "Fun", "Players", "Moderators", "Admins", "HeadAdmins", "Creators" } + return function(Vargs) - local service = Vargs.Service - local server = Vargs.Server - local settings = server.Settings + local service = Vargs.Service + local server = Vargs.Server + local settings = server.Settings + + if not server.Variables then + server.Variables = { _isBackupByCriticalPlugin = true } + end + + local Core = server.Core + local Admin = server.Admin + local Remote = server.Remote + local Logs = server.Logs + local Variables = server.Variables + + if not server.CriticalMode then -- Only run this code if server flips flag. This should *only* be on for the fallback module! + return + end + + local function createPaddingForList(list) + local maxSize = 0 + + for i, v in ipairs(list) do + if type(v) == "table" then + if string.len(v[1]) > maxSize then + maxSize = v[1] + end + end + end + + for i, v in ipairs(list) do + if type(v) == "table" then + v[2] = string.rep(" ", maxSize - string.len()) + list[i] = table.concat(v, " ") + end + end + end + + local function getFormattedStatus(name, status) + return string.format(`[{name}]`) + end + + local function getCommandStatusData() + local list = table.create(#AVAILABLE_COMMAND_MODULES) + list[1], list[2], list[3] = "", "Commands:", "" - local Core = server.Core - local Admin = server.Admin - local Remote = server.Remote - local Logs = server.Logs + for i, v in ipairs(AVAILABLE_COMMAND_MODULES) do + if not server.CommandModules or not server.CommandModules:FindFirstChild(v) or not pcall(require, server.CommandModules[v]) then + table.insert(list, {v, "", getFormattedStatus("Loss of services.", false)}) + else + table.insert(list, {v, "", getFormattedStatus("Temporary loss of services. Essential commands remain.", "warn")}) + end + end + end + + local function genOverrideListData() + local list = table.create(#SETTINGS_OVERRIDE) + list[1], list[2], list[3] = "", "Settings:", "" + + if not settings then + table.insert(list, {"All setting data", "", getFormattedStatus("Loss of services.", false)}) + else + for _, v in ipairs(SETTINGS_OVERRIDE) do + table.insert(list, {v, "", getFormattedStatus(type(v) ~= "boolean" and "Has been forced to 'Default'." or v and "Has been forced enabled." or "Has been forced disabled.", type(v) ~= "boolean" and "warn" or v)}) + end + end + end + + local function getServiceStatusData() + local list = table.clone(Variables.ACMI_HEADER) + + table.move(getCommandStatusData(), 1, #AVAILABLE_COMMAND_MODULES + 3, #list + 1, list) + table.move(genOverrideListData(), 1, #SETTINGS_OVERRIDE + 3, #list + 1, list) + table.move(table.clone(Variables.ACMI_FOOTER), 1, #Variables.ACMI_FOOTER, #list + 1, list) -- TODO: Make this check status dynamically as well + Variables.CachedACMI = list + + return list + end + + local function onPlayerAdded(p: Player) + local data = Core.GetPlayer(p) + + if Admin.GetLevel(p) > 0 then + Functions.Notification( + "Adonis Restricted Mode"; + "Click to view more information."; + {p}; + 900; + "rbxassetid://7467273592"; + Core.Bytecode("client.Remote.Send('ProcessCommand', ':aciminfo')"); + ) + end + end - if server.CriticalMode or Core.DebugMode and Core.PanicMode then + if server.Panic then + server.Panic("ADONIS WAS STARTED IN CRITICAL MODE!") end - local function onPlayerAdded(p: Player) - local data = Core.GetPlayer(p) - - if Admin.GetLevel(p) > 0 then - Remote.MakeGui(p,"Notification",{ - Title = "Adonis Restricted Mode"; - Message = "Click to view more information."; - Icon = "rbxassetid://7467273592"; - Time = 900; - OnClick = Core.Bytecode("client.Remote.Send('ProcessCommand', ':aciminfo')"); - }) - end - end - - settings.Theme = "Default" - settings.MobileTheme = "Default" - settings.DefaultTheme = "Default" - settings.SaveAdmins = false - settings.FunCommands = false - settings.PlayerCommands = true - settings.CommandFeedback = true - settings.CrossServerCommands = false - settings.ChatCommands = true - settings.CodeExecution = false - settings.SilentCommandDenials = false - settings.Console = false - settings.Console_AdminsOnly = false - settings.HelpSystem = false - settings.HelpButton = false - settings.DonorCapes = false - settings.DonorCommands = false - settings.LocalCapes = false - settings.Detection = false - settings.CheckClients = false - settings.ExploitNotifications = false - settings.CharacterCheckLogs = false - settings.AntiNoclip = false - settings.AntiRootJointDeletion = false - settings.AntiMultiTool = false - settings.AntiGod = false - settings.AntiSpeed = false - settings.AntiBuildingTools = false - settings.AntiAntiIdle = false - settings.ExploitGuiDetection = false - settings.Notification = false - settings.G_API = false - settings.G_Access = false - - Logs.AddLog("Errors", { - Text = `ADONIS CRITICAL INCIDENT`; - Desc = "Adonis MainModule has failed to load. Resorted to backup."; - }) - - Logs.AddLog("Script", { - Text = `ADONIS CRITICAL INCIDENT`; - Desc = "Adonis MainModule has failed to load. Resorted to backup."; - }) - - if Core.Panic then -- TODO: Maybe re-add panic mode?!?!? Lol - Core.Panic("ADONIS WAS STARTED IN CRITICAL MODE!") + if Logs and Logs.AddLog then + Logs.AddLog("Errors", { + Text = "ADONIS CRITICAL INCIDENT"; + Desc = "Adonis MainModule has failed to load. Resorted to backup."; + }) + + Logs.AddLog("Script", { + Text = "ADONIS CRITICAL INCIDENT"; + Desc = "Adonis MainModule has failed to load. Resorted to backup."; + }) + end + + if settings then + for k, v in SETTINGS_OVERRIDE do + settings[k] = v + end end - ACIMInfo = { + Variables.ACMI_HEADER, Variables.ACMI_FOOTER = ACMI_HEADER, ACMI_FOOTER + server.Commands.ACIMInfo = { Prefix = Settings.Prefix; Commands = {"ACIMInfo"}; Args = {}; Description = "Show a list of functionality loss."; - AdminLevel = 1; + AdminLevel = 0; Hidden = false; Function = function(plr: Player, args: {string}, data) Remote.MakeGui(plr, "List", { Title = "Adonis Critical Incident", Icon = "rbxassetid://7467273592", - Table = require(server.Dependencies.ACIMInfo), + Table = Variables.CachedACMI or getServiceStatusData(), Font = "Code", PageSize = 100; Size = {750, 400}, @@ -97,5 +216,5 @@ return function(Vargs) end }; - service.Events.PlayerAdded:Connect(onPlayerAdded) + service.Events.PlayerAdded:Connect(onPlayerAdded) -- TODO: Check if already in players this fires for, if not then add a getplayers for loop end From 1e7ff110331a2981160cdb4a4b68ae15237547dd Mon Sep 17 00:00:00 2001 From: ccuser44 <68124053+ccuser44@users.noreply.github.com> Date: Sun, 23 Nov 2025 19:29:40 +0200 Subject: [PATCH 3/5] Fix syntax for notification function parameters --- .../Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua b/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua index 7cf434526c..032d4257c1 100644 --- a/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua +++ b/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua @@ -159,12 +159,12 @@ return function(Vargs) if Admin.GetLevel(p) > 0 then Functions.Notification( - "Adonis Restricted Mode"; - "Click to view more information."; - {p}; - 900; - "rbxassetid://7467273592"; - Core.Bytecode("client.Remote.Send('ProcessCommand', ':aciminfo')"); + "Adonis Restricted Mode", + "Click to view more information.", + {p}, + 900, + "rbxassetid://7467273592", + Core.Bytecode("client.Remote.Send('ProcessCommand', ':aciminfo')") ) end end From dee4a106c438fd54a90500009d2f37440172ad6e Mon Sep 17 00:00:00 2001 From: ccuser44 <68124053+ccuser44@users.noreply.github.com> Date: Sun, 23 Nov 2025 19:32:06 +0200 Subject: [PATCH 4/5] Fix typo --- .../Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua b/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua index 032d4257c1..1d07a95f6e 100644 --- a/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua +++ b/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua @@ -78,7 +78,7 @@ local AVAILABLE_COMMAND_MODULES = { "Donors", "Fun", "Players", "Moderators", "A return function(Vargs) local service = Vargs.Service local server = Vargs.Server - local settings = server.Settings + local Settings = server.Settings if not server.Variables then server.Variables = { _isBackupByCriticalPlugin = true } @@ -89,6 +89,7 @@ return function(Vargs) local Remote = server.Remote local Logs = server.Logs local Variables = server.Variables + local Functions = server.Functions if not server.CriticalMode then -- Only run this code if server flips flag. This should *only* be on for the fallback module! return @@ -107,14 +108,14 @@ return function(Vargs) for i, v in ipairs(list) do if type(v) == "table" then - v[2] = string.rep(" ", maxSize - string.len()) + v[2] = string.rep(" ", maxSize - string.len(v[1])) list[i] = table.concat(v, " ") end end end local function getFormattedStatus(name, status) - return string.format(`[{name}]`) + return `[{name}]` end local function getCommandStatusData() @@ -134,7 +135,7 @@ return function(Vargs) local list = table.create(#SETTINGS_OVERRIDE) list[1], list[2], list[3] = "", "Settings:", "" - if not settings then + if not Settings then table.insert(list, {"All setting data", "", getFormattedStatus("Loss of services.", false)}) else for _, v in ipairs(SETTINGS_OVERRIDE) do @@ -185,9 +186,9 @@ return function(Vargs) }) end - if settings then + if Settings then for k, v in SETTINGS_OVERRIDE do - settings[k] = v + Settings[k] = v end end From 175fe5f989be085b138ef6f98207ce8e3a2e4858 Mon Sep 17 00:00:00 2001 From: ccuser44 <68124053+ccuser44@users.noreply.github.com> Date: Wed, 26 Nov 2025 11:32:34 +0200 Subject: [PATCH 5/5] Refactor ACMI footer and improve service status handling --- .../Plugins/ADONIS_CRITICAL_INCIDENT.lua | 58 ++++++++++--------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua b/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua index 1d07a95f6e..07df7c63a5 100644 --- a/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua +++ b/MainModule/Server/Plugins/ADONIS_CRITICAL_INCIDENT.lua @@ -53,24 +53,24 @@ local ACMI_HEADER = { local ACMI_FOOTER = { ""; - "Core"; - ""; - "Server Plugins [Services remain operational.]"; - "Client Plugins [Services remain operational.]"; - ""; - "AntiExploit [Loss of services.]"; - "(SERVER)AntiCheat [Loss of services.]"; - "(CLIENT)AntiCheat [Loss of services.]"; - "HelpSystem [Loss of services.]"; - "WebPanel [Loss of services.]"; - "CrossServer Functions [Loss of services.]"; - "_G Services [Loss of services.]"; - "TrelloAPI [Services remain operational.]"; - "DataStore [Services remain operational.]"; - ""; - "Client:"; - ""; - "UI Themes [Loss of services.]"; + "Core"; + ""; + "Server Plugins [Services remain operational.]"; + "Client Plugins [Services remain operational.]"; + ""; + "AntiExploit [Loss of services.]"; + "(SERVER)AntiCheat [Loss of services.]"; + "(CLIENT)AntiCheat [Loss of services.]"; + "HelpSystem [Loss of services.]"; + "WebPanel [Loss of services.]"; + "CrossServer Functions [Loss of services.]"; + "_G Services [Loss of services.]"; + "TrelloAPI [Services remain operational.]"; + "DataStore [Services remain operational.]"; + ""; + "Client:"; + ""; + "UI Themes [Loss of services.]"; } local AVAILABLE_COMMAND_MODULES = { "Donors", "Fun", "Players", "Moderators", "Admins", "HeadAdmins", "Creators" } @@ -101,7 +101,7 @@ return function(Vargs) for i, v in ipairs(list) do if type(v) == "table" then if string.len(v[1]) > maxSize then - maxSize = v[1] + maxSize = string.len(v[1]) end end end @@ -112,6 +112,8 @@ return function(Vargs) list[i] = table.concat(v, " ") end end + + return list end local function getFormattedStatus(name, status) @@ -129,29 +131,33 @@ return function(Vargs) table.insert(list, {v, "", getFormattedStatus("Temporary loss of services. Essential commands remain.", "warn")}) end end + + return list end local function genOverrideListData() - local list = table.create(#SETTINGS_OVERRIDE) - list[1], list[2], list[3] = "", "Settings:", "" + local list = {"", "Settings:", ""} if not Settings then table.insert(list, {"All setting data", "", getFormattedStatus("Loss of services.", false)}) else - for _, v in ipairs(SETTINGS_OVERRIDE) do - table.insert(list, {v, "", getFormattedStatus(type(v) ~= "boolean" and "Has been forced to 'Default'." or v and "Has been forced enabled." or "Has been forced disabled.", type(v) ~= "boolean" and "warn" or v)}) + for k, v in pairs(SETTINGS_OVERRIDE) do + table.insert(list, {k, "", getFormattedStatus(type(v) ~= "boolean" and "Has been forced to 'Default'." or v and "Has been forced enabled." or "Has been forced disabled.", type(v) ~= "boolean" and "warn" or v)}) end end + + return list end local function getServiceStatusData() local list = table.clone(Variables.ACMI_HEADER) table.move(getCommandStatusData(), 1, #AVAILABLE_COMMAND_MODULES + 3, #list + 1, list) - table.move(genOverrideListData(), 1, #SETTINGS_OVERRIDE + 3, #list + 1, list) + table.move(genOverrideListData(), 1, service.CountTable(SETTINGS_OVERRIDE) + 3, #list + 1, list) table.move(table.clone(Variables.ACMI_FOOTER), 1, #Variables.ACMI_FOOTER, #list + 1, list) -- TODO: Make this check status dynamically as well Variables.CachedACMI = list - + + print(createPaddingForList(list)) return list end @@ -166,7 +172,7 @@ return function(Vargs) 900, "rbxassetid://7467273592", Core.Bytecode("client.Remote.Send('ProcessCommand', ':aciminfo')") - ) + ) end end