local ENV = (getgenv and getgenv()) or _G local SOURCE_URL = "https://raw.githubusercontent.com/7yd7/Hub/refs/heads/Branch/GUIS/Emotes.lua" local ADDON = [==[ local ENV = (getgenv and getgenv()) or _G local API = ENV.__7yd7SpeedAPI if not API then warn("Emote controls unavailable. Rejoin and execute again.") return end if ENV.__7yd7SpeedCleanup then pcall(ENV.__7yd7SpeedCleanup, false) end if ENV.__7yd7SpeedKeys then pcall(function() ENV.__7yd7SpeedKeys:Disconnect() end) end local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local GuiService = game:GetService("GuiService") local player = Players.LocalPlayer local alive = true local connections = {} local speed = 1 local minimum = 0.1 local maximum = math.clamp( tonumber(ENV.__7yd7SpeedMax) or 3, 0.2, 100 ) local sliderDragging = false local windowDragging = false local dragOrigin, frameOrigin local function connect(signal, callback) local c = signal:Connect(callback) table.insert(connections, c) return c end local parent if type(gethui) == "function" then pcall(function() parent = gethui() end) end parent = parent or game:GetService("CoreGui") local previous = parent:FindFirstChild("DanceSpeedPanel") if previous then previous:Destroy() end local gui = Instance.new("ScreenGui") gui.Name = "DanceSpeedPanel" gui.ResetOnSpawn = false gui.DisplayOrder = 1000000 gui.Parent = parent local frame = Instance.new("Frame") frame.Size = UDim2.fromOffset(340, 225) frame.Position = UDim2.new(0.5, -170, 0.65, 0) frame.BackgroundColor3 = Color3.fromRGB(18, 18, 23) frame.BorderSizePixel = 0 frame.Parent = gui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 12) local border = Instance.new("UIStroke") border.Color = Color3.fromRGB(230, 40, 50) border.Thickness = 1.5 border.Parent = frame local header = Instance.new("TextButton") header.Size = UDim2.new(1, -42, 0, 38) header.BackgroundColor3 = Color3.fromRGB(40, 20, 24) header.BorderSizePixel = 0 header.Text = "⚡ DANCE SPEED" header.TextColor3 = Color3.fromRGB(255, 65, 75) header.Font = Enum.Font.GothamBold header.TextSize = 15 header.Parent = frame Instance.new("UICorner", header).CornerRadius = UDim.new(0, 10) local close = Instance.new("TextButton") close.Size = UDim2.fromOffset(42, 38) close.Position = UDim2.new(1, -42, 0, 0) close.BackgroundColor3 = Color3.fromRGB(145, 25, 35) close.BorderSizePixel = 0 close.Text = "X" close.TextColor3 = Color3.new(1, 1, 1) close.Font = Enum.Font.GothamBold close.TextSize = 17 close.Parent = frame Instance.new("UICorner", close).CornerRadius = UDim.new(0, 10) local label = Instance.new("TextLabel") label.Position = UDim2.fromOffset(12, 43) label.Size = UDim2.new(1, -24, 0, 25) label.BackgroundTransparency = 1 label.TextColor3 = Color3.new(1, 1, 1) label.Font = Enum.Font.GothamSemibold label.TextSize = 14 label.Parent = frame local bar = Instance.new("TextButton") bar.Position = UDim2.fromOffset(20, 78) bar.Size = UDim2.new(1, -40, 0, 12) bar.BackgroundColor3 = Color3.fromRGB(65, 65, 72) bar.BorderSizePixel = 0 bar.Text = "" bar.AutoButtonColor = false bar.Parent = frame Instance.new("UICorner", bar).CornerRadius = UDim.new(1, 0) local fill = Instance.new("Frame") fill.Size = UDim2.new(0, 0, 1, 0) fill.BackgroundColor3 = Color3.fromRGB(240, 45, 55) fill.BorderSizePixel = 0 fill.Parent = bar Instance.new("UICorner", fill).CornerRadius = UDim.new(1, 0) local knob = Instance.new("Frame") knob.Size = UDim2.fromOffset(18, 18) knob.AnchorPoint = Vector2.new(0.5, 0.5) knob.BackgroundColor3 = Color3.new(1, 1, 1) knob.BorderSizePixel = 0 knob.Parent = bar Instance.new("UICorner", knob).CornerRadius = UDim.new(1, 0) local speedBox = Instance.new("TextBox") speedBox.Position = UDim2.fromOffset(20, 103) speedBox.Size = UDim2.fromOffset(90, 28) speedBox.BackgroundColor3 = Color3.fromRGB(42, 42, 49) speedBox.BorderSizePixel = 0 speedBox.TextColor3 = Color3.new(1, 1, 1) speedBox.Font = Enum.Font.GothamSemibold speedBox.TextSize = 13 speedBox.ClearTextOnFocus = false speedBox.Parent = frame Instance.new("UICorner", speedBox).CornerRadius = UDim.new(0, 6) local applyButton = Instance.new("TextButton") applyButton.Position = UDim2.new(1, -115, 0, 103) applyButton.Size = UDim2.fromOffset(95, 28) applyButton.BackgroundColor3 = Color3.fromRGB(170, 30, 40) applyButton.BorderSizePixel = 0 applyButton.Text = "SET SPEED" applyButton.TextColor3 = Color3.new(1, 1, 1) applyButton.Font = Enum.Font.GothamBold applyButton.TextSize = 11 applyButton.Parent = frame Instance.new("UICorner", applyButton).CornerRadius = UDim.new(0, 6) local maxLabel = Instance.new("TextLabel") maxLabel.Position = UDim2.fromOffset(12, 140) maxLabel.Size = UDim2.fromOffset(83, 28) maxLabel.BackgroundTransparency = 1 maxLabel.Text = "Max speed" maxLabel.TextColor3 = Color3.fromRGB(220, 220, 225) maxLabel.Font = Enum.Font.Gotham maxLabel.TextSize = 12 maxLabel.TextXAlignment = Enum.TextXAlignment.Left maxLabel.Parent = frame local maxBox = Instance.new("TextBox") maxBox.Position = UDim2.fromOffset(96, 140) maxBox.Size = UDim2.fromOffset(58, 28) maxBox.BackgroundColor3 = Color3.fromRGB(42, 42, 49) maxBox.BorderSizePixel = 0 maxBox.TextColor3 = Color3.new(1, 1, 1) maxBox.Font = Enum.Font.GothamSemibold maxBox.TextSize = 12 maxBox.ClearTextOnFocus = false maxBox.Parent = frame Instance.new("UICorner", maxBox).CornerRadius = UDim.new(0, 6) local setMax = Instance.new("TextButton") setMax.Position = UDim2.fromOffset(160, 140) setMax.Size = UDim2.fromOffset(75, 28) setMax.BackgroundColor3 = Color3.fromRGB(55, 80, 125) setMax.BorderSizePixel = 0 setMax.Text = "SET MAX" setMax.TextColor3 = Color3.new(1, 1, 1) setMax.Font = Enum.Font.GothamBold setMax.TextSize = 10 setMax.Parent = frame Instance.new("UICorner", setMax).CornerRadius = UDim.new(0, 6) local resetMax = Instance.new("TextButton") resetMax.Position = UDim2.fromOffset(241, 140) resetMax.Size = UDim2.fromOffset(87, 28) resetMax.BackgroundColor3 = Color3.fromRGB(170, 30, 40) resetMax.BorderSizePixel = 0 resetMax.Text = "RESET 3X" resetMax.TextColor3 = Color3.new(1, 1, 1) resetMax.Font = Enum.Font.GothamBold resetMax.TextSize = 10 resetMax.Parent = frame Instance.new("UICorner", resetMax).CornerRadius = UDim.new(0, 6) local status = Instance.new("TextLabel") status.Position = UDim2.fromOffset(12, 177) status.Size = UDim2.new(1, -24, 0, 38) status.BackgroundTransparency = 1 status.TextColor3 = Color3.fromRGB(180, 220, 180) status.Font = Enum.Font.Gotham status.TextSize = 10 status.TextWrapped = true status.Parent = frame local function getTrack() return API.State.currentEmoteTrack end local function refresh() local alpha = math.clamp( (speed - minimum) / (maximum - minimum), 0, 1 ) fill.Size = UDim2.new(alpha, 0, 1, 0) knob.Position = UDim2.new(alpha, 0, 0.5, 0) label.Text = string.format( "Dance speed: %.1fx | Max: %.1fx", speed, maximum ) speedBox.Text = tostring(speed) maxBox.Text = tostring(maximum) end local function saveConfig() pcall(function() API.Config.EmoteSpeed = speed API.Config.EmoteSpeedEnabled = API.State.speedEmoteEnabled API.Config.CustomEmoteSpeedMax = maximum API.SaveConfig() end) end local function enableSpeedMode() -- Use the original 7yd7 toggle, not just a separate GUI variable. if not API.State.speedEmoteEnabled then speedBox.Text = tostring(speed) if API.UI.SpeedBox then API.UI.SpeedBox.Text = tostring(speed) end API.ToggleSpeedMode() end API.State.speedEmoteEnabled = true API.Config.EmoteSpeedEnabled = true end local function applySpeed(value) value = tonumber(value) if not value or value ~= value then status.Text = "Enter a valid speed." return end speed = math.clamp( math.floor(value * 10 + 0.5) / 10, minimum, maximum ) -- Update the original SpeedBox BEFORE enabling speed mode. if API.UI.SpeedBox then API.UI.SpeedBox.Text = tostring(speed) end API.Config.EmoteSpeed = speed enableSpeedMode() API.Config.EmoteSpeed = speed API.Config.EmoteSpeedEnabled = true if API.UI.SpeedBox then API.UI.SpeedBox.Text = tostring(speed) end -- Apply immediately to the actual track managed by 7yd7. local track = getTrack() if track and track.IsPlaying then local ok = pcall(function() track:AdjustSpeed(speed) end) status.Text = ok and string.format("Applied %.1fx to current dance.", speed) or "Could not adjust current track. Restart the dance." else status.Text = string.format( "Speed set to %.1fx. Select/restart a dance.", speed ) end refresh() saveConfig() end local function applyMaximum(value) value = tonumber(value) if not value or value ~= value then status.Text = "Enter a valid maximum." return end maximum = math.clamp( math.floor(value * 10 + 0.5) / 10, 0.2, 100 ) ENV.__7yd7SpeedMax = maximum if speed > maximum then speed = maximum end refresh() applySpeed(speed) status.Text = string.format( "Maximum is %.1fx. Drag slider to use it.", maximum ) end local function updateSlider(x) local width = bar.AbsoluteSize.X if width <= 0 then return end local alpha = math.clamp( (x - bar.AbsolutePosition.X) / width, 0, 1 ) applySpeed(minimum + alpha * (maximum - minimum)) end connect(bar.InputBegan, function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then sliderDragging = true updateSlider(input.Position.X) end end) connect(knob.InputBegan, function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then sliderDragging = true updateSlider(input.Position.X) end end) connect(UIS.InputChanged, function(input) if sliderDragging then if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then updateSlider(input.Position.X) end elseif windowDragging then if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then local delta = input.Position - dragOrigin frame.Position = UDim2.new( frameOrigin.X.Scale, frameOrigin.X.Offset + delta.X, frameOrigin.Y.Scale, frameOrigin.Y.Offset + delta.Y ) end end end) connect(UIS.InputEnded, function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then sliderDragging = false windowDragging = false end end) connect(header.InputBegan, function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then windowDragging = true dragOrigin = input.Position frameOrigin = frame.Position end end) connect(applyButton.Activated, function() applySpeed(speedBox.Text) end) connect(speedBox.FocusLost, function(enterPressed) if enterPressed then applySpeed(speedBox.Text) end end) connect(setMax.Activated, function() applyMaximum(maxBox.Text) end) connect(maxBox.FocusLost, function(enterPressed) if enterPressed then applyMaximum(maxBox.Text) end end) connect(resetMax.Activated, function() applyMaximum(3) end) local function toggleMenu() local exists, wheel = API.GetWheel() local opening = not (exists and wheel and wheel.Visible) pcall(function() GuiService:SetEmotesMenuOpen(opening) end) if exists and wheel then pcall(function() wheel.Visible = opening end) status.Text = opening and "Emote menu opened." or "Menu closed." else status.Text = "Roblox emote wheel unavailable in this game." end end local function emergencyStop() pcall(API.StopCurrentEmote) if API.State.speedEmoteEnabled then pcall(API.ToggleSpeedMode) end API.State.speedEmoteEnabled = false API.Config.EmoteSpeedEnabled = false API.Config.EmoteSpeed = 1 if API.UI.SpeedBox then API.UI.SpeedBox.Text = "1" end speed = 1 refresh() saveConfig() status.Text = "Stopped dance. Normal speed restored." end local function cleanup(resetNormal) if not alive then return end if resetNormal then -- Reset value only. Leave the original emote menu loaded. API.Config.EmoteSpeed = 1 if API.UI.SpeedBox then API.UI.SpeedBox.Text = "1" end local track = getTrack() if track and track.IsPlaying then pcall(function() track:AdjustSpeed(1) end) end end alive = false for _, c in ipairs(connections) do pcall(function() c:Disconnect() end) end ENV.__7yd7SpeedCleanup = nil gui:Destroy() end ENV.__7yd7SpeedCleanup = cleanup connect(close.Activated, function() cleanup(true) end) ENV.__7yd7SpeedKeys = UIS.InputBegan:Connect(function(input, processed) if processed or UIS:GetFocusedTextBox() then return end if input.KeyCode == Enum.KeyCode.Period then toggleMenu() elseif input.KeyCode == Enum.KeyCode.RightBracket then emergencyStop() end end) -- Enable the original mode once, then set the chosen value. enableSpeedMode() refresh() applySpeed(speed) status.Text = "Ready: . menu | ] emergency stop" ]==] local function openAddon() local chunk, err = loadstring(ADDON) if not chunk then warn("Speed GUI compile error: " .. tostring(err)) return end local ok, problem = pcall(chunk) if not ok then warn("Speed GUI error: " .. tostring(problem)) end end -- Re-execution: reopen only the speed GUI. if ENV.__7yd7SpeedAPI then openAddon() return end if _G.EmotesGUIRunning then warn("An older emote script is running. Rejoin before running this combined version.") return end local ok, source = pcall(function() return game:HttpGet(SOURCE_URL) end) if not ok or type(source) ~= "string" or #source < 10000 then warn("Could not download the original 7yd7 script.") return end -- Expose the real local state and toggle functions to the GUI. local bridge = [==[ do local API = { State = State, Config = Config, UI = UI, SaveConfig = function() return SaveConfig() end, ToggleSpeedMode = function() if not State.speedEmoteEnabled then toggleSpeedEmote() end end, StopCurrentEmote = function() stopCurrentEmote() stopEmotes() end, GetWheel = function() return checkEmotesMenuExists() end } local ENV = (getgenv and getgenv()) or _G ENV.__7yd7SpeedAPI = API end ]==] local combined, compileError = loadstring(source .. "\n\n" .. bridge .. "\n\n" .. ADDON) if not combined then warn("Combined compile error: " .. tostring(compileError)) return end local success, runtimeError = pcall(combined) if not success then warn("Combined runtime error: " .. tostring(runtimeError)) end