-- Open Src local WindUI do local ok, result = pcall(function() return loadstring(game:HttpGet("https://github.com/Footagesus/WindUI/releases/latest/download/main.lua"))() end) if ok and type(result) == "table" then WindUI = result else game:GetService("StarterGui"):SetCore("SendNotification", { Title = "Error", Text = "Failed to load WindUI." }) return end end local EmoteWindow = WindUI:CreateWindow({ Title = "Emote Player", Icon = "sparkles", Author = "by Sty!", Folder = "EmotePlayer", Size = UDim2.fromOffset(600, 480), Transparent = true, Theme = "Dark" }) local EC local function safeLoad(url) local success, result = pcall(function() return loadstring(game:HttpGet(url))() end) return success, result end local successEC, ECResult = safeLoad("https://pastebin.com/raw/EJtYczqK") if successEC and type(ECResult) == "table" and type(ECResult.DMVS) == "function" and type(ECResult.StopEmote) == "function" and type(ECResult.ListEmotes) == "function" then EC = ECResult else game:GetService("StarterGui"):SetCore("SendNotification", { Title = "Error", Text = "Failed to load the emote engine (Pastebin)." }) return end local EmotesTabR = EmoteWindow:Tab({ Title = "Emotes (Duels)", Icon = "sparkles" }) local StatusSection = EmotesTabR:Section({ Title = "Status" }) local currentStatusLabel = StatusSection:Paragraph({ Title = "Current Emote", Desc = "None", Color = Color3.fromRGB(150, 150, 150), }) local ReplicatedStorage = game:GetService("ReplicatedStorage") local Shared = ReplicatedStorage:WaitForChild("Shared") local EmotesRoot = Shared:WaitForChild("Emotes") local moduleIndex = {} local bundleLookup = {} local eventLookup = {} WindUI:Notify({ Title = "Loading", Content = "Indexing emotes, please wait...", Icon = "loader", Duration = 5 }) task.spawn(function() for _, obj in ipairs(EmotesRoot:GetDescendants()) do if obj:IsA("ModuleScript") and obj.Name ~= "TemplateEmotes" then local ok, t = pcall(require, obj) if ok and type(t) == "table" then for name, def in pairs(t) do if type(name) == "string" and type(def) == "table" then moduleIndex[name] = def end end end end end local BundlesModule = EmotesRoot:FindFirstChild("Bundles") if BundlesModule then local ok, t = pcall(require, BundlesModule) if ok and type(t) == "table" then for _, bundleDef in pairs(t) do if type(bundleDef) == "table" then for _, field in pairs(bundleDef) do if type(field) == "table" then local emoteName = field.Emote or field.Name or field.Id if type(emoteName) == "string" then bundleLookup[emoteName] = true end end end end end end end local EventsFolder = EmotesRoot:FindFirstChild("Events") if EventsFolder then for _, obj in ipairs(EventsFolder:GetDescendants()) do if obj:IsA("ModuleScript") and obj.Name ~= "TemplateEmotes" then local ok, t = pcall(require, obj) if ok and type(t) == "table" then for k in pairs(t) do if type(k) == "string" then eventLookup[k] = true end end end end end end local function categorize(name) local def = moduleIndex[name] if def and (def.IsLimited or def.Limited or def.IsExclusive) then return "Limited" end if def and (def.IsPurchasable or def.Purchasable or def.ForSale or def.Price) then return "Shop" end if eventLookup[name] then return "Events" end if bundleLookup[name] then return "Bundles" end if def then local p = def.Parent while p and p ~= EmotesRoot do local n = p.Name:lower() if n:find("limit") then return "Limited" end if n:find("shop") or n:find("buy") then return "Shop" end if n:find("event") then return "Events" end if n:find("bundle") then return "Bundles" end p = p.Parent end end return "Shop" end local order = { "Bundles", "Limited", "Shop", "Events" } local buckets = { Bundles = {}, Limited = {}, Shop = {}, Events = {} } local successList, emoteList = pcall(function() return EC.ListEmotes() end) if successList and type(emoteList) == "table" then for _, name in ipairs(emoteList) do local cat = categorize(name) table.insert(buckets[cat], name) end end local flat = {} for _, cat in ipairs(order) do table.sort(buckets[cat]) for _, name in ipairs(buckets[cat]) do table.insert(flat, "[" .. cat .. "] " .. name) end end local selectedEmote = nil local activeEmote = nil local autoPlay = false local lastPlayTime = 0 local function updateStatus(text) currentStatusLabel:SetDesc(text) end local function playEmote(name) if not name then return end if activeEmote then pcall(function() EC.StopEmote() end) task.wait(0.1) end local successPlay, err = pcall(function() EC.DMVS(name) end) if successPlay then activeEmote = name lastPlayTime = tick() updateStatus(name) WindUI:Notify({ Title = "Playing", Content = name, Icon = "play", Duration = 2 }) else WindUI:Notify({ Title = "Error", Content = "Failed to play: " .. tostring(err), Icon = "x", Duration = 3 }) end end local function stopEmote() if activeEmote then pcall(function() EC.StopEmote() end) WindUI:Notify({ Title = "Stopped", Content = activeEmote, Icon = "square", Duration = 2 }) activeEmote = nil updateStatus("None") end end local RunService = game:GetService("RunService") task.spawn(function() while true do RunService.Heartbeat:Wait() if autoPlay and selectedEmote then if tick() - lastPlayTime >= 1 then local isPlaying = false if EC and type(EC.IsEmotePlaying) == "function" then local ok, result = pcall(function() return EC.IsEmotePlaying(selectedEmote) end) if ok then isPlaying = result end end if not isPlaying then playEmote(selectedEmote) end end end end end) EmotesTabR:Dropdown({ Title = "Select an emote", Desc = #flat .. " emotes available.", Values = flat, SearchBar = true, Callback = function(value) local name = value:match("%] (.+)$") if name then selectedEmote = name if autoPlay then playEmote(name) end end end, }) EmotesTabR:Section({ Title = "Controls" }) EmotesTabR:Toggle({ Title = "Auto Play Emote", Desc = "Automatically replays the selected emote whenever it stops.", Value = false, Callback = function(state) autoPlay = state if state and selectedEmote then playEmote(selectedEmote) end end, }) EmotesTabR:Button({ Title = "Play Selected Emote", Desc = "Plays the emote you currently have selected.", Callback = function() if selectedEmote then playEmote(selectedEmote) else WindUI:Notify({ Title = "Info", Content = "Select an emote first before trying to play it.", Icon = "alert-circle", Duration = 2 }) end end, }) EmotesTabR:Button({ Title = "Stop", Desc = "Stops whatever emote is currently playing.", Callback = function() stopEmote() end, }) EmotesTabR:Button({ Title = "Random Emote", Desc = "Picks a random emote from the list and plays it immediately.", Callback = function() if #flat == 0 then return end local pick = flat[math.random(1, #flat)] local name = pick:match("%] (.+)$") if name then selectedEmote = name playEmote(name) end end, }) EmotesTabR:Button({ Title = "Copy Name", Desc = "Copies the selected emote's exact name to your clipboard.", Callback = function() if selectedEmote then local copyFunc = setclipboard or toclipboard if copyFunc then copyFunc(selectedEmote) WindUI:Notify({ Title = "Copied!", Content = selectedEmote, Icon = "clipboard", Duration = 2 }) else WindUI:Notify({ Title = "Error", Content = "Your executor doesn't support clipboard copying.", Icon = "x", Duration = 2 }) end end end, }) WindUI:Notify({ Title = "Ready", Content = "Loaded " .. #flat .. " emotes successfully.", Icon = "check", Duration = 3 }) end)