686

Untitled

686
Nov 7th, 2021
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.35 KB | None | 0 0
  1. ChatFloodDetector:
  2. -- Script GUID: {96d8105a-1e16-44a8-9798-797a494a2891}
  3. -- Decompiled with the Synapse X Luau decompiler.
  4.  
  5. local v1 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatConstants"));
  6. local u1 = nil;
  7. pcall(function()
  8. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  9. end);
  10. if u1 == nil then
  11. u1 = {};
  12. end;
  13. if not u1.FormatMessageToSend or not u1.LocalizeFormattedMessage then
  14. function u1.FormatMessageToSend(p1, p2, p3)
  15. return p3;
  16. end;
  17. end;
  18. local u2 = {};
  19. local u3 = {};
  20. local function u4(p4)
  21. table.insert(p4, tick() + 15);
  22. end;
  23. return function(p5)
  24. p5:RegisterProcessCommandsFunction("flood_detection", function(p6, p7, p8)
  25. if u2[p6] then
  26. return false;
  27. end;
  28. local v2 = p5:GetSpeaker(p6);
  29. if not v2 then
  30. return false;
  31. end;
  32. if not v2:GetPlayer() then
  33. return false;
  34. end;
  35. if not u3[p6] then
  36. u3[p6] = {};
  37. end;
  38. if not u3[p6][p8] then
  39. u3[p6][p8] = {};
  40. end;
  41. local v3 = u3[p6][p8];
  42. local v4 = tick();
  43. while #v3 > 0 and v3[1] < v4 do
  44. table.remove(v3, 1);
  45. end;
  46. if #v3 < 7 then
  47. u4(v3);
  48. return false;
  49. end;
  50. local v5 = math.ceil(v3[1] - v4);
  51. if v5 > 1 then
  52. local v6 = "seconds";
  53. else
  54. v6 = "second";
  55. end;
  56. v2:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatFloodDetector_MessageDisplaySeconds", string.format("You must wait %d %s before sending another message!", v5, v6), "RBX_NUMBER", tostring(v5)), p8);
  57. return true;
  58. end, v1.LowPriority);
  59. p5.SpeakerRemoved:connect(function(p9)
  60. u3[p9] = nil;
  61. end);
  62. end;
  63. TeamChat:
  64. -- Script GUID: {fb4fac4f-1c47-4e6a-8aa7-ea22b4c54cd8}
  65. -- Decompiled with the Synapse X Luau decompiler.
  66.  
  67. local l__ClientChatModules__1 = game:GetService("Chat"):WaitForChild("ClientChatModules");
  68. local v2 = require(l__ClientChatModules__1:WaitForChild("ChatSettings"));
  69. local v3 = require(l__ClientChatModules__1:WaitForChild("ChatConstants"));
  70. local u1 = nil;
  71. pcall(function()
  72. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  73. end);
  74. if u1 == nil then
  75. u1 = {};
  76. end;
  77. if not u1.FormatMessageToSend or not u1.LocalizeFormattedMessage then
  78. function u1.FormatMessageToSend(p1, p2, p3)
  79. return p3;
  80. end;
  81. end;
  82. local u2 = {
  83. ChatColor = v2.ErrorMessageTextColor or Color3.fromRGB(245, 50, 50)
  84. };
  85. return function(p4)
  86. local l__Players__4 = game:GetService("Players");
  87. local v5 = p4:AddChannel("Team");
  88. v5.WelcomeMessage = u1:FormatMessageToSend("GameChat_TeamChat_WelcomeMessage", "This is a private channel between you and your team members.");
  89. v5.Joinable = false;
  90. v5.Leavable = false;
  91. v5.AutoJoin = false;
  92. v5.Private = true;
  93. v5:RegisterProcessCommandsFunction("replication_function", function(p5, p6, p7)
  94. local v6 = p4:GetSpeaker(p5);
  95. local v7 = p4:GetChannel(p7);
  96. if v6 and v7 then
  97. local v8 = v6:GetPlayer();
  98. if v8 then
  99. for v9, v10 in pairs(v7:GetSpeakerList()) do
  100. local v11 = p4:GetSpeaker(v10);
  101. if v11 then
  102. local v12 = v11:GetPlayer();
  103. if v12 and v8.Team == v12.Team then
  104. v11:SendMessage(p6, p7, p5, {
  105. NameColor = v8.TeamColor.Color,
  106. ChatColor = v8.TeamColor.Color,
  107. ChannelColor = v8.TeamColor.Color
  108. });
  109. end;
  110. end;
  111. end;
  112. end;
  113. end;
  114. return true;
  115. end, v3.LowPriority);
  116. local function u3(p8, p9, p10)
  117. if p9 == nil then
  118. p9 = "";
  119. end;
  120. local v13 = p4:GetSpeaker(p8);
  121. if v13 then
  122. local v14 = v13:GetPlayer();
  123. if v14 then
  124. if v14.Team == nil then
  125. v13:SendSystemMessage(u1:FormatMessageToSend("GameChat_TeamChat_CannotTeamChatIfNotInTeam", "You cannot team chat if you are not on a team!"), p10, u2);
  126. return;
  127. end;
  128. local v15 = p4:GetChannel("Team");
  129. if v15 then
  130. if not v13:IsInChannel(v15.Name) then
  131. v13:JoinChannel(v15.Name);
  132. end;
  133. if p9 and string.len(p9) > 0 then
  134. v13:SayMessage(p9, v15.Name);
  135. end;
  136. v13:SetMainChannel(v15.Name);
  137. end;
  138. end;
  139. end;
  140. end;
  141. p4:RegisterProcessCommandsFunction("team_commands", function(p11, p12, p13)
  142. local v16 = false;
  143. if p12 == nil then
  144. error("Message is nil");
  145. end;
  146. if p13 == "Team" then
  147. return false;
  148. end;
  149. if string.sub(p12, 1, 6):lower() == "/team " or p12:lower() == "/team" then
  150. u3(p11, string.sub(p12, 7), p13);
  151. return true;
  152. end;
  153. if string.sub(p12, 1, 3):lower() == "/t " or p12:lower() == "/t" then
  154. u3(p11, string.sub(p12, 4), p13);
  155. return true;
  156. end;
  157. if string.sub(p12, 1, 2):lower() == "% " or p12:lower() == "%" then
  158. u3(p11, string.sub(p12, 3), p13);
  159. v16 = true;
  160. end;
  161. return v16;
  162. end, v3.StandardPriority);
  163. local function u4()
  164. if not v2.DefaultChannelNameColor then
  165. return Color3.fromRGB(35, 76, 142);
  166. end;
  167. return v2.DefaultChannelNameColor;
  168. end;
  169. local function u5(p14, p15)
  170. if p15.Neutral or p15.Team == nil then
  171. p14:UpdateChannelNameColor(v5.Name, u4());
  172. if p14:IsInChannel(v5.Name) then
  173. p14:LeaveChannel(v5.Name);
  174. return;
  175. end;
  176. elseif not p15.Neutral and p15.Team then
  177. p14:UpdateChannelNameColor(v5.Name, p15.Team.TeamColor.Color);
  178. if not p14:IsInChannel(v5.Name) then
  179. p14:JoinChannel(v5.Name);
  180. end;
  181. end;
  182. end;
  183. p4.SpeakerAdded:connect(function(p16)
  184. local v17 = p4:GetSpeaker(p16);
  185. if v17 then
  186. local v18 = v17:GetPlayer();
  187. if v18 then
  188. u5(v17, v18);
  189. end;
  190. end;
  191. end);
  192. local u6 = {};
  193. l__Players__4.PlayerAdded:connect(function(p17)
  194. u6[p17] = p17.Changed:connect(function(p18)
  195. local v19 = p4:GetSpeaker(p17.Name);
  196. if v19 then
  197. if p18 == "Neutral" then
  198. u5(v19, p17);
  199. return;
  200. end;
  201. if p18 == "Team" then
  202. u5(v19, p17);
  203. if v19:IsInChannel(v5.Name) then
  204. v19:SendSystemMessage(u1:FormatMessageToSend("GameChat_TeamChat_NowInTeam", string.format("You are now on the '%s' team.", p17.Team.Name), "RBX_NAME", p17.Team.Name), v5.Name);
  205. end;
  206. end;
  207. end;
  208. end);
  209. end);
  210. l__Players__4.PlayerRemoving:connect(function(p19)
  211. local v20 = u6[p19];
  212. if v20 then
  213. v20:Disconnect();
  214. end;
  215. u6[p19] = nil;
  216. end);
  217. end;
  218. ChatMessageValidator:
  219. -- Script GUID: {a395cd73-05c3-4577-99a3-a0f2a076a79d}
  220. -- Decompiled with the Synapse X Luau decompiler.
  221.  
  222. local l__Chat__1 = game:GetService("Chat");
  223. local l__RunService__2 = game:GetService("RunService");
  224. local l__ClientChatModules__3 = l__Chat__1:WaitForChild("ClientChatModules");
  225. local v4 = require(l__ClientChatModules__3:WaitForChild("ChatSettings"));
  226. local v5 = require(l__ClientChatModules__3:WaitForChild("ChatConstants"));
  227. local u1 = nil;
  228. pcall(function()
  229. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  230. end);
  231. if u1 == nil then
  232. u1 = {};
  233. end;
  234. if not u1.FormatMessageToSend or not u1.LocalizeFormattedMessage then
  235. function u1.FormatMessageToSend(p1, p2, p3)
  236. return p3;
  237. end;
  238. end;
  239. local v6, v7 = pcall(function()
  240. return UserSettings():IsUserFeatureEnabled("UserChatAddServerSideChecks");
  241. end);
  242. local v8, v9 = pcall(function()
  243. return UserSettings():IsUserFeatureEnabled("UserChatValidateFirst");
  244. end);
  245. local v10 = { "\n", "\r", "\t", "\011", "\012" };
  246. if v4.DisallowedWhiteSpace then
  247. v10 = v4.DisallowedWhiteSpace;
  248. end;
  249. local function u2(p4)
  250. if l__RunService__2:IsStudio() then
  251. return true;
  252. end;
  253. local v11, v12 = pcall(function()
  254. return l__Chat__1:CanUserChatAsync(p4.UserId);
  255. end);
  256. return v11 or v12;
  257. end;
  258. local u3 = v6 or v7;
  259. local function u4(p5)
  260. if v4.MaximumMessageLength * 6 < p5:len() then
  261. return false;
  262. end;
  263. if utf8.len(p5) == nil then
  264. return false;
  265. end;
  266. if v4.MaximumMessageLength < utf8.len(utf8.nfcnormalize(p5)) then
  267. return false;
  268. end;
  269. return true;
  270. end;
  271. local u5 = v8 or v9;
  272. return function(p6)
  273. local v13 = nil;
  274. v13 = function(p7, p8, p9)
  275. local v14 = p6:GetSpeaker(p7);
  276. local v15 = v14:GetPlayer();
  277. if not v14 then
  278. return false;
  279. end;
  280. if not v15 then
  281. return false;
  282. end;
  283. if not l__RunService__2:IsStudio() and v15.UserId < 1 then
  284. return true;
  285. end;
  286. if not u2(v15) then
  287. v14:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatMessageValidator_SettingsError", "Your chat settings prevent you from sending messages."), p9);
  288. return true;
  289. end;
  290. if u3 then
  291. if not u4(p8) then
  292. v14:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatMessageValidator_MaxLengthError", "Your message exceeds the maximum message length."), p9);
  293. return true;
  294. end;
  295. for v16, v17 in pairs(v10) do
  296. if p8:find(v17) then
  297. v14:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatMessageValidator_WhitespaceError", "Your message contains whitespace that is not allowed."), p9);
  298. return true;
  299. end;
  300. end;
  301. else
  302. if v4.MaximumMessageLength + 1 < p8:len() then
  303. v14:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatMessageValidator_MaxLengthError", "Your message exceeds the maximum message length."), p9);
  304. return true;
  305. end;
  306. for v18 = 1, #v10 do
  307. if string.find(p8, v10[v18]) then
  308. v14:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatMessageValidator_WhitespaceError", "Your message contains whitespace that is not allowed."), p9);
  309. return true;
  310. end;
  311. end;
  312. end;
  313. return false;
  314. end;
  315. if u5 then
  316. p6:RegisterProcessCommandsFunction("message_validation", v13, v5.VeryHighPriority);
  317. return;
  318. end;
  319. p6:RegisterProcessCommandsFunction("message_validation", v13, v4.LowPriority);
  320. end;
  321. ChatCommandsTeller:
  322. -- Script GUID: {62984baf-530f-49e9-9d78-e75b20340494}
  323. -- Decompiled with the Synapse X Luau decompiler.
  324.  
  325. local l__ClientChatModules__1 = game:GetService("Chat"):WaitForChild("ClientChatModules");
  326. local v2 = require(l__ClientChatModules__1:WaitForChild("ChatSettings"));
  327. local v3 = require(l__ClientChatModules__1:WaitForChild("ChatConstants"));
  328. local u1 = nil;
  329. pcall(function()
  330. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  331. end);
  332. if u1 == nil then
  333. u1 = {};
  334. end;
  335. if not u1.FormatMessageToSend or not u1.LocalizeFormattedMessage then
  336. function u1.FormatMessageToSend(p1, p2, p3)
  337. return p3;
  338. end;
  339. end;
  340. return function(p4)
  341. local function u2()
  342. if v2.ShowJoinAndLeaveHelpText == nil then
  343. return false;
  344. end;
  345. return v2.ShowJoinAndLeaveHelpText;
  346. end;
  347. p4:RegisterProcessCommandsFunction("chat_commands_inquiry", function(p5, p6, p7)
  348. if p6:lower() ~= "/?" and p6:lower() ~= "/help" then
  349. return false;
  350. end;
  351. local v4 = p4:GetSpeaker(p5);
  352. v4:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatCommandsTeller_Desc", "These are the basic chat commands."), p7);
  353. if v2.AllowMeCommand then
  354. v4:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatCommandsTeller_MeCommand", "/me <text> : roleplaying command for doing actions."), p7);
  355. end;
  356. v4:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatCommandsTeller_SwitchChannelCommand", "/c <channel> : switch channel menu tabs."), p7);
  357. if u2() then
  358. v4:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatCommandsTeller_JoinChannelCommand", "/join <channel> or /j <channel> : join channel."), p7);
  359. v4:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatCommandsTeller_LeaveChannelCommand", "/leave <channel> or /l <channel> : leave channel. (leaves current if none specified)"), p7);
  360. end;
  361. v4:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatCommandsTeller_WhisperCommand", "/whisper <speaker> or /w <speaker> : open private message channel with speaker."), p7);
  362. v4:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatCommandsTeller_MuteCommand", "/mute <speaker> : mute a speaker."), p7);
  363. v4:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatCommandsTeller_UnMuteCommand", "/unmute <speaker> : unmute a speaker."), p7);
  364. local v5 = v4:GetPlayer();
  365. if v5 and v5.Team then
  366. v4:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatCommandsTeller_TeamCommand", "/team <message> or /t <message> : send a team chat to players on your team."), p7);
  367. end;
  368. return true;
  369. end, v3.StandardPriority);
  370. if v2.GeneralChannelName then
  371. local v6 = p4:GetChannel(v2.GeneralChannelName);
  372. if v6 then
  373. v6.WelcomeMessage = u1:FormatMessageToSend("GameChat_ChatCommandsTeller_AllChannelWelcomeMessage", "Chat '/?' or '/help' for a list of chat commands.");
  374. end;
  375. end;
  376. end;
  377. FriendJoinNotifier:
  378. -- Script GUID: {83af296e-6626-4e60-a2e1-705a0a45ce55}
  379. -- Decompiled with the Synapse X Luau decompiler.
  380.  
  381. local l__Players__1 = game:GetService("Players");
  382. local l__FriendService__2 = game:GetService("FriendService");
  383. local l__ClientChatModules__3 = game:GetService("Chat"):WaitForChild("ClientChatModules");
  384. local v4 = require(l__ClientChatModules__3:WaitForChild("ChatSettings"));
  385. local v5 = require(l__ClientChatModules__3:WaitForChild("ChatConstants"));
  386. local u1 = nil;
  387. pcall(function()
  388. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  389. end);
  390. if u1 == nil then
  391. u1 = {};
  392. end;
  393. if not u1.FormatMessageToSend or not u1.LocalizeFormattedMessage then
  394. function u1.FormatMessageToSend(p1, p2, p3)
  395. return p3;
  396. end;
  397. end;
  398. local u2 = {
  399. ChatColor = Color3.fromRGB(255, 255, 255)
  400. };
  401. return function(p4)
  402. local function u3(p5, p6)
  403. local v6 = p4:GetSpeaker(p5.Name);
  404. if v6 then
  405. v6:SendSystemMessage(u1:FormatMessageToSend("GameChat_FriendChatNotifier_JoinMessage", string.format("Your friend %s has joined the game.", p6.Name), "RBX_NAME", p6.Name), "System", u2);
  406. end;
  407. end;
  408. if (function()
  409. if v4.ShowFriendJoinNotification == nil then
  410. return false;
  411. end;
  412. return v4.ShowFriendJoinNotification;
  413. end)() then
  414. local function u4(p7, p8)
  415. if p7 ~= p8 then
  416. coroutine.wrap(function()
  417. if p7:IsFriendsWith(p8.UserId) then
  418. u3(p7, p8);
  419. end;
  420. end)();
  421. end;
  422. end;
  423. l__Players__1.PlayerAdded:connect(function(p9)
  424. local v7 = l__Players__1:GetPlayers();
  425. for v8 = 1, #v7 do
  426. u4(v7[v8], p9);
  427. end;
  428. end);
  429. end;
  430. end;
  431. MeCommand:
  432. -- Script GUID: {488260a1-1165-4e46-9c3f-b0f96301527d}
  433. -- Decompiled with the Synapse X Luau decompiler.
  434.  
  435. local l__ClientChatModules__1 = game:GetService("Chat"):WaitForChild("ClientChatModules");
  436. local u1 = require(l__ClientChatModules__1:WaitForChild("ChatSettings"));
  437. local u2 = require(l__ClientChatModules__1:WaitForChild("ChatConstants"));
  438. return function(p1)
  439. if u1 and u1.AllowMeCommand then
  440. p1:RegisterFilterMessageFunction("me_command", function(p2, p3, p4)
  441. local l__Message__2 = p3.Message;
  442. if l__Message__2 and string.sub(l__Message__2, 1, 4):lower() == "/me " then
  443. p3.MessageType = u2.MessageTypeMeCommand;
  444. end;
  445. end);
  446. end;
  447. end;
  448. PrivateMessaging:
  449. -- Script GUID: {51d3b45f-6075-4504-a6d1-15d45b1b8729}
  450. -- Decompiled with the Synapse X Luau decompiler.
  451.  
  452. local l__Chat__1 = game:GetService("Chat");
  453. local l__RunService__2 = game:GetService("RunService");
  454. local l__Players__3 = game:GetService("Players");
  455. local l__ClientChatModules__4 = l__Chat__1:WaitForChild("ClientChatModules");
  456. local v5 = require(l__ClientChatModules__4:WaitForChild("ChatConstants"));
  457. local v6 = require(l__ClientChatModules__4:WaitForChild("ChatSettings"));
  458. local u1 = nil;
  459. pcall(function()
  460. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  461. end);
  462. if u1 == nil then
  463. u1 = {};
  464. end;
  465. if not u1.FormatMessageToSend or not u1.LocalizeFormattedMessage then
  466. function u1.FormatMessageToSend(p1, p2, p3)
  467. return p3;
  468. end;
  469. end;
  470. local function u2()
  471. if not v5.WhisperChannelPrefix then
  472. return "To ";
  473. end;
  474. return v5.WhisperChannelPrefix;
  475. end;
  476. local u3 = {
  477. ChatColor = v6.ErrorMessageTextColor or Color3.fromRGB(245, 50, 50)
  478. };
  479. local function u4(p4)
  480. return u2() .. p4;
  481. end;
  482. return function(p5)
  483. local function u5(p6, p7)
  484. local v7 = nil;
  485. if l__RunService__2:IsStudio() then
  486. return true;
  487. end;
  488. local v8 = p6:GetPlayer();
  489. v7 = p7:GetPlayer();
  490. if not v8 or not v7 then
  491. return false;
  492. end;
  493. local v9, v10 = pcall(function()
  494. return l__Chat__1:CanUsersChatAsync(v8.UserId, v7.UserId);
  495. end);
  496. return v9 or v10;
  497. end;
  498. local function u6(p8, p9, p10)
  499. local v11 = nil;
  500. local v12 = p5:GetSpeaker(p8);
  501. local v13 = p9;
  502. local v14 = nil;
  503. if string.sub(p9, 1, 1) == "\"" then
  504. local v15 = string.find(p9, "\"", 2);
  505. if v15 then
  506. v13 = string.sub(p9, 2, v15 - 1);
  507. v14 = string.sub(p9, v15 + 2);
  508. end;
  509. else
  510. local v16 = string.match(p9, "^[^%s]+");
  511. if v16 then
  512. v13 = v16;
  513. v14 = string.sub(p9, string.len(v13) + 2);
  514. end;
  515. end;
  516. if v6.WhisperByDisplayName then
  517. local v17 = false;
  518. local v18 = {};
  519. for v19, v20 in pairs((l__Players__3:GetPlayers())) do
  520. if v20.Name == v13 then
  521. v17 = true;
  522. break;
  523. end;
  524. if v20.DisplayName == v13 then
  525. table.insert(v18, v20.Name);
  526. end;
  527. end;
  528. if not v17 and #v18 > 1 then
  529. local v21 = "";
  530. local v22, v23, v24 = pairs(v18);
  531. while true do
  532. local v25 = nil;
  533. local v26 = nil;
  534. v26, v25 = v22(v23, v24);
  535. if not v26 then
  536. break;
  537. end;
  538. v24 = v26;
  539. if v26 ~= #v18 then
  540. v21 = v21 .. "@" .. v25 .. ", ";
  541. else
  542. v21 = v21 .. "@" .. v25;
  543. end;
  544. end;
  545. v12:SendSystemMessage(u1:FormatMessageToSend("InGame.Chat.Response.DisplayNameMultipleMatches", "Warning: The following users have this display name: "), p10, u3);
  546. v12:SendSystemMessage(v21, p10, u3);
  547. return;
  548. end;
  549. end;
  550. v11 = p5:GetSpeaker(v13);
  551. local v27 = p5:GetChannel(u4(v13));
  552. if not v27 or not v11 then
  553. v12:SendSystemMessage(u1:FormatMessageToSend("GameChat_MuteSpeaker_SpeakerDoesNotExist", string.format("Speaker '%s' does not exist.", tostring(v13)), "RBX_NAME", tostring(v13)), p10, u3);
  554. return;
  555. end;
  556. if not u5(v12, v11) then
  557. v12:SendSystemMessage(u1:FormatMessageToSend("GameChat_PrivateMessaging_CannotChat", "You are not able to chat with this player."), p10, u3);
  558. return;
  559. end;
  560. if v27.Name == u4(p8) then
  561. v12:SendSystemMessage(u1:FormatMessageToSend("GameChat_PrivateMessaging_CannotWhisperToSelf", "You cannot whisper to yourself."), p10, u3);
  562. return;
  563. end;
  564. if not v12:IsInChannel(v27.Name) then
  565. v12:JoinChannel(v27.Name);
  566. end;
  567. if v14 and string.len(v14) > 0 then
  568. v12:SayMessage(v14, v27.Name);
  569. end;
  570. v12:SetMainChannel(v27.Name);
  571. end;
  572. p5:RegisterProcessCommandsFunction("whisper_commands", function(p11, p12, p13)
  573. local v28 = false;
  574. if string.sub(p12, 1, 3):lower() == "/w " then
  575. u6(p11, string.sub(p12, 4), p13);
  576. return true;
  577. end;
  578. if string.sub(p12, 1, 9):lower() == "/whisper " then
  579. u6(p11, string.sub(p12, 10), p13);
  580. v28 = true;
  581. end;
  582. return v28;
  583. end, v5.StandardPriority);
  584. local function u7()
  585. if not v6.WhisperChannelNameColor then
  586. return Color3.fromRGB(102, 14, 102);
  587. end;
  588. return v6.WhisperChannelNameColor;
  589. end;
  590. local function u8(p14, p15, p16)
  591. local v29 = p5:GetSpeaker(p14);
  592. local l__ExtraData__30 = v29.ExtraData;
  593. v29:SendMessage(p15, p16, p14, l__ExtraData__30);
  594. local v31 = p5:GetSpeaker(string.sub(p16, 4));
  595. local v32 = u4(p14);
  596. if v31 then
  597. if not v31:IsInChannel(v32) then
  598. v31:JoinChannel(v32);
  599. end;
  600. v31:SendMessage(p15, v32, p14, l__ExtraData__30);
  601. end;
  602. return true;
  603. end;
  604. local function u9(p17, p18, p19)
  605. if v5.MessageTypeWhisper then
  606. p18.MessageType = v5.MessageTypeWhisper;
  607. end;
  608. end;
  609. p5.SpeakerAdded:connect(function(p20)
  610. local v33 = p5:GetSpeaker(p20);
  611. if v6.PlayerDisplayNamesEnabled and v33:GetPlayer() then
  612. local v34 = v33:GetNameForDisplay() .. "(@" .. p20 .. ")";
  613. else
  614. v34 = p20;
  615. end;
  616. local v35 = u4(p20);
  617. if p5:GetChannel(v35) then
  618. p5:RemoveChannel(v35);
  619. end;
  620. local v36 = p5:AddChannel(v35);
  621. v36.Joinable = false;
  622. v36.Leavable = true;
  623. v36.AutoJoin = false;
  624. v36.Private = true;
  625. v36.WelcomeMessage = u1:FormatMessageToSend("GameChat_PrivateMessaging_NowChattingWith", "You are now privately chatting with " .. v34 .. ".", "RBX_NAME", tostring(v34));
  626. v36.ChannelNameColor = u7();
  627. v36:RegisterProcessCommandsFunction("replication_function", u8, v5.LowPriority);
  628. v36:RegisterFilterMessageFunction("message_type_function", u9);
  629. end);
  630. p5.SpeakerRemoved:connect(function(p21)
  631. local v37 = u4(p21);
  632. if p5:GetChannel(v37) then
  633. p5:RemoveChannel(v37);
  634. end;
  635. end);
  636. end;
  637. MuteSpeaker:
  638. -- Script GUID: {56bdc4bb-34bc-4f69-973c-c7a51ae3e296}
  639. -- Decompiled with the Synapse X Luau decompiler.
  640.  
  641. local l__ClientChatModules__1 = game:GetService("Chat"):WaitForChild("ClientChatModules");
  642. local v2 = require(l__ClientChatModules__1:WaitForChild("ChatConstants"));
  643. local v3 = require(l__ClientChatModules__1:WaitForChild("ChatSettings"));
  644. local u1 = nil;
  645. pcall(function()
  646. u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
  647. end);
  648. if u1 == nil then
  649. u1 = {};
  650. end;
  651. if not u1.FormatMessageToSend or not u1.LocalizeFormattedMessage then
  652. function u1.FormatMessageToSend(p1, p2, p3)
  653. return p3;
  654. end;
  655. end;
  656. local u2 = {
  657. ChatColor = v3.ErrorMessageTextColor or Color3.fromRGB(245, 50, 50)
  658. };
  659. return function(p4)
  660. local function u3(p5)
  661. local v4 = nil;
  662. local v5 = nil;
  663. local v6 = p5;
  664. if string.sub(p5, 1, 1) == "\"" then
  665. v4 = string.find(p5, "\"", 2);
  666. if not v4 then
  667. v5 = v6;
  668. return v5;
  669. end;
  670. else
  671. local v7 = string.match(p5, "^[^%s]+");
  672. if v7 then
  673. v6 = v7;
  674. else
  675. v5 = v6;
  676. return v5;
  677. end;
  678. v5 = v6;
  679. return v5;
  680. end;
  681. return string.sub(p5, 2, v4 - 1);
  682. end;
  683. local function u4(p6, p7, p8)
  684. local v8 = u3(p7);
  685. local v9 = p4:GetSpeaker(p6);
  686. if v9 then
  687. local v10 = "";
  688. if v3.PlayerDisplayNamesEnabled then
  689. v10 = v9:GetNameForDisplay();
  690. end;
  691. if v8:lower() == p6:lower() or v3.PlayerDisplayNamesEnabled and v8:lower() == v10:lower() then
  692. v9:SendSystemMessage(u1:FormatMessageToSend("GameChat_DoMuteCommand_CannotMuteSelf", "You cannot mute yourself."), p8, u2);
  693. return;
  694. end;
  695. local v11 = v3.PlayerDisplayNamesEnabled and p4:GetSpeakerByUserOrDisplayName(v8) or p4:GetSpeaker(v8);
  696. if v11 then
  697. v9:AddMutedSpeaker(v11.Name);
  698. local v12 = v8;
  699. if v3.PlayerDisplayNamesEnabled then
  700. v12 = v11:GetNameForDisplay();
  701. end;
  702. v9:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatMain_SpeakerHasBeenMuted", string.format("Speaker '%s' has been muted.", v12), "RBX_NAME", v12), p8);
  703. return;
  704. else
  705. v9:SendSystemMessage(u1:FormatMessageToSend("GameChat_MuteSpeaker_SpeakerDoesNotExist", string.format("Speaker '%s' does not exist.", tostring(v8)), "RBX_NAME", tostring(v8)), p8, u2);
  706. end;
  707. end;
  708. end;
  709. local function u5(p9, p10, p11)
  710. local v13 = u3(p10);
  711. local v14 = p4:GetSpeaker(p9);
  712. if v14 then
  713. if v13:lower() == p9:lower() or v13:lower() == (v3.PlayerDisplayNamesEnabled and v14:GetNameForDisplay() or p9):lower() then
  714. v14:SendSystemMessage(u1:FormatMessageToSend("GameChat_DoMuteCommand_CannotMuteSelf", "You cannot mute yourself."), p11, u2);
  715. return;
  716. end;
  717. local v15 = v3.PlayerDisplayNamesEnabled and p4:GetSpeakerByUserOrDisplayName(v13) or p4:GetSpeaker(v13);
  718. if v15 then
  719. v14:RemoveMutedSpeaker(v15.Name);
  720. local v16 = v13;
  721. if v3.PlayerDisplayNamesEnabled then
  722. v16 = v15:GetNameForDisplay();
  723. end;
  724. v14:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatMain_SpeakerHasBeenUnMuted", string.format("Speaker '%s' has been unmuted.", v16), "RBX_NAME", v16), p11);
  725. return;
  726. else
  727. v14:SendSystemMessage(u1:FormatMessageToSend("GameChat_MuteSpeaker_SpeakerDoesNotExist", string.format("Speaker '%s' does not exist.", tostring(v13)), "RBX_NAME", tostring(v13)), p11, u2);
  728. end;
  729. end;
  730. end;
  731. p4:RegisterProcessCommandsFunction("mute_commands", function(p12, p13, p14)
  732. local v17 = false;
  733. if string.sub(p13, 1, 6):lower() == "/mute " then
  734. u4(p12, string.sub(p13, 7), p14);
  735. return true;
  736. end;
  737. if string.sub(p13, 1, 8):lower() == "/unmute " then
  738. u5(p12, string.sub(p13, 9), p14);
  739. v17 = true;
  740. end;
  741. return v17;
  742. end, v2.StandardPriority);
  743. end;
  744. ExtraDetalnitializer:
  745. -- Script GUID: {97d54f97-67fd-4dcb-b40a-815fd6c5256a}
  746. -- Decompiled with the Synapse X Luau decompiler.
  747.  
  748. local u1 = {
  749. Groups = { {
  750. GroupId = 2868472,
  751. Rank = 100,
  752. ChatColor = Color3.new(0.6862745098039216, 0.8666666666666667, 1)
  753. }, {
  754. GroupId = 1200769,
  755. ChatColor = Color3.new(1, 0.8431372549019608, 0)
  756. } },
  757. Players = { {} }
  758. };
  759. local function u2(p1, p2)
  760. local v1 = true;
  761. if type(p2) ~= "nil" then
  762. v1 = type(p2) == "number";
  763. end;
  764. assert(v1, "requiredRank must be a number or nil");
  765. return function(p3)
  766. if not p3 or not p3.UserId then
  767. return false;
  768. end;
  769. local l__UserId__2 = p3.UserId;
  770. local u3 = false;
  771. local v3, v4 = pcall(function()
  772. if not p2 then
  773. u3 = p3:IsInGroup(p1);
  774. return;
  775. end;
  776. u3 = p2 < p3:GetRankInGroup(p1);
  777. end);
  778. if not v3 and v4 then
  779. print("Error checking in group: " .. v4);
  780. end;
  781. return false;
  782. end;
  783. end;
  784. (function()
  785. if u1.Groups then
  786. for v5, v6 in pairs(u1.Groups) do
  787. v6.IsInGroup = u2(v6.GroupId, v6.Rank);
  788. end;
  789. end;
  790. end)();
  791. local l__Players__4 = game:GetService("Players");
  792. local function u5(p4)
  793. local v7 = nil;
  794. local v8 = nil;
  795. local v9 = nil;
  796. local v10 = nil;
  797. local v11 = nil;
  798. local v12 = nil;
  799. if u1.Players then
  800. local v13 = l__Players__4:FindFirstChild(p4);
  801. if v13 then
  802. for v14, v15 in pairs(u1.Players) do
  803. if v13.UserId == v15.UserId then
  804. return v15.ChatColor;
  805. end;
  806. end;
  807. end;
  808. end;
  809. if u1.Groups then
  810. local v16, v17, v18 = pairs(u1.Groups);
  811. while true do
  812. local v19 = nil;
  813. v19, v7 = v16(v17, v18);
  814. if not v19 then
  815. break;
  816. end;
  817. v18 = v19;
  818. if v7.IsInGroup(l__Players__4:FindFirstChild(p4)) then
  819. v8 = "ChatColor";
  820. v9 = v7;
  821. v10 = v8;
  822. v11 = v9[v10];
  823. v12 = v11;
  824. return v12;
  825. end;
  826. end;
  827. return;
  828. else
  829. return;
  830. end;
  831. v8 = "ChatColor";
  832. v9 = v7;
  833. v10 = v8;
  834. v11 = v9[v10];
  835. v12 = v11;
  836. return v12;
  837. end;
  838. return function(p5)
  839. local u6 = { Color3.new(0.9921568627450981, 0.1607843137254902, 0.2627450980392157), Color3.new(0.00392156862745098, 0.6352941176470588, 1), Color3.new(0.00784313725490196, 0.7215686274509804, 0.3411764705882353), BrickColor.new("Bright violet").Color, BrickColor.new("Bright orange").Color, BrickColor.new("Bright yellow").Color, BrickColor.new("Light reddish violet").Color, BrickColor.new("Brick yellow").Color };
  840. local function u7(p6)
  841. local v20 = nil;
  842. v20 = 0;
  843. for v21 = 1, #p6 do
  844. local v22 = string.byte(string.sub(p6, v21, v21));
  845. local v23 = #p6 - v21 + 1;
  846. if #p6 % 2 == 1 then
  847. v23 = v23 - 1;
  848. end;
  849. if v23 % 4 >= 2 then
  850. v22 = -v22;
  851. end;
  852. v20 = v20 + v22;
  853. end;
  854. return local v24;
  855. end;
  856. local function u8(p7)
  857. return u6[(u7(p7) + 0) % #u6 + 1];
  858. end;
  859. local function u9(p8)
  860. local v25 = p8:GetPlayer();
  861. if v25 and v25.Team ~= nil then
  862. return v25.TeamColor.Color;
  863. end;
  864. return u8(p8.Name);
  865. end;
  866. local function v26(p9)
  867. local v27 = p5:GetSpeaker(p9);
  868. if not v27:GetExtraData("NameColor") then
  869. v27:SetExtraData("NameColor", u9(v27));
  870. end;
  871. if not v27:GetExtraData("ChatColor") then
  872. local v28 = u5(p9);
  873. if v28 then
  874. v27:SetExtraData("ChatColor", v28);
  875. end;
  876. end;
  877. if not v27:GetExtraData("Tags") then
  878. v27:SetExtraData("Tags", {});
  879. end;
  880. end;
  881. p5.SpeakerAdded:connect(v26);
  882. for v29, v30 in pairs(p5:GetSpeakerList()) do
  883. v26(v30);
  884. end;
  885. local u10 = {};
  886. l__Players__4.PlayerAdded:connect(function(p10)
  887. u10[p10] = p10.Changed:connect(function(p11)
  888. local v31 = p5:GetSpeaker(p10.Name);
  889. if v31 and (p11 == "TeamColor" or p11 == "Neutral" or p11 == "Team") then
  890. v31:SetExtraData("NameColor", u9(v31));
  891. end;
  892. end);
  893. end);
  894. l__Players__4.PlayerRemoving:connect(function(p12)
  895. local v32 = u10[p12];
  896. if v32 then
  897. v32:Disconnect();
  898. end;
  899. u10[p12] = nil;
  900. end);
  901. end;
  902. DisplayNameHelpers:
  903. -- Script GUID:
  904. -- Decompiled with the Synapse X Luau decompiler.
  905.  
  906. local u1 = {
  907. ChattingToSelf = 1,
  908. NoMatches = 2,
  909. MultipleMatches = 3
  910. };
  911. local l__Players__2 = game:GetService("Players");
  912. local u3 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
  913. return {
  914. CommandErrorCodes = u1,
  915. getUserNameFromChattedName = function(p1, p2, p3)
  916. if p2 == p1 then
  917. return p2, u1.ChattingToSelf;
  918. end;
  919. local v1 = l__Players__2:GetPlayers();
  920. for v2, v3 in pairs(v1) do
  921. if string.lower(v3.Name) == string.lower(p1) then
  922. return v3.Name, nil;
  923. end;
  924. end;
  925. local v4 = 0;
  926. local v5 = nil;
  927. if u3.PlayerDisplayNamesEnabled then
  928. for v6, v7 in pairs(v1) do
  929. if v7.Name ~= p2 and string.lower(v7.DisplayName) == string.lower(p1) then
  930. v4 = v4 + 1;
  931. v5 = v7.Name;
  932. end;
  933. end;
  934. end;
  935. if v4 == 1 then
  936. return v5, nil;
  937. end;
  938. if v4 ~= 0 then
  939. if v4 >= 2 then
  940. return p1, u1.MultipleMatches;
  941. else
  942. return;
  943. end;
  944. end;
  945. if p3 == p1 then
  946. return p3, u1.ChattingToSelf;
  947. end;
  948. return p1, u1.NoMatches;
  949. end,
  950. getUsersWithDisplayNameString = function(p4, p5)
  951. local v8 = {};
  952. local v9 = "";
  953. for v10, v11 in pairs((l__Players__2:GetPlayers())) do
  954. if v11.Name ~= p5 and string.lower(v11.DisplayName) == string.lower(p4) then
  955. table.insert(v8, v11.Name);
  956. end;
  957. end;
  958. local v12, v13, v14 = pairs(v8);
  959. while true do
  960. local v15 = nil;
  961. local v16 = nil;
  962. v16, v15 = v12(v13, v14);
  963. if not v16 then
  964. break;
  965. end;
  966. v14 = v16;
  967. if v16 ~= #v8 then
  968. v9 = v9 .. "@" .. v15 .. ", ";
  969. else
  970. v9 = v9 .. "@" .. v15;
  971. end;
  972. end;
  973. return v9;
  974. end
  975. };
Advertisement
Add Comment
Please, Sign In to add comment