import pygame from tkinter import * def play(): pygame.mixer.music.load('Medication.wav') pygame.mixer.music.play() def pause(): pygame.mixer.music.pause() def unpause(): pygame.mixer.music.unpause() def sound(): pygame.mixer.Sound.play(sound_effect) pygame.init() sound_effect = pygame.mixer.Sound('skibidi toilet.wav') root = Tk() root.geometry('180x200') myframe = Frame(root) myframe.pack() mylabel = Label(myframe, text = "Pygame Mixer") mylabel.pack() Button1 = Button(myframe, text = "play", command = play, width = 15) Button1.pack(pady = 5) Button2 = Button(myframe, text = "sound", command = sound, width = 15) Button2.pack(pady = 5) Button3 = Button(myframe, text = "unpause", command = unpause, width = 15) Button3.pack(pady = 5) button4 = Button(myframe, text = "pause", command = pause, width = 15) button4.pack(pady = 5) root.mainloop()