local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players =…
- User
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local localPlayer = Players.LocalPlayer
local Animations = ReplicatedStorage:WaitForChild("Animations") local ButtonTemplates = ReplicatedStorage:WaitForChild("ButtonTemplates")
local MaleAnims = Animations:WaitForChild("Male") local FemaleAnims = Animations:WaitForChild("Female") local ThreePlusAnims = Animations:WaitForChild("ThreePlus") local Emotes = Animations:WaitForChild("Emotes")
local EmoteTemplate = ButtonTemplates:WaitForChild("EmoteTemplate") local MaleTemplate = ButtonTemplates:WaitForChild("MaleTemplate") local FemaleTemplate = ButtonTemplates:WaitForChild("FemaleTemplate") local ThreePlusTemplate = ButtonTemplates:WaitForChild("ThreePlusTemplate")
local PlayerGui = localPlayer:WaitForChild("PlayerGui") local MainMenuGui = PlayerGui:WaitForChild("MainMenuGui") local MainFrame = MainMenuGui:WaitForChild("MainFrame") local Animation = MainFrame:WaitForChild("Animation")
local Men_List = Animation:WaitForChild("Men_List") local Women_List = Animation:WaitForChild("Women_List") local Plus_List = Animation:WaitForChild("Plus_List") local Emote_List = Animation:WaitForChild("Emote_List") local All_List = Animation:WaitForChild("All_List")
local function setupButtons(category, template, parentList, categoryName) for _, anim in category:GetChildren() do local button = template:Clone() button.Name = anim.Name button.Text = anim.Name button.Parent = parentList local allButton = button:Clone() allButton.Parent = All_List end end
-- Getting the buttons local TitleLabel = script.Parent:WaitForChild("TitleLabel") local PlusButton = TitleLabel:WaitForChild("+") local AllButton = TitleLabel:WaitForChild("ALL") local EmoteButton = TitleLabel:WaitForChild("E") local MaleButton = TitleLabel:WaitForChild("M") local FemaleButton = TitleLabel:WaitForChild("W")
-- Function to hide all lists local function hideAllLists() Men_List.Visible = false Women_List.Visible = false Plus_List.Visible = false Emote_List.Visible = false All_List.Visible = false end
-- Functions to show specific lists local function showPlusList() hideAllLists() Plus_List.Visible = true end
local function showAllList() hideAllLists() All_List.Visible = true end
local function showEmoteList() hideAllLists() Emote_List.Visible = true end
local function showMaleList() hideAllLists() Men_List.Visible = true end
local function showFemaleList() hideAllLists() Women_List.Visible = true end
-- Connecting buttons to functions PlusButton.MouseButton1Click:Connect(showPlusList) AllButton.MouseButton1Click:Connect(showAllList) EmoteButton.MouseButton1Click:Connect(showEmoteList) MaleButton.MouseButton1Click:Connect(showMaleList) FemaleButton.MouseButton1Click:Connect(showFemaleList)
setupButtons(MaleAnims, MaleTemplate, Men_List, "Male") setupButtons(FemaleAnims, FemaleTemplate, Women_List, "Female") setupButtons(ThreePlusAnims, ThreePlusTemplate, Plus_List, "ThreePlus") setupButtons(Emotes, EmoteTemplate, Emote_List, "Emote")
- Assistant