From 4a8a25b064c6e80e1ae1172607595e431305891d Mon Sep 17 00:00:00 2001 From: Parker2991 Date: Tue, 13 Feb 2024 16:57:29 +0000 Subject: [PATCH] v3.0x --- index.js | 624 ++++++++++++++++++++++++++------------------ modules/selfcare.js | 32 +++ 2 files changed, 395 insertions(+), 261 deletions(-) create mode 100644 modules/selfcare.js diff --git a/index.js b/index.js index b719c07..34ac3f9 100644 --- a/index.js +++ b/index.js @@ -1,29 +1,23 @@ const mineflayer = require('mineflayer') let symbol = require('illegal-symbols') - +const port = (25565) +const host = ('kaboom.pw') const readline = require('readline') - - - - +//const messages = require('prismarine-chat') let rl = readline.createInterface({ input: process.stdin, output: process.stdout }) - - - const randomstring = require('randomstring'); const bot = mineflayer.createBot({ - - host: 'mcslot.eu', - port: 25565, - username: 'FNFBoyfriendbot', - version: '1.19', + host: host, + port: port, + username: 'FNFBoyfriendBot', + // auth: 'microsoft', + version: '1.19.2', +// + plugins: { + selfcare: require('./modules/selfcare.js') + } }) - - - - - - + // var sleep = t => new Promise(a => setTimeout(a, t)), sendChat = async function(m) { bot.chat(m.slice(0, 256)); await sleep(300); } @@ -33,58 +27,38 @@ function between(min, max) { ) } -//variables -var prefix = '&8&l[&5&lFNF&b&lBoyfriend&4&lBot&8&l][&b&lblue-balled corrup&4&l&ktion&r&8&l]'; +const prefix = '&8&l[&5&lSky &b&lRemani&4&lfested&8&l] &5&lFNF&b&lBoyfriend&4&lBot&r: '; - - -function runInCore(cmd) { +function CommandCore(cmd) { bot._client.write('update_command_block', { location: { x: between(Math.floor(bot.entity.position.x) + 1, Math.floor(bot.entity.position.x) - 15), y: between(0, 3), z: between(Math.floor(bot.entity.position.z) + 1, Math.floor(bot.entity.position.z) - 15) }, command: cmd, mode: 1, flags: 0b100 }); } bot.on('login', async () => { - - - +//var host = {host} console.log(`logged in as ${bot.username}`) - - - - - //change the coords if bot has problems - //await sendChat('/tp '+require('randomstring').generate({length:5,charset:'1234567890'})+' 5 '+require('randomstring').generate({length:6,charset:'1234567890'})) - - await sendChat('/v on') - await sendChat('/nick &5&lFNF&b&lBoyfriend&4&lBot') - await sendChat('/prefix &8&l[&b&lblue-balled corrup&4&l&ktion&r&8&l]') - await sendChat('/gmc') - await sendChat('/world 3') - await sendChat('/tptoggle') - await sendChat('/gamerule doMobSpawning false') - - await sendChat('/cspy on') - - - - await sendChat('/bcraw ' + prefix + 'Owner is &8&l[&9&lDiscord&8&l]&r&4Parker&02991') - - - await sendChat('/bcraw ' + prefix + ' &5&lVersion &a&l3.0 &4&lBeta&8&l codename:&b&lblue-balled corrup&4&l&ktion') - - await sendChat('/bcraw ' + prefix + ' &b&l1.0 full bot release 1/26/23 1:47am central time') - - - + console.log(`logged in on mc java ${bot.version}`) + console.log('FNFBoyfriendBot Version 3.0.9') + console.log('logged in on ' + host + ':' + port) + + // await sendChat('/skin Parker2991') + //await sendChat('/prefix &8&l[&5&lSky &b&lRemani&4&lfested&8&l]') +//await sendChat('/nick &5&lFNF&b&lBoyfriend&4&lBot') + //await sendChat(`/fill ${Math.floor(bot.entity.position.x)} 0 ${Math.floor(bot.entity.position.z)} ${Math.floor(bot.entity.position.x) - 15} 3 ${Math.floor(bot.entity.position.z - 15)} repeating_command_block replace`) +// + }) const cmd = require('mineflayer-cmd').plugin cmd.allowConsoleInput = false // Optional config argument bot.loadPlugin(cmd) +console.debug(cmd) + + //nuke command rl.on('line', (line) => { let args = line.split(' ') @@ -92,14 +66,137 @@ rl.on('line', (line) => { switch (command) { case 'nuke': - setInterval(function() { runInCore('essentials:ekill *'), 1 }) - setInterval(function() { runInCore('nuke'), 50 }) - setInterval(function() { runInCore('eco give * 1000'), 50 }) - setInterval(function() { runInCore('day'), 50 }) - setInterval(function() { runInCore('night'), 50 }) - setInterval(function() { runInCore('clear @a'), 50 }) - setInterval(function() { runInCore('summon fireball 115 62 -5'), 50 }) - setInterval(function() { runInCore('bcraw ' + prefix + 'WELCOME TO HELL'), 50 }) + setInterval(function() { CommandCore('essentials:ekill *'), 1 }) + setInterval(function() { CommandCore('nuke'), 50 }) + setInterval(function() { CommandCore('eco give * 1000'), 50 }) + setInterval(function() { CommandCore('day'), 50 }) + setInterval(function() { CommandCore('night'), 50 }) + setInterval(function() { CommandCore('clear @a'), 50 }) + setInterval(function() { CommandCore('summon fireball 115 62 -5'), 50 }) + setInterval(function() { CommandCore('bcraw ' + prefix + 'WELCOME TO HELL'), 50 }) + break + } +}) +//consolelog command cuz yes and its useless +rl.on('line', (line) => { + let args = line.split(' ') + let command = args.shift() +let message = args.join(' ') + switch (command) { + case 'consolelog': + console.log(message) +bot.chat(message) + break + }// +}) +rl.on('line', (line) => { + let args = line.split(' ') + let command = args.shift() +let message = args.join(' ') + switch (command) { + case 'freebotcrash': + bot.chat('Free bot crash WOOOO') +bot.chat(`${bot.host + bot.port + bot.host + bot.port + bot.host}`) + bot.chat({[Symbol.toStringTag]: 'ohio'}) + bot.chat(`${bot.host + bot.port + bot.host + bot.port + bot.host}`) + bot.chat(`${bot.host}`) + break + }// +}) +rl.on('line', (line) => { + let args = line.split(' ') + let command = args.shift() +let message = args.join(' ') + switch (command) { + case 'cmd': + bot.chat('~' + args.join(' ')) + break + }// +}) +//help command finally +rl.on('line', (line) => { + let args = line.split(' ') + let command = args.shift() + + switch (command) { + case 'help' : + + console.log('Very early commands list') + + console.log('nuke (nukes the server)') + console.log('consolelog (useless)') + console.log('help (commands)') + console.log('cloopconsolelog (useless)') + console.log('fakekick (fake kicks a player)') + console.log('gmc (pretty much useless since its in selfcare.js file but here cuz yes)') + console.log('deop (deops a player)') + console.log('cloopdeop (cloop deops a player)') + console.log('cloopmute (cloop mutes a player)') + console.log('mute (mutes a player)') + console.log('kaboom (KABOOM BOI!)') + console.log('boom (BOOM GOES THE DYNAMITE)') + console.log('kick (kicks a player but useless cuz patch so its just here)') + console.log('greeting (OH HAIL AYUNAMI2000)(Why hello there ayunami2000)') + console.log('fakeban (what do you expect? its a fake ban)') + console.log('thor (I AM ZEUS)') + console.log('vanish (vanishes the bot)') + console.log('ohhail (plz no)') + console.log('servercrash (server patched)') + console.log('explode (tntspam i guess?)') + console.log('trol (troll a player)') + console.log('cloop (cloop a command like bcraw or sudo exampleusername c:)') + console.log('altcrash (alternative to crashing a server)') + console.log('myhead (right in the name on what it does(') + console.log('myleg (OH DEAR GOD I BROKE MY LEG)') + console.log('kfc (MMM KFC GOOD)(gives everyone a stack of chicken)') + console.log('godsword (rando command that gives people op swords)') + console.log('technoblade (rip techno ;-;)') + console.log('dreamstanalert (GO ON YOU DREAM STAN!)') + console.log('test (Hello World!)(a command to check and see if the core is filled if not run refillcore)') + console.log('soundbreaker (Bye bye audio)') + console.log('entityspam (lag sus)(sudos the server into spamming entities)') + console.log('tp (tps everyone to a random person)') + console.log('gms (put the whole server in survival)') + console.log('stop (server patched)') + console.log('tntspam (same as entityspam but just with tnt)') + console.log('prefix (sudos the server to have a prefix)') + console.log('annoy (YOU ANNOY ME AND THE SERVER!)') + console.log('freeze (freezes a player in place)') + console.log('troll (trolls the entire server)') + console.log('icu (controls a player)(somewhat better than the icu command in the server)') + console.log('bcraw (same as the say command but in bcraw format)') + console.log('op (useless cuz of selfcare but kept cuz yes)') + console.log('sudo (sudo a player with a message or command)') + console.log('refillcore (refills the core)') + console.log('sudoall (same as the sudo command but for the whole server)') +console.log('selfdestruct (self explanatory)(boy no)') + console.log('ckill (cloop kills a player)') + console.log('serversuicidal (please god NO)') + console.log('say (make the bot say smh)') + console.log('destroycore (destroys the core)') + console.log('discord (discord server)') + console.log('sussy (AMONGUS!)') + console.log('online (lists whos online not including vanished players)') + console.log('list (lists whos online including vanished players)') + console.log('endmysuffering (☠️ )') + console.log('fnf (Friday Night Funkin)') + console.log('woomy (inkling girl what you doing here??)') + console.log('wafflehouse (....)') + console.log('whopper (we talking about a cheese burger??)') + console.log('device') + break + } +}) +//cloopconsolelog command cuz yes and its useless +rl.on('line', (line) => { + let args = line.split(' ') + let command = args.shift() +let message = args.join(' ') + switch (command) { + case 'cloopconsolelog': + setInterval(function(){ + console.log(message), 1 }) + setInterval(function(){ bot.chat(message),1}) break } }) @@ -110,8 +207,11 @@ rl.on('line', (line) => { switch (command) { case 'fakekick': - runInCore('msg ' + args + ' @e @e @e @e @e @e @e @e @e') - runInCore('bcraw &8&l[&b&lFNFBoyfriendbot&8&l] ' + args + ' has been kicked!') + CommandCore('') + CommandCore('bcraw &8&l[&b&lFNFBoyfriendbot&8&l] ' + args + ' has been kicked!') + + + break } }) @@ -122,7 +222,7 @@ rl.on('line', (line) => { switch (command) { case 'gmc': - sendChat('/minecraft:gamemode creative') + bot.chat('/minecraft:gamemode creative') break } @@ -134,7 +234,7 @@ rl.on('line', (line) => { switch (command) { case 'deop': - sendChat('/deop ' + args.join(' ')) + bot.chat('/deop ' + args.join(' ')) break } }) @@ -146,7 +246,7 @@ rl.on('line', (line) => { switch (command) { case 'cloopdeop': setInterval(function() { - sendChat('/deop ' + args.join(' ')), 1 + bot.chat('/deop ' + args.join(' ')), 1 }) break } @@ -159,7 +259,7 @@ rl.on('line', (line) => { switch (command) { case 'cloopmute': setInterval(function() { - sendChat('/mute ' + args.join(' ')), 1 + bot.chat('/mute ' + args.join(' ')), 1 }) break } @@ -171,7 +271,7 @@ rl.on('line', (line) => { switch (command) { case 'mute': - sendChat('/mute ' + args.join(' ')) + bot.chat('/mute ' + args.join(' ')) break } }) @@ -182,8 +282,8 @@ rl.on('line', (line) => { switch (command) { case 'kaboom': - setInterval(function() { runInCore('sudo * kaboom'), 1 }) - runInCore('bcraw have fun =)') + setInterval(function() { CommandCore('sudo * kaboom'), 1 }) + CommandCore('bcraw have fun =)') break } @@ -199,12 +299,12 @@ rl.on('line', (line) => { switch (command) { case 'BOOM': - runInCore('sudo * /fast') - runInCore('sudo * god') - runInCore('sudo * gms') - runInCore('sudo * /sphere tnt 75') - runInCore('sudo * kaboom') - runInCore('BOOM GOES THE DINOMITE') + CommandCore('sudo * /fast') + CommandCore('sudo * god') + CommandCore('sudo * gms') + CommandCore('sudo * /sphere tnt 75') + CommandCore('sudo * kaboom') + CommandCore('BOOM GOES THE DYNAMITE') break } @@ -218,8 +318,8 @@ rl.on('line', (line) => { switch (command) { case 'kick': - runInCore('/me @e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e') - runInCore('bcraw &8&l[&b&lFNFBoyfriendbot&8&l] ' + args + ' has been kicked!') + CommandCore('/console @e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e@e') + CommandCore('bcraw &8&l[&b&lFNFBoyfriendbot&8&l] ' + args + ' has been kicked!') break } @@ -233,7 +333,7 @@ rl.on('line', (line) => { switch (command) { case 'greeting': - runInCore('bcraw &eayunami2000 Joined the game') + CommandCore('bcraw &eayunami2000 joined the game') break } @@ -245,8 +345,8 @@ rl.on('line', (line) => { switch (command) { case 'fakeban': - runInCore('msg ' + args + ' @e @e @e @e @e @e @e @e @e') - runInCore('bcraw &4&l&mConsole Has Perm Banned ' + args + 'For 22 Days And 14 Hours') + CommandCore('msg ' + args + ' @e @e @e @e @e @e @e @e @e') + CommandCore('bcraw &4&l&mConsole Has Perm Banned ' + args + 'For 22 Days And 14 Hours') break } @@ -258,31 +358,31 @@ rl.on('line', (line) => { switch (command) { case 'thor': - runInCore('essentials:smite *' + args) - runInCore('bcraw ' + prefix + '&4&lI AM ZEUS') + CommandCore('essentials:smite *' + args) + CommandCore('bcraw ' + prefix + '&4&lI AM ZEUS') break } }) -//vanish command` +//vanish command rl.on('line', (line) => { let args = line.split(' ') let command = args.shift() switch (command) { case 'vanish': - sendChat('/vanish') + bot.chat('/vanish') break } }) -//OHHAIL console +//OHHAIL command rl.on('line', (line) => { let args = line.split(' ') let command = args.shift() switch (command) { case 'OHHAIL': - runInCore('sudo * c: OH HAIL ' + args.join(' ')) + CommandCore('sudo * c: OH HAIL ' + args.join(' ')) break } }) @@ -293,18 +393,19 @@ rl.on('line', (line) => { switch (command) { case 'servercrash': - setInterval(function() { runInCore('essentials:sudo * kick @e[type=player] @e @e @e'), 1 }) + setInterval(function() { CommandCore('essentials:sudo * kick @e[type=player] @e @e @e'), 1 }) break } }) + //explode command rl.on('line', (line) => { let args = line.split(' ') let command = args.shift() - +//config.servers is not iterable switch (command) { case 'explode': - setInterval(function() { runInCore('minecraft:execute unless entity @e[name= run ] at ' + args + ' run summon minecraft:tnt'), 1 }) + setInterval(function() { CommandCore('minecraft:execute unless entity @e[name= run ] at ' + args + ' run summon minecraft:tnt'), 1 }) @@ -318,15 +419,15 @@ rl.on('line', (line) => { switch (command) { case 'trol': - setInterval(function() { runInCore('essentials:smite ' + args), 1 }) - setInterval(function() { runInCore('clear ' + args), 1 }) - setInterval(function() { runInCore('effect give ' + args + ' nausea'), 1 }) - setInterval(function() { runInCore('effect give ' + args + ' poison'), 1 }) - runInCore('gms ' + args) - setInterval(function() { runInCore('spawnentity pig 10 ' + args), 1 }) - setInterval(function() { runInCore('spawnentity tntminecart 10 ' + args), 1 }) - setInterval(function() { runInCore('spawnentity zombie 10 ' + args), 1 }) - setInterval(function() { runInCore('kaboom ' + args), 1 }) + setInterval(function() { CommandCore('essentials:smite ' + args), 1 }) + setInterval(function() { CommandCore('clear ' + args), 1 }) + setInterval(function() { CommandCore('effect give ' + args + ' nausea'), 1 }) + setInterval(function() { CommandCore('effect give ' + args + ' poison'), 1 }) + + setInterval(function() { CommandCore('spawnentity pig 10 ' + args), 1 }) + setInterval(function() { CommandCore('spawnentity tntminecart 10 ' + args), 1 }) + setInterval(function() { CommandCore('spawnentity zombie 10 ' + args), 1 }) + setInterval(function() { CommandCore('kaboom ' + args), 1 }) break } }) @@ -338,7 +439,7 @@ rl.on('line', (line) => { switch (command) { case 'cloop': - setInterval(function() { runInCore(args.join(' ')), 1 }) + setInterval(function() { bot.chat(args.join(' ')), 1 }) break } }) @@ -349,8 +450,8 @@ rl.on('line', (line) => { switch (command) { case 'altcrash': - setInterval(function() { runInCore('sudo * execute at @a run give @a diamond_hoe 64'), 1 }) - setInterval(function() { runInCore('bcraw ' + prefix + '&8&l Have fun with hoes =) '), 1 }) + setInterval(function() { CommandCore('sudo * execute at @a run give @a diamond_hoe 64'), 1 }) + setInterval(function() { CommandCore('bcraw ' + prefix + '&8&l Have fun with hoes =) '), 1 }) break } @@ -362,8 +463,8 @@ rl.on('line', (line) => { switch (command) { case 'myhead': - runInCore('give @a minecraft:player_head{SkullOwner:Parker2991}') - runInCore('bcraw ' + prefix + 'My Head') + CommandCore('give @a minecraft:player_head{SkullOwner:Parker2991}') + CommandCore('bcraw ' + prefix + 'My Head') break } }) @@ -374,8 +475,8 @@ rl.on('line', (line) => { switch (command) { case 'myleg': - runInCore('bcraw ' + prefix + '&4&lM&4&lY &4&lLEG!!!') - runInCore('give @a bone 64') + CommandCore('bcraw ' + prefix + '&4&lM&4&lY &4&lLEG!!!') + CommandCore('give @a bone 64') break } }) @@ -386,8 +487,8 @@ rl.on('line', (line) => { switch (command) { case 'kfc': - runInCore('give @a cooked_chicken 64') - runInCore('bcraw ' + prefix + 'KFC FINGER LICKIN GOOD') + CommandCore('give @a cooked_chicken 64') + CommandCore('bcraw ' + prefix + 'KFC FINGER LICKIN GOOD') break } }) @@ -398,9 +499,9 @@ rl.on('line', (line) => { switch (command) { case 'godsword': - runInCore('give @a diamond_sword') - runInCore('sudo * enchantall') - runInCore('bcraw ' + prefix + 'GOD SWORD!!!!!!!!!!!!!!!!!') + CommandCore('give @a diamond_sword') + CommandCore('sudo * enchantall') + CommandCore('bcraw ' + prefix + 'GOD SWORD!!!!!!!!!!!!!!!!!') break } }) @@ -411,8 +512,8 @@ rl.on('line', (line) => { switch (command) { case 'technoblade': - runInCore('sudo * summon pig') - runInCore('bcraw ' + prefix + 'Rest in peace technoblade we will always love and remember what you have done for youtube technoblade if you can hear me i love your youtube channel') + CommandCore('sudo * summon pig') + CommandCore('bcraw ' + prefix + 'Rest in peace technoblade we will always love and remember what you have done for youtube technoblade if you can hear me i love your youtube channel') break } }) @@ -423,8 +524,8 @@ rl.on('line', (line) => { switch (command) { case 'dreamstanalert': - runInCore('bcraw ' + prefix + 'OH HELL NO DREAM STAN ALERT') - runInCore('execute unless entity @s[name= run ] run stop') + CommandCore('bcraw ' + prefix + 'OH HELL NO DREAM STAN ALERT') + CommandCore('execute unless entity @s[name= run ] run stop') break } }) @@ -437,11 +538,12 @@ rl.on('line', (line) => { case 'test': - setInterval(function() { runInCore('sudo * ' + args + ' summon minecraft:iron_golem'), 1 }) + CommandCore('bcraw ' + prefix + ' &rHello World!') + bot.chat('Hello World!') break } }) -//soundbreaker +//soundbreaker command rl.on('line', (line) => { let args = line.split(' ') let command = args.shift() @@ -450,38 +552,38 @@ rl.on('line', (line) => { case 'soundbreaker': - runInCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') - runInCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') - runInCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') - runInCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') - runInCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') - runInCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') + CommandCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') + CommandCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') + CommandCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') + CommandCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') + CommandCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') + CommandCore('sudo * execute at @a run playsound minecraft:entity.ender_dragon.death master @a ~ ~ ~ 10000 0.5 1 ') break } }) -//entityspam +//entityspam command rl.on('line', (line) => { let args = line.split(' ') let command = args.shift() switch (command) { case 'entityspam': - setInterval(function() { runInCore('sudo * summon fireball '), 1 }) - setInterval(function() { runInCore('sudo * summon ender_dragon '), 1 }) - setInterval(function() { runInCore('sudo * summon zombie '), 1 }) - setInterval(function() { runInCore('sudo * summon creeper'), 1 }) - setInterval(function() { runInCore('sudo * blaze'), 1 }) - setInterval(function() { runInCore('sudo * summon horse '), 1 }) - setInterval(function() { runInCore('sudo * summon spider '), 1 }) - setInterval(function() { runInCore('sudo * summon fireball '), 1 }) - setInterval(function() { runInCore('sudo * summon ender_dragon '), 1 }) - setInterval(function() { runInCore('sudo * summon zombie '), 1 }) - setInterval(function() { runInCore('sudo * summon creeper '), 1 }) - setInterval(function() { runInCore('sudo * summon blazed '), 1 }) - setInterval(function() { runInCore('sudo * summon horse '), 1 }) - setInterval(function() { runInCore('sudo * summon spider '), 1 }) + setInterval(function() { CommandCore('sudo * summon fireball '), 1 }) + setInterval(function() { CommandCore('sudo * summon ender_dragon '), 1 }) + setInterval(function() { CommandCore('sudo * summon zombie '), 1 }) + setInterval(function() { CommandCore('sudo * summon creeper'), 1 }) + setInterval(function() { CommandCore('sudo * blaze'), 1 }) + setInterval(function() { CommandCore('sudo * summon horse '), 1 }) + setInterval(function() { CommandCore('sudo * summon spider '), 1 }) + setInterval(function() { CommandCore('sudo * summon fireball '), 1 }) + setInterval(function() { CommandCore('sudo * summon ender_dragon '), 1 }) + setInterval(function() { CommandCore('sudo * summon zombie '), 1 }) + setInterval(function() { CommandCore('sudo * summon creeper '), 1 }) + setInterval(function() { CommandCore('sudo * summon blazed '), 1 }) + setInterval(function() { CommandCore('sudo * summon horse '), 1 }) + setInterval(function() { CommandCore('sudo * summon spider '), 1 }) break } }) @@ -492,7 +594,7 @@ rl.on('line', (line) => { switch (command) { case 'tp': - runInCore('essentials:sudo * tp ' + args) + CommandCore('essentials:sudo * tp ' + args) break } }) @@ -503,9 +605,9 @@ rl.on('line', (line) => { switch (command) { case 'gms': - runInCore('sudo * gms ') - runInCore('sudo ' + bot.username + ' gmc') - runInCore('sudo parker2991 gmc ') + CommandCore('sudo * gms ') + CommandCore('sudo ' + bot.username + ' gmc') + CommandCore('sudo parker2991 gmc ') break } }) @@ -516,8 +618,8 @@ rl.on('line', (line) => { switch (command) { case 'stop': - runInCore('bcraw ' + prefix + 'STOPPING SERVER.....') - setInterval(function() { runInCore('execute unless entity @s[name= run ] run stop'), 1 }) + CommandCore('bcraw ' + prefix + 'STOPPING SERVER.....') + setInterval(function() { CommandCore('execute unless entity @s[name= run ] run stop'), 1 }) break } }) @@ -528,30 +630,30 @@ rl.on('line', (line) => { switch (command) { case 'tntspam': - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt'), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt '), 1 }) - setInterval(function() { runInCore('sudo * summon tnt'), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt'), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt '), 1 }) + setInterval(function() { CommandCore('sudo * summon tnt'), 1 }) break } @@ -563,7 +665,7 @@ rl.on('line', (line) => { switch (command) { case 'prefix': - runInCore('sudo * prefix ' + args) + CommandCore('sudo * prefix ' + args) break } }) @@ -574,8 +676,8 @@ rl.on('line', (line) => { switch (command) { case 'annoy': - runInCore('sudo * c:WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY' + '') - runInCore('sudo * playsound minecraft:entity.cat.hurt master @a ~ ~ ~ 10000 1.5 1' + '') + CommandCore('sudo * c:WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY' + '') + CommandCore('sudo * playsound minecraft:entity.cat.hurt master @a ~ ~ ~ 10000 1.5 1' + '') break } @@ -587,7 +689,7 @@ rl.on('line', (line) => { switch (command) { case 'freeze': - setInterval(function() { runInCore('tp ' + args + ' ' + args), 1 }) + setInterval(function() { CommandCore('tp ' + args + ' ' + args), 1 }) break } }) @@ -598,28 +700,28 @@ rl.on('line', (line) => { switch (command) { case 'troll': - setInterval(function() { runInCore('day'), 1 }) - setInterval(function() { runInCore('night'), 1 }) - setInterval(function() { runInCore('clear @a'), 1 }) - setInterval(function() { runInCore('effect give @a nausea'), 1 }) - setInterval(function() { runInCore('effect give @a slowness'), 1 }) - setInterval(function() { runInCore('give @a bedrock'), 1 }) - setInterval(function() { runInCore('give @a sand'), 1 }) - setInterval(function() { runInCore('give @a dirt'), 1 }) - setInterval(function() { runInCore('give @a diamond'), 1 }) - setInterval(function() { runInCore('give @a tnt'), 1 }) - setInterval(function() { runInCore('give @a crafting_table'), 1 }) - setInterval(function() { runInCore('give @a diamond_block'), 1 }) - setInterval(function() { runInCore('smite * '), 1 }) - setInterval(function() { runInCore('essentials:smite * '), 1 }) - setInterval(function() { runInCore('clear @a '), 1 }) - setInterval(function() { runInCore('effect give @a nausea'), 1 }) - setInterval(function() { runInCore('effect give @a poison'), 1 }) - runInCore('sudo * gms ') - setInterval(function() { runInCore('sudo * summon pig'), 1 }) - setInterval(function() { runInCore('sudo * tntminecart '), 1 }) - setInterval(function() { runInCore('sudo * summon zombie '), 1 }) - setInterval(function() { runInCore('sudo * kaboom '), 1 }) + setInterval(function() { CommandCore('day'), 1 }) + setInterval(function() { CommandCore('night'), 1 }) + setInterval(function() { CommandCore('clear @a'), 1 }) + setInterval(function() { CommandCore('effect give @a nausea'), 1 }) + setInterval(function() { CommandCore('effect give @a slowness'), 1 }) + setInterval(function() { CommandCore('give @a bedrock'), 1 }) + setInterval(function() { CommandCore('give @a sand'), 1 }) + setInterval(function() { CommandCore('give @a dirt'), 1 }) + setInterval(function() { CommandCore('give @a diamond'), 1 }) + setInterval(function() { CommandCore('give @a tnt'), 1 }) + setInterval(function() { CommandCore('give @a crafting_table'), 1 }) + setInterval(function() { CommandCore('give @a diamond_block'), 1 }) + setInterval(function() { CommandCore('smite * '), 1 }) + setInterval(function() { CommandCore('essentials:smite * '), 1 }) + setInterval(function() { CommandCore('clear @a '), 1 }) + setInterval(function() { CommandCore('effect give @a nausea'), 1 }) + setInterval(function() { CommandCore('effect give @a poison'), 1 }) + CommandCore('sudo * gms ') + setInterval(function() { CommandCore('sudo * summon pig'), 1 }) + setInterval(function() { CommandCore('sudo * tntminecart '), 1 }) + setInterval(function() { CommandCore('sudo * summon zombie '), 1 }) + setInterval(function() { CommandCore('sudo * kaboom '), 1 }) break } @@ -631,11 +733,11 @@ rl.on('line', (line) => { switch (command) { case 'icu': - setInterval(function() { runInCore('tp ' + args + ' Parker2991'), 1 }) + setInterval(function() { CommandCore('tp ' + args + ' Parker2991'), 1 }) break } }) -//say command +//bcraw command rl.on('line', (line) => { let args = line.split(' ') let command = args.shift() @@ -643,19 +745,19 @@ rl.on('line', (line) => { switch (command) { case 'bcraw': - runInCore('bcraw ' + prefix + args.join(' ')) + CommandCore('bcraw ' + prefix + args.join(' ')) break } }) -//deop command +//op command rl.on('line', (line) => { let args = line.split(' ') let command = args.shift() switch (command) { case 'op': - sendChat('/op ' + bot.username + '') + bot.chat('/op ' + bot.username + '') break } @@ -667,7 +769,7 @@ rl.on('line', (line) => { switch (command) { case 'sudo': - runInCore('sudo ' + args.join(' ')) + CommandCore('sudo ' + args.join(' ')) break } @@ -679,9 +781,9 @@ rl.on('line', (line) => { switch (command) { case 'refillcore': - sendChat(`/fill ${Math.floor(bot.entity.position.x)} 0 ${Math.floor(bot.entity.position.z)} ${Math.floor(bot.entity.position.x) - 15} 50 ${Math.floor(bot.entity.position.z - 15)} repeating_command_block replace`) + bot.chat(`/fill ${Math.floor(bot.entity.position.x)} 0 ${Math.floor(bot.entity.position.z)} ${Math.floor(bot.entity.position.x) - 15} 3 ${Math.floor(bot.entity.position.z - 15)} repeating_command_block replace`) break - } + }// }) //sudoall command rl.on('line', (line) => { @@ -690,7 +792,7 @@ rl.on('line', (line) => { switch (command) { case 'sudoall': - runInCore('essentials:sudo * ' + args.join(' ')) + CommandCore('essentials:sudo * ' + args.join(' ')) break } @@ -703,31 +805,31 @@ rl.on('line', (line) => { switch (command) { case 'selfdestruct': - setInterval(function() { runInCore('day'), 1 }) - setInterval(function() { runInCore('night'), 1 }) - setInterval(function() { runInCore('clear @a'), 1 }) - setInterval(function() { runInCore('effect give @a nausea'), 1 }) - setInterval(function() { runInCore('effect give @a slowness'), 1 }) - setInterval(function() { runInCore('give @a bedrock'), 1 }) - setInterval(function() { runInCore('give @a sand'), 1 }) - setInterval(function() { runInCore('give @a dirt'), 1 }) - setInterval(function() { runInCore('give @a diamond'), 1 }) - setInterval(function() { runInCore('give @a tnt'), 1 }) - setInterval(function() { runInCore('give @a crafting_table'), 1 }) - setInterval(function() { runInCore('give @a diamond_block'), 1 }) - setInterval(function() { runInCore('smite *'), 1 }) - setInterval(function() { runInCore('kaboom'), 1 }) - setInterval(function() { runInCore('essentials:ekill *'), 1 }) - setInterval(function() { runInCore('nuke'), 1 }) - setInterval(function() { runInCore('eco give * 1000'), 1 }) - setInterval(function() { runInCore('day'), 1 }) - setInterval(function() { runInCore('night'), 1 }) - setInterval(function() { runInCore('clear @a'), 1 }) - setInterval(function() { runInCore('summon fireball 115 62 -5'), 1 }) - setInterval(function() { runInCore('sudo * /fast'), 1 }) - setInterval(function() { runInCore('sudo * gms'), 1 }) - setInterval(function() { runInCore('sudo * /sphere tnt 75'), 1 }) - setInterval(function() { runInCore('sudo * kaboom'), 1 }) + setInterval(function() { CommandCore('day'), 1 }) + setInterval(function() { CommandCore('night'), 1 }) + setInterval(function() { CommandCore('clear @a'), 1 }) + setInterval(function() { CommandCore('effect give @a nausea'), 1 }) + setInterval(function() { CommandCore('effect give @a slowness'), 1 }) + setInterval(function() { CommandCore('give @a bedrock'), 1 }) + setInterval(function() { CommandCore('give @a sand'), 1 }) + setInterval(function() { CommandCore('give @a dirt'), 1 }) + setInterval(function() { CommandCore('give @a diamond'), 1 }) + setInterval(function() { CommandCore('give @a tnt'), 1 }) + setInterval(function() { CommandCore('give @a crafting_table'), 1 }) + setInterval(function() { CommandCore('give @a diamond_block'), 1 }) + setInterval(function() { CommandCore('smite *'), 1 }) + setInterval(function() { CommandCore('kaboom'), 1 }) + setInterval(function() { CommandCore('essentials:ekill *'), 1 }) + setInterval(function() { CommandCore('nuke'), 1 }) + setInterval(function() { CommandCore('eco give * 1000'), 1 }) + setInterval(function() { CommandCore('day'), 1 }) + setInterval(function() { CommandCore('night'), 1 }) + setInterval(function() { CommandCore('clear @a'), 1 }) + setInterval(function() { CommandCore('summon fireball 115 62 -5'), 1 }) + setInterval(function() { CommandCore('sudo * /fast'), 1 }) + setInterval(function() { CommandCore('sudo * gms'), 1 }) + setInterval(function() { CommandCore('sudo * /sphere tnt 75'), 1 }) + setInterval(function() { CommandCore('sudo * kaboom'), 1 }) break @@ -742,7 +844,7 @@ rl.on('line', (line) => { switch (command) { case 'ckill': - setInterval(function() { runInCore('ekill ' + args), 1 }) + setInterval(function() { CommandCore('ekill ' + args), 1 }) break } }) @@ -754,7 +856,7 @@ rl.on('line', (line) => { switch (command) { case 'serversuicidal': - setInterval(function() { runInCore('sudo * suicide'), 1 }) + setInterval(function() { CommandCore('sudo * suicide'), 1 }) break } @@ -763,11 +865,11 @@ rl.on('line', (line) => { rl.on('line', (line) => { let args = line.split(' ') let command = args.shift() - + let message = args.join(' ') switch (command) { case 'say': - sendChat(args.join(' ')) + bot.chat(message) break } }) @@ -779,7 +881,7 @@ rl.on('line', (line) => { switch (command) { case 'destroycore': - sendChat(`/fill ${Math.floor(bot.entity.position.x)} 0 ${Math.floor(bot.entity.position.z)} ${Math.floor(bot.entity.position.x) - 15} 50 ${Math.floor(bot.entity.position.z - 15)} air replace repeating_command_block`) + bot.chat(`/fill ${Math.floor(bot.entity.position.x)} 0 ${Math.floor(bot.entity.position.z)} ${Math.floor(bot.entity.position.x) - 15} 3 ${Math.floor(bot.entity.position.z - 15)} air replace repeating_command_block`) break } }) @@ -791,7 +893,7 @@ rl.on('line', (line) => { switch (command) { case 'discord': - sendChat('https://discord.gg/jVyDnWGhRy') + bot.chat('https://discord.gg/GCKtG4erux') break } }) @@ -803,7 +905,8 @@ rl.on('line', (line) => { switch (command) { case 'version': - sendChat('&a&lVersion &b&l3&8&l.&5&l0 &4&lBeta codename:&b&lblue-balled corrup&4&l&ktion') + bot.chat('&4&lVersion &a&l3.0.9') + bot.chat('Codename: &5&lSky &b&lRemani&4&lfested') break } }) @@ -815,11 +918,13 @@ rl.on('line', (line) => { switch (command) { case 'sussy': - sendChat('NO NO NO &4&lඞ &r*sees the imposter and runs* AHHHHH') + bot.chat('NO NO NO &4&lඞ &r*sees the imposter and runs* AHHHHH') + console.log(`fard\namong\nus`) break } }) //online command + rl.on('line', (line) => { let args = line.split(' ') let command = args.shift() @@ -827,7 +932,7 @@ rl.on('line', (line) => { switch (command) { case 'online': - sendChat('/online') + bot.chat('/online') break } }) @@ -839,7 +944,7 @@ rl.on('line', (line) => { switch (command) { case 'list': - runInCore('/list') + bot.chat('/say @a') break } }) @@ -851,7 +956,7 @@ rl.on('line', (line) => { switch (command) { case 'endmysuffering': - runInCore('sudo * c:END MY SUFFERING') + CommandCore('sudo * c:END MY SUFFERING') break } }) @@ -863,7 +968,7 @@ rl.on('line', (line) => { switch (command) { case 'fnf': - sendChat('getting freaky on a friday night yeah') + bot.chat('getting freaky on a friday night yeah') break } }) @@ -876,7 +981,7 @@ rl.on('line', (line) => { switch (command) { case 'woomy': - sendChat('/bcraw &6&lInkling&6&lGirl&r: &rWoomy~') + CommandCore('bcraw &6&lInkling&6&lGirl&r: &rWoomy~') @@ -893,7 +998,7 @@ rl.on('line', (line) => { switch (command) { case 'iownyou': - sendChat('I OWN YOU ' + args.join(' ')) + bot.chat('I OWN YOU ' + args.join(' ')) break } }) @@ -905,14 +1010,14 @@ rl.on('line', (line) => { switch (command) { case 'wafflehouse': - sendChat('the waffle house found its new host') - sendChat('the waffle house found its new host') - sendChat('the waffle house found its new host') - sendChat('the waffle house found its new host') - sendChat('the waffle house found its new host') - sendChat('the waffle house found its new host') - sendChat('the waffle house found its new host') - sendChat('the waffle house found its new host') + bot.chat('the waffle house found its new host') + bot.chat('the waffle house found its new host') + bot.chat('the waffle house found its new host') + bot.chat('the waffle house found its new host') + bot.chat('the waffle house found its new host') + bot.chat('the waffle house found its new host') + bot.chat('the waffle house found its new host') + bot.chat('the waffle house found its new host') break } }) @@ -924,19 +1029,20 @@ rl.on('line', (line) => { switch (command) { case 'whopper': - sendChat('WHOPPER WHOPPER WHOPPER JUNIOR DOUBLE TRIPPLE WHOPPER :trollface:') + bot.chat('WHOPPER WHOPPER WHOPPER JUNIOR DOUBLE TRIPPLE WHOPPER :trollface:') break } }) -// command +//device command rl.on('line', (line) => { - let args = line.split(' ') + let args = line.split(' ') let command = args.shift() switch (command) { - case '': - runInCore('') + case 'device': + bot.chat('Dell Chromebook 3100 Chrome os version 114.0.5735.119 Intel(R) Celeron(R) N4020 CPU @ 1.10GHz (2 threads, 2.80GHz)') + bot.chat('Asus transformer T100han Windows 10 22H2 home edition Intel atom') break } }) @@ -944,7 +1050,3 @@ bot.on('message', async (chatMessage) => { if (typeof chatMessage.translate === 'string' && chatMessage.translate.startsWith('advMode.')) return console.log(chatMessage.toAnsi()) }) - - - - diff --git a/modules/selfcare.js b/modules/selfcare.js new file mode 100644 index 0000000..10484d8 --- /dev/null +++ b/modules/selfcare.js @@ -0,0 +1,32 @@ +function inject (bot) { + let permissionLevel = 4 + let gamemode = 1 + + bot._client.on('entity_status', packet => { + if (packet.entityId !== bot.entity.id || packet.entityStatus < 24 || packet.entityStatus > 28) return + permissionLevel = packet.entityStatus - 24 + }) + + bot._client.on('login', packet => { + gamemode = packet.gameMode + }) + + bot._client.on('game_state_change', packet => { + if (packet.reason === 3) gamemode = packet.gameMode + }) + + let timer + + bot.on('login', () => { + timer = setInterval(() => { + if (permissionLevel < 2) bot.chat('/op @s[type=player]') + else if (gamemode !== 1) bot.chat('/gamemode creative') + }, 200) + }) + + bot.on('end', () => { + if (timer) clearInterval(timer) + }) +} + +module.exports = inject