Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chat service:
- -- Script GUID: {0d165940-e1dc-4850-b877-33cb51d9bcb7}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local l__RunService__2 = game:GetService("RunService");
- local l__Chat__3 = game:GetService("Chat");
- local l__ClientChatModules__4 = l__Chat__3:WaitForChild("ClientChatModules");
- local l__Parent__5 = script.Parent;
- local l__ClientChatModules__6 = l__Chat__3:WaitForChild("ClientChatModules");
- local v7 = {
- ChatColor = require(l__ClientChatModules__6:WaitForChild("ChatSettings")).ErrorMessageTextColor or Color3.fromRGB(245, 50, 50)
- };
- local v8 = require(l__ClientChatModules__6:WaitForChild("ChatConstants"));
- local v9 = require(l__Parent__5:WaitForChild("ChatChannel"));
- local v10 = require(l__Parent__5:WaitForChild("Speaker"));
- local v11 = require(l__Parent__5:WaitForChild("Util"));
- local u1 = nil;
- pcall(function()
- u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
- end);
- u1 = u1 or {};
- if not u1.FormatMessageToSend or not u1.LocalizeFormattedMessage then
- function u1.FormatMessageToSend(p1, p2, p3)
- return p3;
- end;
- end;
- local v12 = {};
- v12.__index = v12;
- function v12.AddChannel(p4, p5, p6)
- if p4.ChatChannels[p5:lower()] then
- error(string.format("Channel %q alrady exists.", p5));
- end;
- local v13 = v9.new(p4, p5);
- p4.ChatChannels[p5:lower()] = v13;
- v13:RegisterProcessCommandsFunction("default_commands", function(p7, p8)
- if p8:lower() ~= "/leave" then
- return false;
- end;
- local v14 = p4:GetChannel(p5);
- local v15 = p4:GetSpeaker(p7);
- if v14 and v15 then
- if v14.Leavable then
- v15:LeaveChannel(p5);
- v15:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatService_YouHaveLeftChannel", string.format("You have left channel '%s'", p5), "RBX_NAME", p5), "System");
- else
- v15:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatService_CannotLeaveChannel", "You cannot leave this channel."), p5);
- end;
- end;
- return true;
- end, v8.HighPriority);
- local v16, v17 = pcall(function()
- p4.eChannelAdded:Fire(p5);
- end);
- if not v16 and v17 then
- print("Error addding channel: " .. v17);
- end;
- if p6 ~= nil then
- v13.AutoJoin = p6;
- if p6 then
- for v18, v19 in pairs(p4.Speakers) do
- v19:JoinChannel(p5);
- end;
- end;
- end;
- return v13;
- end;
- function v12.RemoveChannel(p9, p10)
- local v20 = nil;
- if p9.ChatChannels[p10:lower()] then
- local l__Name__21 = p9.ChatChannels[p10:lower()].Name;
- p9.ChatChannels[p10:lower()]:InternalDestroy();
- p9.ChatChannels[p10:lower()] = nil;
- local v22 = nil;
- v22, v20 = pcall(function()
- p9.eChannelRemoved:Fire(l__Name__21);
- end);
- if not (not v22) or not v20 then
- return;
- end;
- else
- warn(string.format("Channel %q does not exist.", p10));
- return;
- end;
- print("Error removing channel: " .. v20);
- end;
- function v12.GetChannel(p11, p12)
- return p11.ChatChannels[p12:lower()];
- end;
- function v12.AddSpeaker(p13, p14)
- if p13.Speakers[p14:lower()] then
- error("Speaker \"" .. p14 .. "\" already exists!");
- end;
- local v23 = v10.new(p13, p14);
- p13.Speakers[p14:lower()] = v23;
- local v24, v25 = pcall(function()
- p13.eSpeakerAdded:Fire(p14);
- end);
- if not v24 and v25 then
- print("Error adding speaker: " .. v25);
- end;
- return v23;
- end;
- function v12.InternalUnmuteSpeaker(p15, p16)
- for v26, v27 in pairs(p15.ChatChannels) do
- if v27:IsSpeakerMuted(p16) then
- v27:UnmuteSpeaker(p16);
- end;
- end;
- end;
- function v12.RemoveSpeaker(p17, p18)
- local v28 = nil;
- if p17.Speakers[p18:lower()] then
- local l__Name__29 = p17.Speakers[p18:lower()].Name;
- p17:InternalUnmuteSpeaker(l__Name__29);
- p17.Speakers[p18:lower()]:InternalDestroy();
- p17.Speakers[p18:lower()] = nil;
- local v30 = nil;
- v30, v28 = pcall(function()
- p17.eSpeakerRemoved:Fire(l__Name__29);
- end);
- if not (not v30) or not v28 then
- return;
- end;
- else
- warn("Speaker \"" .. p18 .. "\" does not exist!");
- return;
- end;
- print("Error removing speaker: " .. v28);
- end;
- function v12.GetSpeaker(p19, p20)
- return p19.Speakers[p20:lower()];
- end;
- function v12.GetSpeakerByUserOrDisplayName(p21, p22)
- local v31 = p21.Speakers[p22:lower()];
- if v31 then
- return v31;
- end;
- for v32, v33 in pairs(p21.Speakers) do
- local v34 = v33:GetPlayer();
- if v34 and v34.DisplayName:lower() == p22:lower() then
- return v33;
- end;
- end;
- end;
- function v12.GetChannelList(p23)
- local v35 = {};
- for v36, v37 in pairs(p23.ChatChannels) do
- if not v37.Private then
- table.insert(v35, v37.Name);
- end;
- end;
- return v35;
- end;
- function v12.GetAutoJoinChannelList(p24)
- local v38 = {};
- for v39, v40 in pairs(p24.ChatChannels) do
- if v40.AutoJoin then
- table.insert(v38, v40);
- end;
- end;
- return v38;
- end;
- function v12.GetSpeakerList(p25)
- local v41 = {};
- for v42, v43 in pairs(p25.Speakers) do
- table.insert(v41, v43.Name);
- end;
- return v41;
- end;
- function v12.SendGlobalSystemMessage(p26, p27)
- for v44, v45 in pairs(p26.Speakers) do
- v45:SendSystemMessage(p27, nil);
- end;
- end;
- function v12.RegisterFilterMessageFunction(p28, p29, p30, p31)
- if p28.FilterMessageFunctions:HasFunction(p29) then
- error(string.format("FilterMessageFunction '%s' already exists", p29));
- end;
- p28.FilterMessageFunctions:AddFunction(p29, p30, p31);
- end;
- function v12.FilterMessageFunctionExists(p32, p33)
- return p32.FilterMessageFunctions:HasFunction(p33);
- end;
- function v12.UnregisterFilterMessageFunction(p34, p35)
- if not p34.FilterMessageFunctions:HasFunction(p35) then
- error(string.format("FilterMessageFunction '%s' does not exists", p35));
- end;
- p34.FilterMessageFunctions:RemoveFunction(p35);
- end;
- function v12.RegisterProcessCommandsFunction(p36, p37, p38, p39)
- if p36.ProcessCommandsFunctions:HasFunction(p37) then
- error(string.format("ProcessCommandsFunction '%s' already exists", p37));
- end;
- p36.ProcessCommandsFunctions:AddFunction(p37, p38, p39);
- end;
- function v12.ProcessCommandsFunctionExists(p40, p41)
- return p40.ProcessCommandsFunctions:HasFunction(p41);
- end;
- function v12.UnregisterProcessCommandsFunction(p42, p43)
- if not p42.ProcessCommandsFunctions:HasFunction(p43) then
- error(string.format("ProcessCommandsFunction '%s' does not exist", p43));
- end;
- p42.ProcessCommandsFunctions:RemoveFunction(p43);
- end;
- local u2 = 0;
- local u3 = 0;
- local u4 = 0;
- function v12.InternalNotifyFilterIssue(p44)
- if tick() - u2 > 60 then
- u3 = 0;
- end;
- u3 = u3 + 1;
- u2 = tick();
- if u3 >= 3 and tick() - u4 > 60 then
- u4 = tick();
- local v46 = p44:GetChannel("System");
- if v46 then
- v46:SendSystemMessage(u1:FormatMessageToSend("GameChat_ChatService_ChatFilterIssues", "The chat filter is currently experiencing issues and messages may be slow to appear."), v7);
- end;
- end;
- end;
- local function u5(p45)
- return string.len((string.gsub(p45, " ", ""))) == 0;
- end;
- local u6 = { 0.05, 0.1, 0.2 };
- local u7 = {};
- function v12.InternalApplyRobloxFilter(p46, p47, p48, p49)
- if not l__RunService__2:IsServer() or not (not l__RunService__2:IsStudio()) then
- if not u7[p48] then
- u7[p48] = true;
- wait();
- end;
- return p48;
- end;
- local v47 = p46:GetSpeaker(p47);
- local v48 = p49 and p46:GetSpeaker(p49);
- if v47 == nil then
- return nil;
- end;
- local v49 = v47:GetPlayer();
- local v50 = v48 and v48:GetPlayer();
- if v49 == nil then
- return p48;
- end;
- if u5(p48) then
- return p48;
- end;
- local v51 = tick();
- local v52 = 0;
- while true do
- local v53 = nil;
- local v54 = nil;
- v54, v53 = pcall(function()
- if v50 then
- return l__Chat__3:FilterStringAsync(p48, v49, v50);
- end;
- return l__Chat__3:FilterStringForBroadcast(p48, v49);
- end);
- if v54 then
- return v53;
- end;
- warn("Error filtering message:", v53);
- v52 = v52 + 1;
- if v52 > 3 then
- break;
- end;
- if tick() - v51 > 60 then
- break;
- end;
- local v55 = u6[math.min(#u6, v52)];
- wait(v55 + (math.random() * 2 - 1) * v55);
- end;
- p46:InternalNotifyFilterIssue();
- return nil;
- end;
- function v12.InternalApplyRobloxFilterNewAPI(p50, p51, p52, p53)
- local v56 = nil;
- if not l__RunService__2:IsServer() or not (not l__RunService__2:IsStudio()) then
- wait();
- return true, false, p52;
- end;
- local v57 = p50:GetSpeaker(p51);
- if v57 == nil then
- return false, nil, nil;
- end;
- local v58 = v57:GetPlayer();
- if v58 == nil then
- return true, false, p52;
- end;
- if u5(p52) then
- return true, false, p52;
- end;
- local v59 = nil;
- v59, v56 = pcall(function()
- return game:GetService("TextService"):FilterStringAsync(p52, v58.UserId, p53);
- end);
- if v59 then
- return true, true, v56;
- end;
- warn("Error filtering message:", p52, v56);
- p50:InternalNotifyFilterIssue();
- return false, nil, nil;
- end;
- function v12.InternalDoMessageFilter(p54, p55, p56, p57)
- for v60, v61, v62 in p54.FilterMessageFunctions:GetIterator(), nil do
- local v63, v64 = pcall(function()
- v61(p55, p56, p57);
- end);
- if not v63 then
- warn(string.format("DoMessageFilter Function '%s' failed for reason: %s", v60, v64));
- end;
- end;
- end;
- function v12.InternalDoProcessCommands(p58, p59, p60, p61)
- local v65 = p58.ProcessCommandsFunctions:GetIterator();
- local v66 = nil;
- local v67 = nil;
- while true do
- local v68 = nil;
- local v69, v70, v71 = v65(v66, v67);
- if not v69 then
- break;
- end;
- v67 = v69;
- local v72 = nil;
- v72, v68 = pcall(function()
- local v73 = v70(p59, p60, p61);
- if type(v73) ~= "boolean" then
- error("Process command functions must return a bool");
- end;
- return v73;
- end);
- if not v72 then
- warn(string.format("DoProcessCommands Function '%s' failed for reason: %s", v69, v68));
- elseif v68 then
- return true;
- end;
- end;
- return false;
- end;
- function v12.InternalGetUniqueMessageId(p62)
- local l__MessageIdCounter__74 = p62.MessageIdCounter;
- p62.MessageIdCounter = l__MessageIdCounter__74 + 1;
- return l__MessageIdCounter__74;
- end;
- function v12.InternalAddSpeakerWithPlayerObject(p63, p64, p65, p66)
- if p63.Speakers[p64:lower()] then
- error("Speaker \"" .. p64 .. "\" already exists!");
- end;
- local v75 = v10.new(p63, p64);
- v75:InternalAssignPlayerObject(p65);
- p63.Speakers[p64:lower()] = v75;
- if p66 then
- local v76, v77 = pcall(function()
- p63.eSpeakerAdded:Fire(p64);
- end);
- if not v76 and v77 then
- print("Error adding speaker: " .. v77);
- end;
- end;
- return v75;
- end;
- function v12.InternalFireSpeakerAdded(p67, p68)
- local v78, v79 = pcall(function()
- p67.eSpeakerAdded:Fire(p68);
- end);
- if not v78 and v79 then
- print("Error firing speaker added: " .. v79);
- end;
- end;
- function v1.new()
- local v80 = setmetatable({}, v12);
- v80.MessageIdCounter = 0;
- v80.ChatChannels = {};
- v80.Speakers = {};
- v80.FilterMessageFunctions = v11:NewSortedFunctionContainer();
- v80.ProcessCommandsFunctions = v11:NewSortedFunctionContainer();
- v80.eChannelAdded = Instance.new("BindableEvent");
- v80.eChannelRemoved = Instance.new("BindableEvent");
- v80.eSpeakerAdded = Instance.new("BindableEvent");
- v80.eSpeakerRemoved = Instance.new("BindableEvent");
- v80.ChannelAdded = v80.eChannelAdded.Event;
- v80.ChannelRemoved = v80.eChannelRemoved.Event;
- v80.SpeakerAdded = v80.eSpeakerAdded.Event;
- v80.SpeakerRemoved = v80.eSpeakerRemoved.Event;
- v80.ChatServiceMajorVersion = 0;
- v80.ChatServiceMinorVersion = 5;
- return v80;
- end;
- return v1.new();
- Chat Channel:
- -- Script GUID: {42b41888-1bdd-47cb-9f12-c569ee186020}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1, v2 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserShouldMuteUnfilteredMessage");
- end);
- local v3 = {};
- local l__Chat__4 = game:GetService("Chat");
- local l__RunService__5 = game:GetService("RunService");
- local l__ClientChatModules__6 = l__Chat__4:WaitForChild("ClientChatModules");
- local v7 = require(l__ClientChatModules__6:WaitForChild("ChatSettings"));
- local v8 = require(l__ClientChatModules__6:WaitForChild("ChatConstants"));
- local v9 = require(script.Parent:WaitForChild("Util"));
- local u1 = nil;
- pcall(function()
- u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
- end);
- u1 = u1 or {};
- if not u1.FormatMessageToSend or not u1.LocalizeFormattedMessage then
- function u1.FormatMessageToSend(p1, p2, p3)
- return p3;
- end;
- end;
- local v10 = {};
- v10.__index = v10;
- function v10.SendSystemMessage(p4, p5, p6)
- local u2 = p4:InternalCreateMessageObject(p5, nil, true, p6);
- local v11, v12 = pcall(function()
- p4.eMessagePosted:Fire(u2);
- end);
- if not v11 and v12 then
- print("Error posting message: " .. v12);
- end;
- p4:InternalAddMessageToHistoryLog(u2);
- for v13, v14 in pairs(p4.Speakers) do
- v14:InternalSendSystemMessage(u2, p4.Name);
- end;
- return u2;
- end;
- function v10.SendSystemMessageToSpeaker(p7, p8, p9, p10)
- local v15 = p7.Speakers[p9];
- if v15 then
- v15:InternalSendSystemMessage(p7:InternalCreateMessageObject(p8, nil, true, p10), p7.Name);
- return;
- end;
- if l__RunService__5:IsStudio() then
- warn(string.format("Speaker '%s' is not in channel '%s' and cannot be sent a system message", p9, p7.Name));
- end;
- end;
- function v10.SendMessageObjToFilters(p11, p12, p13, p14)
- p13.Message = p12;
- p11:InternalDoMessageFilter(p14.Name, p13, p11.Name);
- p11.ChatService:InternalDoMessageFilter(p14.Name, p13, p11.Name);
- p13.Message = p13.Message;
- return p13.Message;
- end;
- function v10.CanCommunicateByUserId(p15, p16, p17)
- if l__RunService__5:IsStudio() then
- return true;
- end;
- if p16 == 0 or p17 == 0 then
- return true;
- end;
- local v16, v17 = pcall(function()
- return l__Chat__4:CanUsersChatAsync(p16, p17);
- end);
- return v16 or v17;
- end;
- function v10.CanCommunicate(p18, p19, p20)
- local v18 = nil;
- local v19 = p19:GetPlayer();
- v18 = p20:GetPlayer();
- if not v19 or not v18 then
- return true;
- end;
- return p18:CanCommunicateByUserId(v19.UserId, v18.UserId);
- end;
- function v10.SendMessageToSpeaker(p21, p22, p23, p24, p25)
- local v20 = p21.Speakers[p23];
- local v21 = p21.ChatService:GetSpeaker(p24);
- if v20 and v21 then
- if v20:IsSpeakerMuted(p24) then
- return;
- end;
- if not p21:CanCommunicate(v20, v21) then
- return;
- end;
- local v22 = p21:InternalCreateMessageObject(p22, p24, p23 == p24, p25);
- p22 = p21:SendMessageObjToFilters(p22, v22, p24);
- v20:InternalSendMessage(v22, p21.Name);
- local v23, v24, v25 = p21.ChatService:InternalApplyRobloxFilterNewAPI(v22.FromSpeaker, p22, p21.Private and Enum.TextFilterContext.PrivateChat or Enum.TextFilterContext.PublicChat);
- if v23 then
- v22.FilterResult = v25;
- v22.IsFilterResult = v24;
- v22.IsFiltered = true;
- v20:InternalSendFilteredMessageWithFilterResult(v22, p21.Name);
- return;
- end;
- elseif l__RunService__5:IsStudio() then
- warn(string.format("Speaker '%s' is not in channel '%s' and cannot be sent a message", p23, p21.Name));
- end;
- end;
- function v10.KickSpeaker(p26, p27, p28)
- local v26 = nil;
- local v27 = p26.ChatService:GetSpeaker(p27);
- if not v27 then
- error("Speaker \"" .. p27 .. "\" does not exist!");
- end;
- v26 = v27:GetNameForDisplay();
- if p28 then
- local v28 = string.format("You were kicked from '%s' for the following reason(s): %s", p26.Name, p28);
- local v29 = string.format("%s was kicked for the following reason(s): %s", v26, p28);
- else
- v28 = string.format("You were kicked from '%s'", p26.Name);
- v29 = string.format("%s was kicked", v26);
- end;
- p26:SendSystemMessageToSpeaker(v28, p27);
- v27:LeaveChannel(p26.Name);
- p26:SendSystemMessage(v29);
- end;
- function v10.MuteSpeaker(p29, p30, p31, p32)
- local v30 = p29.ChatService:GetSpeaker(p30);
- if not v30 then
- error("Speaker \"" .. p30 .. "\" does not exist!");
- end;
- if p32 == 0 or p32 == nil then
- local v31 = 0;
- else
- v31 = os.time() + p32;
- end;
- p29.Mutes[p30:lower()] = v31;
- if p31 then
- p29:SendSystemMessage(string.format("%s was muted for the following reason(s): %s", v30:GetNameForDisplay(), p31));
- end;
- local v32, v33 = pcall(function()
- p29.eSpeakerMuted:Fire(p30, p31, p32);
- end);
- if not v32 and v33 then
- print("Error mutting speaker: " .. v33);
- end;
- local v34 = p29.ChatService:GetSpeaker(p30);
- if v34 then
- local v35, v36 = pcall(function()
- v34.eMuted:Fire(p29.Name, p31, p32);
- end);
- if not v35 and v36 then
- print("Error mutting speaker: " .. v36);
- end;
- end;
- end;
- function v10.UnmuteSpeaker(p33, p34)
- if not p33.ChatService:GetSpeaker(p34) then
- error("Speaker \"" .. p34 .. "\" does not exist!");
- end;
- p33.Mutes[p34:lower()] = nil;
- local v37, v38 = pcall(function()
- p33.eSpeakerUnmuted:Fire(p34);
- end);
- if not v37 and v38 then
- print("Error unmuting speaker: " .. v38);
- end;
- local v39 = p33.ChatService:GetSpeaker(p34);
- if v39 then
- local v40, v41 = pcall(function()
- v39.eUnmuted:Fire(p33.Name);
- end);
- if not v40 and v41 then
- print("Error unmuting speaker: " .. v41);
- end;
- end;
- end;
- function v10.IsSpeakerMuted(p35, p36)
- return p35.Mutes[p36:lower()] ~= nil;
- end;
- function v10.GetSpeakerList(p37)
- local v42 = {};
- for v43, v44 in pairs(p37.Speakers) do
- table.insert(v42, v44.Name);
- end;
- return v42;
- end;
- function v10.RegisterFilterMessageFunction(p38, p39, p40, p41)
- if p38.FilterMessageFunctions:HasFunction(p39) then
- error(string.format("FilterMessageFunction '%s' already exists", p39));
- end;
- p38.FilterMessageFunctions:AddFunction(p39, p40, p41);
- end;
- function v10.FilterMessageFunctionExists(p42, p43)
- return p42.FilterMessageFunctions:HasFunction(p43);
- end;
- function v10.UnregisterFilterMessageFunction(p44, p45)
- if not p44.FilterMessageFunctions:HasFunction(p45) then
- error(string.format("FilterMessageFunction '%s' does not exists", p45));
- end;
- p44.FilterMessageFunctions:RemoveFunction(p45);
- end;
- function v10.RegisterProcessCommandsFunction(p46, p47, p48, p49)
- if p46.ProcessCommandsFunctions:HasFunction(p47) then
- error(string.format("ProcessCommandsFunction '%s' already exists", p47));
- end;
- p46.ProcessCommandsFunctions:AddFunction(p47, p48, p49);
- end;
- function v10.ProcessCommandsFunctionExists(p50, p51)
- return p50.ProcessCommandsFunctions:HasFunction(p51);
- end;
- function v10.UnregisterProcessCommandsFunction(p52, p53)
- if not p52.ProcessCommandsFunctions:HasFunction(p53) then
- error(string.format("ProcessCommandsFunction '%s' does not exist", p53));
- end;
- p52.ProcessCommandsFunctions:RemoveFunction(p53);
- end;
- local function u3(p54)
- local v45 = {};
- for v46, v47 in pairs(p54) do
- v45[v46] = v47;
- end;
- return v45;
- end;
- function v10.GetHistoryLog(p55)
- return u3(p55.ChatHistory);
- end;
- function v10.GetHistoryLogForSpeaker(p56, p57)
- local v48 = -1;
- local v49 = p57:GetPlayer();
- if v49 then
- v48 = v49.UserId;
- end;
- local v50 = {};
- for v51 = 1, #p56.ChatHistory do
- if p56:CanCommunicateByUserId(v48, p56.ChatHistory[v51].SpeakerUserId) then
- local v52 = u3(p56.ChatHistory[v51]);
- if v52.MessageType == v8.MessageTypeDefault or v52.MessageType == v8.MessageTypeMeCommand then
- local v53 = nil;
- v53 = v52.FilterResult;
- if v52.IsFilterResult then
- if v49 then
- v52.Message = v53:GetChatForUserAsync(v49.UserId);
- else
- v52.Message = v53:GetNonChatStringForBroadcastAsync();
- end;
- else
- v52.Message = v53;
- end;
- end;
- table.insert(v50, v52);
- end;
- end;
- return v50;
- end;
- function v10.InternalDestroy(p58)
- for v54, v55 in pairs(p58.Speakers) do
- v55:LeaveChannel(p58.Name);
- end;
- p58.eDestroyed:Fire();
- p58.eDestroyed:Destroy();
- p58.eMessagePosted:Destroy();
- p58.eSpeakerJoined:Destroy();
- p58.eSpeakerLeft:Destroy();
- p58.eSpeakerMuted:Destroy();
- p58.eSpeakerUnmuted:Destroy();
- end;
- function v10.InternalDoMessageFilter(p59, p60, p61, p62)
- for v56, v57, v58 in p59.FilterMessageFunctions:GetIterator(), nil do
- local v59, v60 = pcall(function()
- v57(p60, p61, p62);
- end);
- if not v59 then
- warn(string.format("DoMessageFilter Function '%s' failed for reason: %s", v56, v60));
- end;
- end;
- end;
- function v10.InternalDoProcessCommands(p63, p64, p65, p66)
- local v61 = p63.ProcessCommandsFunctions:GetIterator();
- local v62 = nil;
- local v63 = nil;
- while true do
- local v64 = nil;
- local v65, v66, v67 = v61(v62, v63);
- if not v65 then
- break;
- end;
- v63 = v65;
- local v68 = nil;
- v68, v64 = pcall(function()
- local v69 = v66(p64, p65, p66);
- if type(v69) ~= "boolean" then
- error("Process command functions must return a bool");
- end;
- return v69;
- end);
- if not v68 then
- warn(string.format("DoProcessCommands Function '%s' failed for reason: %s", v65, v64));
- elseif v64 then
- return true;
- end;
- end;
- return false;
- end;
- local u4 = v1 or v2;
- function v10.InternalPostMessage(p67, p68, p69, p70)
- if p67:InternalDoProcessCommands(p68.Name, p69, p67.Name) then
- return false;
- end;
- if p67.Mutes[p68.Name:lower()] ~= nil then
- local v70 = p67.Mutes[p68.Name:lower()];
- if not (v70 > 0) or not (v70 < os.time()) then
- p67:SendSystemMessageToSpeaker(u1:FormatMessageToSend("GameChat_ChatChannel_MutedInChannel", "You are muted and cannot talk in this channel"), p68.Name);
- return false;
- end;
- p67:UnmuteSpeaker(p68.Name);
- end;
- local v71 = p67:InternalCreateMessageObject(p69, p68.Name, false, p70);
- v71.Message = p69;
- local u5 = nil;
- local u6 = v71;
- pcall(function()
- u5 = l__Chat__4:InvokeChatCallback(Enum.ChatCallbackType.OnServerReceivingMessage, u6);
- end);
- u6.Message = nil;
- if u5 then
- if u5.ShouldDeliver == false then
- return false;
- end;
- u6 = u5;
- end;
- p69 = p67:SendMessageObjToFilters(p69, u6, p68);
- local v72 = {};
- for v73, v74 in pairs(p67.Speakers) do
- if not v74:IsSpeakerMuted(p68.Name) and p67:CanCommunicate(p68, v74) then
- table.insert(v72, v74.Name);
- if v74.Name == p68.Name then
- local v75 = u3(u6);
- if u4 then
- v75.Message = string.rep("_", u6.MessageLength);
- else
- v75.Message = p69;
- end;
- v75.IsFiltered = true;
- v74:InternalSendMessage(v75, p67.Name);
- else
- v74:InternalSendMessage(u6, p67.Name);
- end;
- end;
- end;
- local v76, v77 = pcall(function()
- p67.eMessagePosted:Fire(u6);
- end);
- if not v76 and v77 then
- print("Error posting message: " .. v77);
- end;
- local v78, v79, v80 = p67.ChatService:InternalApplyRobloxFilterNewAPI(u6.FromSpeaker, p69, p67.Private and Enum.TextFilterContext.PrivateChat or Enum.TextFilterContext.PublicChat);
- if not v78 then
- return false;
- end;
- u6.FilterResult = v80;
- u6.IsFilterResult = v79;
- u6.IsFiltered = true;
- p67:InternalAddMessageToHistoryLog(u6);
- for v81, v82 in pairs(v72) do
- local v83 = p67.Speakers[v82];
- if v83 then
- v83:InternalSendFilteredMessageWithFilterResult(u6, p67.Name);
- end;
- end;
- local v84 = {};
- for v85, v86 in pairs(p67.Speakers) do
- if not v86:IsSpeakerMuted(p68.Name) and p67:CanCommunicate(p68, v86) then
- local v87 = false;
- for v88, v89 in pairs(v72) do
- if v86.Name == v89 then
- v87 = true;
- break;
- end;
- end;
- if not v87 then
- table.insert(v84, v86.Name);
- end;
- end;
- end;
- for v90, v91 in pairs(v84) do
- local v92 = p67.Speakers[v91];
- if v92 then
- v92:InternalSendFilteredMessageWithFilterResult(u6, p67.Name);
- end;
- end;
- return v71;
- end;
- function v10.InternalAddSpeaker(p71, p72)
- if p71.Speakers[p72.Name] then
- warn("Speaker \"" .. p72.name .. "\" is already in the channel!");
- return;
- end;
- p71.Speakers[p72.Name] = p72;
- local v93, v94 = pcall(function()
- p71.eSpeakerJoined:Fire(p72.Name);
- end);
- if not v93 and v94 then
- print("Error removing channel: " .. v94);
- end;
- end;
- function v10.InternalRemoveSpeaker(p73, p74)
- if not p73.Speakers[p74.Name] then
- warn("Speaker \"" .. p74.name .. "\" is not in the channel!");
- return;
- end;
- p73.Speakers[p74.Name] = nil;
- local v95, v96 = pcall(function()
- p73.eSpeakerLeft:Fire(p74.Name);
- end);
- if not v95 and v96 then
- print("Error removing speaker: " .. v96);
- end;
- end;
- function v10.InternalRemoveExcessMessagesFromLog(p75)
- local l__table_remove__97 = table.remove;
- while p75.MaxHistory < #p75.ChatHistory do
- l__table_remove__97(p75.ChatHistory, 1);
- end;
- end;
- function v10.InternalAddMessageToHistoryLog(p76, p77)
- table.insert(p76.ChatHistory, p77);
- p76:InternalRemoveExcessMessagesFromLog();
- end;
- function v10.GetMessageType(p78, p79, p80)
- if p80 == nil then
- return v8.MessageTypeSystem;
- end;
- return v8.MessageTypeDefault;
- end;
- function v10.InternalCreateMessageObject(p81, p82, p83, p84, p85)
- local v98 = -1;
- local v99 = nil;
- local v100 = nil;
- if p83 then
- v100 = p81.ChatService:GetSpeaker(p83);
- if v100 then
- local v101 = v100:GetPlayer();
- if v101 then
- v98 = v101.UserId;
- if v7.PlayerDisplayNamesEnabled then
- v99 = v100:GetNameForDisplay();
- end;
- else
- v98 = 0;
- end;
- end;
- end;
- local v102 = {
- ID = p81.ChatService:InternalGetUniqueMessageId(),
- FromSpeaker = p83,
- SpeakerDisplayName = v99,
- SpeakerUserId = v98,
- OriginalChannel = p81.Name,
- MessageLength = string.len(p82),
- MessageType = p81:GetMessageType(p82, p83),
- IsFiltered = p84,
- Message = p84 and p82 or nil,
- Time = os.time(),
- ExtraData = {}
- };
- if v100 then
- for v103, v104 in pairs(v100.ExtraData) do
- v102.ExtraData[v103] = v104;
- end;
- end;
- if p85 then
- for v105, v106 in pairs(p85) do
- v102.ExtraData[v105] = v106;
- end;
- end;
- return v102;
- end;
- function v10.SetChannelNameColor(p86, p87)
- p86.ChannelNameColor = p87;
- for v107, v108 in pairs(p86.Speakers) do
- v108:UpdateChannelNameColor(p86.Name, p87);
- end;
- end;
- function v10.GetWelcomeMessageForSpeaker(p88, p89)
- if p88.GetWelcomeMessageFunction then
- local v109 = p88.GetWelcomeMessageFunction(p89);
- if v109 then
- return v109;
- end;
- end;
- return p88.WelcomeMessage;
- end;
- function v10.RegisterGetWelcomeMessageFunction(p90, p91)
- if type(p91) ~= "function" then
- error("RegisterGetWelcomeMessageFunction must be called with a function.");
- end;
- p90.GetWelcomeMessageFunction = p91;
- end;
- function v10.UnRegisterGetWelcomeMessageFunction(p92)
- p92.GetWelcomeMessageFunction = nil;
- end;
- function v3.new(p93, p94, p95, p96)
- local v110 = setmetatable({}, v10);
- v110.ChatService = p93;
- v110.Name = p94;
- v110.WelcomeMessage = p95 and "";
- v110.GetWelcomeMessageFunction = nil;
- v110.ChannelNameColor = p96;
- v110.Joinable = true;
- v110.Leavable = true;
- v110.AutoJoin = false;
- v110.Private = false;
- v110.Speakers = {};
- v110.Mutes = {};
- v110.MaxHistory = 200;
- v110.HistoryIndex = 0;
- v110.ChatHistory = {};
- v110.FilterMessageFunctions = v9:NewSortedFunctionContainer();
- v110.ProcessCommandsFunctions = v9:NewSortedFunctionContainer();
- v110.eDestroyed = Instance.new("BindableEvent");
- v110.eMessagePosted = Instance.new("BindableEvent");
- v110.eSpeakerJoined = Instance.new("BindableEvent");
- v110.eSpeakerLeft = Instance.new("BindableEvent");
- v110.eSpeakerMuted = Instance.new("BindableEvent");
- v110.eSpeakerUnmuted = Instance.new("BindableEvent");
- v110.MessagePosted = v110.eMessagePosted.Event;
- v110.SpeakerJoined = v110.eSpeakerJoined.Event;
- v110.SpeakerLeft = v110.eSpeakerLeft.Event;
- v110.SpeakerMuted = v110.eSpeakerMuted.Event;
- v110.SpeakerUnmuted = v110.eSpeakerUnmuted.Event;
- v110.Destroyed = v110.eDestroyed.Event;
- return v110;
- end;
- return v3;
- Speaker:
- -- Script GUID: {3e1ba9f7-b5a9-446a-92c6-560d73b615b1}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local l__Parent__2 = script.Parent;
- local u1 = {};
- local u2 = {
- eDestroyed = true,
- eSaidMessage = true,
- eReceivedMessage = true,
- eReceivedUnfilteredMessage = true,
- eMessageDoneFiltering = true,
- eReceivedSystemMessage = true,
- eChannelJoined = true,
- eChannelLeft = true,
- eMuted = true,
- eUnmuted = true,
- eExtraDataUpdated = true,
- eMainChannelSet = true,
- eChannelNameColorUpdated = true
- };
- local u3 = {
- Destroyed = "eDestroyed",
- SaidMessage = "eSaidMessage",
- ReceivedMessage = "eReceivedMessage",
- ReceivedUnfilteredMessage = "eReceivedUnfilteredMessage",
- RecievedUnfilteredMessage = "eReceivedUnfilteredMessage",
- MessageDoneFiltering = "eMessageDoneFiltering",
- ReceivedSystemMessage = "eReceivedSystemMessage",
- ChannelJoined = "eChannelJoined",
- ChannelLeft = "eChannelLeft",
- Muted = "eMuted",
- Unmuted = "eUnmuted",
- ExtraDataUpdated = "eExtraDataUpdated",
- MainChannelSet = "eMainChannelSet",
- ChannelNameColorUpdated = "eChannelNameColorUpdated"
- };
- function u1.__index(p1, p2)
- local v3 = rawget(u1, p2);
- if v3 then
- return v3;
- end;
- if u2[p2] and not rawget(p1, p2) then
- rawset(p1, p2, Instance.new("BindableEvent"));
- end;
- local v4 = u3[p2];
- if v4 and not rawget(p1, p2) then
- if not rawget(p1, v4) then
- rawset(p1, v4, Instance.new("BindableEvent"));
- end;
- rawset(p1, p2, rawget(p1, v4).Event);
- end;
- return rawget(p1, p2);
- end;
- function u1.LazyFire(p3, p4, ...)
- local v5 = rawget(p3, p4);
- if v5 then
- v5:Fire(...);
- end;
- end;
- function u1.SayMessage(p5, p6, p7, p8)
- if p5.ChatService:InternalDoProcessCommands(p5.Name, p6, p7) then
- return;
- end;
- if not p7 then
- return;
- end;
- local v6 = p5.Channels[p7:lower()];
- if not v6 then
- return;
- end;
- local v7 = v6:InternalPostMessage(p5, p6, p8);
- if v7 then
- pcall(function()
- p5:LazyFire("eSaidMessage", v7, p7);
- end);
- end;
- return v7;
- end;
- function u1.JoinChannel(p9, p10)
- if p9.Channels[p10:lower()] then
- warn("Speaker is already in channel \"" .. p10 .. "\"");
- return;
- end;
- local v8 = p9.ChatService:GetChannel(p10);
- if not v8 then
- error("Channel \"" .. p10 .. "\" does not exist!");
- end;
- p9.Channels[p10:lower()] = v8;
- v8:InternalAddSpeaker(p9);
- local v9, v10 = pcall(function()
- p9.eChannelJoined:Fire(v8.Name, v8:GetWelcomeMessageForSpeaker(p9));
- end);
- if not v9 and v10 then
- print("Error joining channel: " .. v10);
- end;
- end;
- function u1.LeaveChannel(p11, p12)
- if not p11.Channels[p12:lower()] then
- warn("Speaker is not in channel \"" .. p12 .. "\"");
- return;
- end;
- local v11 = p11.Channels[p12:lower()];
- p11.Channels[p12:lower()] = nil;
- v11:InternalRemoveSpeaker(p11);
- local v12, v13 = pcall(function()
- p11:LazyFire("eChannelLeft", v11.Name);
- if p11.PlayerObj then
- p11.EventFolder.OnChannelLeft:FireClient(p11.PlayerObj, v11.Name);
- end;
- end);
- if not v12 and v13 then
- print("Error leaving channel: " .. v13);
- end;
- end;
- function u1.IsInChannel(p13, p14)
- return p13.Channels[p14:lower()] ~= nil;
- end;
- function u1.GetChannelList(p15)
- local v14 = {};
- for v15, v16 in pairs(p15.Channels) do
- table.insert(v14, v16.Name);
- end;
- return v14;
- end;
- function u1.SendMessage(p16, p17, p18, p19, p20)
- local v17 = p16.Channels[p18:lower()];
- if not v17 then
- warn(string.format("Speaker '%s' is not in channel '%s' and cannot receive a message in it.", p16.Name, p18));
- return;
- end;
- v17:SendMessageToSpeaker(p17, p16.Name, p19, p20);
- end;
- function u1.SendSystemMessage(p21, p22, p23, p24)
- local v18 = p21.Channels[p23:lower()];
- if not v18 then
- warn(string.format("Speaker '%s' is not in channel '%s' and cannot receive a system message in it.", p21.Name, p23));
- return;
- end;
- v18:SendSystemMessageToSpeaker(p22, p21.Name, p24);
- end;
- function u1.GetPlayer(p25)
- return p25.PlayerObj;
- end;
- local u4 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
- function u1.GetNameForDisplay(p26)
- if not u4.PlayerDisplayNamesEnabled then
- return p26.Name;
- end;
- local v19 = p26:GetPlayer();
- if v19 then
- return v19.DisplayName;
- end;
- return p26.Name;
- end;
- function u1.SetExtraData(p27, p28, p29)
- p27.ExtraData[p28] = p29;
- p27:LazyFire("eExtraDataUpdated", p28, p29);
- end;
- function u1.GetExtraData(p30, p31)
- return p30.ExtraData[p31];
- end;
- function u1.SetMainChannel(p32, p33)
- local v20, v21 = pcall(function()
- p32:LazyFire("eMainChannelSet", p33);
- if p32.PlayerObj then
- p32.EventFolder.OnMainChannelSet:FireClient(p32.PlayerObj, p33);
- end;
- end);
- if not v20 and v21 then
- print("Error setting main channel: " .. v21);
- end;
- end;
- function u1.AddMutedSpeaker(p34, p35)
- p34.MutedSpeakers[p35:lower()] = true;
- end;
- function u1.RemoveMutedSpeaker(p36, p37)
- p36.MutedSpeakers[p37:lower()] = false;
- end;
- function u1.IsSpeakerMuted(p38, p39)
- return p38.MutedSpeakers[p39:lower()];
- end;
- function u1.InternalDestroy(p40)
- for v22, v23 in pairs(p40.Channels) do
- v23:InternalRemoveSpeaker(p40);
- end;
- p40.eDestroyed:Fire();
- p40.EventFolder = nil;
- p40.eDestroyed:Destroy();
- p40.eSaidMessage:Destroy();
- p40.eReceivedMessage:Destroy();
- p40.eReceivedUnfilteredMessage:Destroy();
- p40.eMessageDoneFiltering:Destroy();
- p40.eReceivedSystemMessage:Destroy();
- p40.eChannelJoined:Destroy();
- p40.eChannelLeft:Destroy();
- p40.eMuted:Destroy();
- p40.eUnmuted:Destroy();
- p40.eExtraDataUpdated:Destroy();
- p40.eMainChannelSet:Destroy();
- p40.eChannelNameColorUpdated:Destroy();
- end;
- function u1.InternalAssignPlayerObject(p41, p42)
- p41.PlayerObj = p42;
- end;
- function u1.InternalAssignEventFolder(p43, p44)
- p43.EventFolder = p44;
- end;
- function u1.InternalSendMessage(p45, p46, p47)
- local v24, v25 = pcall(function()
- p45:LazyFire("eReceivedUnfilteredMessage", p46, p47);
- if p45.PlayerObj then
- p45.EventFolder.OnNewMessage:FireClient(p45.PlayerObj, p46, p47);
- end;
- end);
- if not v24 and v25 then
- print("Error sending internal message: " .. v25);
- end;
- end;
- function u1.InternalSendFilteredMessage(p48, p49, p50)
- local v26, v27 = pcall(function()
- p48:LazyFire("eReceivedMessage", p49, p50);
- p48:LazyFire("eMessageDoneFiltering", p49, p50);
- if p48.PlayerObj then
- p48.EventFolder.OnMessageDoneFiltering:FireClient(p48.PlayerObj, p49, p50);
- end;
- end);
- if not v26 and v27 then
- print("Error sending internal filtered message: " .. v27);
- end;
- end;
- local function u5(p51)
- local v28 = {};
- for v29, v30 in pairs(p51) do
- v28[v29] = v30;
- end;
- return v28;
- end;
- function u1.InternalSendFilteredMessageWithFilterResult(p52, p53, p54)
- local v31 = u5(p53);
- local u6 = p52:GetPlayer();
- local u7 = "";
- local l__FilterResult__8 = v31.FilterResult;
- pcall(function()
- if not v31.IsFilterResult then
- u7 = l__FilterResult__8;
- return;
- end;
- if not u6 then
- u7 = l__FilterResult__8:GetNonChatStringForBroadcastAsync();
- return;
- end;
- u7 = l__FilterResult__8:GetChatForUserAsync(u6.UserId);
- end);
- if #u7 > 0 then
- v31.Message = u7;
- v31.FilterResult = nil;
- p52:InternalSendFilteredMessage(v31, p54);
- end;
- end;
- function u1.InternalSendSystemMessage(p55, p56, p57)
- local v32, v33 = pcall(function()
- p55:LazyFire("eReceivedSystemMessage", p56, p57);
- if p55.PlayerObj then
- p55.EventFolder.OnNewSystemMessage:FireClient(p55.PlayerObj, p56, p57);
- end;
- end);
- if not v32 and v33 then
- print("Error sending internal system message: " .. v33);
- end;
- end;
- function u1.UpdateChannelNameColor(p58, p59, p60)
- p58:LazyFire("eChannelNameColorUpdated", p59, p60);
- if p58.PlayerObj then
- p58.EventFolder.ChannelNameColorUpdated:FireClient(p58.PlayerObj, p59, p60);
- end;
- end;
- function v1.new(p61, p62)
- local v34 = setmetatable({}, u1);
- v34.ChatService = p61;
- v34.PlayerObj = nil;
- v34.Name = p62;
- v34.ExtraData = {};
- v34.Channels = {};
- v34.MutedSpeakers = {};
- v34.EventFolder = nil;
- return v34;
- end;
- return v1;
- Util:
- -- Script GUID: {9ff55bc2-4bc2-4be9-8513-cf743e7bb0af}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatConstants")).StandardPriority;
- if v1 == nil then
- v1 = 10;
- end;
- local v2 = {};
- v2.__index = v2;
- local v3 = {};
- local v4 = {};
- v4.__index = v4;
- function v4.RebuildProcessCommandsPriorities(p1)
- p1.RegisteredPriorites = {};
- local v5, v6, v7 = pairs(p1.FunctionMap);
- while true do
- local v8, v9 = v5(v6, v7);
- if not v8 then
- break;
- end;
- local v10 = true;
- local v11, v12, v13 = pairs(v9);
- local v14, v15 = v11(v12, v13);
- if v14 then
- v10 = false;
- end;
- if not v10 then
- table.insert(p1.RegisteredPriorites, v8);
- end;
- end;
- table.sort(p1.RegisteredPriorites, function(p2, p3)
- return p3 < p2;
- end);
- end;
- function v4.HasFunction(p4, p5)
- if p4.RegisteredFunctions[p5] == nil then
- return false;
- end;
- return true;
- end;
- function v4.RemoveFunction(p6, p7)
- p6.RegisteredFunctions[p7] = nil;
- p6.FunctionMap[p6.RegisteredFunctions[p7]][p7] = nil;
- p6:RebuildProcessCommandsPriorities();
- end;
- function v4.AddFunction(p8, p9, p10, p11)
- if p11 == nil then
- p11 = v1;
- end;
- if p8.RegisteredFunctions[p9] then
- error(p9 .. " is already in use!");
- end;
- p8.RegisteredFunctions[p9] = p11;
- if p8.FunctionMap[p11] == nil then
- p8.FunctionMap[p11] = {};
- end;
- p8.FunctionMap[p11][p9] = p10;
- p8:RebuildProcessCommandsPriorities();
- end;
- function v4.GetIterator(p12)
- local u1 = 1;
- local u2 = nil;
- local u3 = nil;
- return function()
- local v16 = nil;
- while true do
- if #p12.RegisteredPriorites < u1 then
- return;
- end;
- v16 = p12.RegisteredPriorites[u1];
- local v17, v18 = next(p12.FunctionMap[v16], u2);
- u2 = v17;
- u3 = v18;
- if u2 ~= nil then
- break;
- end;
- u1 = u1 + 1;
- end;
- return u2, u3, v16;
- end;
- end;
- local u4 = v4;
- function v3.new()
- local v19 = setmetatable({}, u4);
- v19.RegisteredFunctions = {};
- v19.RegisteredPriorites = {};
- v19.FunctionMap = {};
- return v19;
- end;
- u4 = function(p13)
- return v3.new();
- end;
- v2.NewSortedFunctionContainer = u4;
- return v2;
- Bubble Chat:
- -- Script GUID: {14113adf-d54c-423f-8636-d12299bc895d}
- -- Decompiled with the Synapse X Luau decompiler.
- local l__Players__1 = game:GetService("Players");
- local l__ReplicatedStorage__2 = game:GetService("ReplicatedStorage");
- local l__Chat__3 = game:GetService("Chat");
- local l__TextService__4 = game:GetService("TextService");
- local v5 = l__Players__1.LocalPlayer;
- while v5 == nil do
- l__Players__1.ChildAdded:wait();
- v5 = l__Players__1.LocalPlayer;
- end;
- local l__PlayerGui__6 = v5:WaitForChild("PlayerGui");
- local v7, v8 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserShouldLocalizeGameChatBubble");
- end);
- local v9, v10 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserChatNewMessageLengthCheck2");
- end);
- local v11 = v9 or v10;
- local function v12(p1)
- return utf8.len(utf8.nfcnormalize(p1));
- end;
- if v11 then
- local v13 = 128 - v12("...") - 1;
- else
- v13 = 128 - string.len("...") - 1;
- end;
- local v14 = Instance.new("ScreenGui");
- v14.Name = "BubbleChat";
- v14.ResetOnSpawn = false;
- v14.Parent = l__PlayerGui__6;
- local function u1()
- local v15 = {
- data = {}
- };
- local v16 = Instance.new("BindableEvent");
- v15.Emptied = v16.Event;
- function v15.Size(p2)
- return #v15.data;
- end;
- function v15.Empty(p3)
- return v15:Size() <= 0;
- end;
- function v15.PopFront(p4)
- table.remove(v15.data, 1);
- if v15:Empty() then
- v16:Fire();
- end;
- end;
- function v15.Front(p5)
- return v15.data[1];
- end;
- function v15.Get(p6, p7)
- return v15.data[p7];
- end;
- function v15.PushBack(p8, p9)
- table.insert(v15.data, p9);
- end;
- function v15.GetData(p10)
- return v15.data;
- end;
- return v15;
- end;
- local function u2()
- return {
- Fifo = u1(),
- BillboardGui = nil
- };
- end;
- local function u3(p11, p12, p13)
- if v11 then
- return p12 + (p13 - p12) * math.min(v12(p11) / 75, 1);
- end;
- return p12 + (p13 - p12) * math.min(string.len(p11) / 75, 1);
- end;
- local function u4(p14, p15, p16)
- local v17 = {
- ComputeBubbleLifetime = function(p17, p18, p19)
- if p19 then
- return u3(p18, 8, 15);
- end;
- return u3(p18, 12, 20);
- end,
- Origin = nil,
- RenderBubble = nil,
- Message = p14
- };
- v17.BubbleDieDelay = v17:ComputeBubbleLifetime(p14, p16);
- v17.BubbleColor = p15;
- v17.IsLocalPlayer = p16;
- return v17;
- end;
- local u5 = {
- WHITE = "dub",
- BLUE = "blu",
- GREEN = "gre",
- RED = "red"
- };
- function createChatBubbleMain(p20, p21)
- local v18 = Instance.new("ImageLabel");
- v18.Name = "ChatBubble";
- v18.ScaleType = Enum.ScaleType.Slice;
- v18.SliceCenter = p21;
- v18.Image = "rbxasset://textures/" .. tostring(p20) .. ".png";
- v18.BackgroundTransparency = 1;
- v18.BorderSizePixel = 0;
- v18.Size = UDim2.new(1, 0, 1, 0);
- v18.Position = UDim2.new(0, 0, 0, 0);
- return v18;
- end;
- function createChatBubbleTail(p22, p23)
- local v19 = Instance.new("ImageLabel");
- v19.Name = "ChatBubbleTail";
- v19.Image = "rbxasset://textures/ui/dialog_tail.png";
- v19.BackgroundTransparency = 1;
- v19.BorderSizePixel = 0;
- v19.Position = p22;
- v19.Size = p23;
- return v19;
- end;
- function createChatBubbleWithTail(p24, p25, p26, p27)
- local v20 = createChatBubbleMain(p24, p27);
- createChatBubbleTail(p25, p26).Parent = v20;
- return v20;
- end;
- function createScaledChatBubbleWithTail(p28, p29, p30, p31)
- local v21 = createChatBubbleMain(p28, p31);
- local v22 = Instance.new("Frame");
- v22.Name = "ChatBubbleTailFrame";
- v22.BackgroundTransparency = 1;
- v22.SizeConstraint = Enum.SizeConstraint.RelativeXX;
- v22.Position = UDim2.new(0.5, 0, 1, 0);
- v22.Size = UDim2.new(p29, 0, p29, 0);
- v22.Parent = v21;
- createChatBubbleTail(p30, UDim2.new(1, 0, 0.5, 0)).Parent = v22;
- return v21;
- end;
- function createChatImposter(p32, p33, p34)
- local v23 = Instance.new("ImageLabel");
- v23.Name = "DialogPlaceholder";
- v23.Image = "rbxasset://textures/" .. tostring(p32) .. ".png";
- v23.BackgroundTransparency = 1;
- v23.BorderSizePixel = 0;
- v23.Position = UDim2.new(0, 0, -1.25, 0);
- v23.Size = UDim2.new(1, 0, 1, 0);
- local v24 = Instance.new("ImageLabel");
- v24.Name = "DotDotDot";
- v24.Image = "rbxasset://textures/" .. tostring(p33) .. ".png";
- v24.BackgroundTransparency = 1;
- v24.BorderSizePixel = 0;
- v24.Position = UDim2.new(0.001, 0, p34, 0);
- v24.Size = UDim2.new(1, 0, 0.7, 0);
- v24.Parent = v23;
- return v23;
- end;
- local u6 = {
- ChatBubble = {},
- ChatBubbleWithTail = {},
- ScalingChatBubbleWithTail = {},
- CharacterSortedMsg = (function()
- local v25 = {
- data = {}
- };
- local u7 = 0;
- function v25.Size(p35)
- return u7;
- end;
- function v25.Erase(p36, p37)
- if v25.data[p37] then
- u7 = u7 - 1;
- end;
- v25.data[p37] = nil;
- end;
- function v25.Set(p38, p39, p40)
- v25.data[p39] = p40;
- if p40 then
- u7 = u7 + 1;
- end;
- end;
- function v25.Get(p41, p42)
- if not p42 then
- return;
- end;
- if not v25.data[p42] then
- v25.data[p42] = u2();
- local u8 = nil;
- u8 = v25.data[p42].Fifo.Emptied:connect(function()
- u8:disconnect();
- v25:Erase(p42);
- end);
- end;
- return v25.data[p42];
- end;
- function v25.GetData(p43)
- return v25.data;
- end;
- return v25;
- end)()
- };
- local function v26(p44, p45, p46, p47, p48)
- u6.ChatBubble[p44] = createChatBubbleMain(p45, p48);
- if p47 then
- local v27 = -1;
- else
- v27 = 0;
- end;
- u6.ChatBubbleWithTail[p44] = createChatBubbleWithTail(p45, UDim2.new(0.5, -14, 1, v27), UDim2.new(0, 30, 0, 14), p48);
- if p47 then
- local v28 = -1;
- else
- v28 = 0;
- end;
- u6.ScalingChatBubbleWithTail[p44] = createScaledChatBubbleWithTail(p45, 0.5, UDim2.new(-0.5, 0, 0, v28), p48);
- end;
- v26(u5.WHITE, "ui/dialog_white", "ui/chatBubble_white_notify_bkg", false, Rect.new(5, 5, 15, 15));
- v26(u5.BLUE, "ui/dialog_blue", "ui/chatBubble_blue_notify_bkg", true, Rect.new(7, 7, 33, 33));
- v26(u5.RED, "ui/dialog_red", "ui/chatBubble_red_notify_bkg", true, Rect.new(7, 7, 33, 33));
- v26(u5.GREEN, "ui/dialog_green", "ui/chatBubble_green_notify_bkg", true, Rect.new(7, 7, 33, 33));
- function u6.SanitizeChatLine(p49, p50)
- if not v11 then
- if v13 < string.len(p50) then
- return string.sub(p50, 1, v13 + string.len("..."));
- else
- return p50;
- end;
- end;
- if not (v13 < v12(p50)) then
- return p50;
- end;
- return string.sub(p50, 1, utf8.offset(p50, v13 + v12("...") + 1) - 1);
- end;
- local function u9(p51)
- local v29 = Instance.new("BillboardGui");
- v29.Adornee = p51;
- v29.Size = UDim2.new(0, 400, 0, 250);
- v29.StudsOffset = Vector3.new(0, 1.5, 2);
- v29.Parent = v14;
- local v30 = Instance.new("Frame");
- v30.Name = "BillboardFrame";
- v30.Size = UDim2.new(1, 0, 1, 0);
- v30.Position = UDim2.new(0, 0, -0.5, 0);
- v30.BackgroundTransparency = 1;
- v30.Parent = v29;
- local u10 = nil;
- u10 = v30.ChildRemoved:connect(function()
- if #v30:GetChildren() <= 1 then
- u10:disconnect();
- v29:Destroy();
- end;
- end);
- u6:CreateSmallTalkBubble(u5.WHITE).Parent = v30;
- return v29;
- end;
- function u6.CreateBillboardGuiHelper(p52, p53, p54)
- if p53 and not u6.CharacterSortedMsg:Get(p53).BillboardGui then
- if not p54 and p53:IsA("BasePart") then
- u6.CharacterSortedMsg:Get(p53).BillboardGui = u9(p53);
- return;
- end;
- if p53:IsA("Model") then
- local l__Head__31 = p53:FindFirstChild("Head");
- if l__Head__31 and l__Head__31:IsA("BasePart") then
- u6.CharacterSortedMsg:Get(p53).BillboardGui = u9(l__Head__31);
- end;
- end;
- end;
- end;
- local function u11(p55)
- if not p55 or not l__Players__1.LocalPlayer.Character then
- return;
- end;
- return p55:IsDescendantOf(l__Players__1.LocalPlayer.Character);
- end;
- function u6.SetBillboardLODNear(p56, p57)
- local v32 = u11(p57.Adornee);
- p57.Size = UDim2.new(0, 400, 0, 250);
- if v32 then
- local v33 = 1.5;
- else
- v33 = 2.5;
- end;
- if v32 then
- local v34 = 2;
- else
- v34 = 0.1;
- end;
- p57.StudsOffset = Vector3.new(0, v33, v34);
- p57.Enabled = true;
- local v35 = p57.BillboardFrame:GetChildren();
- for v36 = 1, #v35 do
- v35[v36].Visible = true;
- end;
- p57.BillboardFrame.SmallTalkBubble.Visible = false;
- end;
- function u6.SetBillboardLODDistant(p58, p59)
- p59.Size = UDim2.new(4, 0, 3, 0);
- if u11(p59.Adornee) then
- local v37 = 2;
- else
- v37 = 0.1;
- end;
- p59.StudsOffset = Vector3.new(0, 3, v37);
- p59.Enabled = true;
- local v38 = p59.BillboardFrame:GetChildren();
- for v39 = 1, #v38 do
- v38[v39].Visible = false;
- end;
- p59.BillboardFrame.SmallTalkBubble.Visible = true;
- end;
- function u6.SetBillboardLODVeryFar(p60, p61)
- p61.Enabled = false;
- end;
- local function u12(p62)
- if not p62 then
- return 100000;
- end;
- return (p62.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude;
- end;
- function u6.SetBillboardGuiLOD(p63, p64, p65)
- if not p65 then
- return;
- end;
- if p65:IsA("Model") then
- local l__Head__40 = p65:FindFirstChild("Head");
- if not l__Head__40 then
- p65 = p65.PrimaryPart;
- else
- p65 = l__Head__40;
- end;
- end;
- local v41 = u12(p65);
- if v41 < 65 then
- u6:SetBillboardLODNear(p64);
- return;
- end;
- if v41 >= 65 and v41 < 100 then
- u6:SetBillboardLODDistant(p64);
- return;
- end;
- u6:SetBillboardLODVeryFar(p64);
- end;
- function u6.CameraCFrameChanged(p66)
- for v42, v43 in pairs(u6.CharacterSortedMsg:GetData()) do
- local l__BillboardGui__44 = v43.BillboardGui;
- if l__BillboardGui__44 then
- u6:SetBillboardGuiLOD(l__BillboardGui__44, v42);
- end;
- end;
- end;
- local l__Enum_Font_SourceSans__13 = Enum.Font.SourceSans;
- local l__Enum_FontSize_Size24__14 = Enum.FontSize.Size24;
- function u6.CreateBubbleText(p67, p68, p69)
- local v45 = Instance.new("TextLabel");
- v45.Name = "BubbleText";
- v45.BackgroundTransparency = 1;
- v45.Position = UDim2.new(0, 15, 0, 0);
- v45.Size = UDim2.new(1, -30, 1, 0);
- v45.Font = l__Enum_Font_SourceSans__13;
- v45.ClipsDescendants = true;
- v45.TextWrapped = true;
- v45.FontSize = l__Enum_FontSize_Size24__14;
- v45.Text = p68;
- v45.Visible = false;
- v45.AutoLocalize = p69;
- return v45;
- end;
- function u6.CreateSmallTalkBubble(p70, p71)
- local v46 = u6.ScalingChatBubbleWithTail[p71]:Clone();
- v46.Name = "SmallTalkBubble";
- v46.AnchorPoint = Vector2.new(0, 0.5);
- v46.Position = UDim2.new(0, 0, 0.5, 0);
- v46.Visible = false;
- local v47 = u6:CreateBubbleText("...");
- v47.TextScaled = true;
- v47.TextWrapped = false;
- v47.Visible = true;
- v47.Parent = v46;
- return v46;
- end;
- function u6.UpdateChatLinesForOrigin(p72, p73, p74)
- local l__Fifo__48 = u6.CharacterSortedMsg:Get(p73).Fifo;
- local v49 = l__Fifo__48:Size();
- local v50 = l__Fifo__48:GetData();
- if #v50 <= 1 then
- return;
- end;
- for v51 = #v50 - 1, 1, -1 do
- local l__RenderBubble__52 = v50[v51].RenderBubble;
- if not l__RenderBubble__52 then
- return;
- end;
- if v49 - v51 + 1 > 1 then
- local l__ChatBubbleTail__53 = l__RenderBubble__52:FindFirstChild("ChatBubbleTail");
- if l__ChatBubbleTail__53 then
- l__ChatBubbleTail__53:Destroy();
- end;
- local l__BubbleText__54 = l__RenderBubble__52:FindFirstChild("BubbleText");
- if l__BubbleText__54 then
- l__BubbleText__54.TextTransparency = 0.5;
- end;
- end;
- l__RenderBubble__52:TweenPosition(UDim2.new(l__RenderBubble__52.Position.X.Scale, l__RenderBubble__52.Position.X.Offset, 1, p74 - l__RenderBubble__52.Size.Y.Offset - 14), Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 0.1, true);
- p74 = p74 - l__RenderBubble__52.Size.Y.Offset - 14;
- end;
- end;
- function u6.DestroyBubble(p75, p76, p77)
- if not p76 then
- return;
- end;
- if p76:Empty() then
- return;
- end;
- local l__RenderBubble__55 = p76:Front().RenderBubble;
- if l__RenderBubble__55 then
- local u15 = l__RenderBubble__55;
- spawn(function()
- while p76:Front().RenderBubble ~= p77 do
- wait();
- end;
- u15 = p76:Front().RenderBubble;
- local l__BubbleText__56 = u15:FindFirstChild("BubbleText");
- local l__ChatBubbleTail__57 = u15:FindFirstChild("ChatBubbleTail");
- while u15 and u15.ImageTransparency < 1 do
- local v58 = wait();
- if u15 then
- local v59 = v58 * 1.5;
- u15.ImageTransparency = u15.ImageTransparency + v59;
- if l__BubbleText__56 then
- l__BubbleText__56.TextTransparency = l__BubbleText__56.TextTransparency + v59;
- end;
- if l__ChatBubbleTail__57 then
- l__ChatBubbleTail__57.ImageTransparency = l__ChatBubbleTail__57.ImageTransparency + v59;
- end;
- end;
- end;
- if u15 then
- u15:Destroy();
- p76:PopFront();
- end;
- end);
- return;
- end;
- p76:PopFront();
- end;
- function u6.CreateChatLineRender(p78, p79, p80, p81, p82, p83)
- if not p79 then
- return;
- end;
- if not u6.CharacterSortedMsg:Get(p79).BillboardGui then
- u6:CreateBillboardGuiHelper(p79, p81);
- end;
- local l__BillboardGui__60 = u6.CharacterSortedMsg:Get(p79).BillboardGui;
- if l__BillboardGui__60 then
- local v61 = u6.ChatBubbleWithTail[p80.BubbleColor]:Clone();
- v61.Visible = false;
- local v62 = u6:CreateBubbleText(p80.Message, p83);
- v62.Parent = v61;
- v61.Parent = l__BillboardGui__60.BillboardFrame;
- p80.RenderBubble = v61;
- local v63 = l__TextService__4:GetTextSize(v62.Text, 24, l__Enum_Font_SourceSans__13, Vector2.new(400, 250));
- local v64 = math.max((v63.X + 30) / 400, 0.1);
- v61.Size = UDim2.new(0, 0, 0, 0);
- v61.Position = UDim2.new(0.5, 0, 1, 0);
- local v65 = v63.Y / 24 * 34;
- v61:TweenSizeAndPosition(UDim2.new(v64, 0, 0, v65), UDim2.new((1 - v64) / 2, 0, 1, -v65), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true, function()
- v62.Visible = true;
- end);
- u6:SetBillboardGuiLOD(l__BillboardGui__60, p80.Origin);
- u6:UpdateChatLinesForOrigin(p80.Origin, -v65);
- delay(p80.BubbleDieDelay, function()
- u6:DestroyBubble(p82, v61);
- end);
- end;
- end;
- local function u16(p84, p85, p86)
- local v66 = u4(p85, u5.WHITE, p86);
- if p84 then
- v66.User = p84.Name;
- v66.Origin = p84.Character;
- end;
- return v66;
- end;
- function u6.OnPlayerChatMessage(p87, p88, p89, p90)
- if not u6:BubbleChatEnabled() then
- return;
- end;
- local l__LocalPlayer__67 = l__Players__1.LocalPlayer;
- local v68 = false;
- if l__LocalPlayer__67 ~= nil then
- v68 = p88 ~= l__LocalPlayer__67;
- end;
- local v69 = u16(p88, u6:SanitizeChatLine(p89), not v68);
- if p88 and v69.Origin then
- local l__Fifo__70 = u6.CharacterSortedMsg:Get(v69.Origin).Fifo;
- l__Fifo__70:PushBack(v69);
- u6:CreateChatLineRender(p88.Character, v69, true, l__Fifo__70, false);
- end;
- end;
- local function u17(p91, p92, p93, p94)
- local v71 = u4(p92, p94, p93);
- v71.Origin = p91;
- return v71;
- end;
- local u18 = v7 or v8;
- function u6.OnGameChatMessage(p95, p96, p97, p98)
- local l__LocalPlayer__72 = l__Players__1.LocalPlayer;
- local v73 = false;
- if l__LocalPlayer__72 ~= nil then
- v73 = l__LocalPlayer__72.Character ~= p96;
- end;
- local v74 = u5.WHITE;
- if p98 == Enum.ChatColor.Blue then
- v74 = u5.BLUE;
- elseif p98 == Enum.ChatColor.Green then
- v74 = u5.GREEN;
- elseif p98 == Enum.ChatColor.Red then
- v74 = u5.RED;
- end;
- local v75 = u17(p96, u6:SanitizeChatLine(p97), not v73, v74);
- u6.CharacterSortedMsg:Get(v75.Origin).Fifo:PushBack(v75);
- if u18 then
- u6:CreateChatLineRender(p96, v75, false, u6.CharacterSortedMsg:Get(v75.Origin).Fifo, true);
- return;
- end;
- u6:CreateChatLineRender(p96, v75, false, u6.CharacterSortedMsg:Get(v75.Origin).Fifo, false);
- end;
- function u6.BubbleChatEnabled(p99)
- local l__ClientChatModules__76 = l__Chat__3:FindFirstChild("ClientChatModules");
- if l__ClientChatModules__76 then
- local l__ChatSettings__77 = l__ClientChatModules__76:FindFirstChild("ChatSettings");
- if l__ChatSettings__77 then
- local v78 = require(l__ChatSettings__77);
- if v78.BubbleChatEnabled ~= nil then
- return v78.BubbleChatEnabled;
- end;
- end;
- end;
- return l__Players__1.BubbleChat;
- end;
- function u6.ShowOwnFilteredMessage(p100)
- local v79 = nil;
- local l__ClientChatModules__80 = l__Chat__3:FindFirstChild("ClientChatModules");
- if l__ClientChatModules__80 then
- v79 = l__ClientChatModules__80:FindFirstChild("ChatSettings");
- if not v79 then
- return false;
- end;
- else
- return false;
- end;
- return require(v79).ShowUserOwnFilteredMessage;
- end;
- function findPlayer(p101)
- local v81, v82, v83 = pairs(l__Players__1:GetPlayers());
- while true do
- local v84, v85 = v81(v82, v83);
- if v84 then
- else
- break;
- end;
- v83 = v84;
- if v85.Name == p101 then
- return v85;
- end;
- end;
- end;
- l__Chat__3.Chatted:connect(function(p102, p103, p104)
- u6:OnGameChatMessage(p102, p103, p104);
- end);
- local v86 = nil;
- if game.Workspace.CurrentCamera then
- v86 = game.Workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):connect(function(p105)
- u6:CameraCFrameChanged();
- end);
- end;
- local u19 = v86;
- game.Workspace.Changed:connect(function(p106)
- if p106 == "CurrentCamera" then
- if u19 then
- u19:disconnect();
- end;
- if game.Workspace.CurrentCamera then
- u19 = game.Workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):connect(function(p107)
- u6:CameraCFrameChanged();
- end);
- end;
- end;
- end);
- local u20 = nil;
- function getAllowedMessageTypes()
- if u20 then
- return u20;
- end;
- local l__ClientChatModules__87 = l__Chat__3:FindFirstChild("ClientChatModules");
- if l__ClientChatModules__87 then
- else
- return { "Message", "Whisper" };
- end;
- local l__ChatSettings__88 = l__ClientChatModules__87:FindFirstChild("ChatSettings");
- if l__ChatSettings__88 then
- local v89 = require(l__ChatSettings__88);
- if v89.BubbleChatMessageTypes then
- u20 = v89.BubbleChatMessageTypes;
- return u20;
- end;
- end;
- local l__ChatConstants__90 = l__ClientChatModules__87:FindFirstChild("ChatConstants");
- if l__ChatConstants__90 then
- local v91 = require(l__ChatConstants__90);
- u20 = { v91.MessageTypeDefault, v91.MessageTypeWhisper };
- end;
- return u20;
- end;
- function checkAllowedMessageType(p108)
- local v92 = getAllowedMessageTypes();
- local v93 = #v92;
- local v94 = 1 - 1;
- while true do
- if v92[v94] == p108.MessageType then
- return true;
- end;
- if 0 <= 1 then
- if v94 < v93 then
- else
- break;
- end;
- elseif v93 < v94 then
- else
- break;
- end;
- v94 = v94 + 1;
- end;
- return false;
- end;
- local v95 = l__ReplicatedStorage__2:WaitForChild("DefaultChatSystemChatEvents");
- local l__OnMessageDoneFiltering__96 = v95:WaitForChild("OnMessageDoneFiltering");
- v95:WaitForChild("OnNewMessage").OnClientEvent:connect(function(p109, p110)
- if not checkAllowedMessageType(p109) then
- return;
- end;
- local v97 = findPlayer(p109.FromSpeaker);
- if not v97 then
- return;
- end;
- if (not p109.IsFiltered or p109.FromSpeaker == v5.Name) and (p109.FromSpeaker ~= v5.Name or u6:ShowOwnFilteredMessage()) then
- return;
- end;
- u6:OnPlayerChatMessage(v97, p109.Message, nil);
- end);
- l__OnMessageDoneFiltering__96.OnClientEvent:connect(function(p111, p112)
- if not checkAllowedMessageType(p111) then
- return;
- end;
- local v98 = findPlayer(p111.FromSpeaker);
- if not v98 then
- return;
- end;
- if p111.FromSpeaker == v5.Name and not u6:ShowOwnFilteredMessage() then
- return;
- end;
- u6:OnPlayerChatMessage(v98, p111.Message, nil);
- end);
- Chatscript:
- -- Script GUID: {68482062-39e6-4c6a-8611-8f9b7f475305}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = false;
- local v2, v3 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserHandleChatHotKeyWithContextActionService");
- end);
- if v2 then
- v1 = v3;
- end;
- local l__ReplicatedStorage__4 = game:GetService("ReplicatedStorage");
- local u1 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
- local l__StarterGui__2 = game:GetService("StarterGui");
- function SetCoreGuiChatConnections(p1)
- local v5 = 0;
- while true do
- if v5 < 10 then
- else
- break;
- end;
- v5 = v5 + 1;
- local v6, v7 = pcall(function()
- l__StarterGui__2:SetCore("CoreGuiChatConnections", p1);
- end);
- if not v6 then
- else
- break;
- end;
- if not v6 then
- if v5 == 10 then
- error("Error calling SetCore CoreGuiChatConnections: " .. v7);
- end;
- end;
- wait();
- end;
- end;
- function checkBothChatTypesDisabled()
- if u1.BubbleChatEnabled ~= nil then
- if u1.ClassicChatEnabled ~= nil then
- else
- return false;
- end;
- else
- return false;
- end;
- return not (u1.BubbleChatEnabled or u1.ClassicChatEnabled);
- end;
- if not game:GetService("GuiService"):IsTenFootInterface() and not game:GetService("UserInputService").VREnabled then
- if not checkBothChatTypesDisabled() then
- (function()
- local v8 = {
- ChatWindow = {},
- SetCore = {},
- GetCore = {}
- };
- v8.ChatWindow.ChatTypes = {};
- v8.ChatWindow.ChatTypes.BubbleChatEnabled = u1.BubbleChatEnabled;
- v8.ChatWindow.ChatTypes.ClassicChatEnabled = u1.ClassicChatEnabled;
- local u3 = require(script:WaitForChild("ChatMain"));
- local function v9(p2)
- local v10 = Instance.new("BindableEvent");
- v10.Name = p2;
- v8.ChatWindow[p2] = v10;
- v10.Event:connect(function(...)
- u3[p2](u3, ...);
- end);
- end;
- local function v11(p3)
- local v12 = Instance.new("BindableFunction");
- v12.Name = p3;
- v8.ChatWindow[p3] = v12;
- function v12.OnInvoke(...)
- return u3[p3](u3, ...);
- end;
- end;
- local function v13(p4)
- local v14 = Instance.new("BindableEvent");
- v14.Name = p4;
- v8.ChatWindow[p4] = v14;
- u3[p4]:connect(function(...)
- v14:Fire(...);
- end);
- end;
- local function v15(p5)
- local v16 = Instance.new("BindableEvent");
- v16.Name = p5;
- v8.SetCore[p5] = v16;
- v16.Event:connect(function(...)
- u3[p5 .. "Event"]:fire(...);
- end);
- end;
- local function v17(p6)
- local v18 = Instance.new("BindableFunction");
- v18.Name = p6;
- v8.GetCore[p6] = v18;
- function v18.OnInvoke(...)
- return u3["f" .. p6](...);
- end;
- end;
- v9("ToggleVisibility");
- v9("SetVisible");
- v9("FocusChatBar");
- v9("EnterWhisperState");
- v11("GetVisibility");
- v11("GetMessageCount");
- v9("TopbarEnabledChanged");
- v11("IsFocused");
- v13("ChatBarFocusChanged");
- v13("VisibilityStateChanged");
- v13("MessagesChanged");
- v13("MessagePosted");
- (function(p7)
- local v19 = Instance.new("BindableEvent");
- v19.Name = p7;
- v8.ChatWindow[p7] = v19;
- v19.Event:connect(function(...)
- u3[p7]:fire(...);
- end);
- end)("CoreGuiEnabled");
- v15("ChatMakeSystemMessage");
- v15("ChatWindowPosition");
- v15("ChatWindowSize");
- v17("ChatWindowPosition");
- v17("ChatWindowSize");
- v15("ChatBarDisabled");
- v17("ChatBarDisabled");
- if not v1 then
- v9("SpecialKeyPressed");
- end;
- SetCoreGuiChatConnections(v8);
- end)();
- else
- local v20 = {
- ChatWindow = {}
- };
- v20.ChatWindow.ChatTypes = {};
- v20.ChatWindow.ChatTypes.BubbleChatEnabled = false;
- v20.ChatWindow.ChatTypes.ClassicChatEnabled = false;
- SetCoreGuiChatConnections(v20);
- end;
- else
- l__ReplicatedStorage__4:WaitForChild("DefaultChatSystemChatEvents").GetInitDataRequest:InvokeServer();
- end;
- chatmain:
- -- Script GUID: {eb76fd28-332f-4b23-b216-15bb200ad356}
- --[[VARIABLE DEFINITION ANOMALY DETECTED, DECOMPILATION OUTPUT POTENTIALLY INCORRECT]]--
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = false;
- local v2, v3 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserFixChatWindowHoverOver");
- end);
- if v2 then
- v1 = v3;
- end;
- local v4 = false;
- local v5, v6 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserFixMouseCapture");
- end);
- if v5 then
- v4 = v6;
- end;
- local v7 = false;
- local v8, v9 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserHandleChatHotKeyWithContextActionService");
- end);
- if v8 then
- v7 = v9;
- end;
- local l__RunService__10 = game:GetService("RunService");
- local l__ReplicatedStorage__11 = game:GetService("ReplicatedStorage");
- local l__Chat__12 = game:GetService("Chat");
- local l__StarterGui__13 = game:GetService("StarterGui");
- local l__ContextActionService__14 = game:GetService("ContextActionService");
- local v15 = l__ReplicatedStorage__11:WaitForChild("DefaultChatSystemChatEvents");
- local v16 = l__ReplicatedStorage__11:WaitForChild("DefaultChatSystemChatEvents");
- local l__ClientChatModules__17 = l__Chat__12:WaitForChild("ClientChatModules");
- local v18 = require(l__ClientChatModules__17:WaitForChild("ChatConstants"));
- local v19 = require(l__ClientChatModules__17:WaitForChild("ChatSettings"));
- local v20 = require(l__ClientChatModules__17:WaitForChild("MessageCreatorModules"):WaitForChild("Util"));
- local u1 = nil;
- pcall(function()
- u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
- end);
- if u1 == nil then
- u1 = {
- Get = function(p1, p2, p3)
- return p3;
- end
- };
- end;
- local v21, v22 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserChatNewMessageLengthCheck2");
- end);
- local v23 = Instance.new("BindableEvent");
- local u2 = {
- OnNewMessage = "RemoteEvent",
- OnMessageDoneFiltering = "RemoteEvent",
- OnNewSystemMessage = "RemoteEvent",
- OnChannelJoined = "RemoteEvent",
- OnChannelLeft = "RemoteEvent",
- OnMuted = "RemoteEvent",
- OnUnmuted = "RemoteEvent",
- OnMainChannelSet = "RemoteEvent",
- SayMessageRequest = "RemoteEvent",
- GetInitDataRequest = "RemoteFunction"
- };
- local u3 = {};
- local u4 = 10;
- function TryRemoveChildWithVerifyingIsCorrectType(p4)
- if u2[p4.Name] then
- if p4:IsA(u2[p4.Name]) then
- u2[p4.Name] = nil;
- u3[p4.Name] = p4;
- u4 = u4 - 1;
- end;
- end;
- end;
- for v24, v25 in pairs(v16:GetChildren()) do
- TryRemoveChildWithVerifyingIsCorrectType(v25);
- end;
- if u4 > 0 then
- local v26 = v16.ChildAdded:connect(function(p5)
- TryRemoveChildWithVerifyingIsCorrectType(p5);
- if u4 < 1 then
- v23:Fire();
- end;
- end);
- v23.Event:wait();
- v26:disconnect();
- v23:Destroy();
- end;
- local l__UserInputService__27 = game:GetService("UserInputService");
- local l__RunService__28 = game:GetService("RunService");
- local l__Players__29 = game:GetService("Players");
- local v30 = l__Players__29.LocalPlayer;
- while not v30 do
- l__Players__29.ChildAdded:wait();
- v30 = l__Players__29.LocalPlayer;
- end;
- local v31 = 6;
- if v19.ScreenGuiDisplayOrder ~= nil then
- v31 = v19.ScreenGuiDisplayOrder;
- end;
- local v32 = Instance.new("ScreenGui");
- v32.Name = "Chat";
- v32.ResetOnSpawn = false;
- v32.DisplayOrder = v31;
- v32.Parent = v30:WaitForChild("PlayerGui");
- local v33 = require(script:WaitForChild("MessageLabelCreator"));
- local v34 = require(script:WaitForChild("MessageLogDisplay"));
- local v35 = require(script:WaitForChild("ChatChannel"));
- local v36 = require(script:WaitForChild("ChatWindow")).new();
- local v37 = require(script:WaitForChild("ChannelsBar")).new();
- local v38 = v34.new();
- local v39 = require(script:WaitForChild("CommandProcessor")).new();
- local v40 = require(script:WaitForChild("ChatBar")).new(v39, v36);
- v36:CreateGuiObjects(v32);
- v36:RegisterChatBar(v40);
- v36:RegisterChannelsBar(v37);
- v36:RegisterMessageLogDisplay(v38);
- v20:RegisterChatWindow(v36);
- local v41 = require(script:WaitForChild("MessageSender"));
- v41:RegisterSayMessageFunction(u3.SayMessageRequest);
- if l__UserInputService__27.TouchEnabled then
- v40:SetTextLabelText(u1:Get("GameChat_ChatMain_ChatBarTextTouch", "Tap here to chat"));
- else
- v40:SetTextLabelText(u1:Get("GameChat_ChatMain_ChatBarText", "To chat click here or press \"/\" key"));
- end;
- local l__script__5 = script;
- spawn(function()
- local v42 = require(l__script__5:WaitForChild("CurveUtil"));
- local v43 = 1 / (v19.ChatAnimationFPS and 20);
- local v44 = tick();
- while true do
- local v45 = tick();
- local v46 = v42:DeltaTimeToTimescale(v45 - v44);
- if v46 ~= 0 then
- v36:Update(v46);
- end;
- v44 = v45;
- wait(v43);
- end;
- end);
- function CheckIfPointIsInSquare(p6, p7, p8)
- local v47 = false;
- if p7.X <= p6.X then
- v47 = false;
- if p6.X <= p8.X then
- v47 = false;
- if p7.Y <= p6.Y then
- v47 = p6.Y <= p8.Y;
- end;
- end;
- end;
- return v47;
- end;
- local u6 = 0;
- local u7 = false;
- local u8 = Instance.new("BindableEvent");
- function DoBackgroundFadeIn(p9)
- u6 = tick();
- u7 = false;
- u8:Fire();
- v36:FadeInBackground(p9 or v19.ChatDefaultFadeDuration);
- if v36:GetCurrentChannel() then
- local l__Scroller__48 = v38.Scroller;
- l__Scroller__48.ScrollingEnabled = true;
- l__Scroller__48.ScrollBarThickness = v34.ScrollBarThickness;
- end;
- end;
- function DoBackgroundFadeOut(p10)
- u6 = tick();
- u7 = true;
- u8:Fire();
- v36:FadeOutBackground(p10 or v19.ChatDefaultFadeDuration);
- if v36:GetCurrentChannel() then
- local l__Scroller__49 = v38.Scroller;
- l__Scroller__49.ScrollingEnabled = false;
- l__Scroller__49.ScrollBarThickness = 0;
- end;
- end;
- local u9 = 0;
- local u10 = false;
- function DoTextFadeIn(p11)
- u9 = tick();
- u10 = false;
- u8:Fire();
- v36:FadeInText((p11 or v19.ChatDefaultFadeDuration) * 0);
- end;
- function DoTextFadeOut(p12)
- u9 = tick();
- u10 = true;
- u8:Fire();
- v36:FadeOutText(p12 or v19.ChatDefaultFadeDuration);
- end;
- function DoFadeInFromNewInformation()
- DoTextFadeIn();
- if v19.ChatShouldFadeInFromNewInformation then
- DoBackgroundFadeIn();
- end;
- end;
- function InstantFadeIn()
- DoBackgroundFadeIn(0);
- DoTextFadeIn(0);
- end;
- function InstantFadeOut()
- DoBackgroundFadeOut(0);
- DoTextFadeOut(0);
- end;
- local u11 = nil;
- local u12 = Instance.new("BindableEvent");
- function UpdateFadingForMouseState(p13)
- u11 = p13;
- u12:Fire();
- if v40:IsFocused() then
- return;
- end;
- if p13 then
- else
- DoBackgroundFadeIn();
- return;
- end;
- DoBackgroundFadeIn();
- DoTextFadeIn();
- end;
- local u13 = Instance.new("BindableEvent");
- spawn(function()
- while true do
- l__RunService__28.RenderStepped:wait();
- while not (not u11) or not (not v40:IsFocused()) do
- if u11 then
- u12.Event:wait();
- end;
- if v40:IsFocused() then
- u13.Event:wait();
- end;
- end;
- if not u7 then
- if v19.ChatWindowBackgroundFadeOutTime < tick() - u6 then
- DoBackgroundFadeOut();
- end;
- elseif not u10 then
- if v19.ChatWindowTextFadeOutTime < tick() - u9 then
- DoTextFadeOut();
- end;
- else
- u8.Event:wait();
- end;
- end;
- end);
- function getClassicChatEnabled()
- if v19.ClassicChatEnabled ~= nil then
- return v19.ClassicChatEnabled;
- end;
- return l__Players__29.ClassicChat;
- end;
- function getBubbleChatEnabled()
- if v19.BubbleChatEnabled ~= nil then
- return v19.BubbleChatEnabled;
- end;
- return l__Players__29.BubbleChat;
- end;
- function bubbleChatOnly()
- return not getClassicChatEnabled() and getBubbleChatEnabled();
- end;
- local u14 = {};
- function UpdateMousePosition(p14, p15)
- if u14.Visible then
- if u14.IsCoreGuiEnabled then
- if not u14.TopbarEnabled then
- if not v19.ChatOnWithTopBarOff then
- return;
- end;
- end;
- else
- return;
- end;
- else
- return;
- end;
- if bubbleChatOnly() then
- return;
- end;
- local l__AbsolutePosition__50 = v36.GuiObject.AbsolutePosition;
- local v51 = CheckIfPointIsInSquare(p14, l__AbsolutePosition__50, l__AbsolutePosition__50 + v36.GuiObject.AbsoluteSize);
- if v1 then
- if p15 then
- if v51 == true then
- return;
- end;
- end;
- end;
- if v51 ~= u11 then
- UpdateFadingForMouseState(v51);
- end;
- end;
- l__UserInputService__27.InputChanged:connect(function(p16, p17)
- if p16.UserInputType == Enum.UserInputType.MouseMovement then
- UpdateMousePosition(Vector2.new(p16.Position.X, p16.Position.Y), p17);
- end;
- end);
- l__UserInputService__27.TouchTap:connect(function(p18, p19)
- UpdateMousePosition(p18[1], false);
- end);
- l__UserInputService__27.TouchMoved:connect(function(p20, p21)
- UpdateMousePosition(Vector2.new(p20.Position.X, p20.Position.Y), false);
- end);
- if not v4 then
- l__UserInputService__27.Changed:connect(function(p22)
- if p22 == "MouseBehavior" and l__UserInputService__27.MouseBehavior == Enum.MouseBehavior.LockCenter then
- local l__AbsolutePosition__52 = v36.GuiObject.AbsolutePosition;
- if CheckIfPointIsInSquare(v32.AbsoluteSize / 2, l__AbsolutePosition__52, l__AbsolutePosition__52 + v36.GuiObject.AbsoluteSize) then
- l__UserInputService__27.MouseBehavior = Enum.MouseBehavior.Default;
- end;
- end;
- end);
- end;
- UpdateFadingForMouseState(true);
- UpdateFadingForMouseState(false);
- local v53 = {
- Signal = function()
- local v54 = {};
- local u15 = nil;
- local u16 = nil;
- local u17 = Instance.new("BindableEvent");
- function v54.fire(p23, ...)
- u15 = { ... };
- u16 = select("#", ...);
- u17:Fire();
- end;
- function v54.connect(p24, p25)
- if not p25 then
- error("connect(nil)", 2);
- end;
- return u17.Event:connect(function()
- p25(unpack(u15, 1, u16));
- end);
- end;
- function v54.wait(p26)
- u17.Event:wait();
- assert(u15, "Missing arg data, likely due to :TweenSize/Position corrupting threadrefs.");
- return unpack(u15, 1, u16);
- end;
- return v54;
- end
- };
- function SetVisibility(p27)
- v36:SetVisible(p27);
- u14.VisibilityStateChanged:fire(p27);
- u14.Visible = p27;
- if u14.IsCoreGuiEnabled then
- if p27 then
- else
- InstantFadeOut();
- return;
- end;
- else
- return;
- end;
- InstantFadeIn();
- end;
- u14.TopbarEnabled = true;
- u14.MessageCount = 0;
- u14.Visible = true;
- u14.IsCoreGuiEnabled = true;
- function u14.ToggleVisibility(p28)
- SetVisibility(not v36:GetVisible());
- end;
- function u14.SetVisible(p29, p30)
- if v36:GetVisible() ~= p30 then
- SetVisibility(p30);
- end;
- end;
- function u14.FocusChatBar(p31)
- v40:CaptureFocus();
- end;
- function u14.EnterWhisperState(p32, p33)
- v40:EnterWhisperState(p33);
- end;
- function u14.GetVisibility(p34)
- return v36:GetVisible();
- end;
- function u14.GetMessageCount(p35)
- return p35.MessageCount;
- end;
- function u14.TopbarEnabledChanged(p36, p37)
- p36.TopbarEnabled = p37;
- p36.CoreGuiEnabled:fire(game:GetService("StarterGui"):GetCoreGuiEnabled(Enum.CoreGuiType.Chat));
- end;
- function u14.IsFocused(p38, p39)
- return v40:IsFocused();
- end;
- u14.ChatBarFocusChanged = v53.Signal();
- u14.VisibilityStateChanged = v53.Signal();
- u14.MessagesChanged = v53.Signal();
- u14.MessagePosted = v53.Signal();
- u14.CoreGuiEnabled = v53.Signal();
- u14.ChatMakeSystemMessageEvent = v53.Signal();
- u14.ChatWindowPositionEvent = v53.Signal();
- u14.ChatWindowSizeEvent = v53.Signal();
- u14.ChatBarDisabledEvent = v53.Signal();
- function u14.fChatWindowPosition(p40)
- return v36.GuiObject.Position;
- end;
- function u14.fChatWindowSize(p41)
- return v36.GuiObject.Size;
- end;
- function u14.fChatBarDisabled(p42)
- return not v40:GetEnabled();
- end;
- if v7 then
- local u18 = true;
- l__ContextActionService__14:BindAction("ToggleChat", function(p43, p44, p45)
- if p43 == "ToggleChat" and p44 == Enum.UserInputState.Begin and u18 and p45.UserInputType == Enum.UserInputType.Keyboard then
- DoChatBarFocus();
- end;
- end, true, Enum.KeyCode.Slash);
- else
- local u19 = true;
- function u14.SpecialKeyPressed(p46, p47, p48)
- if p47 == Enum.SpecialKey.ChatHotkey and u19 then
- DoChatBarFocus();
- end;
- end;
- end;
- u14.CoreGuiEnabled:connect(function(p49)
- u14.IsCoreGuiEnabled = p49;
- p49 = p49 and (u14.TopbarEnabled or v19.ChatOnWithTopBarOff);
- v36:SetCoreGuiEnabled(p49);
- if p49 then
- InstantFadeIn();
- return;
- end;
- v40:ReleaseFocus();
- InstantFadeOut();
- end);
- function trimTrailingSpaces(p50)
- local v55 = #p50;
- while true do
- if 0 < v55 then
- else
- break;
- end;
- if p50:find("^%s", v55) then
- else
- break;
- end;
- v55 = v55 - 1;
- end;
- return p50:sub(1, v55);
- end;
- local u20 = false;
- u14.ChatMakeSystemMessageEvent:connect(function(p51)
- if p51.Text and type(p51.Text) == "string" then
- while not u20 do
- wait();
- end;
- local l__GeneralChannelName__56 = v19.GeneralChannelName;
- local v57 = v36:GetChannel(l__GeneralChannelName__56);
- if v57 then
- v57:AddMessageToChannel({
- ID = -1,
- FromSpeaker = nil,
- SpeakerUserId = 0,
- OriginalChannel = l__GeneralChannelName__56,
- IsFiltered = true,
- MessageLength = string.len(p51.Text),
- Message = trimTrailingSpaces(p51.Text),
- MessageType = v18.MessageTypeSetCore,
- Time = os.time(),
- ExtraData = p51
- });
- v37:UpdateMessagePostedInChannel(l__GeneralChannelName__56);
- u14.MessageCount = u14.MessageCount + 1;
- u14.MessagesChanged:fire(u14.MessageCount);
- end;
- end;
- end);
- u14.ChatBarDisabledEvent:connect(function(p52)
- if u19 then
- v40:SetEnabled(not p52);
- if p52 then
- v40:ReleaseFocus();
- end;
- end;
- end);
- u14.ChatWindowSizeEvent:connect(function(p53)
- v36.GuiObject.Size = p53;
- end);
- u14.ChatWindowPositionEvent:connect(function(p54)
- v36.GuiObject.Position = p54;
- end);
- function DoChatBarFocus()
- if not v36:GetCoreGuiEnabled() then
- return;
- end;
- if not v40:GetEnabled() then
- return;
- end;
- if not v40:IsFocused() then
- if v40:GetVisible() then
- u14:SetVisible(true);
- InstantFadeIn();
- v40:CaptureFocus();
- u14.ChatBarFocusChanged:fire(true);
- end;
- end;
- end;
- u13.Event:connect(function(p55)
- u14.ChatBarFocusChanged:fire(p55);
- end);
- function DoSwitchCurrentChannel(p56)
- if v36:GetChannel(p56) then
- v36:SwitchCurrentChannel(p56);
- end;
- end;
- function SendMessageToSelfInTargetChannel(p57, p58, p59)
- local v58 = v36:GetChannel(p58);
- if v58 then
- v58:AddMessageToChannel({
- ID = -1,
- FromSpeaker = nil,
- SpeakerUserId = 0,
- OriginalChannel = p58,
- IsFiltered = true,
- MessageLength = string.len(p57),
- Message = trimTrailingSpaces(p57),
- MessageType = v18.MessageTypeSystem,
- Time = os.time(),
- ExtraData = p59
- });
- end;
- end;
- function chatBarFocused()
- if not u11 then
- DoBackgroundFadeIn();
- if u10 then
- DoTextFadeIn();
- end;
- end;
- u13:Fire(true);
- end;
- local u21 = v21 or v22;
- function chatBarFocusLost(p60, p61)
- DoBackgroundFadeIn();
- u13:Fire(false);
- if p60 then
- local v59 = v40:GetTextBox().Text;
- if v40:IsInCustomState() then
- local v60 = v40:GetCustomMessage();
- if v60 then
- v59 = v60;
- end;
- local v61 = v40:CustomStateProcessCompletedMessage(v59);
- v40:ResetCustomState();
- if v61 then
- return;
- end;
- end;
- if not u21 then
- v59 = string.sub(v59, 1, v19.MaximumMessageLength);
- end;
- v40:GetTextBox().Text = "";
- if v59 ~= "" then
- u14.MessagePosted:fire(v59);
- if not v39:ProcessCompletedChatMessage(v59, v36) then
- local v62 = nil;
- if v19.DisallowedWhiteSpace then
- local v63 = #v19.DisallowedWhiteSpace;
- local v64 = 1 - 1;
- while true do
- if v19.DisallowedWhiteSpace[v64] == "\t" then
- v59 = string.gsub(v59, v19.DisallowedWhiteSpace[v64], " ");
- else
- v59 = string.gsub(v59, v19.DisallowedWhiteSpace[v64], "");
- end;
- if 0 <= 1 then
- if v64 < v63 then
- else
- break;
- end;
- elseif v63 < v64 then
- else
- break;
- end;
- v64 = v64 + 1;
- end;
- end;
- v62 = string.gsub(string.gsub(v59, "\n", ""), "[ ]+", " ");
- local v65 = v36:GetTargetMessageChannel();
- if v65 then
- v41:SendMessage(v62, v65);
- return;
- end;
- v41:SendMessage(v62, nil);
- end;
- end;
- end;
- end;
- local u22 = {};
- function setupChatBarConnections()
- local v66 = #u22;
- local v67 = 1 - 1;
- while true do
- u22[v67]:Disconnect();
- if 0 <= 1 then
- if v67 < v66 then
- else
- break;
- end;
- elseif v66 < v67 then
- else
- break;
- end;
- v67 = v67 + 1;
- end;
- u22 = {};
- table.insert(u22, (v40:GetTextBox().FocusLost:connect(chatBarFocusLost)));
- table.insert(u22, (v40:GetTextBox().Focused:connect(chatBarFocused)));
- end;
- setupChatBarConnections();
- v40.GuiObjectsChanged:connect(setupChatBarConnections);
- function getEchoMessagesInGeneral()
- if v19.EchoMessagesInGeneralChannel == nil then
- return true;
- end;
- return v19.EchoMessagesInGeneralChannel;
- end;
- u3.OnMessageDoneFiltering.OnClientEvent:connect(function(p62)
- if not v19.ShowUserOwnFilteredMessage and p62.FromSpeaker == v30.Name then
- return;
- end;
- local l__OriginalChannel__68 = p62.OriginalChannel;
- local v69 = v36:GetChannel(l__OriginalChannel__68);
- if v69 then
- v69:UpdateMessageFiltered(p62);
- end;
- if getEchoMessagesInGeneral() and v19.GeneralChannelName and l__OriginalChannel__68 ~= v19.GeneralChannelName then
- local v70 = v36:GetChannel(v19.GeneralChannelName);
- if v70 then
- v70:UpdateMessageFiltered(p62);
- end;
- end;
- end);
- u3.OnNewMessage.OnClientEvent:connect(function(p63, p64)
- local v71 = v36:GetChannel(p64);
- if v71 then
- v71:AddMessageToChannel(p63);
- if p63.FromSpeaker ~= v30.Name then
- v37:UpdateMessagePostedInChannel(p64);
- end;
- if getEchoMessagesInGeneral() and v19.GeneralChannelName and p64 ~= v19.GeneralChannelName then
- local v72 = v36:GetChannel(v19.GeneralChannelName);
- if v72 then
- v72:AddMessageToChannel(p63);
- end;
- end;
- u14.MessageCount = u14.MessageCount + 1;
- u14.MessagesChanged:fire(u14.MessageCount);
- DoFadeInFromNewInformation();
- end;
- end);
- u3.OnNewSystemMessage.OnClientEvent:connect(function(p65, p66)
- p66 = p66 and "System";
- local v73 = v36:GetChannel(p66);
- if v73 then
- v73:AddMessageToChannel(p65);
- v37:UpdateMessagePostedInChannel(p66);
- u14.MessageCount = u14.MessageCount + 1;
- u14.MessagesChanged:fire(u14.MessageCount);
- DoFadeInFromNewInformation();
- if getEchoMessagesInGeneral() and v19.GeneralChannelName and p66 ~= v19.GeneralChannelName then
- local v74 = v36:GetChannel(v19.GeneralChannelName);
- if v74 then
- v74:AddMessageToChannel(p65);
- return;
- end;
- end;
- else
- warn(string.format("Just received system message for channel I'm not in [%s]", p66));
- end;
- end);
- function HandleChannelJoined(p67, p68, p69, p70, p71, p72)
- if v36:GetChannel(p67) then
- v36:RemoveChannel(p67);
- end;
- if p67 == v19.GeneralChannelName then
- u20 = true;
- end;
- if p70 then
- v40:SetChannelNameColor(p67, p70);
- end;
- local v75 = v36:AddChannel(p67);
- if v75 then
- if p67 == v19.GeneralChannelName then
- DoSwitchCurrentChannel(p67);
- end;
- if p69 then
- local v76 = 1;
- if v19.MessageHistoryLengthPerChannel < #p69 then
- v76 = #p69 - v19.MessageHistoryLengthPerChannel;
- end;
- local v77 = #p69;
- local v78 = v76 - 1;
- while true do
- v75:AddMessageToChannel(p69[v78]);
- if 0 <= 1 then
- if v78 < v77 then
- else
- break;
- end;
- elseif v77 < v78 then
- else
- break;
- end;
- v78 = v78 + 1;
- end;
- if getEchoMessagesInGeneral() then
- if p71 then
- if v19.GeneralChannelName then
- if p67 ~= v19.GeneralChannelName then
- local v79 = v36:GetChannel(v19.GeneralChannelName);
- if v79 then
- v79:AddMessagesToChannelByTimeStamp(p69, v76);
- end;
- end;
- end;
- end;
- end;
- end;
- if p68 ~= "" then
- local v80 = {
- ID = -1,
- FromSpeaker = nil,
- SpeakerUserId = 0,
- OriginalChannel = p67,
- IsFiltered = true,
- MessageLength = string.len(p68),
- Message = trimTrailingSpaces(p68),
- MessageType = v18.MessageTypeWelcome,
- Time = os.time(),
- ExtraData = nil
- };
- v75:AddMessageToChannel(v80);
- if getEchoMessagesInGeneral() then
- if p72 then
- if not v19.ShowChannelsBar then
- if p67 ~= v19.GeneralChannelName then
- local v81 = v36:GetChannel(v19.GeneralChannelName);
- if v81 then
- v81:AddMessageToChannel(v80);
- end;
- end;
- end;
- end;
- end;
- end;
- DoFadeInFromNewInformation();
- end;
- end;
- u3.OnChannelJoined.OnClientEvent:connect(function(p73, p74, p75, p76)
- HandleChannelJoined(p73, p74, p75, p76, false, true);
- end);
- u3.OnChannelLeft.OnClientEvent:connect(function(p77)
- v36:RemoveChannel(p77);
- DoFadeInFromNewInformation();
- end);
- u3.OnMuted.OnClientEvent:connect(function(p78)
- end);
- u3.OnUnmuted.OnClientEvent:connect(function(p79)
- end);
- u3.OnMainChannelSet.OnClientEvent:connect(function(p80)
- DoSwitchCurrentChannel(p80);
- end);
- coroutine.wrap(function()
- local l__ChannelNameColorUpdated__82 = v15:WaitForChild("ChannelNameColorUpdated", 5);
- if l__ChannelNameColorUpdated__82 then
- l__ChannelNameColorUpdated__82.OnClientEvent:connect(function(p81, p82)
- v40:SetChannelNameColor(p81, p82);
- end);
- end;
- end)();
- local u23 = nil;
- local u24 = nil;
- local u25 = nil;
- local u26 = nil;
- pcall(function()
- u23 = l__StarterGui__13:GetCore("PlayerBlockedEvent");
- u24 = l__StarterGui__13:GetCore("PlayerMutedEvent");
- u25 = l__StarterGui__13:GetCore("PlayerUnblockedEvent");
- u26 = l__StarterGui__13:GetCore("PlayerUnmutedEvent");
- end);
- function SendSystemMessageToSelf(p83)
- local v83 = v36:GetCurrentChannel();
- if v83 then
- v83:AddMessageToChannel({
- ID = -1,
- FromSpeaker = nil,
- SpeakerUserId = 0,
- OriginalChannel = v83.Name,
- IsFiltered = true,
- MessageLength = string.len(p83),
- Message = trimTrailingSpaces(p83),
- MessageType = v18.MessageTypeSystem,
- Time = os.time(),
- ExtraData = nil
- });
- end;
- end;
- function MutePlayer(p84)
- local l__MutePlayerRequest__84 = v15:FindFirstChild("MutePlayerRequest");
- if l__MutePlayerRequest__84 then
- else
- return false;
- end;
- return l__MutePlayerRequest__84:InvokeServer(p84.Name);
- end;
- if u23 then
- u23.Event:connect(function(p85)
- if MutePlayer(p85) then
- if v19.PlayerDisplayNamesEnabled then
- local v85 = p85.DisplayName;
- else
- v85 = p85.Name;
- end;
- SendSystemMessageToSelf(string.gsub(u1:Get("GameChat_ChatMain_SpeakerHasBeenBlocked", string.format("Speaker '%s' has been blocked.", v85)), "{RBX_NAME}", v85));
- end;
- end);
- end;
- if u24 then
- u24.Event:connect(function(p86)
- if MutePlayer(p86) then
- if v19.PlayerDisplayNamesEnabled then
- local v86 = p86.DisplayName;
- else
- v86 = p86.Name;
- end;
- SendSystemMessageToSelf(string.gsub(u1:Get("GameChat_ChatMain_SpeakerHasBeenMuted", string.format("Speaker '%s' has been muted.", v86)), "{RBX_NAME}", v86));
- end;
- end);
- end;
- function UnmutePlayer(p87)
- local l__UnMutePlayerRequest__87 = v15:FindFirstChild("UnMutePlayerRequest");
- if l__UnMutePlayerRequest__87 then
- else
- return false;
- end;
- return l__UnMutePlayerRequest__87:InvokeServer(p87.Name);
- end;
- if u25 then
- u25.Event:connect(function(p88)
- if UnmutePlayer(p88) then
- if v19.PlayerDisplayNamesEnabled then
- local v88 = p88.DisplayName;
- else
- v88 = p88.Name;
- end;
- SendSystemMessageToSelf(string.gsub(u1:Get("GameChat_ChatMain_SpeakerHasBeenUnBlocked", string.format("Speaker '%s' has been unblocked.", v88)), "{RBX_NAME}", v88));
- end;
- end);
- end;
- if u26 then
- u26.Event:connect(function(p89)
- if UnmutePlayer(p89) then
- if v19.PlayerDisplayNamesEnabled then
- local v89 = p89.DisplayName;
- else
- v89 = p89.Name;
- end;
- SendSystemMessageToSelf(string.gsub(u1:Get("GameChat_ChatMain_SpeakerHasBeenUnMuted", string.format("Speaker '%s' has been unmuted.", v89)), "{RBX_NAME}", v89));
- end;
- end);
- end;
- spawn(function()
- if v30.UserId > 0 then
- pcall(function()
- local v90 = l__StarterGui__13:GetCore("GetBlockedUserIds");
- if #v90 > 0 then
- local l__SetBlockedUserIdsRequest__91 = v15:FindFirstChild("SetBlockedUserIdsRequest");
- if l__SetBlockedUserIdsRequest__91 then
- l__SetBlockedUserIdsRequest__91:FireServer(v90);
- end;
- end;
- end);
- end;
- end);
- spawn(function()
- local v92, v93 = pcall(function()
- return l__Chat__12:CanUserChatAsync(v30.UserId);
- end);
- if v92 then
- u19 = l__RunService__28:IsStudio() and v93;
- end;
- end);
- local v94 = u3.GetInitDataRequest:InvokeServer();
- for v95, v96 in pairs(v94.Channels) do
- if v96[1] == v19.GeneralChannelName then
- HandleChannelJoined(v96[1], v96[2], v96[3], v96[4], true, false);
- end;
- end;
- for v97, v98 in pairs(v94.Channels) do
- if v98[1] ~= v19.GeneralChannelName then
- HandleChannelJoined(v98[1], v98[2], v98[3], v98[4], true, false);
- end;
- end;
- return u14;
- Channelsbar:
- -- Script GUID: {be3297a0-72d1-47b7-9780-04a82e644ed4}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local l__PlayerGui__2 = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui");
- local l__Parent__3 = script.Parent;
- local v4 = {};
- v4.__index = v4;
- local u1 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
- local u2 = require(l__Parent__3:WaitForChild("MessageSender"));
- function v4.CreateGuiObjects(p1, p2)
- local v5 = Instance.new("Frame");
- v5.Selectable = false;
- v5.Size = UDim2.new(1, 0, 1, 0);
- v5.BackgroundTransparency = 1;
- v5.Parent = p2;
- local v6 = Instance.new("Frame");
- v6.Selectable = false;
- v6.Name = "ScrollingBase";
- v6.BackgroundTransparency = 1;
- v6.ClipsDescendants = true;
- v6.Size = UDim2.new(1, 0, 1, 0);
- v6.Position = UDim2.new(0, 0, 0, 0);
- v6.Parent = v5;
- local v7 = Instance.new("Frame");
- v7.Selectable = false;
- v7.Name = "ScrollerSizer";
- v7.BackgroundTransparency = 1;
- v7.Size = UDim2.new(1, 0, 1, 0);
- v7.Position = UDim2.new(0, 0, 0, 0);
- v7.Parent = v6;
- local v8 = Instance.new("Frame");
- v8.Selectable = false;
- v8.Name = "ScrollerFrame";
- v8.BackgroundTransparency = 1;
- v8.Size = UDim2.new(1, 0, 1, 0);
- v8.Position = UDim2.new(0, 0, 0, 0);
- v8.Parent = v7;
- local v9 = Instance.new("Frame");
- v9.Selectable = false;
- v9.Size = UDim2.new(1, 0, 1, 0);
- v9.Position = UDim2.new(0, 0, 0, 0);
- v9.ClipsDescendants = true;
- v9.BackgroundTransparency = 1;
- v9.Parent = v5;
- local v10 = Instance.new("Frame");
- v10.Selectable = false;
- v10.Name = "LeaveConfirmationFrame";
- v10.Size = UDim2.new(1, 0, 1, 0);
- v10.Position = UDim2.new(0, 0, 1, 0);
- v10.BackgroundTransparency = 0.6;
- v10.BorderSizePixel = 0;
- v10.BackgroundColor3 = Color3.new(0, 0, 0);
- v10.Parent = v9;
- local v11 = Instance.new("TextButton");
- v11.Selectable = false;
- v11.Size = UDim2.new(1, 0, 1, 0);
- v11.BackgroundTransparency = 1;
- v11.Text = "";
- v11.Parent = v10;
- local v12 = Instance.new("TextButton");
- v12.Selectable = false;
- v12.Size = UDim2.new(0.25, 0, 1, 0);
- v12.BackgroundTransparency = 1;
- v12.Font = u1.DefaultFont;
- v12.TextSize = 18;
- v12.TextStrokeTransparency = 0.75;
- v12.Position = UDim2.new(0, 0, 0, 0);
- v12.TextColor3 = Color3.new(0, 1, 0);
- v12.Text = "Confirm";
- v12.Parent = v10;
- local v13 = v12:Clone();
- v13.Parent = v10;
- v13.Position = UDim2.new(0.75, 0, 0, 0);
- v13.TextColor3 = Color3.new(1, 0, 0);
- v13.Text = "Cancel";
- local v14 = Instance.new("TextLabel");
- v14.Selectable = false;
- v14.Size = UDim2.new(0.5, 0, 1, 0);
- v14.Position = UDim2.new(0.25, 0, 0, 0);
- v14.BackgroundTransparency = 1;
- v14.TextColor3 = Color3.new(1, 1, 1);
- v14.TextStrokeTransparency = 0.75;
- v14.Text = "Leave channel <XX>?";
- v14.Font = u1.DefaultFont;
- v14.TextSize = 18;
- v14.Parent = v10;
- local v15 = Instance.new("StringValue");
- v15.Name = "LeaveTarget";
- v15.Parent = v10;
- local l__Position__3 = v10.Position;
- v12.MouseButton1Click:connect(function()
- u2:SendMessage(string.format("/leave %s", v15.Value), nil);
- v10:TweenPosition(l__Position__3, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
- end);
- v13.MouseButton1Click:connect(function()
- v10:TweenPosition(l__Position__3, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true);
- end);
- local v16 = Instance.new("ImageButton", v5);
- v16.Selectable = u1.GamepadNavigationEnabled;
- v16.Name = "PageLeftButton";
- v16.SizeConstraint = Enum.SizeConstraint.RelativeYY;
- v16.Size = UDim2.new(0.7, 0, 0.7, 0);
- v16.BackgroundTransparency = 1;
- v16.Position = UDim2.new(0, 4, 0.15000000000000002, 0);
- v16.Visible = false;
- v16.Image = "rbxassetid://471630199";
- local v17 = Instance.new("ImageLabel", v16);
- v17.Name = "ArrowLabel";
- v17.BackgroundTransparency = 1;
- v17.Size = UDim2.new(0.4, 0, 0.4, 0);
- v17.Image = "rbxassetid://471630112";
- local v18 = Instance.new("Frame", v5);
- v18.Selectable = false;
- v18.BackgroundTransparency = 1;
- v18.Name = "PositionalHelper";
- v18.Size = v16.Size;
- v18.SizeConstraint = v16.SizeConstraint;
- v18.Position = UDim2.new(1, 0, 0.15000000000000002, 0);
- local v19 = v16:Clone();
- v19.Parent = v18;
- v19.Name = "PageRightButton";
- v19.Size = UDim2.new(1, 0, 1, 0);
- v19.SizeConstraint = Enum.SizeConstraint.RelativeXY;
- v19.Position = UDim2.new(-1, -4, 0, 0);
- local v20 = UDim2.new(0.05, 0, 0, 0);
- v19.ArrowLabel.Position = UDim2.new(0.3, 0, 0.3, 0) + v20;
- v16.ArrowLabel.Position = UDim2.new(0.3, 0, 0.3, 0) - v20;
- v16.ArrowLabel.Rotation = 180;
- p1.GuiObject = v5;
- p1.GuiObjects.BaseFrame = v5;
- p1.GuiObjects.ScrollerSizer = v7;
- p1.GuiObjects.ScrollerFrame = v8;
- p1.GuiObjects.PageLeftButton = v16;
- p1.GuiObjects.PageRightButton = v19;
- p1.GuiObjects.LeaveConfirmationFrame = v10;
- p1.GuiObjects.LeaveConfirmationNotice = v14;
- p1.GuiObjects.PageLeftButtonArrow = v16.ArrowLabel;
- p1.GuiObjects.PageRightButtonArrow = v19.ArrowLabel;
- p1:AnimGuiObjects();
- v16.MouseButton1Click:connect(function()
- p1:ScrollChannelsFrame(-1);
- end);
- v19.MouseButton1Click:connect(function()
- p1:ScrollChannelsFrame(1);
- end);
- p1:ScrollChannelsFrame(0);
- end;
- function v4.UpdateMessagePostedInChannel(p3, p4)
- local v21 = p3:GetChannelTab(p4);
- if v21 then
- v21:UpdateMessagePostedInChannel();
- return;
- end;
- warn("ChannelsTab '" .. p4 .. "' does not exist!");
- end;
- local u4 = require(l__Parent__3:WaitForChild("ChannelsTab"));
- function v4.AddChannelTab(p5, p6)
- if p5:GetChannelTab(p6) then
- error("Channel tab '" .. p6 .. "'already exists!");
- end;
- local v22 = u4.new(p6);
- v22.GuiObject.Parent = p5.GuiObjects.ScrollerFrame;
- p5.ChannelTabs[p6:lower()] = v22;
- p5.NumTabs = p5.NumTabs + 1;
- p5:OrganizeChannelTabs();
- if u1.RightClickToLeaveChannelEnabled then
- v22.NameTag.MouseButton2Click:connect(function()
- p5.LeaveConfirmationNotice.Text = string.format("Leave channel %s?", v22.ChannelName);
- p5.LeaveConfirmationFrame.LeaveTarget.Value = v22.ChannelName;
- p5.LeaveConfirmationFrame:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.2, true);
- end);
- end;
- return v22;
- end;
- function v4.RemoveChannelTab(p7, p8)
- if not p7:GetChannelTab(p8) then
- error("Channel tab '" .. p8 .. "'does not exist!");
- end;
- local v23 = p8:lower();
- p7.ChannelTabs[v23]:Destroy();
- p7.ChannelTabs[v23] = nil;
- p7.NumTabs = p7.NumTabs - 1;
- p7:OrganizeChannelTabs();
- end;
- function v4.GetChannelTab(p9, p10)
- return p9.ChannelTabs[p10:lower()];
- end;
- function v4.OrganizeChannelTabs(p11)
- local v24 = {};
- table.insert(v24, p11:GetChannelTab(u1.GeneralChannelName));
- table.insert(v24, p11:GetChannelTab("System"));
- for v25, v26 in pairs(p11.ChannelTabs) do
- if v26.ChannelName ~= u1.GeneralChannelName and v26.ChannelName ~= "System" then
- table.insert(v24, v26);
- end;
- end;
- for v27, v28 in pairs(v24) do
- v28.GuiObject.Position = UDim2.new(v27 - 1, 0, 0, 0);
- end;
- p11.GuiObjects.ScrollerSizer.Size = UDim2.new(1 / math.max(1, math.min(u1.ChannelsBarFullTabSize, p11.NumTabs)), 0, 1, 0);
- p11:ScrollChannelsFrame(0);
- end;
- function v4.ResizeChannelTabText(p12, p13)
- for v29, v30 in pairs(p12.ChannelTabs) do
- v30:SetTextSize(p13);
- end;
- end;
- function v4.ScrollChannelsFrame(p14, p15)
- if p14.ScrollChannelsFrameLock then
- return;
- end;
- p14.ScrollChannelsFrameLock = true;
- local l__ChannelsBarFullTabSize__31 = u1.ChannelsBarFullTabSize;
- local v32 = p14.CurPageNum + p15;
- if v32 < 0 then
- v32 = 0;
- elseif v32 > 0 and p14.NumTabs < v32 + l__ChannelsBarFullTabSize__31 then
- v32 = p14.NumTabs - l__ChannelsBarFullTabSize__31;
- end;
- p14.CurPageNum = v32;
- local v33 = UDim2.new(-p14.CurPageNum, 0, 0, 0);
- p14.GuiObjects.PageLeftButton.Visible = p14.CurPageNum > 0;
- p14.GuiObjects.PageRightButton.Visible = p14.CurPageNum + l__ChannelsBarFullTabSize__31 < p14.NumTabs;
- if p15 == 0 then
- p14.ScrollChannelsFrameLock = false;
- return;
- end;
- p14:WaitUntilParentedCorrectly();
- p14.GuiObjects.ScrollerFrame:TweenPosition(v33, Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.15, true, function()
- p14.ScrollChannelsFrameLock = false;
- end);
- end;
- local u5 = require(l__Parent__3:WaitForChild("CurveUtil"));
- function v4.FadeOutBackground(p16, p17)
- for v34, v35 in pairs(p16.ChannelTabs) do
- v35:FadeOutBackground(p17);
- end;
- p16.AnimParams.Background_TargetTransparency = 1;
- p16.AnimParams.Background_NormalizedExptValue = u5:NormalizedDefaultExptValueInSeconds(p17);
- end;
- function v4.FadeInBackground(p18, p19)
- for v36, v37 in pairs(p18.ChannelTabs) do
- v37:FadeInBackground(p19);
- end;
- p18.AnimParams.Background_TargetTransparency = 0.6;
- p18.AnimParams.Background_NormalizedExptValue = u5:NormalizedDefaultExptValueInSeconds(p19);
- end;
- function v4.FadeOutText(p20, p21)
- for v38, v39 in pairs(p20.ChannelTabs) do
- v39:FadeOutText(p21);
- end;
- end;
- function v4.FadeInText(p22, p23)
- for v40, v41 in pairs(p22.ChannelTabs) do
- v41:FadeInText(p23);
- end;
- end;
- function v4.AnimGuiObjects(p24)
- p24.GuiObjects.PageLeftButton.ImageTransparency = p24.AnimParams.Background_CurrentTransparency;
- p24.GuiObjects.PageRightButton.ImageTransparency = p24.AnimParams.Background_CurrentTransparency;
- p24.GuiObjects.PageLeftButtonArrow.ImageTransparency = p24.AnimParams.Background_CurrentTransparency;
- p24.GuiObjects.PageRightButtonArrow.ImageTransparency = p24.AnimParams.Background_CurrentTransparency;
- end;
- function v4.InitializeAnimParams(p25)
- p25.AnimParams.Background_TargetTransparency = 0.6;
- p25.AnimParams.Background_CurrentTransparency = 0.6;
- p25.AnimParams.Background_NormalizedExptValue = u5:NormalizedDefaultExptValueInSeconds(0);
- end;
- function v4.Update(p26, p27)
- for v42, v43 in pairs(p26.ChannelTabs) do
- v43:Update(p27);
- end;
- p26.AnimParams.Background_CurrentTransparency = u5:Expt(p26.AnimParams.Background_CurrentTransparency, p26.AnimParams.Background_TargetTransparency, p26.AnimParams.Background_NormalizedExptValue, p27);
- p26:AnimGuiObjects();
- end;
- function v4.WaitUntilParentedCorrectly(p28)
- while not p28.GuiObject:IsDescendantOf(game:GetService("Players").LocalPlayer) do
- p28.GuiObject.AncestryChanged:wait();
- end;
- end;
- function v1.new()
- local v44 = setmetatable({}, v4);
- v44.GuiObject = nil;
- v44.GuiObjects = {};
- v44.ChannelTabs = {};
- v44.NumTabs = 0;
- v44.CurPageNum = 0;
- v44.ScrollChannelsFrameLock = false;
- v44.AnimParams = {};
- v44:InitializeAnimParams();
- u1.SettingsChanged:connect(function(p29, p30)
- if p29 == "ChatChannelsTabTextSize" then
- v44:ResizeChannelTabText(p30);
- end;
- end);
- return v44;
- end;
- return v1;
- Chatbar:
- -- Script GUID: {225d0ebe-465c-434d-9573-b847046e759e}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local l__UserInputService__2 = game:GetService("UserInputService");
- local l__RunService__3 = game:GetService("RunService");
- local l__Players__4 = game:GetService("Players");
- local l__TextService__5 = game:GetService("TextService");
- local v6 = l__Players__4.LocalPlayer;
- while not v6 do
- l__Players__4.PlayerAdded:wait();
- v6 = l__Players__4.LocalPlayer;
- end;
- local l__Chat__7 = game:GetService("Chat");
- local l__ClientChatModules__8 = l__Chat__7:WaitForChild("ClientChatModules");
- local l__Parent__9 = script.Parent;
- local v10 = require(l__ClientChatModules__8:WaitForChild("ChatSettings"));
- local v11 = require(l__Parent__9:WaitForChild("CurveUtil"));
- local v12 = require(l__ClientChatModules__8:WaitForChild("CommandModules"):WaitForChild("Whisper"));
- local v13 = require(l__Parent__9:WaitForChild("MessageSender"));
- local u1 = nil;
- pcall(function()
- u1 = require(game:GetService("Chat").ClientChatModules.ChatLocalization);
- end);
- if u1 == nil then
- u1 = {
- Get = function(p1, p2, p3)
- return p3;
- end
- };
- end;
- local v14, v15 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserChatNewMessageLengthCheck2");
- end);
- local v16 = {};
- v16.__index = v16;
- function v16.CreateGuiObjects(p4, p5)
- p4.ChatBarParentFrame = p5;
- local v17 = Instance.new("Frame");
- v17.Selectable = false;
- v17.Size = UDim2.new(1, 0, 1, 0);
- v17.BackgroundTransparency = 0.6;
- v17.BorderSizePixel = 0;
- v17.BackgroundColor3 = v10.ChatBarBackGroundColor;
- v17.Parent = p5;
- local v18 = Instance.new("Frame");
- v18.Selectable = false;
- v18.Name = "BoxFrame";
- v18.BackgroundTransparency = 0.6;
- v18.BorderSizePixel = 0;
- v18.BackgroundColor3 = v10.ChatBarBoxColor;
- v18.Size = UDim2.new(1, -14, 1, -14);
- v18.Position = UDim2.new(0, 7, 0, 7);
- v18.Parent = v17;
- local v19 = Instance.new("Frame");
- v19.BackgroundTransparency = 1;
- v19.Size = UDim2.new(1, -10, 1, -10);
- v19.Position = UDim2.new(0, 5, 0, 5);
- v19.Parent = v18;
- local v20 = Instance.new("TextBox");
- v20.Selectable = v10.GamepadNavigationEnabled;
- v20.Name = "ChatBar";
- v20.BackgroundTransparency = 1;
- v20.Size = UDim2.new(1, 0, 1, 0);
- v20.Position = UDim2.new(0, 0, 0, 0);
- v20.TextSize = v10.ChatBarTextSize;
- v20.Font = v10.ChatBarFont;
- v20.TextColor3 = v10.ChatBarTextColor;
- v20.TextTransparency = 0.4;
- v20.TextStrokeTransparency = 1;
- v20.ClearTextOnFocus = false;
- v20.TextXAlignment = Enum.TextXAlignment.Left;
- v20.TextYAlignment = Enum.TextYAlignment.Top;
- v20.TextWrapped = true;
- v20.Text = "";
- v20.Parent = v19;
- local v21 = Instance.new("TextButton");
- v21.Selectable = false;
- v21.Name = "MessageMode";
- v21.BackgroundTransparency = 1;
- v21.Position = UDim2.new(0, 0, 0, 0);
- v21.TextSize = v10.ChatBarTextSize;
- v21.Font = v10.ChatBarFont;
- v21.TextXAlignment = Enum.TextXAlignment.Left;
- v21.TextWrapped = true;
- v21.Text = "";
- v21.Size = UDim2.new(0, 0, 0, 0);
- v21.TextYAlignment = Enum.TextYAlignment.Center;
- v21.TextColor3 = p4:GetDefaultChannelNameColor();
- v21.Visible = true;
- v21.Parent = v19;
- local v22 = Instance.new("TextLabel");
- v22.Selectable = false;
- v22.TextWrapped = true;
- v22.BackgroundTransparency = 1;
- v22.Size = v20.Size;
- v22.Position = v20.Position;
- v22.TextSize = v20.TextSize;
- v22.Font = v20.Font;
- v22.TextColor3 = v20.TextColor3;
- v22.TextTransparency = v20.TextTransparency;
- v22.TextStrokeTransparency = v20.TextStrokeTransparency;
- v22.TextXAlignment = v20.TextXAlignment;
- v22.TextYAlignment = v20.TextYAlignment;
- v22.Text = "...";
- v22.Parent = v19;
- p4.GuiObject = v17;
- p4.TextBox = v20;
- p4.TextLabel = v22;
- p4.GuiObjects.BaseFrame = v17;
- p4.GuiObjects.TextBoxFrame = v18;
- p4.GuiObjects.TextBox = v20;
- p4.GuiObjects.TextLabel = v22;
- p4.GuiObjects.MessageModeTextButton = v21;
- p4:AnimGuiObjects();
- p4:SetUpTextBoxEvents(v20, v22, v21);
- if p4.UserHasChatOff then
- p4:DoLockChatBar();
- end;
- p4.eGuiObjectsChanged:Fire();
- end;
- function v16.DoLockChatBar(p6)
- if p6.TextLabel then
- if v6.UserId > 0 then
- p6.TextLabel.Text = u1:Get("GameChat_ChatMessageValidator_SettingsError", "To chat in game, turn on chat in your Privacy Settings.");
- else
- p6.TextLabel.Text = u1:Get("GameChat_SwallowGuestChat_Message", "Sign up to chat in game.");
- end;
- p6:CalculateSize();
- end;
- if p6.TextBox then
- p6.TextBox.Active = false;
- p6.TextBox.Focused:connect(function()
- p6.TextBox:ReleaseFocus();
- end);
- end;
- end;
- local u2 = v14 or v15;
- function v16.SetUpTextBoxEvents(p7, p8, p9, p10)
- for v23, v24 in pairs(p7.TextBoxConnections) do
- v24:disconnect();
- p7.TextBoxConnections[v23] = nil;
- end;
- p7.TextBoxConnections.UserInputBegan = l__UserInputService__2.InputBegan:connect(function(p11, p12)
- if p11.KeyCode == Enum.KeyCode.Backspace and p7:IsFocused() and p8.Text == "" then
- p7:SetChannelTarget(v10.GeneralChannelName);
- end;
- end);
- p7.TextBoxConnections.TextBoxChanged = p8.Changed:connect(function(p13)
- local v25 = nil;
- if p13 == "AbsoluteSize" then
- p7:CalculateSize();
- return;
- end;
- if p13 ~= "Text" then
- return;
- end;
- p7:CalculateSize();
- if u2 then
- if v10.MaximumMessageLength < utf8.len(utf8.nfcnormalize(p8.Text)) then
- p8.Text = p7.PreviousText;
- else
- p7.PreviousText = p8.Text;
- end;
- elseif v10.MaximumMessageLength < string.len(p8.Text) then
- p8.Text = string.sub(p8.Text, 1, v10.MaximumMessageLength);
- return;
- end;
- if not p7.InCustomState then
- v25 = p7.CommandProcessor:ProcessInProgressChatMessage(p8.Text, p7.ChatWindow, p7);
- if not v25 then
- return;
- end;
- else
- p7.CustomState:TextUpdated();
- return;
- end;
- p7.InCustomState = true;
- p7.CustomState = v25;
- end);
- p7.TextBoxConnections.MessageModeClick = p10.MouseButton1Click:connect(function()
- if p10.Text ~= "" then
- p7:SetChannelTarget(v10.GeneralChannelName);
- end;
- end);
- local function u3(p14)
- if not p14 and p8.Text == "" then
- p9.Visible = true;
- return;
- end;
- p9.Visible = false;
- end;
- p7.TextBoxConnections.TextBoxFocused = p8.Focused:connect(function()
- if not p7.UserHasChatOff then
- p7:CalculateSize();
- u3(true);
- end;
- end);
- p7.TextBoxConnections.TextBoxFocusLost = p8.FocusLost:connect(function(p15, p16)
- p7:CalculateSize();
- if p16 and p16.KeyCode == Enum.KeyCode.Escape then
- p8.Text = "";
- end;
- u3(false);
- end);
- end;
- function v16.GetTextBox(p17)
- return p17.TextBox;
- end;
- function v16.GetMessageModeTextButton(p18)
- return p18.GuiObjects.MessageModeTextButton;
- end;
- function v16.GetMessageModeTextLabel(p19)
- return p19:GetMessageModeTextButton();
- end;
- function v16.IsFocused(p20)
- if p20.UserHasChatOff then
- return false;
- end;
- return p20:GetTextBox():IsFocused();
- end;
- function v16.GetVisible(p21)
- return p21.GuiObject.Visible;
- end;
- function v16.CaptureFocus(p22)
- if not p22.UserHasChatOff then
- p22:GetTextBox():CaptureFocus();
- end;
- end;
- function v16.ReleaseFocus(p23, p24)
- p23:GetTextBox():ReleaseFocus(p24);
- end;
- function v16.ResetText(p25)
- p25:GetTextBox().Text = "";
- end;
- function v16.SetText(p26, p27)
- p26:GetTextBox().Text = p27;
- end;
- function v16.GetEnabled(p28)
- return p28.GuiObject.Visible;
- end;
- function v16.SetEnabled(p29, p30)
- if p29.UserHasChatOff then
- p29.GuiObject.Visible = true;
- return;
- end;
- p29.GuiObject.Visible = p30;
- end;
- function v16.SetTextLabelText(p31, p32)
- if not p31.UserHasChatOff then
- p31.TextLabel.Text = p32;
- end;
- end;
- function v16.SetTextBoxText(p33, p34)
- p33.TextBox.Text = p34;
- end;
- function v16.GetTextBoxText(p35)
- return p35.TextBox.Text;
- end;
- function v16.ResetSize(p36)
- p36.TargetYSize = 0;
- p36:TweenToTargetYSize();
- end;
- local function u4(p37)
- return l__TextService__5:GetTextSize(p37.Text, p37.TextSize, p37.Font, Vector2.new(p37.AbsoluteSize.X, 10000));
- end;
- function v16.CalculateSize(p38)
- if p38.CalculatingSizeLock then
- return;
- end;
- p38.CalculatingSizeLock = true;
- if p38:IsFocused() or p38.TextBox.Text ~= "" then
- local v26 = p38.TextBox.TextSize;
- local v27 = u4(p38.TextBox).Y;
- else
- v26 = p38.TextLabel.TextSize;
- v27 = u4(p38.TextLabel).Y;
- end;
- local v28 = v27 - v26;
- if p38.TargetYSize ~= v28 then
- p38.TargetYSize = v28;
- p38:TweenToTargetYSize();
- end;
- p38.CalculatingSizeLock = false;
- end;
- function v16.TweenToTargetYSize(p39)
- local v29 = UDim2.new(1, 0, 1, p39.TargetYSize);
- p39.GuiObject.Size = v29;
- p39.GuiObject.Size = p39.GuiObject.Size;
- local u5 = math.min(1, math.abs(p39.GuiObject.AbsoluteSize.Y - p39.GuiObject.AbsoluteSize.Y) * (1 / p39.TweenPixelsPerSecond));
- if not pcall(function()
- p39.GuiObject:TweenSize(v29, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, u5, true);
- end) then
- p39.GuiObject.Size = v29;
- end;
- end;
- function v16.SetTextSize(p40, p41)
- if not p40:IsInCustomState() then
- if p40.TextBox then
- p40.TextBox.TextSize = p41;
- end;
- if p40.TextLabel then
- p40.TextLabel.TextSize = p41;
- end;
- end;
- end;
- function v16.GetDefaultChannelNameColor(p42)
- if not v10.DefaultChannelNameColor then
- return Color3.fromRGB(35, 76, 142);
- end;
- return v10.DefaultChannelNameColor;
- end;
- function v16.SetChannelTarget(p43, p44)
- local l__MessageModeTextButton__30 = p43.GuiObjects.MessageModeTextButton;
- local l__TextBox__31 = p43.TextBox;
- local l__TextLabel__32 = p43.TextLabel;
- p43.TargetChannel = p44;
- if not p43:IsInCustomState() then
- if p44 == v10.GeneralChannelName then
- l__MessageModeTextButton__30.Text = "";
- l__MessageModeTextButton__30.Size = UDim2.new(0, 0, 0, 0);
- l__TextBox__31.Size = UDim2.new(1, 0, 1, 0);
- l__TextBox__31.Position = UDim2.new(0, 0, 0, 0);
- l__TextLabel__32.Size = UDim2.new(1, 0, 1, 0);
- l__TextLabel__32.Position = UDim2.new(0, 0, 0, 0);
- return;
- end;
- else
- return;
- end;
- l__MessageModeTextButton__30.Size = UDim2.new(0, 1000, 1, 0);
- local v33 = p44;
- if u1.tryLocalize then
- v33 = u1:tryLocalize(p44);
- end;
- l__MessageModeTextButton__30.Text = string.format("[%s] ", v33);
- local v34 = p43:GetChannelNameColor(p44);
- if v34 then
- l__MessageModeTextButton__30.TextColor3 = v34;
- else
- l__MessageModeTextButton__30.TextColor3 = p43:GetDefaultChannelNameColor();
- end;
- local l__X__35 = l__MessageModeTextButton__30.TextBounds.X;
- l__MessageModeTextButton__30.Size = UDim2.new(0, l__X__35, 1, 0);
- l__TextBox__31.Size = UDim2.new(1, -l__X__35, 1, 0);
- l__TextBox__31.Position = UDim2.new(0, l__X__35, 0, 0);
- l__TextLabel__32.Size = UDim2.new(1, -l__X__35, 1, 0);
- l__TextLabel__32.Position = UDim2.new(0, l__X__35, 0, 0);
- end;
- function v16.IsInCustomState(p45)
- return p45.InCustomState;
- end;
- function v16.ResetCustomState(p46)
- if p46.InCustomState then
- p46.CustomState:Destroy();
- p46.CustomState = nil;
- p46.InCustomState = false;
- p46.ChatBarParentFrame:ClearAllChildren();
- p46:CreateGuiObjects(p46.ChatBarParentFrame);
- p46:SetTextLabelText(u1:Get("GameChat_ChatMain_ChatBarText", "To chat click here or press \"/\" key"));
- end;
- end;
- function v16.EnterWhisperState(p47, p48)
- p47:ResetCustomState();
- if v12.CustomStateCreator then
- p47.CustomState = v12.CustomStateCreator(p48, p47.ChatWindow, p47, v10);
- p47.InCustomState = true;
- else
- if v10.PlayerDisplayNamesEnabled then
- local v36 = p48.DisplayName;
- else
- v36 = p48.Name;
- end;
- p47:SetText("/w " .. v36);
- end;
- p47:CaptureFocus();
- end;
- function v16.GetCustomMessage(p49)
- if not p49.InCustomState then
- return nil;
- end;
- return p49.CustomState:GetMessage();
- end;
- function v16.CustomStateProcessCompletedMessage(p50, p51)
- if not p50.InCustomState then
- return false;
- end;
- return p50.CustomState:ProcessCompletedMessage();
- end;
- function v16.FadeOutBackground(p52, p53)
- p52.AnimParams.Background_TargetTransparency = 1;
- p52.AnimParams.Background_NormalizedExptValue = v11:NormalizedDefaultExptValueInSeconds(p53);
- p52:FadeOutText(p53);
- end;
- function v16.FadeInBackground(p54, p55)
- p54.AnimParams.Background_TargetTransparency = 0.6;
- p54.AnimParams.Background_NormalizedExptValue = v11:NormalizedDefaultExptValueInSeconds(p55);
- p54:FadeInText(p55);
- end;
- function v16.FadeOutText(p56, p57)
- p56.AnimParams.Text_TargetTransparency = 1;
- p56.AnimParams.Text_NormalizedExptValue = v11:NormalizedDefaultExptValueInSeconds(p57);
- end;
- function v16.FadeInText(p58, p59)
- p58.AnimParams.Text_TargetTransparency = 0.4;
- p58.AnimParams.Text_NormalizedExptValue = v11:NormalizedDefaultExptValueInSeconds(p59);
- end;
- function v16.AnimGuiObjects(p60)
- p60.GuiObject.BackgroundTransparency = p60.AnimParams.Background_CurrentTransparency;
- p60.GuiObjects.TextBoxFrame.BackgroundTransparency = p60.AnimParams.Background_CurrentTransparency;
- p60.GuiObjects.TextLabel.TextTransparency = p60.AnimParams.Text_CurrentTransparency;
- p60.GuiObjects.TextBox.TextTransparency = p60.AnimParams.Text_CurrentTransparency;
- p60.GuiObjects.MessageModeTextButton.TextTransparency = p60.AnimParams.Text_CurrentTransparency;
- end;
- function v16.InitializeAnimParams(p61)
- p61.AnimParams.Text_TargetTransparency = 0.4;
- p61.AnimParams.Text_CurrentTransparency = 0.4;
- p61.AnimParams.Text_NormalizedExptValue = 1;
- p61.AnimParams.Background_TargetTransparency = 0.6;
- p61.AnimParams.Background_CurrentTransparency = 0.6;
- p61.AnimParams.Background_NormalizedExptValue = 1;
- end;
- function v16.Update(p62, p63)
- p62.AnimParams.Text_CurrentTransparency = v11:Expt(p62.AnimParams.Text_CurrentTransparency, p62.AnimParams.Text_TargetTransparency, p62.AnimParams.Text_NormalizedExptValue, p63);
- p62.AnimParams.Background_CurrentTransparency = v11:Expt(p62.AnimParams.Background_CurrentTransparency, p62.AnimParams.Background_TargetTransparency, p62.AnimParams.Background_NormalizedExptValue, p63);
- p62:AnimGuiObjects();
- end;
- function v16.SetChannelNameColor(p64, p65, p66)
- p64.ChannelNameColors[p65] = p66;
- if p64.GuiObjects.MessageModeTextButton.Text == p65 then
- p64.GuiObjects.MessageModeTextButton.TextColor3 = p66;
- end;
- end;
- function v16.GetChannelNameColor(p67, p68)
- return p67.ChannelNameColors[p68];
- end;
- function v1.new(p69, p70)
- local v37 = setmetatable({}, v16);
- v37.GuiObject = nil;
- v37.ChatBarParentFrame = nil;
- v37.TextBox = nil;
- v37.TextLabel = nil;
- v37.GuiObjects = {};
- v37.eGuiObjectsChanged = Instance.new("BindableEvent");
- v37.GuiObjectsChanged = v37.eGuiObjectsChanged.Event;
- v37.TextBoxConnections = {};
- v37.PreviousText = "";
- v37.InCustomState = false;
- v37.CustomState = nil;
- v37.TargetChannel = nil;
- v37.CommandProcessor = p69;
- v37.ChatWindow = p70;
- v37.TweenPixelsPerSecond = 500;
- v37.TargetYSize = 0;
- v37.AnimParams = {};
- v37.CalculatingSizeLock = false;
- v37.ChannelNameColors = {};
- v37.UserHasChatOff = false;
- v37:InitializeAnimParams();
- v10.SettingsChanged:connect(function(p71, p72)
- if p71 == "ChatBarTextSize" then
- v37:SetTextSize(p72);
- end;
- end);
- coroutine.wrap(function()
- local v38, v39 = pcall(function()
- return l__Chat__7:CanUserChatAsync(v6.UserId);
- end);
- if (v38 and (l__RunService__3:IsStudio() and v39)) == false then
- v37.UserHasChatOff = true;
- v37:DoLockChatBar();
- end;
- end)();
- return v37;
- end;
- return v1;
- ChatChannel:
- -- Script GUID: {74e636fd-ff73-45d2-80f8-616ec38612ad}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local l__Parent__2 = script.Parent;
- local v3 = {};
- v3.__index = v3;
- function v3.Destroy(p1)
- p1.Destroyed = true;
- end;
- function v3.SetActive(p2, p3)
- if p3 == p2.Active then
- return;
- end;
- if p3 == false then
- p2.MessageLogDisplay:Clear();
- else
- p2.MessageLogDisplay:SetCurrentChannelName(p2.Name);
- for v4 = 1, #p2.MessageLog do
- p2.MessageLogDisplay:AddMessage(p2.MessageLog[v4]);
- end;
- end;
- p2.Active = p3;
- end;
- function v3.UpdateMessageFiltered(p4, p5)
- local v5 = 1;
- local l__MessageLog__6 = p4.MessageLog;
- local v7 = nil;
- while v5 <= #l__MessageLog__6 do
- local v8 = l__MessageLog__6[v5];
- if v8.ID == p5.ID then
- v7 = v8;
- break;
- end;
- v5 = v5 + 1;
- end;
- if v7 then
- v7.Message = p5.Message;
- v7.IsFiltered = true;
- if not p4.Active then
- return;
- end;
- else
- p4:AddMessageToChannelByTimeStamp(p5);
- return;
- end;
- p4.MessageLogDisplay:UpdateMessageFiltered(v7);
- end;
- local u1 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
- function v3.AddMessageToChannel(p6, p7)
- table.insert(p6.MessageLog, p7);
- if p6.Active then
- p6.MessageLogDisplay:AddMessage(p7);
- end;
- if u1.MessageHistoryLengthPerChannel < #p6.MessageLog then
- p6:RemoveLastMessageFromChannel();
- end;
- end;
- function v3.InternalAddMessageAtTimeStamp(p8, p9)
- for v9 = 1, #p8.MessageLog do
- if p9.Time < p8.MessageLog[v9].Time then
- table.insert(p8.MessageLog, v9, p9);
- return;
- end;
- end;
- table.insert(p8.MessageLog, p9);
- end;
- function v3.AddMessagesToChannelByTimeStamp(p10, p11, p12)
- for v10 = p12, #p11 do
- p10:InternalAddMessageAtTimeStamp(p11[v10]);
- end;
- while u1.MessageHistoryLengthPerChannel < #p10.MessageLog do
- table.remove(p10.MessageLog, 1);
- end;
- if p10.Active then
- p10.MessageLogDisplay:Clear();
- for v11 = 1, #p10.MessageLog do
- p10.MessageLogDisplay:AddMessage(p10.MessageLog[v11]);
- end;
- end;
- end;
- function v3.AddMessageToChannelByTimeStamp(p13, p14)
- if not (#p13.MessageLog >= 1) then
- p13:AddMessageToChannel(p14);
- return;
- end;
- if p14.Time < p13.MessageLog[1].Time then
- return;
- end;
- if p13.MessageLog[#p13.MessageLog].Time <= p14.Time then
- p13:AddMessageToChannel(p14);
- return;
- end;
- for v12 = 1, #p13.MessageLog do
- if p14.Time < p13.MessageLog[v12].Time then
- table.insert(p13.MessageLog, v12, p14);
- if u1.MessageHistoryLengthPerChannel < #p13.MessageLog then
- p13:RemoveLastMessageFromChannel();
- end;
- if p13.Active then
- p13.MessageLogDisplay:AddMessageAtIndex(p14, v12);
- end;
- return;
- end;
- end;
- end;
- function v3.RemoveLastMessageFromChannel(p15)
- table.remove(p15.MessageLog, 1);
- if p15.Active then
- p15.MessageLogDisplay:RemoveLastMessage();
- end;
- end;
- function v3.ClearMessageLog(p16)
- p16.MessageLog = {};
- if p16.Active then
- p16.MessageLogDisplay:Clear();
- end;
- end;
- function v3.RegisterChannelTab(p17, p18)
- p17.ChannelTab = p18;
- end;
- function v1.new(p19, p20)
- local v13 = setmetatable({}, v3);
- v13.Destroyed = false;
- v13.Active = false;
- v13.MessageLog = {};
- v13.MessageLogDisplay = p20;
- v13.ChannelTab = nil;
- v13.Name = p19;
- return v13;
- end;
- return v1;
- MessageLogDisplay:
- -- Script GUID: {67841505-e9b3-4fe5-9f0d-509728a9ca95}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1, v2 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserChatHistorySinksInput");
- end);
- local v3 = {
- ScrollBarThickness = 4
- };
- local l__Parent__4 = script.Parent;
- local v5 = {};
- v5.__index = v5;
- local u1 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
- local u2 = v1 or v2;
- function v5.Destroy(p1)
- p1.GuiObject:Destroy();
- p1.Destroyed = true;
- end;
- function v5.SetActive(p2, p3)
- p2.GuiObject.Visible = p3;
- end;
- function v5.UpdateMessageFiltered(p4, p5)
- local v6 = nil;
- local v7 = 1;
- local l__MessageObjectLog__8 = p4.MessageObjectLog;
- while v7 <= #l__MessageObjectLog__8 do
- local v9 = l__MessageObjectLog__8[v7];
- if v9.ID == p5.ID then
- v6 = v9;
- break;
- end;
- v7 = v7 + 1;
- end;
- if v6 then
- v6.UpdateTextFunction(p5);
- p4:PositionMessageLabelInWindow(v6, v7);
- end;
- end;
- local u3 = require(l__Parent__4:WaitForChild("MessageLabelCreator")).new();
- function v5.AddMessage(p6, p7)
- p6:WaitUntilParentedCorrectly();
- local v10 = u3:CreateMessageLabel(p7, p6.CurrentChannelName);
- if v10 == nil then
- return;
- end;
- table.insert(p6.MessageObjectLog, v10);
- p6:PositionMessageLabelInWindow(v10, #p6.MessageObjectLog);
- end;
- function v5.AddMessageAtIndex(p8, p9, p10)
- local v11 = u3:CreateMessageLabel(p9, p8.CurrentChannelName);
- if v11 == nil then
- return;
- end;
- table.insert(p8.MessageObjectLog, p10, v11);
- p8:PositionMessageLabelInWindow(v11, p10);
- end;
- function v5.RemoveLastMessage(p11)
- p11:WaitUntilParentedCorrectly();
- p11.MessageObjectLog[1]:Destroy();
- table.remove(p11.MessageObjectLog, 1);
- end;
- function v5.IsScrolledDown(p12)
- local l__Offset__12 = p12.Scroller.CanvasSize.Y.Offset;
- local l__Y__13 = p12.Scroller.AbsoluteWindowSize.Y;
- local v14 = true;
- if not (l__Offset__12 < l__Y__13) then
- v14 = l__Offset__12 - p12.Scroller.CanvasPosition.Y <= l__Y__13 + 5;
- end;
- return v14;
- end;
- function v5.UpdateMessageTextHeight(p13, p14)
- local l__BaseFrame__15 = p14.BaseFrame;
- for v16 = 1, 10 do
- if p14.BaseMessage.TextFits then
- break;
- end;
- l__BaseFrame__15.Size = UDim2.new(1, 0, 0, p14.GetHeightFunction(p13.Scroller.AbsoluteSize.X - v16));
- end;
- end;
- function v5.PositionMessageLabelInWindow(p15, p16, p17)
- p15:WaitUntilParentedCorrectly();
- local l__BaseFrame__17 = p16.BaseFrame;
- local v18 = 1;
- if p15.MessageObjectLog[p17 - 1] then
- if p17 == #p15.MessageObjectLog then
- v18 = p15.MessageObjectLog[p17 - 1].BaseFrame.LayoutOrder + 1;
- else
- v18 = p15.MessageObjectLog[p17 - 1].BaseFrame.LayoutOrder;
- end;
- end;
- l__BaseFrame__17.LayoutOrder = v18;
- l__BaseFrame__17.Size = UDim2.new(1, 0, 0, p16.GetHeightFunction(p15.Scroller.AbsoluteSize.X));
- l__BaseFrame__17.Parent = p15.Scroller;
- if p16.BaseMessage then
- p15:UpdateMessageTextHeight(p16);
- end;
- if p15:IsScrolledDown() then
- p15.Scroller.CanvasPosition = Vector2.new(0, math.max(0, p15.Scroller.CanvasSize.Y.Offset - p15.Scroller.AbsoluteSize.Y));
- end;
- end;
- function v5.ReorderAllMessages(p18)
- p18:WaitUntilParentedCorrectly();
- if p18.GuiObject.AbsoluteSize.Y < 1 then
- return;
- end;
- for v19, v20 in pairs(p18.MessageObjectLog) do
- p18:UpdateMessageTextHeight(v20);
- end;
- if not p18:IsScrolledDown() then
- p18.Scroller.CanvasPosition = p18.Scroller.CanvasPosition;
- return;
- end;
- p18.Scroller.CanvasPosition = Vector2.new(0, math.max(0, p18.Scroller.CanvasSize.Y.Offset - p18.Scroller.AbsoluteSize.Y));
- end;
- function v5.Clear(p19)
- for v21, v22 in pairs(p19.MessageObjectLog) do
- v22:Destroy();
- end;
- p19.MessageObjectLog = {};
- end;
- function v5.SetCurrentChannelName(p20, p21)
- p20.CurrentChannelName = p21;
- end;
- function v5.FadeOutBackground(p22, p23)
- end;
- function v5.FadeInBackground(p24, p25)
- end;
- local u4 = require(l__Parent__4:WaitForChild("CurveUtil"));
- function v5.FadeOutText(p26, p27)
- for v23 = 1, #p26.MessageObjectLog do
- if p26.MessageObjectLog[v23].FadeOutFunction then
- p26.MessageObjectLog[v23].FadeOutFunction(p27, u4);
- end;
- end;
- end;
- function v5.FadeInText(p28, p29)
- for v24 = 1, #p28.MessageObjectLog do
- if p28.MessageObjectLog[v24].FadeInFunction then
- p28.MessageObjectLog[v24].FadeInFunction(p29, u4);
- end;
- end;
- end;
- function v5.Update(p30, p31)
- for v25 = 1, #p30.MessageObjectLog do
- if p30.MessageObjectLog[v25].UpdateAnimFunction then
- p30.MessageObjectLog[v25].UpdateAnimFunction(p31, u4);
- end;
- end;
- end;
- function v5.WaitUntilParentedCorrectly(p32)
- while not p32.GuiObject:IsDescendantOf(game:GetService("Players").LocalPlayer) do
- p32.GuiObject.AncestryChanged:wait();
- end;
- end;
- local function u5()
- local v26 = Instance.new("Frame");
- v26.Selectable = false;
- v26.Size = UDim2.new(1, 0, 1, 0);
- v26.BackgroundTransparency = 1;
- local v27 = Instance.new("ScrollingFrame");
- v27.Selectable = u1.GamepadNavigationEnabled;
- v27.Name = "Scroller";
- v27.BackgroundTransparency = 1;
- v27.BorderSizePixel = 0;
- v27.Position = UDim2.new(0, 0, 0, 3);
- v27.Size = UDim2.new(1, -4, 1, -6);
- v27.CanvasSize = UDim2.new(0, 0, 0, 0);
- v27.ScrollBarThickness = v3.ScrollBarThickness;
- v27.Active = u2;
- v27.Parent = v26;
- local v28 = Instance.new("UIListLayout");
- v28.SortOrder = Enum.SortOrder.LayoutOrder;
- v28.Parent = v27;
- return v26, v27, v28;
- end;
- function v3.new()
- local v29 = setmetatable({}, v5);
- v29.Destroyed = false;
- local v30, v31, v32 = u5();
- v29.GuiObject = v30;
- v29.Scroller = v31;
- v29.Layout = v32;
- v29.MessageObjectLog = {};
- v29.Name = "MessageLogDisplay";
- v29.GuiObject.Name = "Frame_" .. v29.Name;
- v29.CurrentChannelName = "";
- v29.GuiObject:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
- spawn(function()
- v29:ReorderAllMessages();
- end);
- end);
- local u6 = true;
- v29.Layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
- local l__AbsoluteContentSize__33 = v29.Layout.AbsoluteContentSize;
- v29.Scroller.CanvasSize = UDim2.new(0, 0, 0, l__AbsoluteContentSize__33.Y);
- if u6 then
- v29.Scroller.CanvasPosition = Vector2.new(0, l__AbsoluteContentSize__33.Y - v29.Scroller.AbsoluteWindowSize.Y);
- end;
- end);
- v29.Scroller:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
- u6 = v29:IsScrolledDown();
- end);
- return v29;
- end;
- return v3;
- ChatWindow:
- -- Script GUID: {e1e13763-0ee9-48ff-8afc-bd1232cef46c}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = false;
- local v2, v3 = pcall(function()
- return UserSettings():IsUserFeatureEnabled("UserFixMouseCapture");
- end);
- if v2 then
- v1 = v3;
- end;
- local v4 = {};
- local l__Players__5 = game:GetService("Players");
- local l__Chat__6 = game:GetService("Chat");
- local l__Chat__7 = game:GetService("Chat");
- local l__Parent__8 = script.Parent;
- local v9 = {};
- v9.__index = v9;
- local u1 = require(l__Chat__7:WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
- function getClassicChatEnabled()
- if u1.ClassicChatEnabled ~= nil then
- return u1.ClassicChatEnabled;
- end;
- return l__Players__5.ClassicChat;
- end;
- function getBubbleChatEnabled()
- if u1.BubbleChatEnabled ~= nil then
- return u1.BubbleChatEnabled;
- end;
- return l__Players__5.BubbleChat;
- end;
- function bubbleChatOnly()
- return not getClassicChatEnabled() and getBubbleChatEnabled();
- end;
- function mergeProps(p1, p2)
- if p1 then
- if not p2 then
- return;
- end;
- else
- return;
- end;
- local v10, v11, v12 = pairs(p1);
- while true do
- local v13, v14 = v10(v11, v12);
- if v13 then
- else
- break;
- end;
- v12 = v13;
- if p2[v13] ~= nil then
- p2[v13] = v14;
- end;
- end;
- end;
- local l__PlayerGui__2 = l__Players__5.LocalPlayer:WaitForChild("PlayerGui");
- function v9.CreateGuiObjects(p3, p4)
- local u3 = nil;
- pcall(function()
- u3 = l__Chat__7:InvokeChatCallback(Enum.ChatCallbackType.OnCreatingChatWindow, nil);
- end);
- mergeProps(u3, u1);
- local v15 = Instance.new("Frame");
- v15.BackgroundTransparency = 1;
- v15.Active = u1.WindowDraggable;
- v15.Parent = p4;
- v15.AutoLocalize = false;
- local v16 = Instance.new("Frame");
- v16.Selectable = false;
- v16.Name = "ChatBarParentFrame";
- v16.BackgroundTransparency = 1;
- v16.Parent = v15;
- local v17 = Instance.new("Frame");
- v17.Selectable = false;
- v17.Name = "ChannelsBarParentFrame";
- v17.BackgroundTransparency = 1;
- v17.Position = UDim2.new(0, 0, 0, 0);
- v17.Parent = v15;
- local v18 = Instance.new("Frame");
- v18.Selectable = false;
- v18.Name = "ChatChannelParentFrame";
- v18.BackgroundTransparency = 1;
- v18.BackgroundColor3 = u1.BackGroundColor;
- v18.BackgroundTransparency = 0.6;
- v18.BorderSizePixel = 0;
- v18.Parent = v15;
- local v19 = Instance.new("ImageButton");
- v19.Selectable = false;
- v19.Image = "";
- v19.BackgroundTransparency = 0.6;
- v19.BorderSizePixel = 0;
- v19.Visible = false;
- v19.BackgroundColor3 = u1.BackGroundColor;
- v19.Active = true;
- if bubbleChatOnly() then
- v19.Position = UDim2.new(1, -v19.AbsoluteSize.X, 0, 0);
- else
- v19.Position = UDim2.new(1, -v19.AbsoluteSize.X, 1, -v19.AbsoluteSize.Y);
- end;
- v19.Parent = v15;
- local v20 = Instance.new("ImageLabel");
- v20.Selectable = false;
- v20.Size = UDim2.new(0.8, 0, 0.8, 0);
- v20.Position = UDim2.new(0.2, 0, 0.2, 0);
- v20.BackgroundTransparency = 1;
- v20.Image = "rbxassetid://261880743";
- v20.Parent = v19;
- local function v21()
- local v22 = v15;
- while v22 and not v22:IsA("ScreenGui") do
- v22 = v22.Parent;
- end;
- return v22;
- end;
- local v23 = 3;
- local v24 = v21();
- if v24.AbsoluteSize.X <= 640 then
- v23 = 1;
- elseif v24.AbsoluteSize.X <= 1024 then
- v23 = 2;
- end;
- local u4 = false;
- local function u5()
- if u4 then
- return;
- end;
- u4 = true;
- if not v15:IsDescendantOf(l__PlayerGui__2) then
- return;
- end;
- local v25 = v21();
- local l__MinimumWindowSize__26 = u1.MinimumWindowSize;
- local l__MaximumWindowSize__27 = u1.MaximumWindowSize;
- local v28 = l__MinimumWindowSize__26.X.Scale * v25.AbsoluteSize.X + l__MinimumWindowSize__26.X.Offset;
- local v29 = math.max(l__MinimumWindowSize__26.Y.Scale * v25.AbsoluteSize.Y + l__MinimumWindowSize__26.Y.Offset, v17.AbsoluteSize.Y + v16.AbsoluteSize.Y);
- local v30 = l__MaximumWindowSize__27.X.Scale * v25.AbsoluteSize.X + l__MaximumWindowSize__27.X.Offset;
- local v31 = l__MaximumWindowSize__27.Y.Scale * v25.AbsoluteSize.Y + l__MaximumWindowSize__27.Y.Offset;
- local l__X__32 = v15.AbsoluteSize.X;
- local l__Y__33 = v15.AbsoluteSize.Y;
- if l__X__32 < v28 then
- v15.Size = v15.Size + UDim2.new(0, v28 - l__X__32, 0, 0);
- elseif v30 < l__X__32 then
- v15.Size = v15.Size + UDim2.new(0, v30 - l__X__32, 0, 0);
- end;
- if l__Y__33 < v29 then
- v15.Size = v15.Size + UDim2.new(0, 0, 0, v29 - l__Y__33);
- elseif v31 < l__Y__33 then
- v15.Size = v15.Size + UDim2.new(0, 0, 0, v31 - l__Y__33);
- end;
- local v34 = v15.AbsoluteSize.X / v25.AbsoluteSize.X;
- local v35 = v15.AbsoluteSize.Y / v25.AbsoluteSize.Y;
- if v1 then
- v34 = math.min(v34, 0.45);
- v35 = math.min(v34, 0.45);
- end;
- v15.Size = UDim2.new(v34, 0, v35, 0);
- u4 = false;
- end;
- v15.Changed:connect(function(p5)
- if p5 == "AbsoluteSize" then
- u5();
- end;
- end);
- v19.DragBegin:connect(function(p6)
- v15.Draggable = false;
- end);
- v19.DragStopped:connect(function(p7, p8)
- v15.Draggable = u1.WindowDraggable;
- end);
- local u6 = false;
- local function u7(p9)
- if u1.WindowDraggable == false and u1.WindowResizable == false then
- return;
- end;
- local v36 = p9 - v15.AbsolutePosition + v19.AbsoluteSize;
- v15.Size = UDim2.new(0, v36.X, 0, v36.Y);
- if bubbleChatOnly() then
- v19.Position = UDim2.new(1, -v19.AbsoluteSize.X, 0, 0);
- return;
- end;
- v19.Position = UDim2.new(1, -v19.AbsoluteSize.X, 1, -v19.AbsoluteSize.Y);
- end;
- v19.Changed:connect(function(p10)
- if p10 == "AbsolutePosition" and not v15.Draggable then
- if u6 then
- return;
- end;
- u6 = true;
- u7(v19.AbsolutePosition);
- u6 = false;
- end;
- end);
- local function v37(p11)
- if v23 == 1 then
- p11 = p11 or u1.ChatBarTextSizePhone;
- else
- p11 = p11 or u1.ChatBarTextSize;
- end;
- return p11 + 14 + 10;
- end;
- if bubbleChatOnly() then
- v16.Position = UDim2.new(0, 0, 0, 0);
- v17.Visible = false;
- v17.Active = false;
- v18.Visible = false;
- v18.Active = false;
- local v38 = v21();
- if v23 == 1 then
- local v39 = u1.DefaultWindowSizePhone.X.Scale;
- local v40 = u1.DefaultWindowSizePhone.X.Offset;
- elseif v23 == 2 then
- v39 = u1.DefaultWindowSizeTablet.X.Scale;
- v40 = u1.DefaultWindowSizeTablet.X.Offset;
- else
- v39 = u1.DefaultWindowSizeDesktop.X.Scale;
- v40 = u1.DefaultWindowSizeDesktop.X.Offset;
- end;
- v15.Size = UDim2.new(v39, v40, 0, (v37()));
- v15.Position = u1.DefaultWindowPosition;
- else
- local v41 = v21();
- if v23 == 1 then
- v15.Size = u1.DefaultWindowSizePhone;
- elseif v23 == 2 then
- v15.Size = u1.DefaultWindowSizeTablet;
- else
- v15.Size = u1.DefaultWindowSizeDesktop;
- end;
- v15.Position = u1.DefaultWindowPosition;
- end;
- if v23 == 1 then
- u1.ChatWindowTextSize = u1.ChatWindowTextSizePhone;
- u1.ChatChannelsTabTextSize = u1.ChatChannelsTabTextSizePhone;
- u1.ChatBarTextSize = u1.ChatBarTextSizePhone;
- end;
- local function v42(p12)
- v15.Active = p12;
- v15.Draggable = p12;
- end;
- local function u8(p13)
- if v23 == 1 then
- p13 = p13 or u1.ChatChannelsTabTextSizePhone;
- else
- p13 = p13 or u1.ChatChannelsTabTextSize;
- end;
- return math.max(32, p13 + 8) + 2;
- end;
- local function u9()
- local v43 = nil;
- local v44 = u8();
- v43 = v37();
- if not u1.ShowChannelsBar then
- v18.Size = UDim2.new(1, 0, 1, -(v43 + 2 + 2));
- v18.Position = UDim2.new(0, 0, 0, 2);
- return;
- end;
- v18.Size = UDim2.new(1, 0, 1, -(v44 + v43 + 2 + 2));
- v18.Position = UDim2.new(0, 0, 0, v44 + 2);
- end;
- local function v45(p14)
- v17.Size = UDim2.new(1, 0, 0, (u8(p14)));
- u9();
- end;
- local function u10(p15)
- local v46 = nil;
- v19.Visible = p15;
- v19.Draggable = p15;
- v46 = v16.Size.Y.Offset;
- if p15 then
- v16.Size = UDim2.new(1, -v46 - 2, 0, v46);
- if bubbleChatOnly() then
- return;
- end;
- else
- v16.Size = UDim2.new(1, 0, 0, v46);
- if not bubbleChatOnly() then
- v16.Position = UDim2.new(0, 0, 1, -v46);
- end;
- return;
- end;
- v16.Position = UDim2.new(0, 0, 1, -v46);
- end;
- local function v47(p16)
- local v48 = v37(p16);
- v16.Size = UDim2.new(1, 0, 0, v48);
- if not bubbleChatOnly() then
- v16.Position = UDim2.new(0, 0, 1, -v48);
- end;
- v19.Size = UDim2.new(0, v48, 0, v48);
- v19.Position = UDim2.new(1, -v48, 1, -v48);
- u9();
- u10(u1.WindowResizable);
- end;
- local function v49(p17)
- v17.Visible = p17;
- u9();
- end;
- v45(u1.ChatChannelsTabTextSize);
- v47(u1.ChatBarTextSize);
- v42(u1.WindowDraggable);
- u10(u1.WindowResizable);
- v49(u1.ShowChannelsBar);
- u1.SettingsChanged:connect(function(p18, p19)
- if p18 == "WindowDraggable" then
- v42(p19);
- return;
- end;
- if p18 == "WindowResizable" then
- u10(p19);
- return;
- end;
- if p18 == "ChatChannelsTabTextSize" then
- v45(p19);
- return;
- end;
- if p18 == "ChatBarTextSize" then
- v47(p19);
- return;
- end;
- if p18 == "ShowChannelsBar" then
- v49(p19);
- end;
- end);
- p3.GuiObject = v15;
- p3.GuiObjects.BaseFrame = v15;
- p3.GuiObjects.ChatBarParentFrame = v16;
- p3.GuiObjects.ChannelsBarParentFrame = v17;
- p3.GuiObjects.ChatChannelParentFrame = v18;
- p3.GuiObjects.ChatResizerFrame = v19;
- p3.GuiObjects.ResizeIcon = v20;
- p3:AnimGuiObjects();
- end;
- function v9.GetChatBar(p20)
- return p20.ChatBar;
- end;
- function v9.RegisterChatBar(p21, p22)
- p21.ChatBar = p22;
- p21.ChatBar:CreateGuiObjects(p21.GuiObjects.ChatBarParentFrame);
- end;
- function v9.RegisterChannelsBar(p23, p24)
- p23.ChannelsBar = p24;
- p23.ChannelsBar:CreateGuiObjects(p23.GuiObjects.ChannelsBarParentFrame);
- end;
- function v9.RegisterMessageLogDisplay(p25, p26)
- p25.MessageLogDisplay = p26;
- p25.MessageLogDisplay.GuiObject.Parent = p25.GuiObjects.ChatChannelParentFrame;
- end;
- local u11 = require(l__Parent__8:WaitForChild("ChatChannel"));
- function v9.AddChannel(p27, p28)
- if p27:GetChannel(p28) then
- error("Channel '" .. p28 .. "' already exists!");
- return;
- end;
- local v50 = u11.new(p28, p27.MessageLogDisplay);
- p27.Channels[p28:lower()] = v50;
- v50:SetActive(false);
- local v51 = p27.ChannelsBar:AddChannelTab(p28);
- v51.NameTag.MouseButton1Click:connect(function()
- p27:SwitchCurrentChannel(p28);
- end);
- v50:RegisterChannelTab(v51);
- return v50;
- end;
- function v9.GetFirstChannel(p29)
- local v52, v53, v54 = pairs(p29.Channels);
- local v55, v56 = v52(v53, v54);
- if not v55 then
- return nil;
- end;
- return v56;
- end;
- function v9.RemoveChannel(p30, p31)
- if not p30:GetChannel(p31) then
- error("Channel '" .. p31 .. "' does not exist!");
- end;
- local v57 = p31:lower();
- local v58 = false;
- if p30.Channels[v57] == p30:GetCurrentChannel() then
- v58 = true;
- p30:SwitchCurrentChannel(nil);
- end;
- p30.Channels[v57]:Destroy();
- p30.Channels[v57] = nil;
- p30.ChannelsBar:RemoveChannelTab(p31);
- if v58 then
- if p30:GetChannel(u1.GeneralChannelName) ~= nil and v57 ~= u1.GeneralChannelName:lower() then
- local v59 = u1.GeneralChannelName;
- else
- local v60 = p30:GetFirstChannel();
- v59 = v60 and v60.Name or nil;
- end;
- p30:SwitchCurrentChannel(v59);
- end;
- if not u1.ShowChannelsBar and p30.ChatBar.TargetChannel == p31 then
- p30.ChatBar:SetChannelTarget(u1.GeneralChannelName);
- end;
- end;
- function v9.GetChannel(p32, p33)
- return p33 and p32.Channels[p33:lower()] or nil;
- end;
- function v9.GetTargetMessageChannel(p34)
- if not u1.ShowChannelsBar then
- return p34.ChatBar.TargetChannel;
- end;
- local v61 = p34:GetCurrentChannel();
- return v61 and v61.Name;
- end;
- function v9.GetCurrentChannel(p35)
- return p35.CurrentChannel;
- end;
- function v9.SwitchCurrentChannel(p36, p37)
- if not u1.ShowChannelsBar then
- local v62 = p36:GetChannel(p37);
- if v62 then
- p36.ChatBar:SetChannelTarget(v62.Name);
- end;
- p37 = u1.GeneralChannelName;
- end;
- local v63 = p36:GetCurrentChannel();
- local v64 = p36:GetChannel(p37);
- if v64 == nil then
- error(string.format("Channel '%s' does not exist.", p37));
- end;
- if v64 ~= v63 then
- if v63 then
- v63:SetActive(false);
- p36.ChannelsBar:GetChannelTab(v63.Name):SetActive(false);
- end;
- if v64 then
- v64:SetActive(true);
- p36.ChannelsBar:GetChannelTab(v64.Name):SetActive(true);
- end;
- p36.CurrentChannel = v64;
- end;
- end;
- function v9.UpdateFrameVisibility(p38)
- p38.GuiObject.Visible = p38.Visible and p38.CoreGuiEnabled;
- end;
- function v9.GetVisible(p39)
- return p39.Visible;
- end;
- function v9.SetVisible(p40, p41)
- p40.Visible = p41;
- p40:UpdateFrameVisibility();
- end;
- function v9.GetCoreGuiEnabled(p42)
- return p42.CoreGuiEnabled;
- end;
- function v9.SetCoreGuiEnabled(p43, p44)
- p43.CoreGuiEnabled = p44;
- p43:UpdateFrameVisibility();
- end;
- function v9.EnableResizable(p45)
- p45.GuiObjects.ChatResizerFrame.Active = true;
- end;
- function v9.DisableResizable(p46)
- p46.GuiObjects.ChatResizerFrame.Active = false;
- end;
- local u12 = require(l__Parent__8:WaitForChild("CurveUtil"));
- function v9.FadeOutBackground(p47, p48)
- p47.ChannelsBar:FadeOutBackground(p48);
- p47.MessageLogDisplay:FadeOutBackground(p48);
- p47.ChatBar:FadeOutBackground(p48);
- p47.AnimParams.Background_TargetTransparency = 1;
- p47.AnimParams.Background_NormalizedExptValue = u12:NormalizedDefaultExptValueInSeconds(p48);
- end;
- function v9.FadeInBackground(p49, p50)
- p49.ChannelsBar:FadeInBackground(p50);
- p49.MessageLogDisplay:FadeInBackground(p50);
- p49.ChatBar:FadeInBackground(p50);
- p49.AnimParams.Background_TargetTransparency = 0.6;
- p49.AnimParams.Background_NormalizedExptValue = u12:NormalizedDefaultExptValueInSeconds(p50);
- end;
- function v9.FadeOutText(p51, p52)
- p51.MessageLogDisplay:FadeOutText(p52);
- p51.ChannelsBar:FadeOutText(p52);
- end;
- function v9.FadeInText(p53, p54)
- p53.MessageLogDisplay:FadeInText(p54);
- p53.ChannelsBar:FadeInText(p54);
- end;
- function v9.AnimGuiObjects(p55)
- p55.GuiObjects.ChatChannelParentFrame.BackgroundTransparency = p55.AnimParams.Background_CurrentTransparency;
- p55.GuiObjects.ChatResizerFrame.BackgroundTransparency = p55.AnimParams.Background_CurrentTransparency;
- p55.GuiObjects.ResizeIcon.ImageTransparency = p55.AnimParams.Background_CurrentTransparency;
- end;
- function v9.InitializeAnimParams(p56)
- p56.AnimParams.Background_TargetTransparency = 0.6;
- p56.AnimParams.Background_CurrentTransparency = 0.6;
- p56.AnimParams.Background_NormalizedExptValue = u12:NormalizedDefaultExptValueInSeconds(0);
- end;
- function v9.Update(p57, p58)
- p57.ChatBar:Update(p58);
- p57.ChannelsBar:Update(p58);
- p57.MessageLogDisplay:Update(p58);
- p57.AnimParams.Background_CurrentTransparency = u12:Expt(p57.AnimParams.Background_CurrentTransparency, p57.AnimParams.Background_TargetTransparency, p57.AnimParams.Background_NormalizedExptValue, p58);
- p57:AnimGuiObjects();
- end;
- function v4.new()
- local v65 = setmetatable({}, v9);
- v65.GuiObject = nil;
- v65.GuiObjects = {};
- v65.ChatBar = nil;
- v65.ChannelsBar = nil;
- v65.MessageLogDisplay = nil;
- v65.Channels = {};
- v65.CurrentChannel = nil;
- v65.Visible = true;
- v65.CoreGuiEnabled = true;
- v65.AnimParams = {};
- v65:InitializeAnimParams();
- return v65;
- end;
- return v4;
- MessageLabelCreator:
- -- Script GUID: {1862df25-7a83-47a1-ba46-34cf5d067914}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local l__Chat__2 = game:GetService("Chat");
- local l__ClientChatModules__3 = l__Chat__2:WaitForChild("ClientChatModules");
- local l__MessageCreatorModules__4 = l__ClientChatModules__3:WaitForChild("MessageCreatorModules");
- local l__Parent__5 = script.Parent;
- local v6 = require(l__ClientChatModules__3:WaitForChild("ChatSettings"));
- local v7 = require(l__Parent__5:WaitForChild("MessageSender"));
- local v8 = {};
- v8.__index = v8;
- function mergeProps(p1, p2)
- if not p1 then
- return;
- end;
- local v9, v10, v11 = pairs(p1);
- while true do
- local v12, v13 = v9(v10, v11);
- if v12 then
- else
- break;
- end;
- v11 = v12;
- p2[v12] = v13;
- end;
- end;
- function ReturnToObjectPoolRecursive(p3, p4)
- local v14 = p3:GetChildren();
- local v15 = #v14;
- local v16 = 1 - 1;
- while true do
- ReturnToObjectPoolRecursive(v14[v16], p4);
- if 0 <= 1 then
- if v16 < v15 then
- else
- break;
- end;
- elseif v15 < v16 then
- else
- break;
- end;
- v16 = v16 + 1;
- end;
- p3.Parent = nil;
- p4:ReturnInstance(p3);
- end;
- local u1 = require(l__MessageCreatorModules__4:WaitForChild("Util"));
- function GetMessageCreators()
- local v17 = {};
- local v18 = l__MessageCreatorModules__4:GetChildren();
- local v19 = #v18;
- local v20 = 1 - 1;
- while true do
- if v18[v20]:IsA("ModuleScript") then
- if v18[v20].Name ~= "Util" then
- local v21 = require(v18[v20]);
- v17[v21[u1.KEY_MESSAGE_TYPE]] = v21[u1.KEY_CREATOR_FUNCTION];
- end;
- end;
- if 0 <= 1 then
- if v20 < v19 then
- else
- break;
- end;
- elseif v19 < v20 then
- else
- break;
- end;
- v20 = v20 + 1;
- end;
- return v17;
- end;
- function v8.WrapIntoMessageObject(p5, p6, p7)
- local v22 = nil;
- if u1.KEY_BASE_MESSAGE then
- v22 = p7[u1.KEY_BASE_MESSAGE];
- end;
- return {
- ID = p6.ID,
- BaseFrame = p7[u1.KEY_BASE_FRAME],
- BaseMessage = v22,
- UpdateTextFunction = p7[u1.KEY_UPDATE_TEXT_FUNC] or function()
- warn("NO MESSAGE RESIZE FUNCTION");
- end,
- GetHeightFunction = p7[u1.KEY_GET_HEIGHT],
- FadeInFunction = p7[u1.KEY_FADE_IN],
- FadeOutFunction = p7[u1.KEY_FADE_OUT],
- UpdateAnimFunction = p7[u1.KEY_UPDATE_ANIMATION],
- ObjectPool = p5.ObjectPool,
- Destroyed = false,
- Destroy = function(p8)
- ReturnToObjectPoolRecursive(p8.BaseFrame, p8.ObjectPool);
- p8.Destroyed = true;
- end
- };
- end;
- function v8.CreateMessageLabel(p9, p10, p11)
- local v23 = nil;
- p10.Channel = p11;
- local u2 = nil;
- pcall(function()
- u2 = l__Chat__2:InvokeChatCallback(Enum.ChatCallbackType.OnClientFormattingMessage, p10);
- end);
- p10.ExtraData = p10.ExtraData or {};
- mergeProps(u2, p10.ExtraData);
- local l__MessageType__24 = p10.MessageType;
- if p9.MessageCreators[l__MessageType__24] then
- local v25 = p9.MessageCreators[l__MessageType__24](p10, p11);
- if v25 then
- return p9:WrapIntoMessageObject(p10, v25);
- else
- return;
- end;
- elseif p9.DefaultCreatorType then
- v23 = p9.MessageCreators[p9.DefaultCreatorType](p10, p11);
- if not v23 then
- return;
- end;
- else
- error("No message creator available for message type: " .. l__MessageType__24);
- return;
- end;
- return p9:WrapIntoMessageObject(p10, v23);
- end;
- local u3 = require(l__Parent__5:WaitForChild("ObjectPool"));
- function v1.new()
- local v26 = setmetatable({}, v8);
- v26.ObjectPool = u3.new(50);
- v26.MessageCreators = GetMessageCreators();
- v26.DefaultCreatorType = u1.DEFAULT_MESSAGE_CREATOR;
- u1:RegisterObjectPool(v26.ObjectPool);
- return v26;
- end;
- function v1.GetStringTextBounds(p12, p13, p14, p15, p16)
- return u1:GetStringTextBounds(p13, p14, p15, p16);
- end;
- return v1;
- CommandProcessor:
- -- Script GUID: {bec2a34d-21a2-4ca8-846c-27cb5d9b3b84}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local v2 = {};
- v2.__index = v2;
- local l__ClientChatModules__3 = game:GetService("Chat"):WaitForChild("ClientChatModules");
- local l__CommandModules__4 = l__ClientChatModules__3:WaitForChild("CommandModules");
- local l__Parent__5 = script.Parent;
- local u1 = require(l__CommandModules__4:WaitForChild("Util"));
- function v2.SetupCommandProcessors(p1)
- local v6 = l__CommandModules__4:GetChildren();
- for v7 = 1, #v6 do
- if v6[v7]:IsA("ModuleScript") and v6[v7].Name ~= "Util" then
- local v8 = nil;
- local v9 = require(v6[v7]);
- local v10 = v9[u1.KEY_COMMAND_PROCESSOR_TYPE];
- v8 = v9[u1.KEY_PROCESSOR_FUNCTION];
- if v10 == u1.IN_PROGRESS_MESSAGE_PROCESSOR then
- table.insert(p1.InProgressMessageProcessors, v8);
- elseif v10 == u1.COMPLETED_MESSAGE_PROCESSOR then
- table.insert(p1.CompletedMessageProcessors, v8);
- end;
- end;
- end;
- end;
- local u2 = require(l__ClientChatModules__3:WaitForChild("ChatSettings"));
- function v2.ProcessCompletedChatMessage(p2, p3, p4)
- for v11 = 1, #p2.CompletedMessageProcessors do
- if p2.CompletedMessageProcessors[v11](p3, p4, u2) then
- return true;
- end;
- end;
- return false;
- end;
- function v2.ProcessInProgressChatMessage(p5, p6, p7, p8)
- for v12 = 1, #p5.InProgressMessageProcessors do
- local v13 = p5.InProgressMessageProcessors[v12](p6, p7, p8, u2);
- if v13 then
- return v13;
- end;
- end;
- return nil;
- end;
- function v1.new()
- local v14 = setmetatable({}, v2);
- v14.CompletedMessageProcessors = {};
- v14.InProgressMessageProcessors = {};
- v14:SetupCommandProcessors();
- return v14;
- end;
- return v1;
- ChannelsTab:
- -- Script GUID: {76e85709-929d-421a-a886-5014a998a445}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local v2 = {};
- v2.__index = v2;
- local u1 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
- function v2.Destroy(p1)
- p1.GuiObject:Destroy();
- end;
- function v2.UpdateMessagePostedInChannel(p2, p3)
- if p2.Active and p3 ~= true then
- return;
- end;
- local v3 = p2.UnreadMessageCount + 1;
- p2.UnreadMessageCount = v3;
- local l__NewMessageIcon__4 = p2.NewMessageIcon;
- l__NewMessageIcon__4.Visible = true;
- l__NewMessageIcon__4.TextLabel.Text = v3 < 100 and tostring(v3) or "!";
- local v5 = l__NewMessageIcon__4.Position + UDim2.new(0, 0, -0.1, 0);
- l__NewMessageIcon__4.Position = UDim2.new(0, 0, -0.15, 0);
- l__NewMessageIcon__4:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.15, true);
- end;
- function v2.SetActive(p4, p5)
- p4.Active = p5;
- p4.UnselectedFrame.Visible = not p5;
- p4.SelectedFrame.Visible = p5;
- if not p5 then
- p4.NameTag.Font = Enum.Font.SourceSans;
- return;
- end;
- p4.UnreadMessageCount = 0;
- p4.NewMessageIcon.Visible = false;
- p4.NameTag.Font = Enum.Font.SourceSansBold;
- end;
- function v2.SetTextSize(p6, p7)
- p6.NameTag.TextSize = p7;
- end;
- local u2 = require(script.Parent:WaitForChild("CurveUtil"));
- function v2.FadeOutBackground(p8, p9)
- p8.AnimParams.Background_TargetTransparency = 1;
- p8.AnimParams.Background_NormalizedExptValue = u2:NormalizedDefaultExptValueInSeconds(p9);
- end;
- function v2.FadeInBackground(p10, p11)
- p10.AnimParams.Background_TargetTransparency = 0.6;
- p10.AnimParams.Background_NormalizedExptValue = u2:NormalizedDefaultExptValueInSeconds(p11);
- end;
- function v2.FadeOutText(p12, p13)
- p12.AnimParams.Text_TargetTransparency = 1;
- p12.AnimParams.Text_NormalizedExptValue = u2:NormalizedDefaultExptValueInSeconds(p13);
- p12.AnimParams.TextStroke_TargetTransparency = 1;
- p12.AnimParams.TextStroke_NormalizedExptValue = u2:NormalizedDefaultExptValueInSeconds(p13);
- end;
- function v2.FadeInText(p14, p15)
- p14.AnimParams.Text_TargetTransparency = 0;
- p14.AnimParams.Text_NormalizedExptValue = u2:NormalizedDefaultExptValueInSeconds(p15);
- p14.AnimParams.TextStroke_TargetTransparency = 0.75;
- p14.AnimParams.TextStroke_NormalizedExptValue = u2:NormalizedDefaultExptValueInSeconds(p15);
- end;
- function v2.AnimGuiObjects(p16)
- p16.UnselectedFrame.BackgroundTransparency = p16.AnimParams.Background_CurrentTransparency;
- p16.SelectedFrame.BackgroundImage.BackgroundTransparency = p16.AnimParams.Background_CurrentTransparency;
- p16.SelectedFrame.BlueBarLeft.ImageTransparency = p16.AnimParams.Background_CurrentTransparency;
- p16.SelectedFrame.BlueBarRight.ImageTransparency = p16.AnimParams.Background_CurrentTransparency;
- p16.NameTagNonSelect.TextTransparency = p16.AnimParams.Background_CurrentTransparency;
- p16.NameTagNonSelect.TextStrokeTransparency = p16.AnimParams.Background_CurrentTransparency;
- p16.NameTag.TextTransparency = p16.AnimParams.Text_CurrentTransparency;
- p16.NewMessageIcon.ImageTransparency = p16.AnimParams.Text_CurrentTransparency;
- p16.WhiteTextNewMessageNotification.TextTransparency = p16.AnimParams.Text_CurrentTransparency;
- p16.NameTagSelect.TextTransparency = p16.AnimParams.Text_CurrentTransparency;
- p16.NameTag.TextStrokeTransparency = p16.AnimParams.TextStroke_CurrentTransparency;
- p16.WhiteTextNewMessageNotification.TextStrokeTransparency = p16.AnimParams.TextStroke_CurrentTransparency;
- p16.NameTagSelect.TextStrokeTransparency = p16.AnimParams.TextStroke_CurrentTransparency;
- end;
- function v2.InitializeAnimParams(p17)
- p17.AnimParams.Text_TargetTransparency = 0;
- p17.AnimParams.Text_CurrentTransparency = 0;
- p17.AnimParams.Text_NormalizedExptValue = u2:NormalizedDefaultExptValueInSeconds(0);
- p17.AnimParams.TextStroke_TargetTransparency = 0.75;
- p17.AnimParams.TextStroke_CurrentTransparency = 0.75;
- p17.AnimParams.TextStroke_NormalizedExptValue = u2:NormalizedDefaultExptValueInSeconds(0);
- p17.AnimParams.Background_TargetTransparency = 0.6;
- p17.AnimParams.Background_CurrentTransparency = 0.6;
- p17.AnimParams.Background_NormalizedExptValue = u2:NormalizedDefaultExptValueInSeconds(0);
- end;
- function v2.Update(p18, p19)
- p18.AnimParams.Background_CurrentTransparency = u2:Expt(p18.AnimParams.Background_CurrentTransparency, p18.AnimParams.Background_TargetTransparency, p18.AnimParams.Background_NormalizedExptValue, p19);
- p18.AnimParams.Text_CurrentTransparency = u2:Expt(p18.AnimParams.Text_CurrentTransparency, p18.AnimParams.Text_TargetTransparency, p18.AnimParams.Text_NormalizedExptValue, p19);
- p18.AnimParams.TextStroke_CurrentTransparency = u2:Expt(p18.AnimParams.TextStroke_CurrentTransparency, p18.AnimParams.TextStroke_TargetTransparency, p18.AnimParams.TextStroke_NormalizedExptValue, p19);
- p18:AnimGuiObjects();
- end;
- local function u3()
- local v6 = Instance.new("Frame");
- v6.Selectable = false;
- v6.Size = UDim2.new(1, 0, 1, 0);
- v6.BackgroundTransparency = 1;
- local v7 = Instance.new("Frame");
- v7.Selectable = false;
- v7.Name = "BackgroundFrame";
- v7.Size = UDim2.new(1, -2, 1, -2);
- v7.Position = UDim2.new(0, 1, 0, 1);
- v7.BackgroundTransparency = 1;
- v7.Parent = v6;
- local v8 = Instance.new("Frame");
- v8.Selectable = false;
- v8.Name = "UnselectedFrame";
- v8.Size = UDim2.new(1, 0, 1, 0);
- v8.Position = UDim2.new(0, 0, 0, 0);
- v8.BorderSizePixel = 0;
- v8.BackgroundColor3 = u1.ChannelsTabUnselectedColor;
- v8.BackgroundTransparency = 0.6;
- v8.Parent = v7;
- local v9 = Instance.new("Frame");
- v9.Selectable = false;
- v9.Name = "SelectedFrame";
- v9.Size = UDim2.new(1, 0, 1, 0);
- v9.Position = UDim2.new(0, 0, 0, 0);
- v9.BorderSizePixel = 0;
- v9.BackgroundColor3 = u1.ChannelsTabSelectedColor;
- v9.BackgroundTransparency = 1;
- v9.Parent = v7;
- local v10 = Instance.new("ImageLabel");
- v10.Selectable = false;
- v10.Name = "BackgroundImage";
- v10.BackgroundTransparency = 1;
- v10.BorderSizePixel = 0;
- v10.Size = UDim2.new(1, 0, 1, 0);
- v10.Position = UDim2.new(0, 0, 0, 0);
- v10.ScaleType = Enum.ScaleType.Slice;
- v10.Parent = v9;
- v10.BackgroundTransparency = -0.4;
- v10.BackgroundColor3 = Color3.fromRGB(93.6, 100.8, 115.19999999999999);
- local v11 = Instance.new("ImageLabel");
- v11.Selectable = false;
- v11.Size = UDim2.new(0.5, -2, 0, 4);
- v11.BackgroundTransparency = 1;
- v11.ScaleType = Enum.ScaleType.Slice;
- v11.SliceCenter = Rect.new(3, 3, 32, 21);
- v11.Parent = v9;
- local v12 = v11:Clone();
- v12.Parent = v9;
- v11.Position = UDim2.new(0, 2, 1, -4);
- v12.Position = UDim2.new(0.5, 0, 1, -4);
- v11.Image = "rbxasset://textures/ui/Settings/Slider/SelectedBarLeft.png";
- v12.Image = "rbxasset://textures/ui/Settings/Slider/SelectedBarRight.png";
- v11.Name = "BlueBarLeft";
- v12.Name = "BlueBarRight";
- local v13 = Instance.new("TextButton");
- v13.Selectable = u1.GamepadNavigationEnabled;
- v13.Size = UDim2.new(1, 0, 1, 0);
- v13.Position = UDim2.new(0, 0, 0, 0);
- v13.BackgroundTransparency = 1;
- v13.Font = u1.DefaultFont;
- v13.TextSize = u1.ChatChannelsTabTextSize;
- v13.TextColor3 = Color3.new(1, 1, 1);
- v13.TextStrokeTransparency = 0.75;
- v13.Parent = v7;
- local v14 = v13:Clone();
- local v15 = v13:Clone();
- v14.Parent = v8;
- v15.Parent = v9;
- v14.Font = Enum.Font.SourceSans;
- v14.Active = false;
- v15.Active = false;
- local v16 = Instance.new("Frame");
- v16.Selectable = false;
- v16.Size = UDim2.new(0, 18, 0, 18);
- v16.Position = UDim2.new(0.8, -9, 0.5, -9);
- v16.BackgroundTransparency = 1;
- v16.Parent = v7;
- local v17 = Instance.new("ImageLabel");
- v17.Selectable = false;
- v17.Size = UDim2.new(1, 0, 1, 0);
- v17.BackgroundTransparency = 1;
- v17.Image = "rbxasset://textures/ui/Chat/MessageCounter.png";
- v17.Visible = false;
- v17.Parent = v16;
- local v18 = Instance.new("TextLabel");
- v18.Selectable = false;
- v18.BackgroundTransparency = 1;
- v18.Size = UDim2.new(0, 13, 0, 9);
- v18.Position = UDim2.new(0.5, -7, 0.5, -7);
- v18.Font = u1.DefaultFont;
- v18.TextSize = 14;
- v18.TextColor3 = Color3.new(1, 1, 1);
- v18.Text = "";
- v18.Parent = v17;
- return v6, v13, v14, v15, v17, v8, v9;
- end;
- function v1.new(p20)
- local v19 = setmetatable({}, v2);
- local v20, v21, v22, v23, v24, v25, v26 = u3();
- v19.GuiObject = v20;
- v19.NameTag = v21;
- v19.NameTagNonSelect = v22;
- v19.NameTagSelect = v23;
- v19.NewMessageIcon = v24;
- v19.UnselectedFrame = v25;
- v19.SelectedFrame = v26;
- v19.BlueBarLeft = v26.BlueBarLeft;
- v19.BlueBarRight = v26.BlueBarRight;
- v19.BackgroundImage = v26.BackgroundImage;
- v19.WhiteTextNewMessageNotification = v19.NewMessageIcon.TextLabel;
- v19.ChannelName = p20;
- v19.UnreadMessageCount = 0;
- v19.Active = false;
- v19.GuiObject.Name = "Frame_" .. v19.ChannelName;
- if u1.MaxChannelNameLength < string.len(p20) then
- p20 = string.sub(p20, 1, u1.MaxChannelNameLength - 3) .. "...";
- end;
- v19.NameTag.Text = "";
- v19.NameTagNonSelect.Text = p20;
- v19.NameTagSelect.Text = p20;
- v19.AnimParams = {};
- v19:InitializeAnimParams();
- v19:AnimGuiObjects();
- v19:SetActive(false);
- return v19;
- end;
- return v1;
- ObjectPool:
- -- Script GUID: {c4029029-c46d-4d9d-ba07-3e8c4a4416d0}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local v2 = {};
- v2.__index = v2;
- function v2.GetInstance(p1, p2)
- if p1.InstancePoolsByClass[p2] == nil then
- p1.InstancePoolsByClass[p2] = {};
- end;
- local v3 = #p1.InstancePoolsByClass[p2];
- if not (v3 > 0) then
- return Instance.new(p2);
- end;
- table.remove(p1.InstancePoolsByClass[p2]);
- return p1.InstancePoolsByClass[p2][v3];
- end;
- function v2.ReturnInstance(p3, p4)
- if p3.InstancePoolsByClass[p4.ClassName] == nil then
- p3.InstancePoolsByClass[p4.ClassName] = {};
- end;
- if not (#p3.InstancePoolsByClass[p4.ClassName] < p3.PoolSizePerType) then
- p4:Destroy();
- return;
- end;
- table.insert(p3.InstancePoolsByClass[p4.ClassName], p4);
- end;
- function v1.new(p5)
- local v4 = setmetatable({}, v2);
- v4.InstancePoolsByClass = {};
- v4.Name = "ObjectPool";
- v4.PoolSizePerType = p5;
- return v4;
- end;
- return v1;
- MessageSender:
- -- Script GUID: {0fb37f2f-f8d5-4400-bc9e-44ac716a5054}
- -- Decompiled with the Synapse X Luau decompiler.
- local v1 = {};
- local l__Parent__2 = script.Parent;
- local v3 = {};
- v3.__index = v3;
- function v3.SendMessage(p1, p2, p3)
- p1.SayMessageRequest:FireServer(p2, p3);
- end;
- function v3.RegisterSayMessageFunction(p4, p5)
- p4.SayMessageRequest = p5;
- end;
- function v1.new()
- local v4 = setmetatable({}, v3);
- v4.SayMessageRequest = nil;
- return v4;
- end;
- return v1.new();
- CurveUtil:
- -- Script GUID: {aac71cdd-83ac-4b6b-9435-05ca45660866}
- -- Decompiled with the Synapse X Luau decompiler.
- local u1 = {
- Expt = function(p1, p2, p3, p4, p5)
- if math.abs(p3 - p2) < 0.01 then
- return p3;
- end;
- return p2 + (p3 - p2) * u1:Expty(p2, p3, p4, p5);
- end,
- Expty = function(p6, p7, p8, p9, p10)
- return 1 - math.exp(-(-math.log(1 - p9)) * p10);
- end,
- Sign = function(p11, p12)
- if p12 > 0 then
- return 1;
- end;
- if p12 < 0 then
- return -1;
- end;
- return 0;
- end,
- BezierValForT = function(p13, p14, p15, p16, p17, p18)
- return (1 - p18) * (1 - p18) * (1 - p18) * p14 + 3 * p18 * (1 - p18) * (1 - p18) * p15 + 3 * p18 * p18 * (1 - p18) * p16 + p18 * p18 * p18 * p17;
- end,
- _BezierPt2ForT = {
- x = 0,
- y = 0
- },
- BezierPt2ForT = function(p19, p20, p21, p22, p23, p24, p25, p26, p27, p28)
- u1._BezierPt2ForT.x = u1:BezierValForT(p20, p22, p24, p26, p28);
- u1._BezierPt2ForT.y = u1:BezierValForT(p21, p23, p25, p27, p28);
- return u1._BezierPt2ForT;
- end,
- YForPointOf2PtLine = function(p29, p30, p31, p32)
- local v1 = (p30.y - p31.y) / (p30.x - p31.x);
- return v1 * p32 + (p30.y - v1 * p30.x);
- end,
- DeltaTimeToTimescale = function(p33, p34)
- return p34 / 0.016666666666666666;
- end,
- SecondsToTick = function(p35, p36)
- return 0.016666666666666666 / p36;
- end,
- ExptValueInSeconds = function(p37, p38, p39, p40)
- return 1 - math.pow(p38 / p39, 1 / (60 * p40));
- end,
- NormalizedDefaultExptValueInSeconds = function(p41, p42)
- return p41:ExptValueInSeconds(0.01, 1, p42);
- end
- };
- return u1;
Advertisement
Add Comment
Please, Sign In to add comment