I didn’t review my text using google trad so if there is any error tell me
How to add custom theme to MA2
Today I will show you how to (i will not copypaste the same thing 3 time)
It’s pretty simple once you figure out how does it work!
- We will define theme(s) we want to add, I will use Catppuccin as an example
local themes = {
["Frappe"] = {second = {115,121,148},main = {148,156,187},text={198,208,245},bg={48,52,70},third={131,139,167},highlight={140,170,238}},
["Latte"] = {second = {156,160,176},main = {124,127,147},text = {76,79,105},bg = {239,241,245},third = {140,143,161},highlight = {4,165,229}},
["Macchiato"] = {second = {110,115,141},main = {147,154,183},text = {202,211,245},bg = {36,39,58},third = {128,135,162},highlight = {138,173,244}},
["Mocha"] = {second = {108,112,134},main = {147,153,178},text = {205,214,244},bg = {30,30,46},third = {127,132,156},highlight = {137,180,250}}
}
Then we will wait until MA2 fully load
repeat wait() until _G.MoonGlobal.ready
- We will iterate through every of our theme to add them
for k, theme in pairs(themes) do
_G.MoonGlobal.Themer._BuiltInThemes[k] = theme
_G.MoonGlobal.Themer.theme_buttons[k] = {}
_G.MoonGlobal.Themer:AddTheme(k)
print(k.." added!")
end
I will explain each line,
-
Adding our theme to the colors dict
Moon Animator 2 → Libraries → Themer → Line 186 -
Creating a fake buttons in the
Theme
tab
If you ever read the ma2 sourcecode it will bypass this
Moon Animator 2 → Libraries → Themer → Line 206
if themes[theme] or self.theme_buttons[theme] == nil then return end
- Finally, adding theme
You cant change theme if it isn’t added haha
Final Script
Final Script
local themes = {
["Frappe"] = {second = {115,121,148},main = {148,156,187},text={198,208,245},bg={48,52,70},third={131,139,167},highlight={140,170,238}},
["Latte"] = {second = {156,160,176},main = {124,127,147},text = {76,79,105},bg = {239,241,245},third = {140,143,161},highlight = {4,165,229}},
["Macchiato"] = {second = {110,115,141},main = {147,154,183},text = {202,211,245},bg = {36,39,58},third = {128,135,162},highlight = {138,173,244}},
["Mocha"] = {second = {108,112,134},main = {147,153,178},text = {205,214,244},bg = {30,30,46},third = {127,132,156},highlight = {137,180,250}}
}
repeat wait() until _G.MoonGlobal.ready
-- Adding fake buttons
for k, theme in pairs(themes) do
_G.MoonGlobal.Themer._BuiltInThemes[k] = theme
_G.MoonGlobal.Themer.theme_buttons[k] = {}
_G.MoonGlobal.Themer:AddTheme(k)
print(k.." added!")
end
Premade Plugin for Catppuccin
I have already made a plugin with a ui to set theme
https://create.roblox.com/store/asset/13629587968
Ignore the bad reviews, I fix it today,
Feel free to copy my plugin/ui for your customs theme but mention me plz
Limitations
Currently, you can only put your fancy new custom theme through the console using
_G.MoonGlobal.Themer:SetTheme("Theme Name")
I am currently working on a way to add buttons but MA2 has approx. 20k line of code so its pretty complicated