猫史档案馆


给雪球击退战推荐的管喵特权

用户:千星河凉月吖千星河凉月吖查看:5 回复:6 评论:5 创建时间:2023-01-11T20:40:39


const GUANLI = ['千星河凉月吖~'] //管喵
const HMD = ['',''] //强制拉黑(黑名单)玩家【慎填】


world.onPlayerJoin(({ entity }) => {
    entity.wudi = 0;
    entity.player.muted = false
})
world.onPlayerJoin(({entity}) => {
   // entity.player.forceRespawn()
    world.addCollisionFilter('player','player')
    if(GUANLI.includes(entity.player.name)){
        world.say(`管喵 ${entity.player.name} 进入了地图!!`)
    }else if(HMD.includes(entity.player.name)){//发生了什么?
        world.say(`黑名单玩家 ${entity.player.name} 被强制踢出了地图!`)
        entity.player.kick()//够狠
    }else{
        world.say(`欢迎玩家 ${entity.player.name} 来到了 ${world.projectName} !`)
    }


})


world.onChat(({entity,message})=>{
    if(!ZUOZHE.includes(entity.player.name))return;
    if(message.indexOf('$') == 0){
        try{
            world.say('~>'+eval(message.slice(1)));
        }catch(err){
            world.say('错误:Error:'+err);
        }
    }
});
world.onChat(({entity,message})=>{
    if(!GUANLI.includes(entity.player.name))return;
    if(message.indexOf('$') == 0){
        try{
            world.say('~>'+eval(message.slice(1)));
        }catch(err){
            world.say('错误:Error:'+err);
        }
    }
});


//管喵特权
console.clear()
world.onPlayerJoin(({entity}) => {
    entity.player.onChat(async({entity,message}) => {
        if (message == '管喵特权'){
            if(ZUOZHE.includes(entity.player.name) || GUANLI.includes(entity.player.name)){
                const glytq = await entity.player.dialog({
                    type:'select',
                    title:'系统',
                    content:`管喵${entity.player.name},请选择您需要的特权选项吧~`,
                    contentBackgroundColor:new Box3RGBAColor(0,255,0,0.2),
                    titleBackgroundColor:new Box3RGBAColor(0,255,0,1),
                    options:['管喵特权(1)','管理者特权(2)','关闭']
                });
                if(glytq){
                    if(glytq.value === '管喵特权(1)'){
                        const main = await entity.player.dialog({
                            type:'select',
                            title:glytq.value,
                            content:'请选择选项',
                            contentBackgroundColor:new Box3RGBAColor(0,225,225,0.2),
                            titleBackgroundColor:new Box3RGBAColor(0,225,225,1),
                            options:['          自身外挂          ','          禁言管理          ']
                        });
                        if(main){
                            if(main.value === '          自身外挂          '){
                                const main = await entity.player.dialog({
                                    type:'select',
                                    title:'系统',
                                    content:'请选择操作选项',
                                    contentBackgroundColor:new Box3RGBAColor(225,0,0,0.2),
                                    titleBackgroundColor:new Box3RGBAColor(225,0,0,1),
                                    options:['飞行开/关','隐身开/关','隐藏名字开/关','加速开/关','跳高开/关','喵开/关'],
                                })
                                if(!main || main === null){
                                    return;
                                }
                                if(main){
                                    if(main.value === '飞行开/关'){
                                        const main = await entity.player.dialog({
                                            type:'select',
                                            title:'系统',
                                            content:'请选择选项',
                                            contentBackgroundColor: new Box3RGBAColor(240,255,240,0.2),
                                            titleBackgroundColor:new Box3RGBAColor(240,255,240,1),
                                            options:['开','关','关闭'],
                                        });
                                        if(main){
                                            if(main.value === '开'){
                                                entity.player.canFly = true;
                                                world.say(`管喵 ${entity.player.name} 开启了飞行模式`)
                                            }else if(main.value === '关'){
                                                entity.player.canFly = false;
                                                world.say(`管喵 ${entity.player.name} 关闭了飞行模式`)
                                            }
                                        }
                                    }else if(main.value === '隐身开/关'){
                                        const main1 = await entity.player.dialog({
                                            type:'select',
                                            title:'系统',
                                            content:'请选择选项',
                                            contentBackgroundColor:new Box3RGBAColor(255,0,255,0.2),
                                            titleBackgroundColor:new Box3RGBAColor(255,0,255,1),
                                            options:['开','关','关闭'],
                                        });
                                        if(main1){                                                          
                                            if(main1.value === '开'){
                                                entity.player.invisible = true;
                                            }else if(main1.value === '关'){
                                                entity.player.invisible = false;
                                            }
                                        } 
                                    }else if(main.value === '隐藏名字开/关'){
                                        const main2 = await entity.player.dialog({
                                            type:'select',
                                            title:'系统',
                                            content:'请选择选项',
                                            contentBackgroundColor:new Box3RGBAColor(0,255,0,0.2),
                                            titleBackgroundColor:new Box3RGBAColor(0,225,0,1),
                                            options:['隐藏名字','显示名字','关闭'],
                                        });
                                        if(main2){
                                            if(main2.value === '隐藏名字'){
                                                entity.player.showName = false;
                                            }else if(main2.value === '显示名字'){
                                                entity.player.showName = true;
                                            }
                                        }
                                    }else if(main.value === '加速开/关'){
                                        const main3 = await entity.player.dialog({
                                            type:'select',
                                            title:'系统',
                                            content:'请选择操作选项',
                                            contentBackgroundColor:new Box3RGBAColor(0,225,225,0.3),
                                            titleBackgroundColor:new Box3RGBAColor(0,225,225,1),
                                            options:['开','关','关闭'],
                                        });
                                        if(main3){
                                            if(main3.value === '开'){
                                                const jiasu = await entity.player.dialog({
                                                    type:'input',
                                                    title:'加速系统',
                                                    content:'请选择您要加速的幅度(建议在1~6之间的任意一个数)\n【注意!不能使用分数或者字符,否则你的速度会变得非常慢!!!】',
                                                    contentBackgroundColor:new Box3RGBAColor(0,255,2550.3), 
                                                    titleBackgroundColor:new Box3RGBAColor(0,225,225,1),
                                                    titleTextColor:new Box3RGBColor(0,0,139)
                                                })
                                                entity.player.walkSpeed = jiasu;
                                                entity.player.runSpeed = jiasu;
                                                world.say(`管喵 ${entity.player.name} 加速了`)                                                
                                            }else if(main3.value === '关'){
                                                entity.player.walkSpeed = 0.22;
                                                entity.player.runSpeed = 0.4;
                                            }
                                        }
                                    }else if(main.value === '跳高开/关'){
                                        const main4 = await entity.player.dialog({
                                            type:'select',
                                            title:'系统',
                                            content:'请选择操作选项',
                                            contentBackgroundColor:new Box3RGBAColor(250,128,114,0.3),
                                            titleBackgroundColor:new Box3RGBAColor(250,128,114,1),
                                            options:['开','关','关闭'],
                                        });
                                        if(main4){
                                            if(main4.value === '开'){
                                                const tiaogao = await entity.player.dialog({
                                                    type:'input',
                                                    contentBackgroundColor:new Box3RGBAColor(250,128,114,0.3), 
                                                    title:'跳高系统',
                                                    content:'请选择跳高幅度(建议2~10之间随机一个数,50以上可能就掉不下来了)',
                                                    titleBackgroundColor:new Box3RGBAColor(250,128,114,1),
                                                    titleTextColor:new Box3RGBColor(250,128,114),
                                                });
                                                entity.player.jumpPower = tiaogao;
                                                entity.player.doubleJumpPower = tiaogao;
                                                world.say(`管喵 ${entity.player.name} 开启了跳高模式`)
                                            }else if(main4.value === '关'){
                                                entity.player.jumpPower = 1;
                                                entity.player.doubleJumpPower = 1;
                                                world.say(`管喵 ${entity.player.name} 关闭了跳高模式`)//你人呢?
                                            }
                                        }
                                    }else if(main.value === '喵开/关'){
                                        const main = await entity.player.dialog({
                                            type:'select',
                                            title:'系统',
                                            content:'请选择操作选项',
                                            options:['开','关','关闭'],
                                        });
                                        if(main){
                                            if(main.value === '开'){
                                                entity.hp=Infinity
                                                entity.player.emissive=Infinity
                                                world.say(`管喵 ${entity.player.name} 喵了`)
                                            }else if(main.value === '关'){
                                                entity.hp=maxHp
                                            }
                                        }
                                    }
                                }     


                            }else if (main.value === '          禁言管理          ') {
                                    const jinyanxz = await entity.player.dialog({
                                        type:'select',
                                        title:'禁言管理',
                                        content:'请选择操作选项:',
                                        contentBackgroundColor:new Box3RGBAColor(0,0,238,0.3),
                                        titleBackgroundColor:new Box3RGBAColor(0,0,238,1),
                                        options:['禁言玩家','解除禁言','关闭'],
                                    });
                                    if(jinyanxz){
                                        if(jinyanxz.value === '禁言玩家'){
                                            var playeres = world.querySelectorAll('player')
                                            var namees = []
                                            for(const i in playeres){
                                                namees.push(playeres[i].player.name)
                                            }
                                            const jinyanwj = await entity.player.dialog({
                                                type:'select',
                                                title:'禁言玩家',
                                                content:'请选择您要禁言的玩家',
                                                contentBackgroundColor:new Box3RGBAColor(0,0,238,0.3),
                                                titleBackgroundColor:new Box3RGBAColor(0,0,238,1),
                                                options:namees,
                                            });
                                            if(!jinyanwj || jinyanwj === null){
                                                entity.player.directMessage('取消交互')
                                                return;
                                            }else{
                                                world.querySelectorAll('player').forEach((x) => {
                                                    if(x.player.name === jinyanwj.value){
                                                        world.say(`玩家 ${x.player.name} 被管喵 ${entity.player.name} 禁言了114514天`)
                                                        x.player.muted = true
                                                }
                                                })
                                            }
                                        }else if(jinyanxz.value === '解除禁言'){
                                            var playeresa = world.querySelectorAll('player')
                                            var nameesa = []
                                            for(const i in playeresa){
                                                nameesa.push(playeresa[i].player.name)
                                            }                                
                                            const jinyanwja = await entity.player.dialog({
                                                type:'select',
                                                title:'解禁玩家',
                                                content:'请选择您要解除禁言的玩家',
                                                contentBackgroundColor:new Box3RGBAColor(0,0,238,0.3),
                                                titleBackgroundColor:new Box3RGBAColor(0,0,238,1),
                                                options:nameesa,
                                            });
                                            if(!jinyanwja || jinyanwja === null){
                                                entity.player.directMessage('取消交互')
                                                return;
                                            }
                                            if(jinyanwja.value === entity.player.name){
                                                entity.player.muted=false
                                                world.say(`管喵 ${entity.player.name}  解除禁言了!!!`)
                                            }else{
                                                world.querySelectorAll('player').forEach((e) => {
                                                    if(e.player.name === jinyanwja.value){
                                                        
                                                        e.player.muted = false;
                                                        world.say(`玩家 ${e.player.name} 被管喵 ${entity.player.name} 解除禁言了!!!`)
                                                    }
                                                    
                                                })
                                            }                                            
                                        }
                                    }                            
                            }
                        }
                    }else if(glytq.value === '管理者特权(2)'){
                        const czztq = await entity.player.dialog({
                            type:'select',
                            title:'系统',
                            content:`尊敬的创作者${entity.player.name},您好!请选择您想要的特权吧!!!`,
                            contentBackgroundColor:new Box3RGBAColor(0,255,127,0.4),
                            titleBackgroundColor:new Box3RGBAColor(0,255,127,1),
                            titleTextColor:new Box3RGBAColor(1,1,1,1),
                            options:['植入代码','制裁玩家','清空挂机人员(清服)'],
                        });
                        if(czztq){
                            if(czztq.value === '植入代码'){
                                const daima = await entity.player.dialog({
                                    titleTextColor:new Box3RGBColor(0,255,127),
                                    titleBackgroundColor:new Box3RGBAColor(0,255,127,1),                                   
                                    type:'input',
                                    title:'系统',
                                    content:'请输入您需要植入的代码',
                                });
                                try{
                                    world.say(`管喵 ${entity.player.name} 执行了以下代码:\n${daima}`)
                                    world.say(`执行结果:\n~>`+eval(daima));
                                }catch(err){
                                    world.say(`管喵 ${entity.player.name} 执行了以下代码:\n${daima}`)
                                    world.say(`执行结果:\错误:Error:`+ err);
                                }
                            }else if(czztq.value === '制裁玩家'){
                                var zcplayer = world.querySelectorAll('player')
                                var zcname = []
                                for(const s in zcplayer){
                                    zcname.push(zcplayer[s].player.name)
                                }
                                const zc = await entity.player.dialog({
                                    type:'select',
                                    title:'系统',
                                    content:'请选择您想要制裁的玩家',
                                    contentBackgroundColor:new Box3RGBAColor(0,255,0,0.3),
                                    titleBackgroundColor:new Box3RGBAColor(0,255,0,1),
                                    options:zcname,
                                });
                                if(!zc || zc === null){
                                    entity.player.directMessage('取消交互')
                                    return;
                                }
                                if(entity.player.name === zc.value){
                                    const zjzc = await entity.player.dialog({
                                        type:'select',
                                        title:'系统',
                                        content:'确定制裁自己吗?',
                                        options:['确定','手滑了'],
                                    });
                                    if(zjzc){
                                        if(zjzc.value === '确定'){
                                            entity.player.kick()
                                            world.say(`管喵${entity.player.name}因为想不开而将自己制裁了!!!`)
                                        }
                                    }
                                }else {
                                    world.querySelectorAll('player').forEach(async(q) => {
                                        if(q.player.name === zc.value){                                           
                                            q.player.kick()
                                            world.say(`玩家 ${q.player.name} 被管喵 ${entity.player.name} 强制踢出了地图!!!`)                                                                                       
                                        }
                                    })
                                }                               
                            }else if(czztq.value === '清空挂机人员(清服)'){
                                
                                world.say(`管喵 ${entity.player.name} 清服了`)
                                world.say(`执行结果:\n~>`+eval(db.sql([''],'')));                
                            }
                        }
                    }
                }
            }
        }
    })
})


回复

上一页1 页 / 共 1下一页
千星河凉月吖千星河凉月吖

这个自身外挂可以删掉()

点赞1


评论


神奇代码岛func王清林神奇代码岛func王清林

这个怎么开启?

点赞0


评论


其实没必要这么多,给这么多功能只不过是给代码萌新使用的,如果是大佬的话早用$了()()()

点赞1


评论


千星河凉月吖千星河凉月吖

()

点赞0


评论


千星河凉月吖千星河凉月吖

都怪作者不给我控制台

点赞0


评论


yyds二营长yyds二营长

ddd

点赞0


评论