Last active 1 month ago

Configures your Roblox account automatically. To use this, execute the script via the browser console on the Roblox settings page while logged into your account.

Revision 340e9b684d85d08922a8027b9894d66fa0e712b7

Roblox Account Configurator.js Raw
1await (async function () {
2 const settings = {
3 avatarType: "R15",
4 scales: {
5 height: 0.9,
6 width: 0.7,
7 head: 0.95,
8 proportion: 0,
9 bodyType: 0,
10 },
11 gender: 2, // Male
12 language: "en_us", // English
13 theme: "Dark",
14 userSettings: {
15 whoCanSeeMySocialNetworks: "NoOne",
16 whoCanChatWithMeInExperiences: "AllUsers",
17 whoCanWhisperChatWithMeInExperiences: "AllUsers",
18 whoCanOneOnOnePartyWithMe: "Friends",
19 whoCanGroupPartyWithMe: "Friends",
20 whoCanSeeMyOnlineStatus: "Friends",
21 whoCanJoinMeInExperiences: "Friends",
22 updateFriendsAboutMyActivity: "No",
23 privateServerPrivacy: "Friends",
24 whoCanSeeMyInventory: "NoOne",
25 allowPersonalizedAdvertising: "Disabled",
26 allowSellShareData: "Disabled",
27 allowMarketingEmailNotifications: "Disabled",
28 },
29 };
30
31 const csrfToken = localStorage.getItem("x-csrf-token");
32
33 const steps = {
34 successes: 0,
35 fails: 0,
36 };
37
38 function log(success, step) {
39 steps[success ? "successes" : "fails"] += 1;
40 console.log(`${success ? "✅" : "⚠️"} ${step}`);
41 }
42
43 async function request(config) {
44 return await fetch(config.URL, {
45 method: config.Method,
46 headers: config.Headers,
47 body: config.Data ? JSON.stringify(config.Data) : undefined,
48 credentials: "include",
49 referrer: "https://www.roblox.com",
50 });
51 }
52
53 async function setAvatarType() {
54 const step = "Set Avatar Type";
55 const config = {
56 URL: "https://avatar.roblox.com/v1/avatar/set-player-avatar-type",
57 Method: "POST",
58 Headers: {
59 "Content-Type": "application/json",
60 "x-csrf-token": csrfToken,
61 },
62 Data: {
63 playerAvatarType: settings.avatarType,
64 },
65 };
66
67 try {
68 const response = await request(config);
69 if (response.status !== 200) return log(false, step);
70
71 const json = await response.json();
72 log(json.success, step);
73 } catch (_) {
74 log(false, step);
75 }
76 }
77
78 async function setScales() {
79 const step = "Set Scales";
80 const config = {
81 URL: "https://avatar.roblox.com/v1/avatar/set-scales",
82 Method: "POST",
83 Headers: {
84 "Content-Type": "application/json",
85 "x-csrf-token": csrfToken,
86 },
87 Data: settings.scales,
88 };
89
90 try {
91 const response = await request(config);
92 if (response.status !== 200) return log(false, step);
93
94 const json = await response.json();
95 log(json.success, step);
96 } catch (_) {
97 log(false, step);
98 }
99 }
100
101 async function setGender() {
102 const step = "Set Gender";
103 const config = {
104 URL: "https://users.roblox.com/v1/gender",
105 Method: "POST",
106 Headers: {
107 "Content-Type": "application/json",
108 "x-csrf-token": csrfToken,
109 },
110 Data: {
111 gender: settings.gender,
112 },
113 };
114
115 try {
116 const response = await request(config);
117 log(response.status === 200, step);
118 } catch (_) {
119 log(false, step);
120 }
121 }
122
123 async function setLanguage() {
124 const step = "Set Language";
125 const config = {
126 URL: "https://locale.roblox.com/v1/locales/set-user-supported-locale",
127 Method: "POST",
128 Headers: {
129 "Content-Type": "application/json",
130 "x-csrf-token": csrfToken,
131 },
132 Data: {
133 supportedLocaleCode: settings.language,
134 },
135 };
136
137 try {
138 const response = await request(config);
139 if (response.status !== 200) return log(false, step);
140
141 const json = await response.json();
142 log(json.success, step);
143 } catch (_) {
144 log(false, step);
145 }
146 }
147
148 async function setTheme() {
149 const step = "Set Theme";
150 const config = {
151 URL: "https://accountsettings.roblox.com/v1/themes/user",
152 Method: "PATCH",
153 Headers: {
154 "Content-Type": "application/json",
155 "x-csrf-token": csrfToken,
156 },
157 Data: {
158 themeType: settings.theme,
159 },
160 };
161
162 try {
163 const response = await request(config);
164 log(response.status === 200, step);
165 } catch (_) {
166 log(false, step);
167 }
168 }
169
170 async function setUserSettings() {
171 const step = "Set User Settings";
172 const config = {
173 URL: "https://apis.roblox.com/user-settings-api/v1/user-settings",
174 Method: "POST",
175 Headers: {
176 "Content-Type": "application/json",
177 "x-csrf-token": csrfToken,
178 },
179 Data: settings.userSettings,
180 };
181
182 try {
183 const response = await request(config);
184 log(response.status === 200, step);
185 } catch (_) {
186 log(false, step);
187 }
188 }
189
190 console.log("⚙️ Configuring account");
191
192 await Promise.all([
193 setAvatarType(),
194 setScales(),
195 setGender(),
196 setLanguage(),
197 setTheme(),
198 setUserSettings(),
199 ]);
200
201 console.log(`📋 ${steps.successes} successes, ${steps.fails} fails`);
202 console.log(
203 steps.fails > 0 ? "⚠️ There were some failures" : "✅ Everything succeeded",
204 );
205})();