G_lander

Cool custom shimmer sound thing

Aug 5th, 2021
784
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Game.LoadMod("https://unpkg.com/cppkies@0.2")
  2. if(!window.CPPKIES_ONLOAD) CPPKIES_ONLOAD = []
  3. CPPKIES_ONLOAD.push(()=> {
  4.     // Assert
  5.     if(window.CustomChimeSound) return
  6.     window.CustomChimeSound  = {
  7.         playSound: () => {
  8.             PlaySound(CustomChimeSound.soundURL)
  9.         },
  10.         soundURL: ""
  11.     }
  12.     Game.shimmerTypes.golden.initFunc = Cppkies.injectCode(Game.shimmerTypes.golden.initFunc, null, "if (!this.spawned && Game.chimeType === 2 && Game.ascensionMode !== 1) CustomChimeSound.playSound()", "before").bind(Game.shimmerTypes.golden)
  13.     Game.Upgrades["Golden cookie sound selector"].choicesFunction = Cppkies.injectCode(Game.Upgrades["Golden cookie sound selector"].choicesFunction, "choices[1]={name:'Chime',icon:[22,6]};", "\nchoices[2] = {name: 'Custom', icon: [1, 7]}", "after")
  14.     Game.Upgrades["Golden cookie sound selector"].choicesPick = Cppkies.injectCode(Game.Upgrades["Golden cookie sound selector"].choicesPick, null, "\nif(id === 2) CustomChimeSound.soundURL = prompt('Pick the URL to use!', CustomChimeSound.soundURL)", "after")
  15. })
RAW Paste Data