686

Untitled

686
Nov 7th, 2021
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.58 KB | None | 0 0
  1. ChatConstants:
  2. -- Script GUID: {1c9cb67d-f939-4e9a-942b-8e4020f90b8d}
  3. -- Decompiled with the Synapse X Luau decompiler.
  4.  
  5. return {
  6. MessageTypeDefault = "Message",
  7. MessageTypeSystem = "System",
  8. MessageTypeMeCommand = "MeCommand",
  9. MessageTypeWelcome = "Welcome",
  10. MessageTypeSetCore = "SetCore",
  11. MessageTypeWhisper = "Whisper",
  12. MajorVersion = 0,
  13. MinorVersion = 8,
  14. BuildVersion = "2018.05.16",
  15. VeryLowPriority = -5,
  16. LowPriority = 0,
  17. StandardPriority = 10,
  18. HighPriority = 20,
  19. VeryHighPriority = 25,
  20. WhisperChannelPrefix = "To "
  21. };
  22. ChatLocalization:
  23. -- Script GUID: {0436634a-ffe9-4496-9ac8-d2c079e57190}
  24. -- Decompiled with the Synapse X Luau decompiler.
  25.  
  26. local l__LocalizationService__1 = game:GetService("LocalizationService");
  27. local l__Chat__2 = game:GetService("Chat");
  28. local v3, v4 = pcall(function()
  29. return UserSettings():IsUserFeatureEnabled("UserShouldLocalizeServerMessages");
  30. end);
  31. local v5 = {
  32. _hasFetchedLocalization = false
  33. };
  34. function v5._getTranslator(p1)
  35. if not p1._translator and not p1._hasFetchedLocalization then
  36. p1._hasFetchedLocalization = true;
  37. local l__ChatLocalization__6 = l__Chat__2:WaitForChild("ChatLocalization", 4);
  38. if l__ChatLocalization__6 then
  39. p1._translator = l__ChatLocalization__6:GetTranslator(l__LocalizationService__1.RobloxLocaleId);
  40. l__LocalizationService__1:GetPropertyChangedSignal("RobloxLocaleId"):Connect(function()
  41. p1._hasFetchedLocalization = false;
  42. p1._translator = nil;
  43. end);
  44. else
  45. warn("Missing ChatLocalization. Chat interface will not be localized.");
  46. end;
  47. end;
  48. return p1._translator;
  49. end;
  50. function v5.Get(p2, p3, p4, p5)
  51. local u1 = p4;
  52. pcall(function()
  53. local v7 = p2:_getTranslator();
  54. if not v7 then
  55. warn("Missing Translator. Used default for", p3);
  56. return;
  57. end;
  58. u1 = v7:FormatByKey(p3, p5);
  59. end);
  60. return p4;
  61. end;
  62. local u2 = v3 or v4;
  63. function v5.LocalizeFormattedMessage(p6, p7)
  64. local v8 = nil;
  65. if not u2 then
  66. return p7;
  67. end;
  68. local v9, v10 = string.find(p7, "{RBX_LOCALIZATION_KEY}");
  69. if not v9 then
  70. return p7;
  71. end;
  72. local v11 = nil;
  73. v11, v8 = string.find(p7, "{RBX_LOCALIZATION_DEFAULT}");
  74. if not v11 then
  75. return p7;
  76. end;
  77. local v12, v13 = string.find(p7, "{RBX_LOCALIZATION_PARAMS}");
  78. local v14 = string.sub(p7, v10 + 1, v11 - 1);
  79. if not v12 then
  80. return p6:Get(v14, (string.sub(p7, v8 + 1)));
  81. end;
  82. local v15 = {};
  83. for v16, v17 in string.gmatch(string.sub(p7, v13 + 1), "([^%s]+)=([^%s]+)") do
  84. v15[v16] = v17;
  85. end;
  86. return p6:Get(v14, string.sub(p7, v8 + 1, v12 - 1), v15);
  87. end;
  88. function v5.FormatMessageToSend(p8, p9, p10, p11, p12)
  89. if u2 then
  90. if p11 and p12 then
  91. return "{RBX_LOCALIZATION_KEY}" .. p9 .. "{RBX_LOCALIZATION_DEFAULT}" .. p10 .. "{RBX_LOCALIZATION_PARAMS}" .. p11 .. "=" .. p12;
  92. else
  93. return "{RBX_LOCALIZATION_KEY}" .. p9 .. "{RBX_LOCALIZATION_DEFAULT}" .. p10;
  94. end;
  95. end;
  96. if not p11 or not p12 then
  97. return p8:Get(p9, p10);
  98. end;
  99. return string.gsub(p8:Get(p9, p10), "{" .. p11 .. "}", p12);
  100. end;
  101. local u3 = {
  102. System = "InGame.Chat.Label.SystemMessagePrefix",
  103. Team = "InGame.Chat.Label.TeamMessagePrefix",
  104. ["From "] = "InGame.Chat.Label.From",
  105. ["To "] = "InGame.Chat.Label.To"
  106. };
  107. function v5.tryLocalize(p13, p14)
  108. if u3[p14] then
  109. return p13:Get(u3[p14], p14);
  110. end;
  111. for v18, v19 in pairs(u3) do
  112. if string.find(p14, v18) then
  113. return string.gsub(p14, v18, p13:Get(v19, v18), 1);
  114. end;
  115. end;
  116. return p14;
  117. end;
  118. return v5;
  119. ChatSettings:
  120. -- Script GUID: {2ddff9ab-5d3d-48d6-9858-4e45dfde18d8}
  121. -- Decompiled with the Synapse X Luau decompiler.
  122.  
  123. local l__Players__1 = game:GetService("Players");
  124. local l__Chat__2 = game:GetService("Chat");
  125. local v3 = require(script.Parent:WaitForChild("ChatConstants"));
  126. local v4 = {};
  127. local u1 = {
  128. WindowDraggable = false,
  129. WindowResizable = false,
  130. ShowChannelsBar = true,
  131. GamepadNavigationEnabled = false,
  132. AllowMeCommand = false,
  133. ShowUserOwnFilteredMessage = true,
  134. ChatOnWithTopBarOff = false,
  135. ScreenGuiDisplayOrder = 6,
  136. ShowFriendJoinNotification = true,
  137. BubbleChatEnabled = l__Players__1.BubbleChat,
  138. ClassicChatEnabled = l__Players__1.ClassicChat,
  139. ChatWindowTextSize = 18,
  140. ChatChannelsTabTextSize = 18,
  141. ChatBarTextSize = 18,
  142. ChatWindowTextSizePhone = 14,
  143. ChatChannelsTabTextSizePhone = 18,
  144. ChatBarTextSizePhone = 14,
  145. DefaultFont = Enum.Font.GothamSemibold,
  146. ChatBarFont = Enum.Font.GothamSemibold,
  147. BackGroundColor = Color3.new(0, 0, 0),
  148. DefaultMessageColor = Color3.new(1, 1, 1),
  149. DefaultNameColor = Color3.new(1, 1, 1),
  150. ChatBarBackGroundColor = Color3.new(0, 0, 0),
  151. ChatBarBoxColor = Color3.new(1, 1, 1),
  152. ChatBarTextColor = Color3.new(0, 0, 0),
  153. ChannelsTabUnselectedColor = Color3.new(0, 0, 0),
  154. ChannelsTabSelectedColor = Color3.new(0.11764705882352941, 0.11764705882352941, 0.11764705882352941),
  155. DefaultChannelNameColor = Color3.fromRGB(35, 76, 142),
  156. WhisperChannelNameColor = Color3.fromRGB(102, 14, 102),
  157. ErrorMessageTextColor = Color3.fromRGB(245, 50, 50),
  158. MinimumWindowSize = UDim2.new(0.3, 0, 0.25, 0),
  159. MaximumWindowSize = UDim2.new(1, 0, 1, 0),
  160. DefaultWindowPosition = UDim2.new(0, 0, 0, 0),
  161. DefaultWindowSizePhone = UDim2.new(0.5, 0, 0.5, 24),
  162. DefaultWindowSizeTablet = UDim2.new(0.4, 0, 0.3, 24),
  163. DefaultWindowSizeDesktop = UDim2.new(0.3, 0, 0.25, 24),
  164. ChatWindowBackgroundFadeOutTime = 3.5,
  165. ChatWindowTextFadeOutTime = 30,
  166. ChatDefaultFadeDuration = 0.8,
  167. ChatShouldFadeInFromNewInformation = false,
  168. ChatAnimationFPS = 20,
  169. GeneralChannelName = "All",
  170. EchoMessagesInGeneralChannel = true,
  171. ChannelsBarFullTabSize = 4,
  172. MaxChannelNameLength = 12,
  173. RightClickToLeaveChannelEnabled = false,
  174. MessageHistoryLengthPerChannel = 50,
  175. ShowJoinAndLeaveHelpText = false,
  176. MaximumMessageLength = 200,
  177. DisallowedWhiteSpace = { "\n", "\r", "\t", "\011", "\012" },
  178. ClickOnPlayerNameToWhisper = true,
  179. ClickOnChannelNameToSetMainChannel = true,
  180. BubbleChatMessageTypes = { v3.MessageTypeDefault, v3.MessageTypeWhisper },
  181. WhisperCommandAutoCompletePlayerNames = true,
  182. PlayerDisplayNamesEnabled = false,
  183. WhisperByDisplayName = false
  184. };
  185. function v4.__index(p1, p2)
  186. return u1[p2];
  187. end;
  188. local u2 = Instance.new("BindableEvent");
  189. function v4.__newindex(p3, p4, p5)
  190. u1[p4] = p5;
  191. u2:Fire(p4, p5);
  192. end;
  193. local v5 = setmetatable({}, v4);
  194. rawset(v5, "SettingsChanged", u2.Event);
  195. return v5;
  196. SystemMessage:
  197. -- Script GUID: {aae8f4e7-d367-41d7-a912-6aa3fdc7b2f8}
  198. -- Decompiled with the Synapse X Luau decompiler.
  199.  
  200. local l__Parent__1 = script.Parent.Parent;
  201. local v2 = require(l__Parent__1:WaitForChild("ChatSettings"));
  202. local v3 = require(l__Parent__1:WaitForChild("ChatConstants"));
  203. local v4 = require(script.Parent:WaitForChild("Util"));
  204. local u1 = nil;
  205. pcall(function()
  206. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  207. end);
  208. function CreateSystemMessageLabel(p1, p2)
  209. local v5 = p1.Message;
  210. if u1 then
  211. if u1.LocalizeFormattedMessage then
  212. v5 = u1:LocalizeFormattedMessage(v5);
  213. end;
  214. end;
  215. local v6 = p1.ExtraData or {};
  216. local v7 = v6.Font or v2.DefaultFont;
  217. local v8 = v6.TextSize or v2.ChatWindowTextSize;
  218. local v9 = v6.ChatColor or v2.DefaultMessageColor;
  219. local v10, v11 = v4:CreateBaseMessage(v5, v7, v8, v9);
  220. v11.AutoLocalize = true;
  221. local v12 = nil;
  222. if p2 ~= p1.OriginalChannel then
  223. if u1 then
  224. if p1.OriginalChannel == "System" then
  225. local v13 = string.format("{%s}", (u1:Get("InGame.Chat.Label.SystemMessagePrefix", "System")));
  226. elseif u1 then
  227. if p1.OriginalChannel == "Team" then
  228. v13 = string.format("{%s}", (u1:Get("InGame.Chat.Label.TeamMessagePrefix", "System")));
  229. else
  230. v13 = string.format("{%s}", p1.OriginalChannel);
  231. end;
  232. else
  233. v13 = string.format("{%s}", p1.OriginalChannel);
  234. end;
  235. elseif u1 then
  236. if p1.OriginalChannel == "Team" then
  237. v13 = string.format("{%s}", (u1:Get("InGame.Chat.Label.TeamMessagePrefix", "System")));
  238. else
  239. v13 = string.format("{%s}", p1.OriginalChannel);
  240. end;
  241. else
  242. v13 = string.format("{%s}", p1.OriginalChannel);
  243. end;
  244. v12 = v4:AddChannelButtonToBaseMessage(v11, v6.ChannelColor and v9, v13, p1.OriginalChannel);
  245. v11.Text = string.rep(" ", v4:GetNumberOfSpaces(v13, v7, v8) + 1) .. v5;
  246. end;
  247. local v14 = {
  248. [v11] = {
  249. TextTransparency = {
  250. FadedIn = 0,
  251. FadedOut = 1
  252. },
  253. TextStrokeTransparency = {
  254. FadedIn = 0.75,
  255. FadedOut = 1
  256. }
  257. }
  258. };
  259. if v12 then
  260. v14[v12] = {
  261. TextTransparency = {
  262. FadedIn = 0,
  263. FadedOut = 1
  264. },
  265. TextStrokeTransparency = {
  266. FadedIn = 0.75,
  267. FadedOut = 1
  268. }
  269. };
  270. end;
  271. local v15, v16, v17 = v4:CreateFadeFunctions(v14);
  272. return {
  273. [v4.KEY_BASE_FRAME] = v10,
  274. [v4.KEY_BASE_MESSAGE] = v11,
  275. [v4.KEY_UPDATE_TEXT_FUNC] = nil,
  276. [v4.KEY_GET_HEIGHT] = function(p3)
  277. return v4:GetMessageHeight(v11, v10, p3);
  278. end,
  279. [v4.KEY_FADE_IN] = v15,
  280. [v4.KEY_FADE_OUT] = v16,
  281. [v4.KEY_UPDATE_ANIMATION] = v17
  282. };
  283. end;
  284. return {
  285. [v4.KEY_MESSAGE_TYPE] = v3.MessageTypeSystem,
  286. [v4.KEY_CREATOR_FUNCTION] = CreateSystemMessageLabel
  287. };
  288. DefaultChatmessage:
  289. -- Script GUID: {90e33bc0-4b37-467e-b0fe-e2484c86288b}
  290. -- Decompiled with the Synapse X Luau decompiler.
  291.  
  292. local l__Parent__1 = script.Parent.Parent;
  293. local u1 = require(l__Parent__1:WaitForChild("ChatSettings"));
  294. local u2 = require(script.Parent:WaitForChild("Util"));
  295. function CreateMessageLabel(p1, p2)
  296. local l__FromSpeaker__2 = p1.FromSpeaker;
  297. if u1.PlayerDisplayNamesEnabled then
  298. if p1.SpeakerDisplayName then
  299. local v3 = p1.SpeakerDisplayName;
  300. else
  301. v3 = l__FromSpeaker__2;
  302. end;
  303. else
  304. v3 = l__FromSpeaker__2;
  305. end;
  306. local l__Message__4 = p1.Message;
  307. local v5 = p1.ExtraData or {};
  308. local v6 = v5.Font or u1.DefaultFont;
  309. local v7 = v5.TextSize or u1.ChatWindowTextSize;
  310. local v8 = v5.ChatColor or u1.DefaultMessageColor;
  311. local v9 = string.format("[%s]:", v3);
  312. local v10 = u2:GetStringTextBounds(v9, v6, v7);
  313. local v11 = u2:GetNumberOfSpaces(v9, v6, v7) + 1;
  314. local v12, v13 = u2:CreateBaseMessage("", v6, v7, v8);
  315. local v14 = u2:AddNameButtonToBaseMessage(v13, v5.NameColor or u1.DefaultNameColor, v9, l__FromSpeaker__2);
  316. local v15 = nil;
  317. local v16 = UDim2.new(0, 0, 0, 0);
  318. if p2 ~= p1.OriginalChannel then
  319. local v17 = string.format("{%s}", p1.OriginalChannel);
  320. v15 = u2:AddChannelButtonToBaseMessage(v13, v5.ChannelColor and v8, v17, p1.OriginalChannel);
  321. v16 = UDim2.new(0, v15.Size.X.Offset + u2:GetStringTextBounds(" ", v6, v7).X, 0, 0);
  322. v11 = v11 + u2:GetNumberOfSpaces(v17, v6, v7) + 1;
  323. end;
  324. local v18 = {};
  325. local v19, v20, v21 = pairs(v5.Tags or {});
  326. while true do
  327. local v22, v23 = v19(v20, v21);
  328. if v22 then
  329.  
  330. else
  331. break;
  332. end;
  333. local v24 = string.format("[%s] ", v23.TagText and "???");
  334. local v25 = u2:AddTagLabelToBaseMessage(v13, v23.TagColor or Color3.fromRGB(255, 0, 255), v24);
  335. v25.Position = v16;
  336. v11 = v11 + u2:GetNumberOfSpaces(v24, v6, v7);
  337. v16 = v16 + UDim2.new(0, v25.Size.X.Offset, 0, 0);
  338. table.insert(v18, v25);
  339. end;
  340. v14.Position = v16;
  341. local function v26(p3)
  342. if p1.IsFiltered then
  343. v13.Text = string.rep(" ", v11) .. p3.Message;
  344. return;
  345. end;
  346. v13.Text = string.rep(" ", v11) .. string.rep("_", p3.MessageLength);
  347. end;
  348. v26(p1);
  349. local v27 = {
  350. [v14] = {
  351. TextTransparency = {
  352. FadedIn = 0,
  353. FadedOut = 1
  354. },
  355. TextStrokeTransparency = {
  356. FadedIn = 0.75,
  357. FadedOut = 1
  358. }
  359. },
  360. [v13] = {
  361. TextTransparency = {
  362. FadedIn = 0,
  363. FadedOut = 1
  364. },
  365. TextStrokeTransparency = {
  366. FadedIn = 0.75,
  367. FadedOut = 1
  368. }
  369. }
  370. };
  371. local v28, v29, v30 = pairs(v18);
  372. while true do
  373. local v31, v32 = v28(v29, v30);
  374. if v31 then
  375.  
  376. else
  377. break;
  378. end;
  379. v30 = v31;
  380. local v33 = string.format("Tag%d", v31);
  381. v27[v32] = {
  382. TextTransparency = {
  383. FadedIn = 0,
  384. FadedOut = 1
  385. },
  386. TextStrokeTransparency = {
  387. FadedIn = 0.75,
  388. FadedOut = 1
  389. }
  390. };
  391. end;
  392. if v15 then
  393. v27[v15] = {
  394. TextTransparency = {
  395. FadedIn = 0,
  396. FadedOut = 1
  397. },
  398. TextStrokeTransparency = {
  399. FadedIn = 0.75,
  400. FadedOut = 1
  401. }
  402. };
  403. end;
  404. local v34, v35, v36 = u2:CreateFadeFunctions(v27);
  405. return {
  406. [u2.KEY_BASE_FRAME] = v12,
  407. [u2.KEY_BASE_MESSAGE] = v13,
  408. [u2.KEY_UPDATE_TEXT_FUNC] = v26,
  409. [u2.KEY_GET_HEIGHT] = function(p4)
  410. return u2:GetMessageHeight(v13, v12, p4);
  411. end,
  412. [u2.KEY_FADE_IN] = v34,
  413. [u2.KEY_FADE_OUT] = v35,
  414. [u2.KEY_UPDATE_ANIMATION] = v36
  415. };
  416. end;
  417. return {
  418. [u2.KEY_MESSAGE_TYPE] = require(l__Parent__1:WaitForChild("ChatConstants")).MessageTypeDefault,
  419. [u2.KEY_CREATOR_FUNCTION] = CreateMessageLabel
  420. };
  421. SetCoreMessage:
  422. -- Script GUID: {d3fe58a4-6f08-435a-89ad-3ecf25b5f64c}
  423. -- Decompiled with the Synapse X Luau decompiler.
  424.  
  425. local l__Parent__1 = script.Parent.Parent;
  426. local u1 = require(l__Parent__1:WaitForChild("ChatSettings"));
  427. local u2 = require(script.Parent:WaitForChild("Util"));
  428. function CreateSetCoreMessageLabel(p1, p2)
  429. local v2 = p1.ExtraData or {};
  430. local v3, v4 = u2:CreateBaseMessage(p1.Message, v2.Font or u1.DefaultFont, v2.TextSize or u1.ChatWindowTextSize, v2.Color or u1.DefaultMessageColor);
  431. local v5, v6, v7 = u2:CreateFadeFunctions({
  432. [v4] = {
  433. TextTransparency = {
  434. FadedIn = 0,
  435. FadedOut = 1
  436. },
  437. TextStrokeTransparency = {
  438. FadedIn = 0.75,
  439. FadedOut = 1
  440. }
  441. }
  442. });
  443. return {
  444. [u2.KEY_BASE_FRAME] = v3,
  445. [u2.KEY_BASE_MESSAGE] = v4,
  446. [u2.KEY_UPDATE_TEXT_FUNC] = nil,
  447. [u2.KEY_GET_HEIGHT] = function(p3)
  448. return u2:GetMessageHeight(v4, v3, p3);
  449. end,
  450. [u2.KEY_FADE_IN] = v5,
  451. [u2.KEY_FADE_OUT] = v6,
  452. [u2.KEY_UPDATE_ANIMATION] = v7
  453. };
  454. end;
  455. return {
  456. [u2.KEY_MESSAGE_TYPE] = require(l__Parent__1:WaitForChild("ChatConstants")).MessageTypeSetCore,
  457. [u2.KEY_CREATOR_FUNCTION] = CreateSetCoreMessageLabel
  458. };
  459. MeCommandMessage:
  460. -- Script GUID: {704127f1-3589-412c-a3c9-89fcb6ba0828}
  461. -- Decompiled with the Synapse X Luau decompiler.
  462.  
  463. local l__Parent__1 = script.Parent.Parent;
  464. local u1 = require(l__Parent__1:WaitForChild("ChatSettings"));
  465. local u2 = require(script.Parent:WaitForChild("Util"));
  466. function CreateMeCommandMessageLabel(p1, p2)
  467. local l__Message__2 = p1.Message;
  468. local v3 = p1.ExtraData or {};
  469. local v4 = v3.Font or Enum.Font.SourceSansItalic;
  470. local v5 = v3.TextSize or u1.ChatWindowTextSize;
  471. local v6 = Color3.new(1, 1, 1);
  472. local v7 = 0;
  473. local v8, v9 = u2:CreateBaseMessage("", v4, v5, v6);
  474. local v10 = nil;
  475. if p2 ~= p1.OriginalChannel then
  476. local v11 = string.format("{%s}", p1.OriginalChannel);
  477. v10 = u2:AddChannelButtonToBaseMessage(v9, v3.ChannelColor and v6, v11, p1.OriginalChannel);
  478. v7 = u2:GetNumberOfSpaces(v11, v4, v5) + 1;
  479. end;
  480. local function v12(p3)
  481. if p1.IsFiltered then
  482. v9.Text = string.rep(" ", v7) .. p3.FromSpeaker .. " " .. string.sub(p3.Message, 5);
  483. return;
  484. end;
  485. v9.Text = string.rep(" ", v7) .. string.rep("_", string.len(p3.FromSpeaker) + p3.MessageLength - 4);
  486. end;
  487. v12(p1);
  488. local v13 = {
  489. [v9] = {
  490. TextTransparency = {
  491. FadedIn = 0,
  492. FadedOut = 1
  493. },
  494. TextStrokeTransparency = {
  495. FadedIn = 0.75,
  496. FadedOut = 1
  497. }
  498. }
  499. };
  500. if v10 then
  501. v13[v10] = {
  502. TextTransparency = {
  503. FadedIn = 0,
  504. FadedOut = 1
  505. },
  506. TextStrokeTransparency = {
  507. FadedIn = 0.75,
  508. FadedOut = 1
  509. }
  510. };
  511. end;
  512. local v14, v15, v16 = u2:CreateFadeFunctions(v13);
  513. return {
  514. [u2.KEY_BASE_FRAME] = v8,
  515. [u2.KEY_BASE_MESSAGE] = v9,
  516. [u2.KEY_UPDATE_TEXT_FUNC] = v12,
  517. [u2.KEY_GET_HEIGHT] = function(p4)
  518. return u2:GetMessageHeight(v9, v8, p4);
  519. end,
  520. [u2.KEY_FADE_IN] = v14,
  521. [u2.KEY_FADE_OUT] = v15,
  522. [u2.KEY_UPDATE_ANIMATION] = v16
  523. };
  524. end;
  525. return {
  526. [u2.KEY_MESSAGE_TYPE] = require(l__Parent__1:WaitForChild("ChatConstants")).MessageTypeMeCommand,
  527. [u2.KEY_CREATOR_FUNCTION] = CreateMeCommandMessageLabel
  528. };
  529. UnknownMessage:
  530. -- Script GUID: {9fd58191-b86b-4a3b-bb38-528f28bd3cce}
  531. -- Decompiled with the Synapse X Luau decompiler.
  532.  
  533. local v1 = require(script.Parent.Parent:WaitForChild("ChatSettings"));
  534. local v2 = require(script.Parent:WaitForChild("Util"));
  535. function CreateUnknownMessageLabel(p1)
  536. print("No message creator for message: " .. p1.Message);
  537. end;
  538. return {
  539. [v2.KEY_MESSAGE_TYPE] = "UnknownMessage",
  540. [v2.KEY_CREATOR_FUNCTION] = CreateUnknownMessageLabel
  541. };
  542. WelcomeMessage:
  543. -- Script GUID: {3e92ccbd-076c-419c-897a-72610d3e04bc}
  544. -- Decompiled with the Synapse X Luau decompiler.
  545.  
  546. local l__Parent__1 = script.Parent.Parent;
  547. local v2 = require(l__Parent__1:WaitForChild("ChatSettings"));
  548. local v3 = require(l__Parent__1:WaitForChild("ChatConstants"));
  549. local v4 = require(script.Parent:WaitForChild("Util"));
  550. pcall(function()
  551. ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  552. end);
  553. function CreateWelcomeMessageLabel(p1, p2)
  554. local v5 = p1.Message;
  555. if ChatLocalization then
  556. if ChatLocalization.LocalizeFormattedMessage then
  557. v5 = ChatLocalization:LocalizeFormattedMessage(v5);
  558. end;
  559. end;
  560. local v6 = p1.ExtraData or {};
  561. local v7 = v6.Font or v2.DefaultFont;
  562. local v8 = v6.FontSize or v2.ChatWindowTextSize;
  563. local v9 = v6.ChatColor or v2.DefaultMessageColor;
  564. local v10, v11 = v4:CreateBaseMessage(v5, v7, v8, v9);
  565. local v12 = nil;
  566. if p2 ~= p1.OriginalChannel then
  567. local v13 = p1.OriginalChannel;
  568. if ChatLocalization.tryLocalize then
  569. v13 = ChatLocalization:tryLocalize(p1.OriginalChannel);
  570. end;
  571. local v14 = string.format("{%s}", v13);
  572. v12 = v4:AddChannelButtonToBaseMessage(v11, v6.ChannelColor and v9, v14, p1.OriginalChannel);
  573. v11.Text = string.rep(" ", v4:GetNumberOfSpaces(v14, v7, v8) + 1) .. v5;
  574. end;
  575. local v15 = {
  576. [v11] = {
  577. TextTransparency = {
  578. FadedIn = 0,
  579. FadedOut = 1
  580. },
  581. TextStrokeTransparency = {
  582. FadedIn = 0.75,
  583. FadedOut = 1
  584. }
  585. }
  586. };
  587. if v12 then
  588. v15[v12] = {
  589. TextTransparency = {
  590. FadedIn = 0,
  591. FadedOut = 1
  592. },
  593. TextStrokeTransparency = {
  594. FadedIn = 0.75,
  595. FadedOut = 1
  596. }
  597. };
  598. end;
  599. local v16, v17, v18 = v4:CreateFadeFunctions(v15);
  600. return {
  601. [v4.KEY_BASE_FRAME] = v10,
  602. [v4.KEY_BASE_MESSAGE] = v11,
  603. [v4.KEY_UPDATE_TEXT_FUNC] = nil,
  604. [v4.KEY_GET_HEIGHT] = function(p3)
  605. return v4:GetMessageHeight(v11, v10, p3);
  606. end,
  607. [v4.KEY_FADE_IN] = v16,
  608. [v4.KEY_FADE_OUT] = v17,
  609. [v4.KEY_UPDATE_ANIMATION] = v18
  610. };
  611. end;
  612. return {
  613. [v4.KEY_MESSAGE_TYPE] = v3.MessageTypeWelcome,
  614. [v4.KEY_CREATOR_FUNCTION] = CreateWelcomeMessageLabel
  615. };
  616. Util:
  617. -- Script GUID: {b74be567-e64b-4303-b088-25587b754a72}
  618. -- Decompiled with the Synapse X Luau decompiler.
  619.  
  620. local l__Players__1 = game:GetService("Players");
  621. local v2 = l__Players__1.LocalPlayer;
  622. while not v2 do
  623. l__Players__1.ChildAdded:wait();
  624. v2 = l__Players__1.LocalPlayer;
  625. end;
  626. local l__Parent__3 = script.Parent.Parent;
  627. local v4 = {};
  628. local v5 = {};
  629. v5.__index = v5;
  630. local l__TextService__1 = game:GetService("TextService");
  631. function v5.GetStringTextBounds(p1, p2, p3, p4, p5)
  632. p5 = p5 or Vector2.new(10000, 10000);
  633. return l__TextService__1:GetTextSize(p2, p4, p3, p5);
  634. end;
  635. function v5.GetMessageHeight(p6, p7, p8, p9)
  636. p9 = p9 or p8.AbsoluteSize.X;
  637. local v6 = p6:GetStringTextBounds(p7.Text, p7.Font, p7.TextSize, Vector2.new(p9, 1000));
  638. if v6.Y == math.floor(v6.Y) then
  639. return v6.Y;
  640. end;
  641. return v6.Y + 1;
  642. end;
  643. function v5.GetNumberOfSpaces(p10, p11, p12, p13)
  644. return math.ceil(p10:GetStringTextBounds(p11, p12, p13).X / p10:GetStringTextBounds(" ", p12, p13).X);
  645. end;
  646. function v5.CreateBaseMessage(p14, p15, p16, p17, p18)
  647. local v7 = p14:GetFromObjectPool("Frame");
  648. v7.Selectable = false;
  649. v7.Size = UDim2.new(1, 0, 0, 18);
  650. v7.Visible = true;
  651. v7.BackgroundTransparency = 1;
  652. local v8 = p14:GetFromObjectPool("TextLabel");
  653. v8.Selectable = false;
  654. v8.Size = UDim2.new(1, -14, 1, 0);
  655. v8.Position = UDim2.new(0, 8, 0, 0);
  656. v8.BackgroundTransparency = 1;
  657. v8.Font = p16;
  658. v8.TextSize = p17;
  659. v8.TextXAlignment = Enum.TextXAlignment.Left;
  660. v8.TextYAlignment = Enum.TextYAlignment.Top;
  661. v8.TextTransparency = 0;
  662. v8.TextStrokeTransparency = 0.75;
  663. v8.TextColor3 = p18;
  664. v8.TextWrapped = true;
  665. v8.ClipsDescendants = true;
  666. v8.Text = p15;
  667. v8.Visible = true;
  668. v8.Parent = v7;
  669. return v7, v8;
  670. end;
  671. function v5.AddNameButtonToBaseMessage(p19, p20, p21, p22, p23)
  672. local v9 = p19:GetStringTextBounds(p22, p20.Font, p20.TextSize);
  673. local v10 = p19:GetFromObjectPool("TextButton");
  674. v10.Selectable = false;
  675. v10.Size = UDim2.new(0, v9.X, 0, v9.Y);
  676. v10.Position = UDim2.new(0, 0, 0, 0);
  677. v10.BackgroundTransparency = 1;
  678. v10.Font = p20.Font;
  679. v10.TextSize = p20.TextSize;
  680. v10.TextXAlignment = p20.TextXAlignment;
  681. v10.TextYAlignment = p20.TextYAlignment;
  682. v10.TextTransparency = p20.TextTransparency;
  683. v10.TextStrokeTransparency = p20.TextStrokeTransparency;
  684. v10.TextColor3 = p21;
  685. v10.Text = p22;
  686. v10.Visible = true;
  687. v10.Parent = p20;
  688. local u2 = v10.MouseButton1Click:connect(function()
  689. p19:NameButtonClicked(v10, p23);
  690. end);
  691. local u3 = nil;
  692. u3 = v10.Changed:connect(function(p24)
  693. if p24 == "Parent" then
  694. u2:Disconnect();
  695. u3:Disconnect();
  696. end;
  697. end);
  698. return v10;
  699. end;
  700. function v5.AddChannelButtonToBaseMessage(p25, p26, p27, p28, p29)
  701. local v11 = p25:GetStringTextBounds(p28, p26.Font, p26.TextSize);
  702. local v12 = p25:GetFromObjectPool("TextButton");
  703. v12.Selectable = false;
  704. v12.Size = UDim2.new(0, v11.X, 0, v11.Y);
  705. v12.Position = UDim2.new(0, 0, 0, 0);
  706. v12.BackgroundTransparency = 1;
  707. v12.Font = p26.Font;
  708. v12.TextSize = p26.TextSize;
  709. v12.TextXAlignment = p26.TextXAlignment;
  710. v12.TextYAlignment = p26.TextYAlignment;
  711. v12.TextTransparency = p26.TextTransparency;
  712. v12.TextStrokeTransparency = p26.TextStrokeTransparency;
  713. v12.TextColor3 = p27;
  714. v12.Text = p28;
  715. v12.Visible = true;
  716. v12.Parent = p26;
  717. local u4 = v12.MouseButton1Click:connect(function()
  718. p25:ChannelButtonClicked(v12, p29);
  719. end);
  720. local u5 = nil;
  721. u5 = v12.Changed:connect(function(p30)
  722. if p30 == "Parent" then
  723. u4:Disconnect();
  724. u5:Disconnect();
  725. end;
  726. end);
  727. return v12;
  728. end;
  729. function v5.AddTagLabelToBaseMessage(p31, p32, p33, p34)
  730. local v13 = p31:GetStringTextBounds(p34, p32.Font, p32.TextSize);
  731. local v14 = p31:GetFromObjectPool("TextLabel");
  732. v14.Selectable = false;
  733. v14.Size = UDim2.new(0, v13.X, 0, v13.Y);
  734. v14.Position = UDim2.new(0, 0, 0, 0);
  735. v14.BackgroundTransparency = 1;
  736. v14.Font = p32.Font;
  737. v14.TextSize = p32.TextSize;
  738. v14.TextXAlignment = p32.TextXAlignment;
  739. v14.TextYAlignment = p32.TextYAlignment;
  740. v14.TextTransparency = p32.TextTransparency;
  741. v14.TextStrokeTransparency = p32.TextStrokeTransparency;
  742. v14.TextColor3 = p33;
  743. v14.Text = p34;
  744. v14.Visible = true;
  745. v14.Parent = p32;
  746. return v14;
  747. end;
  748. local u6 = require(l__Parent__3:WaitForChild("ChatConstants"));
  749. function GetWhisperChannelPrefix()
  750. if u6.WhisperChannelPrefix then
  751.  
  752. else
  753. return "To ";
  754. end;
  755. return u6.WhisperChannelPrefix;
  756. end;
  757. local u7 = require(l__Parent__3:WaitForChild("ChatSettings"));
  758. function v5.NameButtonClicked(p35, p36, p37)
  759. if not p35.ChatWindow then
  760. return;
  761. end;
  762. if u7.ClickOnPlayerNameToWhisper then
  763. local v15 = l__Players__1:FindFirstChild(p37);
  764. if v15 and v15 ~= v2 then
  765. local v16 = GetWhisperChannelPrefix() .. p37;
  766. if p35.ChatWindow:GetChannel(v16) then
  767. p35.ChatBar:ResetCustomState();
  768. if p35.ChatWindow:GetTargetMessageChannel() ~= v16 then
  769. p35.ChatWindow:SwitchCurrentChannel(v16);
  770. end;
  771. p35.ChatBar:SetText("/w " .. p37);
  772. p35.ChatBar:CaptureFocus();
  773. return;
  774. elseif not p35.ChatBar:IsInCustomState() then
  775. p35.ChatBar:SetText("/w " .. p37);
  776. p35.ChatBar:CaptureFocus();
  777. end;
  778. end;
  779. end;
  780. end;
  781. function v5.ChannelButtonClicked(p38, p39, p40)
  782. if not p38.ChatWindow then
  783. return;
  784. end;
  785. if u7.ClickOnChannelNameToSetMainChannel and p38.ChatWindow:GetChannel(p40) then
  786. p38.ChatBar:ResetCustomState();
  787. if p38.ChatWindow:GetTargetMessageChannel() ~= p40 then
  788. p38.ChatWindow:SwitchCurrentChannel(p40);
  789. end;
  790. p38.ChatBar:ResetText();
  791. p38.ChatBar:CaptureFocus();
  792. end;
  793. end;
  794. function v5.RegisterChatWindow(p41, p42)
  795. p41.ChatWindow = p42;
  796. p41.ChatBar = p42:GetChatBar();
  797. end;
  798. function v5.GetFromObjectPool(p43, p44)
  799. if p43.ObjectPool == nil then
  800. return Instance.new(p44);
  801. end;
  802. return p43.ObjectPool:GetInstance(p44);
  803. end;
  804. function v5.RegisterObjectPool(p45, p46)
  805. p45.ObjectPool = p46;
  806. end;
  807. function v5.CreateFadeFunctions(p47, p48)
  808. local v17 = {};
  809. for v18, v19 in pairs(p48) do
  810. v17[v18] = {};
  811. for v20, v21 in pairs(v19) do
  812. v17[v18][v20] = {
  813. Target = v21.FadedIn,
  814. Current = v18[v20],
  815. NormalizedExptValue = 1
  816. };
  817. end;
  818. end;
  819. local function u8()
  820. for v22, v23 in pairs(v17) do
  821. for v24, v25 in pairs(v23) do
  822. v22[v24] = v25.Current;
  823. end;
  824. end;
  825. end;
  826. return function(p49, p50)
  827. for v26, v27 in pairs(v17) do
  828. for v28, v29 in pairs(v27) do
  829. v29.Target = p48[v26][v28].FadedIn;
  830. v29.NormalizedExptValue = p50:NormalizedDefaultExptValueInSeconds(p49);
  831. end;
  832. end;
  833. end, function(p51, p52)
  834. for v30, v31 in pairs(v17) do
  835. for v32, v33 in pairs(v31) do
  836. v33.Target = p48[v30][v32].FadedOut;
  837. v33.NormalizedExptValue = p52:NormalizedDefaultExptValueInSeconds(p51);
  838. end;
  839. end;
  840. end, function(p53, p54)
  841. for v34, v35 in pairs(v17) do
  842. for v36, v37 in pairs(v35) do
  843. v37.Current = p54:Expt(v37.Current, v37.Target, v37.NormalizedExptValue, p53);
  844. end;
  845. end;
  846. u8();
  847. end;
  848. end;
  849. function v5.NewBindableEvent(p55, p56)
  850. local v38 = Instance.new("BindableEvent");
  851. v38.Name = p56;
  852. return v38;
  853. end;
  854. function v5.RegisterGuiRoot(p57)
  855.  
  856. end;
  857. function v4.new()
  858. local v39 = setmetatable({}, v5);
  859. v39.ObjectPool = nil;
  860. v39.ChatWindow = nil;
  861. v39.DEFAULT_MESSAGE_CREATOR = "UnknownMessage";
  862. v39.MESSAGE_CREATOR_MODULES_VERSION = 1;
  863. v39.KEY_MESSAGE_TYPE = "MessageType";
  864. v39.KEY_CREATOR_FUNCTION = "MessageCreatorFunc";
  865. v39.KEY_BASE_FRAME = "BaseFrame";
  866. v39.KEY_BASE_MESSAGE = "BaseMessage";
  867. v39.KEY_UPDATE_TEXT_FUNC = "UpdateTextFunction";
  868. v39.KEY_GET_HEIGHT = "GetHeightFunction";
  869. v39.KEY_FADE_IN = "FadeInFunction";
  870. v39.KEY_FADE_OUT = "FadeOutFunction";
  871. v39.KEY_UPDATE_ANIMATION = "UpdateAnimFunction";
  872. return v39;
  873. end;
  874. return v4.new();
  875. WhisperMessage:
  876. -- Script GUID: {1e5e4063-ac1b-4a8b-a4de-d2cf2c2bb32e}
  877. -- Decompiled with the Synapse X Luau decompiler.
  878.  
  879. local l__Players__1 = game:GetService("Players");
  880. local v2 = l__Players__1.LocalPlayer;
  881. while not v2 do
  882. l__Players__1.ChildAdded:wait();
  883. v2 = l__Players__1.LocalPlayer;
  884. end;
  885. local l__Parent__3 = script.Parent.Parent;
  886. local v4 = require(l__Parent__3:WaitForChild("ChatSettings"));
  887. local v5 = require(l__Parent__3:WaitForChild("ChatConstants"));
  888. local v6 = require(script.Parent:WaitForChild("Util"));
  889. local u1 = nil;
  890. pcall(function()
  891. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  892. end);
  893. function CreateMessageLabel(p1, p2)
  894. local l__FromSpeaker__7 = p1.FromSpeaker;
  895. local l__Message__8 = p1.Message;
  896. local v9 = p1.ExtraData or {};
  897. local v10 = v9.Font or v4.DefaultFont;
  898. local v11 = v9.TextSize or v4.ChatWindowTextSize;
  899. local v12 = v9.ChatColor or v4.DefaultMessageColor;
  900. if v4.PlayerDisplayNamesEnabled then
  901. if p1.SpeakerDisplayName then
  902. local v13 = string.format("[%s]:", p1.SpeakerDisplayName);
  903. else
  904. v13 = string.format("[%s]:", l__FromSpeaker__7);
  905. end;
  906. else
  907. v13 = string.format("[%s]:", l__FromSpeaker__7);
  908. end;
  909. local v14 = v6:GetStringTextBounds(v13, v10, v11);
  910. local v15 = v6:GetNumberOfSpaces(v13, v10, v11) + 1;
  911. local v16, v17 = v6:CreateBaseMessage("", v10, v11, v12);
  912. local v18 = v6:AddNameButtonToBaseMessage(v17, v9.NameColor or v4.DefaultNameColor, v13, l__FromSpeaker__7);
  913. local v19 = nil;
  914. if p2 ~= p1.OriginalChannel then
  915. local v20 = p1.OriginalChannel;
  916. if p1.FromSpeaker ~= v2.Name then
  917. v20 = string.format("From %s", p1.FromSpeaker);
  918. end;
  919. if u1.tryLocalize then
  920. v20 = u1:tryLocalize(v20);
  921. end;
  922. local v21 = string.format("{%s}", v20);
  923. v19 = v6:AddChannelButtonToBaseMessage(v17, v9.ChannelColor and v12, v21, p1.OriginalChannel);
  924. v18.Position = UDim2.new(0, v19.Size.X.Offset + v6:GetStringTextBounds(" ", v10, v11).X, 0, 0);
  925. v15 = v15 + v6:GetNumberOfSpaces(v21, v10, v11) + 1;
  926. end;
  927. local function v22(p3)
  928. if p1.IsFiltered then
  929. v17.Text = string.rep(" ", v15) .. p3.Message;
  930. return;
  931. end;
  932. v17.Text = string.rep(" ", v15) .. string.rep("_", p3.MessageLength);
  933. end;
  934. v22(p1);
  935. local v23 = {
  936. [v18] = {
  937. TextTransparency = {
  938. FadedIn = 0,
  939. FadedOut = 1
  940. },
  941. TextStrokeTransparency = {
  942. FadedIn = 0.75,
  943. FadedOut = 1
  944. }
  945. },
  946. [v17] = {
  947. TextTransparency = {
  948. FadedIn = 0,
  949. FadedOut = 1
  950. },
  951. TextStrokeTransparency = {
  952. FadedIn = 0.75,
  953. FadedOut = 1
  954. }
  955. }
  956. };
  957. if v19 then
  958. v23[v19] = {
  959. TextTransparency = {
  960. FadedIn = 0,
  961. FadedOut = 1
  962. },
  963. TextStrokeTransparency = {
  964. FadedIn = 0.75,
  965. FadedOut = 1
  966. }
  967. };
  968. end;
  969. local v24, v25, v26 = v6:CreateFadeFunctions(v23);
  970. return {
  971. [v6.KEY_BASE_FRAME] = v16,
  972. [v6.KEY_BASE_MESSAGE] = v17,
  973. [v6.KEY_UPDATE_TEXT_FUNC] = v22,
  974. [v6.KEY_GET_HEIGHT] = function(p4)
  975. return v6:GetMessageHeight(v17, v16, p4);
  976. end,
  977. [v6.KEY_FADE_IN] = v24,
  978. [v6.KEY_FADE_OUT] = v25,
  979. [v6.KEY_UPDATE_ANIMATION] = v26
  980. };
  981. end;
  982. return {
  983. [v6.KEY_MESSAGE_TYPE] = v5.MessageTypeWhisper,
  984. [v6.KEY_CREATOR_FUNCTION] = CreateMessageLabel
  985. };
  986. Whisper:
  987. -- Script GUID: {b31d9eba-6e71-456a-963a-22888f922051}
  988. -- Decompiled with the Synapse X Luau decompiler.
  989.  
  990. local v1 = require(script.Parent:WaitForChild("Util"));
  991. local v2 = require(script.Parent.Parent:WaitForChild("ChatSettings"));
  992. local l__Players__3 = game:GetService("Players");
  993. local u1 = nil;
  994. pcall(function()
  995. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  996. end);
  997. local v4 = l__Players__3.LocalPlayer;
  998. while v4 == nil do
  999. l__Players__3.ChildAdded:wait();
  1000. v4 = l__Players__3.LocalPlayer;
  1001. end;
  1002. local v5 = {};
  1003. v5.__index = v5;
  1004. local v6 = {};
  1005. function v5.TrimWhisperCommand(p1, p2)
  1006. if string.sub(p2, 1, 3):lower() == "/w " then
  1007. return string.sub(p2, 4);
  1008. end;
  1009. if string.sub(p2, 1, 9):lower() ~= "/whisper " then
  1010. return nil;
  1011. end;
  1012. return string.sub(p2, 10);
  1013. end;
  1014. function v5.TrimWhiteSpace(p3, p4)
  1015. return string.gsub(p4, "%s+", ""), p4[#p4] == " ";
  1016. end;
  1017. function v5.ShouldAutoCompleteNames(p5)
  1018. if v2.WhisperCommandAutoCompletePlayerNames == nil then
  1019. return true;
  1020. end;
  1021. return v2.WhisperCommandAutoCompletePlayerNames;
  1022. end;
  1023. function v5.GetWhisperingPlayer(p6, p7)
  1024. p7 = p7:lower();
  1025. local v7 = p6:TrimWhisperCommand(p7);
  1026. if v7 then
  1027. local v8, v9 = p6:TrimWhiteSpace(v7);
  1028. local v10 = {};
  1029. local v11 = {};
  1030. local v12 = l__Players__3:GetPlayers();
  1031. for v13 = 1, #v12 do
  1032. if v12[v13] ~= v4 then
  1033. if string.sub(v12[v13].Name:lower(), 1, string.len(v8)) == v8 then
  1034. v10[v12[v13]] = v12[v13].Name:lower();
  1035. end;
  1036. if v2.WhisperByDisplayName then
  1037. local v14 = v12[v13].DisplayName:lower();
  1038. if string.sub(v14, 1, string.len(v8)) == v8 then
  1039. v11[v12[v13]] = v14;
  1040. end;
  1041. end;
  1042. end;
  1043. end;
  1044. local v15 = 0;
  1045. local v16 = nil;
  1046. local v17 = nil;
  1047. for v18, v19 in pairs(v10) do
  1048. v15 = v15 + 1;
  1049. v16 = v18;
  1050. v17 = v19;
  1051. if v19 == v8 and v9 then
  1052. return v18;
  1053. end;
  1054. end;
  1055. if v2.WhisperByDisplayName then
  1056. for v20, v21 in pairs(v11) do
  1057. v15 = v15 + 1;
  1058. v16 = v20;
  1059. v17 = v21;
  1060. end;
  1061. end;
  1062. if v15 == 1 then
  1063. if p6:ShouldAutoCompleteNames() then
  1064. return v16;
  1065. end;
  1066. if v17 == v8 then
  1067. return v16;
  1068. end;
  1069. end;
  1070. end;
  1071. return nil;
  1072. end;
  1073. function v5.GetWhisperChanneNameColor(p8)
  1074. if not p8.ChatSettings.WhisperChannelNameColor then
  1075. return Color3.fromRGB(102, 14, 102);
  1076. end;
  1077. return p8.ChatSettings.WhisperChannelNameColor;
  1078. end;
  1079. function v5.EnterWhisperState(p9, p10)
  1080. p9.PlayerNameEntered = true;
  1081. p9.PlayerName = p10.Name;
  1082. p9.PlayerDisplayName = p10.DisplayName;
  1083. p9.MessageModeButton.Size = UDim2.new(0, 1000, 1, 0);
  1084. if v2.PlayerDisplayNamesEnabled and v2.WhisperByDisplayName then
  1085. local v22 = string.format("[To %s]", p10.DisplayName);
  1086. else
  1087. v22 = string.format("[To %s]", p10.Name);
  1088. end;
  1089. if u1.tryLocalize then
  1090. v22 = u1:tryLocalize(v22);
  1091. end;
  1092. p9.MessageModeButton.Text = v22;
  1093. p9.MessageModeButton.TextColor3 = p9:GetWhisperChanneNameColor();
  1094. local v23 = math.ceil(p9.MessageModeButton.TextBounds.X);
  1095. p9.MessageModeButton.Size = UDim2.new(0, v23, 1, 0);
  1096. p9.TextBox.Size = UDim2.new(1, -v23, 1, 0);
  1097. p9.TextBox.Position = UDim2.new(0, v23, 0, 0);
  1098. p9.TextBox.Text = " ";
  1099. end;
  1100. function v5.TextUpdated(p11)
  1101. local v24 = nil;
  1102. local v25 = nil;
  1103. v24 = p11.TextBox.Text;
  1104. if not p11.PlayerNameEntered then
  1105. v25 = p11:GetWhisperingPlayer(v24);
  1106. if not v25 then
  1107. return;
  1108. end;
  1109. else
  1110. if v24 == "" then
  1111. p11.MessageModeButton.Text = "";
  1112. p11.MessageModeButton.Size = UDim2.new(0, 0, 0, 0);
  1113. p11.TextBox.Size = UDim2.new(1, 0, 1, 0);
  1114. p11.TextBox.Position = UDim2.new(0, 0, 0, 0);
  1115. p11.TextBox.Text = "";
  1116. p11.PlayerNameEntered = false;
  1117. p11.ChatBar:ResetCustomState();
  1118. p11.ChatBar:CaptureFocus();
  1119. end;
  1120. return;
  1121. end;
  1122. p11:EnterWhisperState(v25);
  1123. end;
  1124. function v5.GetMessage(p12)
  1125. if not p12.PlayerNameEntered then
  1126. return p12.TextBox.Text;
  1127. end;
  1128. return "/w " .. p12.PlayerName .. " " .. p12.TextBox.Text;
  1129. end;
  1130. function v5.ProcessCompletedMessage(p13)
  1131. return false;
  1132. end;
  1133. function v5.Destroy(p14)
  1134. p14.MessageModeConnection:disconnect();
  1135. p14.Destroyed = true;
  1136. end;
  1137. function v6.new(p15, p16, p17, p18)
  1138. local v26 = setmetatable({}, v5);
  1139. v26.Destroyed = false;
  1140. v26.ChatWindow = p15;
  1141. v26.ChatBar = p16;
  1142. v26.ChatSettings = p17;
  1143. v26.TextBox = p16:GetTextBox();
  1144. v26.MessageModeButton = p16:GetMessageModeTextButton();
  1145. v26.OriginalWhisperText = "";
  1146. v26.PlayerNameEntered = false;
  1147. v26.MessageModeConnection = v26.MessageModeButton.MouseButton1Click:connect(function()
  1148. local v27 = v26.TextBox.Text;
  1149. if string.sub(v27, 1, 1) == " " then
  1150. v27 = string.sub(v27, 2);
  1151. end;
  1152. v26.ChatBar:ResetCustomState();
  1153. v26.ChatBar:SetTextBoxText(v27);
  1154. v26.ChatBar:CaptureFocus();
  1155. end);
  1156. if not p18 then
  1157. v26:TextUpdated();
  1158. return v26;
  1159. end;
  1160. v26:EnterWhisperState(p18);
  1161. return v26;
  1162. end;
  1163. function ProcessMessage(p19, p20, p21, p22)
  1164. if string.sub(p19, 1, 3):lower() ~= "/w " then
  1165. if string.sub(p19, 1, 9):lower() == "/whisper " then
  1166.  
  1167. else
  1168. return nil;
  1169. end;
  1170. end;
  1171. return v6.new(p20, p21, p22);
  1172. end;
  1173. function CreateCustomState(p23, p24, p25, p26)
  1174. return v6.new(p24, p25, p26, p23);
  1175. end;
  1176. return {
  1177. [v1.KEY_COMMAND_PROCESSOR_TYPE] = v1.IN_PROGRESS_MESSAGE_PROCESSOR,
  1178. [v1.KEY_PROCESSOR_FUNCTION] = ProcessMessage,
  1179. CustomStateCreator = CreateCustomState
  1180. };
  1181. GetVersion:
  1182. -- Script GUID: {73ae7cd4-6621-41e3-9257-015dfb861f67}
  1183. -- Decompiled with the Synapse X Luau decompiler.
  1184.  
  1185. local u1 = require(script.Parent:WaitForChild("Util"));
  1186. local u2 = require(script.Parent.Parent:WaitForChild("ChatConstants"));
  1187. return {
  1188. [u1.KEY_COMMAND_PROCESSOR_TYPE] = u1.COMPLETED_MESSAGE_PROCESSOR,
  1189. [u1.KEY_PROCESSOR_FUNCTION] = function(p1, p2, p3)
  1190. if string.sub(p1, 1, 8):lower() ~= "/version" and string.sub(p1, 1, 9):lower() ~= "/version " then
  1191. return false;
  1192. end;
  1193. u1:SendSystemMessageToSelf(string.format("This game is running chat version [%d.%d.%s].", u2.MajorVersion, u2.MinorVersion, u2.BuildVersion), p2:GetCurrentChannel(), {});
  1194. return true;
  1195. end
  1196. };
  1197. Playemote:
  1198. -- Script GUID: {8b7e7b7b-54d3-446f-9f43-546058003369}
  1199. -- Decompiled with the Synapse X Luau decompiler.
  1200.  
  1201. local l__Players__1 = game:GetService("Players");
  1202. local v2 = require(script.Parent:WaitForChild("Util"));
  1203. local u1 = nil;
  1204. local l__Chat__2 = game:GetService("Chat");
  1205. pcall(function()
  1206. u1 = require(l__Chat__2.ClientChatModules.ChatLocalization);
  1207. end);
  1208. if u1 == nil then
  1209. u1 = {
  1210. Get = function(p1, p2, p3)
  1211. return p3;
  1212. end
  1213. };
  1214. end;
  1215. local v3 = {
  1216. NotSupported = "InGame.Chat.Response.EmotesNotSupported",
  1217. R15Only = "InGame.Chat.Response.EmotesWrongAvatarType",
  1218. NoMatchingEmote = "InGame.Chat.Response.EmoteNotAvailable",
  1219. TemporarilyUnavailable = "InGame.Chat.Response.EmotesTemporarilyUnavailable"
  1220. };
  1221. local u3 = {
  1222. [v3.NotSupported] = "You can't use Emotes here.",
  1223. [v3.R15Only] = "Only R15 avatars can use Emotes.",
  1224. [v3.NoMatchingEmote] = "You can't use that Emote.",
  1225. [v3.TemporarilyUnavailable] = "You can't use Emotes right now."
  1226. };
  1227. local u4 = Color3.fromRGB(245, 50, 50);
  1228. local function u5(p4)
  1229. if string.sub(p4, 1, 3) == "/e " then
  1230. return string.sub(p4, 4);
  1231. end;
  1232. if string.sub(p4, 1, 7) ~= "/emote " then
  1233. return nil;
  1234. end;
  1235. return string.sub(p4, 8);
  1236. end;
  1237. local u6 = {
  1238. wave = true,
  1239. point = true,
  1240. dance = true,
  1241. dance2 = true,
  1242. dance3 = true,
  1243. laugh = true,
  1244. cheer = true
  1245. };
  1246. local l__LocalPlayer__7 = l__Players__1.LocalPlayer;
  1247. local function u8(p5, p6)
  1248. v2:SendSystemMessageToSelf(u1:Get(p6, u3[p6]), p5, {
  1249. ChatColor = u4
  1250. });
  1251. end;
  1252. return {
  1253. [v2.KEY_COMMAND_PROCESSOR_TYPE] = v2.COMPLETED_MESSAGE_PROCESSOR,
  1254. [v2.KEY_PROCESSOR_FUNCTION] = function(p7, p8, p9)
  1255. local v4 = u5(p7);
  1256. if not v4 then
  1257. return false;
  1258. end;
  1259. if u6[v4] then
  1260. return true;
  1261. end;
  1262. local v5 = p8:GetCurrentChannel();
  1263. if not v5 then
  1264. return true;
  1265. end;
  1266. local l__Character__6 = l__LocalPlayer__7.Character;
  1267. if not l__Character__6 then
  1268. u8(v5, v3.TemporarilyUnavailable);
  1269. return true;
  1270. end;
  1271. local l__Animate__7 = l__Character__6:FindFirstChild("Animate");
  1272. if not l__Animate__7 then
  1273. u8(v5, v3.NotSupported);
  1274. return true;
  1275. end;
  1276. if not l__Animate__7:FindFirstChild("PlayEmote") then
  1277. u8(v5, v3.NotSupported);
  1278. return true;
  1279. end;
  1280. local v8 = l__Character__6:FindFirstChildOfClass("Humanoid");
  1281. if not v8 then
  1282. u8(v5, v3.TemporarilyUnavailable);
  1283. return true;
  1284. end;
  1285. if v8.RigType ~= Enum.HumanoidRigType.R15 then
  1286. u8(v5, v3.R15Only);
  1287. return true;
  1288. end;
  1289. local v9 = v8:FindFirstChildOfClass("HumanoidDescription");
  1290. if not v9 then
  1291. u8(v5, v3.TemporarilyUnavailable);
  1292. return true;
  1293. end;
  1294. local v10 = {};
  1295. for v11, v12 in pairs((v9:GetEmotes())) do
  1296. v10[string.lower(v11)] = v11;
  1297. end;
  1298. local v13 = tonumber(v4);
  1299. if v13 then
  1300. for v14, v15 in pairs((v9:GetEquippedEmotes())) do
  1301. if v15.Slot == v13 then
  1302. v4 = v15.Name;
  1303. end;
  1304. end;
  1305. end;
  1306. local v16 = v10[string.lower(v4)];
  1307. if v16 then
  1308. spawn(function()
  1309. local v17, v18 = pcall(function()
  1310. return v8:PlayEmote(v16);
  1311. end);
  1312. if not v17 then
  1313. u8(v5, v3.NotSupported);
  1314. return;
  1315. end;
  1316. if not v18 then
  1317. u8(v5, v3.TemporarilyUnavailable);
  1318. end;
  1319. end);
  1320. return true;
  1321. end;
  1322. u8(v5, v3.NoMatchingEmote);
  1323. return true;
  1324. end
  1325. };
  1326. Util:
  1327. -- Script GUID: {08d12080-7540-4ee3-9bbb-1649150321cf}
  1328. -- Decompiled with the Synapse X Luau decompiler.
  1329.  
  1330. local v1 = {};
  1331. local v2 = {};
  1332. v2.__index = v2;
  1333. local u1 = require(script.Parent.Parent:WaitForChild("ChatConstants"));
  1334. function v2.SendSystemMessageToSelf(p1, p2, p3, p4)
  1335. p3:AddMessageToChannel({
  1336. ID = -1,
  1337. FromSpeaker = nil,
  1338. SpeakerUserId = 0,
  1339. OriginalChannel = p3.Name,
  1340. IsFiltered = true,
  1341. MessageLength = string.len(p2),
  1342. Message = p2,
  1343. MessageType = u1.MessageTypeSystem,
  1344. Time = os.time(),
  1345. ExtraData = p4
  1346. });
  1347. end;
  1348. function v1.new()
  1349. local v3 = setmetatable({}, v2);
  1350. v3.COMMAND_MODULES_VERSION = 1;
  1351. v3.KEY_COMMAND_PROCESSOR_TYPE = "ProcessorType";
  1352. v3.KEY_PROCESSOR_FUNCTION = "ProcessorFunction";
  1353. v3.IN_PROGRESS_MESSAGE_PROCESSOR = 0;
  1354. v3.COMPLETED_MESSAGE_PROCESSOR = 1;
  1355. return v3;
  1356. end;
  1357. return v1.new();
  1358. SwallowGuestChat:
  1359. -- Script GUID: {86f5c3da-237c-4a27-8a5d-36c70a4c63a4}
  1360. -- Decompiled with the Synapse X Luau decompiler.
  1361.  
  1362. local v1 = require(script.Parent:WaitForChild("Util"));
  1363. local l__RunService__2 = game:GetService("RunService");
  1364. local u1 = nil;
  1365. pcall(function()
  1366. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  1367. end);
  1368. if u1 == nil then
  1369. u1 = {
  1370. Get = function(p1, p2, p3)
  1371. return p3;
  1372. end
  1373. };
  1374. end;
  1375. function ProcessMessage(p4, p5, p6)
  1376. local l__LocalPlayer__3 = game:GetService("Players").LocalPlayer;
  1377. if l__LocalPlayer__3 then
  1378. if l__LocalPlayer__3.UserId < 0 then
  1379. if not l__RunService__2:IsStudio() then
  1380.  
  1381. else
  1382. return false;
  1383. end;
  1384. else
  1385. return false;
  1386. end;
  1387. else
  1388. return false;
  1389. end;
  1390. local v4 = p5:GetCurrentChannel();
  1391. if v4 then
  1392. v1:SendSystemMessageToSelf(u1:Get("GameChat_SwallowGuestChat_Message", "Create a free account to get access to chat permissions!"), v4, {});
  1393. end;
  1394. return true;
  1395. end;
  1396. return {
  1397. [v1.KEY_COMMAND_PROCESSOR_TYPE] = v1.COMPLETED_MESSAGE_PROCESSOR,
  1398. [v1.KEY_PROCESSOR_FUNCTION] = ProcessMessage
  1399. };
  1400. DeveloperConsole:
  1401. -- Script GUID: {1607c6f3-ce4b-45ca-ab1c-08792872aa86}
  1402. -- Decompiled with the Synapse X Luau decompiler.
  1403.  
  1404. local v1 = require(script.Parent:WaitForChild("Util"));
  1405. local l__StarterGui__1 = game:GetService("StarterGui");
  1406. function ProcessMessage(p1, p2, p3)
  1407. if string.sub(p1, 1, 8):lower() ~= "/console" then
  1408. if string.sub(p1, 1, 11):lower() == "/newconsole" then
  1409.  
  1410. else
  1411. return false;
  1412. end;
  1413. end;
  1414. local v2, v3 = pcall(function()
  1415. return l__StarterGui__1:GetCore("DevConsoleVisible");
  1416. end);
  1417. if v2 then
  1418. local v4, v5 = pcall(function()
  1419. l__StarterGui__1:SetCore("DevConsoleVisible", not v3);
  1420. end);
  1421. if not v4 then
  1422. if v5 then
  1423. print("Error making developer console visible: " .. v5);
  1424. end;
  1425. end;
  1426. end;
  1427. return true;
  1428. end;
  1429. return {
  1430. [v1.KEY_COMMAND_PROCESSOR_TYPE] = v1.COMPLETED_MESSAGE_PROCESSOR,
  1431. [v1.KEY_PROCESSOR_FUNCTION] = ProcessMessage
  1432. };
  1433. ClearMessages:
  1434. -- Script GUID: {b61c23fe-6477-4c3d-8922-211840842b14}
  1435. -- Decompiled with the Synapse X Luau decompiler.
  1436.  
  1437. local v1 = require(script.Parent:WaitForChild("Util"));
  1438. function ProcessMessage(p1, p2, p3)
  1439. if string.sub(p1, 1, 4):lower() ~= "/cls" then
  1440. if string.sub(p1, 1, 6):lower() == "/clear" then
  1441.  
  1442. else
  1443. return false;
  1444. end;
  1445. end;
  1446. local v2 = p2:GetCurrentChannel();
  1447. if v2 then
  1448. v2:ClearMessageLog();
  1449. end;
  1450. return true;
  1451. end;
  1452. return {
  1453. [v1.KEY_COMMAND_PROCESSOR_TYPE] = v1.COMPLETED_MESSAGE_PROCESSOR,
  1454. [v1.KEY_PROCESSOR_FUNCTION] = ProcessMessage
  1455. };
  1456. Team:
  1457. -- Script GUID: {4409a751-df3d-4dab-bd72-207047880341}
  1458. -- Decompiled with the Synapse X Luau decompiler.
  1459.  
  1460. local u1 = { "/team ", "/t ", "% " };
  1461. function IsTeamCommand(p1)
  1462. local v1 = #u1;
  1463. local v2 = 1 - 1;
  1464. while true do
  1465. local v3 = u1[v2];
  1466. if string.sub(p1, 1, v3:len()):lower() == v3 then
  1467. return true;
  1468. end;
  1469. if 0 <= 1 then
  1470. if v2 < v1 then
  1471.  
  1472. else
  1473. break;
  1474. end;
  1475. elseif v1 < v2 then
  1476.  
  1477. else
  1478. break;
  1479. end;
  1480. v2 = v2 + 1;
  1481. end;
  1482. return false;
  1483. end;
  1484. local v4 = {};
  1485. v4.__index = v4;
  1486. local v5 = require(script.Parent:WaitForChild("Util"));
  1487. local v6 = {};
  1488. function v4.EnterTeamChat(p2)
  1489. p2.TeamChatEntered = true;
  1490. p2.MessageModeButton.Size = UDim2.new(0, 1000, 1, 0);
  1491. p2.MessageModeButton.Text = "[Team]";
  1492. p2.MessageModeButton.TextColor3 = p2:GetTeamChatColor();
  1493. local l__X__7 = p2.MessageModeButton.TextBounds.X;
  1494. p2.MessageModeButton.Size = UDim2.new(0, l__X__7, 1, 0);
  1495. p2.TextBox.Size = UDim2.new(1, -l__X__7, 1, 0);
  1496. p2.TextBox.Position = UDim2.new(0, l__X__7, 0, 0);
  1497. p2.OriginalTeamText = p2.TextBox.Text;
  1498. p2.TextBox.Text = " ";
  1499. end;
  1500. function v4.TextUpdated(p3)
  1501. local v8 = nil;
  1502. v8 = p3.TextBox.Text;
  1503. if not p3.TeamChatEntered then
  1504. if not IsTeamCommand(v8) then
  1505. return;
  1506. end;
  1507. else
  1508. if v8 == "" then
  1509. p3.MessageModeButton.Text = "";
  1510. p3.MessageModeButton.Size = UDim2.new(0, 0, 0, 0);
  1511. p3.TextBox.Size = UDim2.new(1, 0, 1, 0);
  1512. p3.TextBox.Position = UDim2.new(0, 0, 0, 0);
  1513. p3.TextBox.Text = "";
  1514. p3.TeamChatEntered = false;
  1515. p3.ChatBar:ResetCustomState();
  1516. p3.ChatBar:CaptureFocus();
  1517. end;
  1518. return;
  1519. end;
  1520. p3:EnterTeamChat();
  1521. end;
  1522. function v4.GetMessage(p4)
  1523. if not p4.TeamChatEntered then
  1524. return p4.TextBox.Text;
  1525. end;
  1526. return "/t " .. p4.TextBox.Text;
  1527. end;
  1528. function v4.ProcessCompletedMessage(p5)
  1529. return false;
  1530. end;
  1531. function v4.Destroy(p6)
  1532. p6.MessageModeConnection:disconnect();
  1533. p6.Destroyed = true;
  1534. end;
  1535. local l__Players__2 = game:GetService("Players");
  1536. function v4.GetTeamChatColor(p7)
  1537. local l__LocalPlayer__9 = l__Players__2.LocalPlayer;
  1538. if l__LocalPlayer__9.Team then
  1539. return l__LocalPlayer__9.Team.TeamColor.Color;
  1540. end;
  1541. if not p7.ChatSettings.DefaultChannelNameColor then
  1542. return Color3.fromRGB(35, 76, 142);
  1543. end;
  1544. return p7.ChatSettings.DefaultChannelNameColor;
  1545. end;
  1546. function v6.new(p8, p9, p10)
  1547. local v10 = setmetatable({}, v4);
  1548. v10.Destroyed = false;
  1549. v10.ChatWindow = p8;
  1550. v10.ChatBar = p9;
  1551. v10.ChatSettings = p10;
  1552. v10.TextBox = p9:GetTextBox();
  1553. v10.MessageModeButton = p9:GetMessageModeTextButton();
  1554. v10.OriginalTeamText = "";
  1555. v10.TeamChatEntered = false;
  1556. v10.MessageModeConnection = v10.MessageModeButton.MouseButton1Click:connect(function()
  1557. local v11 = v10.TextBox.Text;
  1558. if string.sub(v11, 1, 1) == " " then
  1559. v11 = string.sub(v11, 2);
  1560. end;
  1561. v10.ChatBar:ResetCustomState();
  1562. v10.ChatBar:SetTextBoxText(v11);
  1563. v10.ChatBar:CaptureFocus();
  1564. end);
  1565. v10:EnterTeamChat();
  1566. return v10;
  1567. end;
  1568. function ProcessMessage(p11, p12, p13, p14)
  1569. if p13.TargetChannel == "Team" then
  1570. return;
  1571. end;
  1572. if IsTeamCommand(p11) then
  1573.  
  1574. else
  1575. return nil;
  1576. end;
  1577. return v6.new(p12, p13, p14);
  1578. end;
  1579. return {
  1580. [v5.KEY_COMMAND_PROCESSOR_TYPE] = v5.IN_PROGRESS_MESSAGE_PROCESSOR,
  1581. [v5.KEY_PROCESSOR_FUNCTION] = ProcessMessage
  1582. };
  1583. SwitchChannel:
  1584. -- Script GUID: {3e429d81-eda8-436f-93bb-f69b618dfabd}
  1585. -- Decompiled with the Synapse X Luau decompiler.
  1586.  
  1587. local v1 = require(script.Parent:WaitForChild("Util"));
  1588. local u1 = nil;
  1589. pcall(function()
  1590. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  1591. end);
  1592. if u1 == nil then
  1593. u1 = {
  1594. Get = function(p1, p2, p3)
  1595. return p3;
  1596. end
  1597. };
  1598. end;
  1599. function ProcessMessage(p4, p5, p6)
  1600. if string.sub(p4, 1, 3):lower() ~= "/c " then
  1601. return false;
  1602. end;
  1603. local v2 = string.sub(p4, 4);
  1604. local v3 = p5:GetChannel(v2);
  1605. if v3 then
  1606. p5:SwitchCurrentChannel(v2);
  1607. if not p6.ShowChannelsBar then
  1608. if p5:GetCurrentChannel() then
  1609. v1:SendSystemMessageToSelf(string.gsub(u1:Get("GameChat_SwitchChannel_NowInChannel", string.format("You are now chatting in channel: '%s'", v2), {
  1610. RBX_NAME = v2
  1611. }), "{RBX_NAME}", v2), v3, {});
  1612. end;
  1613. end;
  1614. else
  1615. local v4 = p5:GetCurrentChannel();
  1616. if v4 then
  1617. v1:SendSystemMessageToSelf(string.gsub(u1:Get("GameChat_SwitchChannel_NotInChannel", string.format("You are not in channel: '%s'", v2), {
  1618. RBX_NAME = v2
  1619. }), "{RBX_NAME}", v2), v4, {
  1620. ChatColor = Color3.fromRGB(245, 50, 50)
  1621. });
  1622. end;
  1623. end;
  1624. return true;
  1625. end;
  1626. return {
  1627. [v1.KEY_COMMAND_PROCESSOR_TYPE] = v1.COMPLETED_MESSAGE_PROCESSOR,
  1628. [v1.KEY_PROCESSOR_FUNCTION] = ProcessMessage
  1629. };
Advertisement
Add Comment
Please, Sign In to add comment