axiyt

Nitus Forsaken idk

Sep 14th, 2025
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 24.96 KB | Gaming | 0 0
  1. -- ๐Ÿงผ Prevent duplicate windows
  2. if getgenv().WhimsicalWindow and getgenv().WhimsicalWindow.Destroy then
  3.     getgenv().WhimsicalWindow:Destroy()
  4. end
  5.  
  6. -- ๐Ÿงฉ Load Fluent UI and Addons
  7. local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))()
  8. local SaveManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/SaveManager.lua"))()
  9. local InterfaceManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/InterfaceManager.lua"))()
  10.  
  11. -- ๐ŸชŸ Create Window
  12. local Window = Fluent:CreateWindow({
  13.     Title = "Whimsical's Paradise",
  14.     SubTitle = "by nix",
  15.     TabWidth = 160,
  16.     Size = UDim2.fromOffset(580, 460),
  17.     Acrylic = true,
  18.     Theme = "Dark",
  19.     MinimizeKey = Enum.KeyCode.LeftControl
  20. })
  21. getgenv().WhimsicalWindow = Window
  22.  
  23. -- ๐Ÿ—‚๏ธ Tabs
  24. local Tabs = {
  25.     Settings = Window:AddTab({ Title = "Settings", Icon = "settings" }),
  26.     Emotes  = Window:AddTab({ Title = "Emotes",  Icon = "smile" }),
  27.     Main    = Window:AddTab({ Title = "Main",    Icon = "zap" })
  28. }
  29. local Options = Fluent.Options
  30.  
  31. -- ๐Ÿงฉ Setup Managers
  32. SaveManager:SetLibrary(Fluent)
  33. InterfaceManager:SetLibrary(Fluent)
  34. SaveManager:IgnoreThemeSettings()
  35. SaveManager:SetIgnoreIndexes({})
  36. InterfaceManager:SetFolder("WhimsicalParadise")
  37. SaveManager:SetFolder("WhimsicalParadise/GameConfig")
  38. InterfaceManager:BuildInterfaceSection(Tabs.Settings)
  39. SaveManager:BuildConfigSection(Tabs.Settings)
  40. Window:SelectTab(2)
  41. Fluent:Notify({ Title = "Whimsical's Paradise", Content = "UI Loaded Successfully", Duration = 6 })
  42. SaveManager:LoadAutoloadConfig()
  43.  
  44. -- =========================
  45. -- Services & Player
  46. -- =========================
  47. local Players = game:GetService("Players")
  48. local LocalPlayer = Players.LocalPlayer
  49. local RunService = game:GetService("RunService")
  50. local UserInputService = game:GetService("UserInputService")
  51. local HttpService = game:GetService("HttpService")
  52. local TeleportService = game:GetService("TeleportService")
  53. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  54. local SoundService = game:GetService("SoundService")
  55. local Camera = workspace.CurrentCamera
  56.  
  57. local function getHumanoid()
  58.     local char = LocalPlayer.Character
  59.     return char and char:FindFirstChildOfClass("Humanoid") or nil
  60. end
  61.  
  62. -- =========================
  63. -- Main tab: Fly+NoClip + Switch Servers + Spinbot + ESP (purple + nametags)
  64. -- =========================
  65.  
  66. -- ๐Ÿ›ธ Fly + NoClip Toggle (WASD + Space/Control, camera-relative)
  67. local flyEnabled = false
  68. local flyConn, flyGyro, flyVel
  69.  
  70. local function setNoClip(state)
  71.     local char = LocalPlayer.Character
  72.     if not char then return end
  73.     for _, part in ipairs(char:GetDescendants()) do
  74.         if part:IsA("BasePart") then
  75.             part.CanCollide = not state
  76.         end
  77.     end
  78. end
  79.  
  80. local function startFly()
  81.     local char = LocalPlayer.Character
  82.     if not char then return end
  83.     local root = char:FindFirstChild("HumanoidRootPart")
  84.     if not root then return end
  85.  
  86.     flyVel = Instance.new("BodyVelocity")
  87.     flyVel.Name = "Whimsical_FlyVelocity"
  88.     flyVel.MaxForce = Vector3.new(1e6, 1e6, 1e6)
  89.     flyVel.P = 2e4
  90.     flyVel.Velocity = Vector3.zero
  91.     flyVel.Parent = root
  92.  
  93.     flyGyro = Instance.new("BodyGyro")
  94.     flyGyro.Name = "Whimsical_FlyGyro"
  95.     flyGyro.MaxTorque = Vector3.new(1e6, 1e6, 1e6)
  96.     flyGyro.P = 1e5
  97.     flyGyro.CFrame = Camera.CFrame
  98.     flyGyro.Parent = root
  99.  
  100.     local flySpeed = 50
  101.     flyConn = RunService.RenderStepped:Connect(function()
  102.         if not LocalPlayer.Character or not root.Parent then return end
  103.  
  104.         -- Build input direction (W=forward, S=backward, A/D strafe, Space/Control vertical)
  105.         local dir = Vector3.zero
  106.         if UserInputService:IsKeyDown(Enum.KeyCode.W) then dir += Camera.CFrame.LookVector end
  107.         if UserInputService:IsKeyDown(Enum.KeyCode.S) then dir -= Camera.CFrame.LookVector end
  108.         if UserInputService:IsKeyDown(Enum.KeyCode.D) then dir += Camera.CFrame.RightVector end
  109.         if UserInputService:IsKeyDown(Enum.KeyCode.A) then dir -= Camera.CFrame.RightVector end
  110.         if UserInputService:IsKeyDown(Enum.KeyCode.Space) then dir += Vector3.new(0, 1, 0) end
  111.         if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) or UserInputService:IsKeyDown(Enum.KeyCode.Q) then dir -= Vector3.new(0, 1, 0) end
  112.  
  113.         local vel = dir.Magnitude > 0 and dir.Unit * flySpeed or Vector3.zero
  114.         flyVel.Velocity = vel
  115.  
  116.         -- Align yaw to camera (keep level)
  117.         local look = Camera.CFrame.LookVector
  118.         local flat = Vector3.new(look.X, 0, look.Z)
  119.         if flat.Magnitude < 0.001 then flat = Vector3.new(0, 0, -1) end
  120.         flyGyro.CFrame = CFrame.new(Vector3.zero, flat.Unit)
  121.     end)
  122.  
  123.     setNoClip(true)
  124. end
  125.  
  126. local function stopFly()
  127.     if flyConn then flyConn:Disconnect() flyConn = nil end
  128.     if flyVel then flyVel:Destroy() flyVel = nil end
  129.     if flyGyro then flyGyro:Destroy() flyGyro = nil end
  130.     setNoClip(false)
  131. end
  132.  
  133. Tabs.Main:AddToggle("FlyNoclip", {
  134.     Title = "Fly + NoClip",
  135.     Description = "WASD flight and disabled collisions",
  136.     Default = false
  137. }):OnChanged(function(state)
  138.     flyEnabled = state
  139.     if state then startFly() else stopFly() end
  140. end)
  141.  
  142. LocalPlayer.CharacterAdded:Connect(function()
  143.     if flyEnabled then
  144.         task.defer(startFly)
  145.     else
  146.         stopFly()
  147.     end
  148. end)
  149.  
  150. -- ๐Ÿ” Switch Servers Button
  151. Tabs.Main:AddButton({
  152.     Title = "๐Ÿ” Switch Servers",
  153.     Description = "Teleport to a random public server",
  154.     Callback = function()
  155.         local pid = game.PlaceId
  156.         local ok, res = pcall(function()
  157.             return HttpService:JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/" .. pid .. "/servers/Public?sortOrder=Asc&limit=100"))
  158.         end)
  159.         if ok and res and res.data then
  160.             local servers = {}
  161.             for _, s in ipairs(res.data) do
  162.                 if s.id and s.playing and s.maxPlayers and s.playing < s.maxPlayers then
  163.                     table.insert(servers, s.id)
  164.                 end
  165.             end
  166.             if #servers > 0 then
  167.                 local target = servers[math.random(1, #servers)]
  168.                 local success, err = pcall(function()
  169.                     TeleportService:TeleportToPlaceInstance(pid, target, LocalPlayer)
  170.                 end)
  171.                 if not success then warn("Teleport failed:", err) end
  172.             else
  173.                 warn("No available servers found.")
  174.             end
  175.         else
  176.             warn("Failed to fetch server list.")
  177.         end
  178.     end
  179. })
  180.  
  181. -- ๐ŸŒ€ Spinbot Toggle + Speed Slider
  182. local spinSpeed = 45 -- degrees per second
  183. local spinEnabled = false
  184. local spinConn
  185.  
  186. Tabs.Main:AddSlider("SpinSpeed", {
  187.     Title = "Spinbot Speed",
  188.     Description = "Rotation speed (deg/sec)",
  189.     Default = 45,
  190.     Min = 10,
  191.     Max = 720,
  192.     Rounding = 1,
  193.     Callback = function(val)
  194.         spinSpeed = val
  195.     end
  196. })
  197.  
  198. Tabs.Main:AddToggle("SpinbotToggle", {
  199.     Title = "Spinbot",
  200.     Description = "Rotate your character continuously",
  201.     Default = false
  202. }):OnChanged(function(state)
  203.     spinEnabled = state
  204.     if spinConn then spinConn:Disconnect() spinConn = nil end
  205.  
  206.     if state then
  207.         spinConn = RunService.RenderStepped:Connect(function(dt)
  208.             local char = LocalPlayer.Character
  209.             local root = char and char:FindFirstChild("HumanoidRootPart")
  210.             local hum = char and char:FindFirstChildOfClass("Humanoid")
  211.             if root and hum then
  212.                 root.CFrame *= CFrame.Angles(0, math.rad(spinSpeed) * dt, 0)
  213.                 hum.AutoRotate = false
  214.             end
  215.         end)
  216.     else
  217.         local hum = getHumanoid()
  218.         if hum then hum.AutoRotate = true end
  219.     end
  220. end)
  221.  
  222. LocalPlayer.CharacterAdded:Connect(function()
  223.     local hum = getHumanoid()
  224.     if hum then hum.AutoRotate = not spinEnabled end
  225. end)
  226.  
  227. -- ๐Ÿงฟ ESP Highlight (Purple) + Nametags โ€” Robust and Clean
  228. local espEnabled = false
  229.  
  230. local function ensureESPForPlayer(player)
  231.     local char = player.Character
  232.     if not char then return end
  233.  
  234.     -- Highlight (purple)
  235.     local highlight = char:FindFirstChild("WhimsicalESP")
  236.     if not highlight then
  237.         highlight = Instance.new("Highlight")
  238.         highlight.Name = "WhimsicalESP"
  239.         highlight.Adornee = char
  240.         highlight.FillTransparency = 1
  241.         highlight.OutlineTransparency = 0
  242.         highlight.OutlineColor = Color3.fromRGB(170, 0, 255)
  243.         highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  244.         highlight.Parent = char
  245.     else
  246.         highlight.Adornee = char
  247.         highlight.OutlineColor = Color3.fromRGB(170, 0, 255)
  248.         highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  249.     end
  250.  
  251.     -- Nametag
  252.     local head = char:FindFirstChild("Head") or char:FindFirstChild("HumanoidRootPart")
  253.     if head then
  254.         local tag = head:FindFirstChild("WhimsicalNameTag")
  255.         if not tag then
  256.             tag = Instance.new("BillboardGui")
  257.             tag.Name = "WhimsicalNameTag"
  258.             tag.AlwaysOnTop = true
  259.             tag.LightInfluence = 0
  260.             tag.Size = UDim2.new(0, 200, 0, 40)
  261.             tag.StudsOffset = Vector3.new(0, 2.5, 0)
  262.             tag.Adornee = head
  263.             tag.Parent = head
  264.  
  265.             local label = Instance.new("TextLabel")
  266.             label.Name = "Text"
  267.             label.BackgroundTransparency = 1
  268.             label.Size = UDim2.new(1, 0, 1, 0)
  269.             label.Font = Enum.Font.GothamBold
  270.             label.TextScaled = true
  271.             label.TextColor3 = Color3.fromRGB(230, 200, 255)
  272.             label.TextStrokeTransparency = 0.2
  273.             label.TextStrokeColor3 = Color3.fromRGB(60, 0, 90)
  274.             label.Text = player.Name
  275.             label.Parent = tag
  276.         else
  277.             local label = tag:FindFirstChild("Text")
  278.             if label and label:IsA("TextLabel") then
  279.                 label.Text = player.Name
  280.             end
  281.             tag.Adornee = head
  282.         end
  283.     end
  284. end
  285.  
  286. local function clearESPForPlayer(player)
  287.     local char = player and player.Character
  288.     if not char then return end
  289.     local h = char:FindFirstChild("WhimsicalESP")
  290.     if h then h:Destroy() end
  291.     local head = char:FindFirstChild("Head") or char:FindFirstChild("HumanoidRootPart")
  292.     if head then
  293.         local tag = head:FindFirstChild("WhimsicalNameTag")
  294.         if tag then tag:Destroy() end
  295.     end
  296. end
  297.  
  298. local function applyESPAll()
  299.     for _, p in ipairs(Players:GetPlayers()) do
  300.         ensureESPForPlayer(p)
  301.     end
  302. end
  303.  
  304. local function clearESPAll()
  305.     for _, p in ipairs(Players:GetPlayers()) do
  306.         clearESPForPlayer(p)
  307.     end
  308. end
  309.  
  310. Tabs.Main:AddToggle("ESPHighlightToggle", {
  311.     Title = "ESP + Nametags",
  312.     Description = "Highlights all players and shows names",
  313.     Default = false
  314. }):OnChanged(function(state)
  315.     espEnabled = state
  316.     clearESPAll()
  317.     if state then
  318.         applyESPAll()
  319.     end
  320. end)
  321.  
  322. Players.PlayerAdded:Connect(function(p)
  323.     p.CharacterAdded:Connect(function()
  324.         if espEnabled then
  325.             task.wait(0.1)
  326.             ensureESPForPlayer(p)
  327.         end
  328.     end)
  329.     if espEnabled then ensureESPForPlayer(p) end
  330. end)
  331.  
  332. Players.PlayerRemoving:Connect(function(p)
  333.     clearESPForPlayer(p)
  334. end)
  335.  
  336. LocalPlayer.CharacterAdded:Connect(function()
  337.     if espEnabled then
  338.         task.wait(0.1)
  339.         ensureESPForPlayer(LocalPlayer)
  340.     end
  341. end)
  342.  
  343. RunService.RenderStepped:Connect(function()
  344.     if not espEnabled then return end
  345.     for _, p in ipairs(Players:GetPlayers()) do
  346.         ensureESPForPlayer(p)
  347.     end
  348. end)
  349.  
  350. -- =========================
  351. -- Emotes tab (modules + folders/models with nested content)
  352. -- =========================
  353. local EmoteFolder = ReplicatedStorage:WaitForChild("Assets"):WaitForChild("Emotes")
  354.  
  355. -- Global state for emotes
  356. local PlayingTracks = {}   -- [emoteName] = AnimationTrack
  357. local PlayingSounds = {}   -- [emoteName] = Sound
  358. local SpawnedByEmote = {}  -- [emoteName] = { spawned instances }
  359. local ActiveEmotes = {}    -- [emoteName] = true if toggled on
  360.  
  361. -- Global loop override
  362. local loopEmoteContent = false
  363. Tabs.Emotes:AddToggle("LoopEmoteContent", {
  364.     Title = "Loop Anim & Audio",
  365.     Description = "Force animation and sound to loop",
  366.     Default = false
  367. }):OnChanged(function(state)
  368.     loopEmoteContent = state
  369.     for _, track in pairs(PlayingTracks) do
  370.         if track then track.Looped = state or track.Looped end
  371.     end
  372.     for _, sound in pairs(PlayingSounds) do
  373.         if sound then sound.Looped = state or sound.Looped end
  374.     end
  375.     for _, list in pairs(SpawnedByEmote) do
  376.         for _, o in ipairs(list) do
  377.             if o and o:IsA("Sound") then
  378.                 o.Looped = state or o.Looped
  379.             end
  380.         end
  381.     end
  382. end)
  383.  
  384. -- ๐ŸŽš๏ธ Emote Volume Slider
  385. Tabs.Emotes:AddSlider("EmoteVolume", {
  386.     Title = "Emote Volume",
  387.     Description = "Adjust emote sound volume",
  388.     Default = 1,
  389.     Min = 0,
  390.     Max = 5,
  391.     Rounding = 1,
  392.     Callback = function(value)
  393.         for _, sound in pairs(PlayingSounds) do
  394.             if sound and sound:IsA("Sound") then
  395.                 sound.Volume = value
  396.             end
  397.         end
  398.         for _, list in pairs(SpawnedByEmote) do
  399.             for _, o in ipairs(list) do
  400.                 if o and o:IsA("Sound") then
  401.                     o.Volume = value
  402.                 end
  403.             end
  404.         end
  405.     end
  406. })
  407.  
  408. -- ๐ŸŽ›๏ธ Playback Speed Control (Animation + Audio)
  409. local useCustomSpeed = false
  410. local customPlaybackSpeed = 1
  411.  
  412. Tabs.Emotes:AddToggle("UseCustomSpeed", {
  413.     Title = "Custom Playback Speed",
  414.     Description = "Override animation and sound speed",
  415.     Default = false
  416. }):OnChanged(function(state)
  417.     useCustomSpeed = state
  418.     -- Apply live if toggled on
  419.     if useCustomSpeed then
  420.         for _, track in pairs(PlayingTracks) do
  421.             if track and track:IsA("AnimationTrack") then
  422.                 track:AdjustSpeed(customPlaybackSpeed)
  423.             end
  424.         end
  425.         for _, sound in pairs(PlayingSounds) do
  426.             if sound and sound:IsA("Sound") then
  427.                 sound.PlaybackSpeed = customPlaybackSpeed
  428.             end
  429.         end
  430.         for _, list in pairs(SpawnedByEmote) do
  431.             for _, o in ipairs(list) do
  432.                 if o and o:IsA("Sound") then
  433.                     o.PlaybackSpeed = customPlaybackSpeed
  434.                 end
  435.             end
  436.         end
  437.     else
  438.         -- Reset to 1x on disable
  439.         for _, track in pairs(PlayingTracks) do
  440.             if track and track:IsA("AnimationTrack") then
  441.                 track:AdjustSpeed(1)
  442.             end
  443.         end
  444.         for _, sound in pairs(PlayingSounds) do
  445.             if sound and sound:IsA("Sound") then
  446.                 sound.PlaybackSpeed = 1
  447.             end
  448.         end
  449.         for _, list in pairs(SpawnedByEmote) do
  450.             for _, o in ipairs(list) do
  451.                 if o and o:IsA("Sound") then
  452.                     o.PlaybackSpeed = 1
  453.                 end
  454.             end
  455.         end
  456.     end
  457. end)
  458.  
  459. Tabs.Emotes:AddSlider("PlaybackSpeedSlider", {
  460.     Title = "Playback Speed",
  461.     Description = "Speed multiplier for animation and sound",
  462.     Default = 1,
  463.     Min = 0.1,
  464.     Max = 3,
  465.     Rounding = 2,
  466.     Callback = function(val)
  467.         customPlaybackSpeed = val
  468.         if useCustomSpeed then
  469.             for _, track in pairs(PlayingTracks) do
  470.                 if track and track:IsA("AnimationTrack") then
  471.                     track:AdjustSpeed(customPlaybackSpeed)
  472.                 end
  473.             end
  474.             for _, sound in pairs(PlayingSounds) do
  475.                 if sound and sound:IsA("Sound") then
  476.                     sound.PlaybackSpeed = customPlaybackSpeed
  477.                 end
  478.             end
  479.             for _, list in pairs(SpawnedByEmote) do
  480.                 for _, o in ipairs(list) do
  481.                     if o and o:IsA("Sound") then
  482.                         o.PlaybackSpeed = customPlaybackSpeed
  483.                     end
  484.                 end
  485.             end
  486.         end
  487.     end
  488. })
  489.  
  490. -- Helpers for emote control
  491. local function stopAllEmotes()
  492.     for name, track in pairs(PlayingTracks) do
  493.         if track and track.IsPlaying then track:Stop() end
  494.         PlayingTracks[name] = nil
  495.     end
  496.     for name, sound in pairs(PlayingSounds) do
  497.         if sound then
  498.             if sound.IsPlaying then sound:Stop() end
  499.             sound:Destroy()
  500.         end
  501.         PlayingSounds[name] = nil
  502.     end
  503.     for name, list in pairs(SpawnedByEmote) do
  504.         for _, obj in ipairs(list) do
  505.             if obj and obj.Parent then obj:Destroy() end
  506.         end
  507.         SpawnedByEmote[name] = nil
  508.     end
  509.     ActiveEmotes = {}
  510. end
  511.  
  512. local function cleanupEmote(name)
  513.     local track = PlayingTracks[name]
  514.     if track and track.IsPlaying then track:Stop() end
  515.     PlayingTracks[name] = nil
  516.  
  517.     local sound = PlayingSounds[name]
  518.     if sound then
  519.         if sound.IsPlaying then sound:Stop() end
  520.         sound:Destroy()
  521.     end
  522.     PlayingSounds[name] = nil
  523.  
  524.     local spawned = SpawnedByEmote[name]
  525.     if spawned then
  526.         for _, obj in ipairs(spawned) do
  527.             if obj and obj.Parent then obj:Destroy() end
  528.         end
  529.     end
  530.     SpawnedByEmote[name] = nil
  531.     ActiveEmotes[name] = nil
  532. end
  533.  
  534. -- Spawn nested content from a folder/model for an emote
  535. local function spawnNestedContentForEmote(emoteName, container)
  536.     SpawnedByEmote[emoteName] = SpawnedByEmote[emoteName] or {}
  537.     local bucket = SpawnedByEmote[emoteName]
  538.  
  539.     local function spawnNode(node)
  540.         local clone
  541.         local ok = pcall(function() clone = node:Clone() end)
  542.         if not ok or not clone then return end
  543.  
  544.         if clone:IsA("Attachment") or clone:IsA("ParticleEmitter") or clone:IsA("Beam") or clone:IsA("Trail") then
  545.             local root = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  546.             if root then
  547.                 clone.Parent = root
  548.                 table.insert(bucket, clone)
  549.             else
  550.                 clone:Destroy()
  551.             end
  552.         elseif clone:IsA("Sound") then
  553.             clone.Parent = SoundService
  554.             clone.Volume = Options.EmoteVolume and Options.EmoteVolume.Value or 1
  555.             clone.Looped = loopEmoteContent or clone.Looped or false
  556.             if useCustomSpeed then clone.PlaybackSpeed = customPlaybackSpeed end
  557.             clone:Play()
  558.             table.insert(bucket, clone)
  559.         elseif clone:IsA("BasePart") or clone:IsA("Model") then
  560.             clone.Parent = workspace
  561.             table.insert(bucket, clone)
  562.         elseif clone:IsA("BillboardGui") or clone:IsA("SurfaceGui") then
  563.             local head = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Head")
  564.             if head and clone:IsA("BillboardGui") then
  565.                 clone.Adornee = head
  566.                 clone.Parent = head
  567.             else
  568.                 local root = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  569.                 clone.Parent = root or LocalPlayer.Character or workspace
  570.             end
  571.             table.insert(bucket, clone)
  572.         else
  573.             clone.Parent = LocalPlayer.Character or workspace
  574.             table.insert(bucket, clone)
  575.         end
  576.     end
  577.  
  578.     for _, child in ipairs(container:GetChildren()) do
  579.         if not child:IsA("ModuleScript") and not child:IsA("Animation") then
  580.             spawnNode(child)
  581.         end
  582.     end
  583. end
  584.  
  585. -- Resolve animation and sound ids from data or descendants
  586. local function resolveAnimationIdFrom(anyInstance, emoteData)
  587.     if emoteData and typeof(emoteData.AssetID) == "string" and emoteData.AssetID ~= "" then
  588.         return emoteData.AssetID
  589.     end
  590.     local anim = anyInstance:FindFirstChildOfClass("Animation") or anyInstance:FindFirstChildWhichIsA("Animation", true)
  591.     if anim and typeof(anim.AnimationId) == "string" and anim.AnimationId ~= "" then
  592.         return anim.AnimationId
  593.     end
  594.     return nil
  595. end
  596.  
  597. local function resolveSoundIdFrom(anyInstance, emoteData)
  598.     local sfxId = emoteData and (emoteData.SFX or emoteData.SoundId or emoteData.EmoteSFX)
  599.     if not sfxId or sfxId == "" then
  600.         local snd = anyInstance:FindFirstChildOfClass("Sound") or anyInstance:FindFirstChildWhichIsA("Sound", true)
  601.         if snd and typeof(snd.SoundId) == "string" and snd.SoundId ~= "" then
  602.             sfxId = snd.SoundId
  603.         end
  604.     end
  605.     return sfxId
  606. end
  607.  
  608. -- ๐Ÿ›‘ Stop All Button
  609. Tabs.Emotes:AddButton({
  610.     Title = "๐Ÿ›‘ Stop All Animations & SFX",
  611.     Description = "Halts all emotes, sounds, and spawned effects",
  612.     Callback = function()
  613.         stopAllEmotes()
  614.     end
  615. })
  616.  
  617. -- ๐ŸŽญ Build toggles for all emotes (modules + folders/models, nested content supported)
  618. task.spawn(function()
  619.     local EmoteFolder = ReplicatedStorage:WaitForChild("Assets"):WaitForChild("Emotes")
  620.     local children = EmoteFolder:GetChildren()
  621.     if #children == 0 then
  622.         warn("No emote entries found in EmoteFolder")
  623.         return
  624.     end
  625.  
  626.     local EntryByName = {}
  627.     for _, entry in ipairs(children) do
  628.         EntryByName[entry.Name] = entry
  629.     end
  630.  
  631.     local function playEmote(emoteName, entry, emoteData, animId, sfxId, looped)
  632.         local hum = getHumanoid()
  633.         -- Animation
  634.         if animId and hum then
  635.             local anim = Instance.new("Animation")
  636.             anim.AnimationId = animId
  637.             local ok, track = pcall(function() return hum:LoadAnimation(anim) end)
  638.             if ok and track then
  639.                 track.Looped = loopEmoteContent or looped or true -- keep playing
  640.                 track:Play()
  641.                 if useCustomSpeed then
  642.                     track:AdjustSpeed(customPlaybackSpeed)
  643.                 else
  644.                     track:AdjustSpeed(1)
  645.                 end
  646.                 PlayingTracks[emoteName] = track
  647.             else
  648.                 warn("Failed to load animation for emote:", emoteName)
  649.             end
  650.         end
  651.         -- Sound
  652.         if typeof(sfxId) == "string" and sfxId:match("^rbxassetid://") then
  653.             local sound = Instance.new("Sound")
  654.             sound.SoundId = sfxId
  655.             sound.Volume = Options.EmoteVolume and Options.EmoteVolume.Value or 1
  656.             sound.Looped = loopEmoteContent or looped or false
  657.             if useCustomSpeed then sound.PlaybackSpeed = customPlaybackSpeed else sound.PlaybackSpeed = 1 end
  658.             sound.Parent = SoundService
  659.             sound:Play()
  660.             PlayingSounds[emoteName] = sound
  661.         end
  662.         -- Nested content
  663.         if not entry:IsA("ModuleScript") and (#entry:GetChildren() > 0) then
  664.             spawnNestedContentForEmote(emoteName, entry)
  665.         else
  666.             local container = EmoteFolder:FindFirstChild(emoteName)
  667.             if container and container ~= entry and (container:IsA("Folder") or container:IsA("Model")) then
  668.                 spawnNestedContentForEmote(emoteName, container)
  669.             end
  670.         end
  671.         ActiveEmotes[emoteName] = true
  672.     end
  673.  
  674.     for _, entry in ipairs(children) do
  675.         local emoteName = entry.Name
  676.         local emoteData = nil
  677.  
  678.         if entry:IsA("ModuleScript") then
  679.             local ok, res = pcall(require, entry)
  680.             if ok then emoteData = res else warn("Error requiring emote module:", emoteName, res) end
  681.         end
  682.  
  683.         local description = (emoteData and emoteData.Description) or ("Toggle emote: " .. emoteName)
  684.         local looped = (emoteData and emoteData.Looped) or false
  685.         local assetId = resolveAnimationIdFrom(entry, emoteData) or ""
  686.         local sfxId   = resolveSoundIdFrom(entry, emoteData) or ""
  687.  
  688.         local toggle = Tabs.Emotes:AddToggle("Emote_" .. emoteName, {
  689.             Title = emoteName,
  690.             Description = description,
  691.             Default = false
  692.         })
  693.  
  694.         toggle:OnChanged(function()
  695.             cleanupEmote(emoteName)
  696.             if toggle.Value then
  697.                 playEmote(emoteName, entry, emoteData, assetId ~= "" and assetId or nil, sfxId ~= "" and sfxId or nil, looped)
  698.             else
  699.                 ActiveEmotes[emoteName] = nil
  700.             end
  701.         end)
  702.     end
  703.  
  704.     -- Reapply after respawn for any emotes still marked active
  705.     LocalPlayer.CharacterAdded:Connect(function()
  706.         task.wait(0.35)
  707.         for name, _ in pairs(ActiveEmotes) do
  708.             local entry = EntryByName[name]
  709.             if entry then
  710.                 local emoteData
  711.                 if entry:IsA("ModuleScript") then
  712.                     local ok, res = pcall(require, entry)
  713.                     if ok then emoteData = res end
  714.                 end
  715.                 local looped = (emoteData and emoteData.Looped) or false
  716.                 local animId = resolveAnimationIdFrom(entry, emoteData)
  717.                 local sfxId  = resolveSoundIdFrom(entry, emoteData)
  718.                 playEmote(name, entry, emoteData, animId, sfxId, looped)
  719.             end
  720.         end
  721.     end)
  722. end)
  723.  
Tags: Cheat
Advertisement
Add Comment
Please, Sign In to add comment