Created
April 26, 2023 13:08
-
-
Save Hri7566/510cc8bad6634881d93a8a3e22e76750 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Eval | |
| // @namespace Violentmonkey Scripts | |
| // @match https://mppclone.com/* | |
| // @grant none | |
| // @version 1.0 | |
| // @author Hri7566 | |
| // @description 4/21/2023, 7:12:33 AM | |
| // ==/UserScript== | |
| MPP.client.on("a", msg => { | |
| if (msg.p._id !== MPP.client.getOwnParticipant()._id) return; | |
| if (!msg.a.startsWith(">")) return; | |
| let out; | |
| try { | |
| out = eval(msg.a.substring(1)); | |
| } catch (err) { | |
| out = `❌ ${err}`; | |
| } | |
| MPP.client.sendArray([{m: 'a', message: `\u034f✔️ ${typeof out} ${out}`}]) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment