local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function() if workspace.Music.IsPlaying == true then script.Parent.Image = "rbxassetid://202000870" workspace.Music:Pause() game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel.TextTransparency = 0 game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel.Visible = true game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel.Text = "muted!" local tweenservice = game:GetService("TweenService") local tweenInfo = TweenInfo.new( 0.3,Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0, false ) local tween = tweenservice:Create(game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel, tweenInfo, {Position = UDim2.new(0.5, 0,0.80, 0)}) tween:Play() wait(2) local tweenservice = game:GetService("TweenService") local tweenInfo = TweenInfo.new( 0.3,Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0, false ) local tweene = tweenservice:Create(game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel, tweenInfo, {TextTransparency = 1}) tweene:Play() tweene.Completed:Connect(function() game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel.Position = UDim2.new(0.5, 0,0.85, 0) game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel.Visible = false end) else script.Parent.Image = "rbxassetid://202000937" workspace.Music:Resume() game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel.TextTransparency = 0 game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel.Visible = true game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel.Text = "unmuted!" local tweenservice = game:GetService("TweenService") local tweenInfo = TweenInfo.new( 0.3,Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0, false ) local tween = tweenservice:Create(game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel, tweenInfo, {Position = UDim2.new(0.5, 0,0.80, 0)}) tween:Play() wait(2) local tweenservice = game:GetService("TweenService") local tweenInfo = TweenInfo.new( 0.3,Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0, false ) local tweene = tweenservice:Create(game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel, tweenInfo, {TextTransparency = 1}) tweene:Play() tweene.Completed:Connect(function() game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel.Position = UDim2.new(0.5, 0,0.85, 0) game.Players.LocalPlayer.PlayerGui:WaitForChild("muted").TextLabel.Visible = false end) end end)
