local players = game:GetService("Players") local localPlayer = players.LocalPlayer local playerGui = localPlayer.PlayerGui local movesetEngine = {} movesetEngine.__index = movesetEngine movesetEngine.Utils = {} movesetEngine.Editor = {} function movesetEngine.Utils:Debug(message: string) if not message then return end print("[ME]:", message) end function movesetEngine.Utils:GetInstance(instance: Instance) if not instance or not instance.Parent then return end return instance end function movesetEngine.Utils:CreateTopbar(args: {}) if not args then return end local moveset: {} = args.Moveset if not moveset then return end local name: string = moveset.Name local icon: string = moveset.Icon local color: Color3 = moveset.Color local baseCharacter: string = moveset.BaseCharacter local flags: {} = moveset.Flags if not name or not icon or not color or not baseCharacter or not flags then return end local topbarGui: ScreenGui = movesetEngine.Utils:GetInstance(playerGui:FindFirstChild("TopbarPlus")) if not topbarGui then return end local containerFrame: Frame = movesetEngine.Utils:GetInstance(topbarGui:FindFirstChild("TopbarContainer")) if not containerFrame then return end for _, iconFrame: Frame in next, containerFrame:GetChildren() do if not iconFrame:IsA("Frame") then continue end local iconButton: TextButton = movesetEngine.Utils:GetInstance(iconFrame:FindFirstChild("IconButton")) local dropdownContainerFrame: Frame = movesetEngine.Utils:GetInstance(iconFrame:FindFirstChild("DropdownContainer")) if not iconButton or not dropdownContainerFrame then continue end local iconLabel: TextLabel = movesetEngine.Utils:GetInstance(iconButton:FindFirstChild("IconLabel")) local iconImage: ImageLabel = movesetEngine.Utils:GetInstance(iconButton:FindFirstChild("IconImage")) local dropdownFrame: Frame = movesetEngine.Utils:GetInstance(dropdownContainerFrame:FindFirstChild("DropdownFrame")) if not iconLabel or not iconImage or iconImage.Image ~= "http://www.roblox.com/asset/?id=12285568530" or not dropdownFrame then continue end for _, characterFrame: Frame in next, dropdownFrame:GetChildren() do if not characterFrame:IsA("Frame") then continue end local characterButton: TextButton = movesetEngine.Utils:GetInstance(characterFrame:FindFirstChild("IconButton")) local characterOverlayFrame: Frame = movesetEngine.Utils:GetInstance(characterFrame:FindFirstChild("IconOverlay")) if not characterButton or not characterOverlayFrame then continue end local characterLabel: TextLabel = movesetEngine.Utils:GetInstance(characterButton:FindFirstChild("IconLabel")) local characterImage: ImageLabel = movesetEngine.Utils:GetInstance(characterButton:FindFirstChild("IconImage")) if not characterLabel or not characterImage then continue end characterButton.MouseButton1Click:Connect(function() flags.RespawnWithMS = false end) if characterFrame.Name ~= "Bald" then continue end local clonedCharacterFrame = characterFrame:Clone() clonedCharacterFrame.Name = name clonedCharacterFrame.Parent = dropdownFrame clonedCharacterFrame.LayoutOrder = #dropdownFrame:GetChildren() local clonedCharacterButton: TextButton = movesetEngine.Utils:GetInstance(clonedCharacterFrame:FindFirstChild("IconButton")) local clonedCharacterOverlayFrame: Frame = movesetEngine.Utils:GetInstance(clonedCharacterFrame:FindFirstChild("IconOverlay")) if not clonedCharacterButton or not clonedCharacterOverlayFrame then continue end local clonedCharacterLabel: TextLabel = movesetEngine.Utils:GetInstance(clonedCharacterButton:FindFirstChild("IconLabel")) local clonedCharacterImage: ImageLabel = movesetEngine.Utils:GetInstance(clonedCharacterButton:FindFirstChild("IconImage")) if not clonedCharacterLabel or not clonedCharacterImage then continue end clonedCharacterLabel.Text = name clonedCharacterLabel.TextColor3 = color clonedCharacterImage.Image = icon clonedCharacterButton.MouseEnter:Connect(function() clonedCharacterOverlayFrame.BackgroundTransparency = 0.9 clonedCharacterOverlayFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) end) clonedCharacterButton.MouseLeave:Connect(function() clonedCharacterOverlayFrame.BackgroundTransparency = 1 clonedCharacterOverlayFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) end) clonedCharacterButton.MouseButton1Down:Connect(function() clonedCharacterOverlayFrame.BackgroundTransparency = 0.75 clonedCharacterOverlayFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) end) clonedCharacterButton.MouseButton1Up:Connect(function() clonedCharacterOverlayFrame.BackgroundTransparency = 0.9 clonedCharacterOverlayFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) local clickSound = Instance.new("Sound") clickSound.Parent = workspace clickSound.SoundId = "rbxassetid://6895079853" clickSound:Play() clickSound.Ended:Connect(function() clickSound:Destroy() end) end) clonedCharacterButton.MouseButton1Click:Connect(function() flags.RespawnWithMS = true local character: Model = localPlayer.Character local humanoid: Humanoid = character:WaitForChild("Humanoid") local communicate: RemoteEvent = character:WaitForChild("Communicate") humanoid.Health = 0 communicate:FireServer({ Character = baseCharacter, Goal = "Change Character", }) end) movesetEngine.Utils:Debug("Topbar Done") end end end function movesetEngine.Editor:CreateMoveset(args: {}) if not args then return movesetEngine.Utils:Debug("Arguments has not specified") end local name: string = args.Name local icon: string = args.Icon local color: Color3 = args.Color local baseCharacter: string = args.BaseCharacter local ultimateName: string = args.UltimateName local replacedAnimations: {} = args.ReplacedAnimations if not name then return movesetEngine.Utils:Debug("Name has not specified") end if not icon then return movesetEngine.Utils:Debug("Icon has not specified") end if not color then return movesetEngine.Utils:Debug("Color has not specified") end if not baseCharacter then return movesetEngine.Utils:Debug("Base Character has not specified") end if not ultimateName then return movesetEngine.Utils:Debug("Ultimate Name has not specified") end if not replacedAnimations then return movesetEngine.Utils:Debug("Replaced Animations has not specified") end local moveset = {} moveset.Name = name moveset.Icon = icon moveset.Color = color moveset.BaseCharacter = baseCharacter moveset.UltimateName = ultimateName moveset.ReplacedAnimations = replacedAnimations moveset.Flags = { RespawnWithMS = false, } movesetEngine.Utils:Debug("Moveset Name: " .. name) movesetEngine.Utils:Debug("Moveset Icon: " .. icon) movesetEngine.Utils:CreateTopbar({ Moveset = moveset, }) localPlayer.CharacterAdded:Connect(function(character: Model) if not moveset.Flags.RespawnWithMS then return end character:SetAttribute("UltimateName", string.upper(ultimateName)) local humanoid: Humanoid = character:WaitForChild("Humanoid") local animator: Animator = humanoid:WaitForChild("Animator") animator.AnimationPlayed:Connect(function(animationTrack: AnimationTrack) for _, replacedAnimationInfo: {} in next, replacedAnimations do local originalId: string = replacedAnimationInfo.OriginalId local replacedId: string = replacedAnimationInfo.ReplacedId local timePosition: number = replacedAnimationInfo.TimePosition local adjustSpeed: number = replacedAnimationInfo.AdjustSpeed local stoppingAnimationsIds: {} = replacedAnimationInfo.StoppingAnimationsIds local stopAllAnimations: boolean = replacedAnimationInfo.StopAllAnimations local callback = replacedAnimationInfo.Callback if not originalId or originalId ~= animationTrack.Animation.AnimationId or not replacedId or not timePosition or not adjustSpeed then continue end animationTrack:Stop() for _, otherAnimationTrack: AnimationTrack in next, animator:GetPlayingAnimationTracks() do if not stopAllAnimations or (stoppingAnimationsIds and not table.find(stoppingAnimationsIds, otherAnimationTrack.Animation.AnimationId)) then continue end otherAnimationTrack:Stop() print(otherAnimationTrack.Animation.AnimationId) end local replacedAnimation = Instance.new("Animation") replacedAnimation.Name = animationTrack.Animation.Name replacedAnimation.Parent = character replacedAnimation.AnimationId = replacedId local replacedAnimationTrack = animator:LoadAnimation(replacedAnimation) replacedAnimationTrack:Play() replacedAnimationTrack.TimePosition = timePosition replacedAnimationTrack:AdjustSpeed(adjustSpeed) if callback then callback(replacedAnimationTrack) end end end) end) setmetatable(moveset, movesetEngine) return moveset end return movesetEngine