From df5374238203ac89224a261e1d56d75019746a6b Mon Sep 17 00:00:00 2001 From: noplsvacban Date: Mon, 17 Oct 2022 20:39:07 +0300 Subject: [PATCH] ScreenshareCrack --- ScreenshareCrack/ScreenshareCrack.plugin.js | 90 ++++++++++++--------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/ScreenshareCrack/ScreenshareCrack.plugin.js b/ScreenshareCrack/ScreenshareCrack.plugin.js index 1e3035d..800bbec 100644 --- a/ScreenshareCrack/ScreenshareCrack.plugin.js +++ b/ScreenshareCrack/ScreenshareCrack.plugin.js @@ -33,22 +33,31 @@ @else@*/ module.exports = (() => { - const config = { - info: { - name: 'ScreenshareCrack', - authors: [ - { - name: 'eternal', - discord_id: '263689920210534400', - github_username: 'eternal404' - } - ], - version: '1.0.0', + const config = { + info: { + name: "ScreenshareCrack", + authors: [ + { + name: "eternal", + discord_id: "263689920210534400", + github_username: "eternal404", + }, + ], + version: "1.5.0", description: 'Allows you to screenshare in any quality/fps without nitro..', github: 'https://github.com/eternal404', github_raw: 'https://raw.githubusercontent.com/discord-modifications/better-discord-plugins/master/ScreenshareCrack/ScreenshareCrack.plugin.js' - }, - }; + }, + changelog: [ + { + title: "v1.5.0", + type: "Fixed", + items: [ + "Fixed the plugin after Discord switched to SWC. Plugin might still be fucky but it works." + ] + }, + ], + }; return !global.ZeresPluginLibrary ? class { constructor() { @@ -122,31 +131,34 @@ module.exports = (() => { } ); } - } : (([Plugin, API]) => { - const { WebpackModules } = API; - - const Stream = WebpackModules.getByProps('ApplicationStreamFPSButtons'); - const Lodash = window._; - - return class extends Plugin { - start() { - const requirements = Stream.ApplicationStreamSettingRequirements; - this.original = Lodash.cloneDeep(requirements); - - for (let i = 0; i < requirements.length; i++) { - for (const key in requirements[i]) { - if (!~['resolution', 'fps'].indexOf(key)) { - delete requirements[i][key]; - } - } - } - }; - - stop() { - Stream.ApplicationStreamSettingRequirements = this.original; - }; - }; - })(ZLibrary.buildPlugin(config)); + } : (([Plugin, Api]) => { + const plugin = (Plugin, Api) => { + const { Patcher, DiscordModules, PluginUtilities } = Api; + return class ScreenshareCrack extends Plugin { + + + onStart() { + // spoof client side premium + let tries = 1; + let intervalId = setInterval(() => { + if (++tries > 5) clearInterval(intervalId); + + const user = + ZeresPluginLibrary.DiscordModules.UserStore.getCurrentUser(); + if (!user) return; + user.premiumType = 2; + clearInterval(intervalId); + }, 1000); + + } + + onStop() { + Patcher.unpatchAll(); //tried some other shit + } + }; + }; + return plugin(Plugin, Api); + })(global.ZeresPluginLibrary.buildPlugin(config)); })(); -/*@end@*/ +/*@end@*/ \ No newline at end of file