ModPE.langEdit("menu.copyright","MINECRAFTPE-MODS.COM") ModPE.langEdit("deathScreen.message", "§l§cWasted") ModPE.langEdit("progressScreen.generating","§aTop hack client"); ModPE.langEdit("menu.version","§aAlphaHackV4"); var VERSION = "V4"; var NAME = "AlphaHack"; var DEVELOPERS = "Real Virus325"; var cBtn = "Xidan" var fontName="minecraft.txt"; var GUI; var menu; var exitUI; var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); var Button = android.widget.Button; var LinearLayout = android.widget.LinearLayout; var RelativeLayout = android.widget.RelativeLayout; var PopupWindow = android.widget.PopupWindow; var ScrollView = android.widget.ScrollView; var TextView = android.widget.TextView; var CheckBox = android.widget.CheckBox; var Switch = android.widget.Switch; var Toast = android.widget.Toast; var Runnable = java.lang.Runnable; var View = android.view.View; var ColorDrawable = android.graphics.drawable.ColorDrawable; var Color = android.graphics.Color; var Gravity = android.view.Gravity; var Intent = android.content.Intent; var Uri = android.net.Uri; var bg = new android.graphics.drawable.GradientDrawable(); bg.setColor(android.graphics.Color.DKGRAY); //ButtonBGColor bg.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke bg.setCornerRadius(1); //ButtonCornerRadius var zm = new android.graphics.drawable.GradientDrawable(); zm.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke zm.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke zm.setCornerRadius(1); //ButtonCornerRadius var bg3 = new android.graphics.drawable.GradientDrawable(); bg3.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke bg3.setCornerRadius(1); //ButtonCornerRadius var bg4 = new android.graphics.drawable.GradientDrawable(); bg4.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke bg4.setCornerRadius(1); //ButtonCornerRadius var bg5 = new android.graphics.drawable.GradientDrawable(); bg5.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke bg5.setCornerRadius(1); //ButtonCornerRadius var bg94 = new android.graphics.drawable.GradientDrawable(); bg94.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke bg94.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke bg94.setCornerRadius(1); //ButtonCornerRadius var qeq = new android.graphics.drawable.GradientDrawable(); qeq.setStroke(4, android.graphics.Color.CYAN); //ButtonStroke qeq.setCornerRadius(1); //ButtonCornerRadius var bg914 = new android.graphics.drawable.GradientDrawable(); bg914.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke bg914.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke bg914.setCornerRadius(1); //ButtonCornerRadius var bgfly = new android.graphics.drawable.GradientDrawable(); bgfly.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke bgfly.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke bgfly.setCornerRadius(1); //ButtonCornerRadius var bgfly1 = new android.graphics.drawable.GradientDrawable(); bgfly1.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke bgfly1.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke bgfly1.setCornerRadius(1); //ButtonCornerRadius var bg95 = new android.graphics.drawable.GradientDrawable(); bg95.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor bg95.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke bg95.setCornerRadius(1); //ButtonCornerRadius var abh = new android.graphics.drawable.GradientDrawable(); abh.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor abh.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke abh.setCornerRadius(1); //ButtonCornerRadius var bg96 = new android.graphics.drawable.GradientDrawable(); bg96.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor bg96.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke bg96.setCornerRadius(1); //ButtonCornerRadius var bg97 = new android.graphics.drawable.GradientDrawable(); bg97.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor bg97.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke bg97.setCornerRadius(1); //ButtonCornerRadius var bg98 = new android.graphics.drawable.GradientDrawable(); bg98.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor bg98.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke bg98.setCornerRadius(1); //ButtonCornerRadius var bg99 = new android.graphics.drawable.GradientDrawable(); bg99.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor bg99.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke bg99.setCornerRadius(1); //ButtonCornerRadius var xid = new android.graphics.drawable.GradientDrawable(); xid.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke xid.setCornerRadius(1); //ButtonCornerRadius var h = new android.graphics.drawable.GradientDrawable(); h.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke h.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke h.setCornerRadius(1); //ButtonCornerRadius var vr = new android.graphics.drawable.GradientDrawable(); vr.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke vr.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke vr.setCornerRadius(1); //ButtonCornerRadius var safe = new android.graphics.drawable.GradientDrawable(); safe.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor safe.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke safe.setCornerRadius(1); //ButtonCornerRadius var kek = new android.graphics.drawable.GradientDrawable(); kek.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke kek.setCornerRadius(1); //ButtonCornerRadius var kek1 = new android.graphics.drawable.GradientDrawable(); kek1.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke kek1.setCornerRadius(1); //ButtonCornerRadius var h2 = new android.graphics.drawable.GradientDrawable(); h2.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke h2.setStroke(2, android.graphics.Color.RED); //ButtonStroke h2.setCornerRadius(1); //ButtonCornerRadius var t = new android.graphics.drawable.GradientDrawable(); t.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke t.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke t.setCornerRadius(1); //ButtonCornerRadius var s = new android.graphics.drawable.GradientDrawable(); s.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke s.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke s.setCornerRadius(1); //ButtonCornerRadius var fe = new android.graphics.drawable.GradientDrawable(); fe.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke fe.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke fe.setCornerRadius(1); //ButtonCornerRadius var t2 = new android.graphics.drawable.GradientDrawable(); t2.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke t2.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke t2.setCornerRadius(1); //ButtonCornerRadius var sp = new android.graphics.drawable.GradientDrawable(); sp.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke sp.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke sp.setCornerRadius(1); //ButtonCornerRadius var zmm = new android.graphics.drawable.GradientDrawable(); zmm.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke zmm.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke zmm.setCornerRadius(1); //ButtonCornerRadius var s2 = new android.graphics.drawable.GradientDrawable(); s2.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke s2.setStroke(2, android.graphics.Color.RED); //ButtonStroke s2.setCornerRadius(1); //ButtonCornerRadius var aw = new android.graphics.drawable.GradientDrawable(); aw.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke aw.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke aw.setCornerRadius(1); //ButtonCornerRadius var lc = new android.graphics.drawable.GradientDrawable(); lc.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke lc.setStroke(2, android.graphics.Color.RED); //ButtonStroke lc.setCornerRadius(1); //ButtonCornerRadius var fs = new android.graphics.drawable.GradientDrawable(); fs.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke fs.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke fs.setCornerRadius(1); //ButtonCornerRadius var akb = new android.graphics.drawable.GradientDrawable(); akb.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke akb.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke akb.setCornerRadius(1); //ButtonCornerRadius var ml = new android.graphics.drawable.GradientDrawable(); ml.setStroke(5, android.graphics.Color.GREEN); //ButtonStroke ml.setCornerRadius(1); //ButtonCornerRadius //свободно ↑↑↑ var cr = new android.graphics.drawable.GradientDrawable(); cr.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke cr.setStroke(2, android.graphics.Color.RED); //ButtonStroke cr.setCornerRadius(1); //ButtonCornerRadius var ht = new android.graphics.drawable.GradientDrawable(); ht.setColor(android.graphics.Color.DKGRAY); //pButtonBGColor ht.setStroke(3, android.graphics.Color.GREEN); //pButtonStroke ht.setCornerRadius(2); //pButtonCornerRadius var ht1 = new android.graphics.drawable.GradientDrawable(); ht1.setColor(android.graphics.Color.DKGRAY); //pButtonBGColor ht1.setStroke(3, android.graphics.Color.RED); //pButtonStroke ht1.setCornerRadius(2); //pButtonCornerRadius var bgh = new android.graphics.drawable.GradientDrawable(); bgh.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke bgh.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke bgh.setCornerRadius(1); //ButtonCornerRadius var t3 = new android.graphics.drawable.GradientDrawable(); t3.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke t3.setStroke(2, android.graphics.Color.RED); //ButtonStroke t3.setCornerRadius(1); //ButtonCornerRadius var j = new android.graphics.drawable.GradientDrawable(); j.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke j.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke j.setCornerRadius(1); //ButtonCornerRadius var lel = new android.graphics.drawable.GradientDrawable(); lel.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke lel.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke lel.setCornerRadius(1); //ButtonCornerRadius var el = new android.graphics.drawable.GradientDrawable(); el.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke el.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke el.setCornerRadius(1); //ButtonCornerRadius var bg9m = new android.graphics.drawable.GradientDrawable(); bg9m.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke bg9m.setStroke(2, android.graphics.Color.RED); //ButtonStroke bg9m.setCornerRadius(1); //ButtonCornerRadius var bb = new android.graphics.drawable.GradientDrawable(); bb.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke bb.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke bb.setCornerRadius(1); //ButtonCornerRadius var wl = new android.graphics.drawable.GradientDrawable(); wl.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke wl.setStroke(2, android.graphics.Color.GREEN); //ButtonStroke wl.setCornerRadius(1); //ButtonCornerRadius var fl = new android.graphics.drawable.GradientDrawable(); fl.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke fl.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke fl.setCornerRadius(1); //ButtonCornerRadius var j2 = new android.graphics.drawable.GradientDrawable(); j2.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor //ButtonStroke j2.setStroke(2, android.graphics.Color.CYAN); //ButtonStroke j2.setCornerRadius(1); //ButtonCornerRadius var xbg = new android.graphics.drawable.GradientDrawable(); xbg.setColor(android.graphics.Color.DKGRAY); //XButtonBGColor xbg.setStroke(2, android.graphics.Color.GREEN); //XButtonStroke xbg.setCornerRadius(2); //XButtonCornerRadius var pbg = new android.graphics.drawable.GradientDrawable(); pbg.setColor(android.graphics.Color.DKGRAY); //pButtonBGColor pbg.setStroke(2, android.graphics.Color.GREEN); //pButtonStroke pbg.setCornerRadius(2); //pButtonCornerRadius var bgz9m = new android.graphics.drawable.GradientDrawable(); bgz9m.setColor(android.graphics.Color.DKGRAY); //pButtonBGColor bgz9m.setStroke(2, android.graphics.Color.RED); //pButtonStroke bgz9m.setCornerRadius(2); //pButtonCornerRadius var pbg1 = new android.graphics.drawable.GradientDrawable(); pbg1.setColor(android.graphics.Color.DKGRAY); //pButtonBGColor pbg1.setStroke(2, android.graphics.Color.GREEN); //pButtonStroke pbg1.setCornerRadius(2); //pButtonCornerRadius var drp = new android.graphics.drawable.GradientDrawable(); drp.setColor(android.graphics.Color.DKGRAY); //pButtonBGColor drp.setStroke(2, android.graphics.Color.GREEN); //pButtonStroke drp.setCornerRadius(2); //pButtonCornerRadius var pbgm = new android.graphics.drawable.GradientDrawable(); pbgm.setStroke(3, android.graphics.Color.RED); //pButtonStroke pbgm.setCornerRadius(2); //pButtonCornerRadius var Button = android.widget.Button; var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); var Utils = { Block: { isLiquid: function(id) { if(id >= 8 && id <= 11) return true; return false; } }, Player: { isInWater: function() { if(Utils.Block.isLiquid(getTile(Entity.getX(getPlayerEnt()), Entity.getY(getPlayerEnt()) - 1.65, Entity.getZ(getPlayerEnt())))) { return true; } else { return false; } }, isOnGround: function() { var y = Entity.getY(getPlayerEnt()); while(y > 1) y -= 1; if((Math.round(y * 100) >= 61 && Math.round(y * 100) <= 63) && getTile(Entity.getX(getPlayerEnt()), Entity.getY(getPlayerEnt()) - 1.65, Entity.getZ(getPlayerEnt())) != 0 && !Utils.Block.isLiquid(getTile(Entity.getX(getPlayerEnt()), Entity.getY(getPlayerEnt()) - 1.65, Entity.getZ(getPlayerEnt())))) { return true; } if((Math.round(y * 100) >= 11 && Math.round(y * 100) <= 13) && getTile(Entity.getX(getPlayerEnt()), Entity.getY(getPlayerEnt()) - 1.65, Entity.getZ(getPlayerEnt())) != 0 && !Utils.Block.isLiquid(getTile(Entity.getX(getPlayerEnt()), Entity.getY(getPlayerEnt()) - 1.65, Entity.getZ(getPlayerEnt())))) { return true; } else { return false; } }, isCollidedHorizontally: function() { var x = Entity.getX(getPlayerEnt()); var z = Entity.getZ(getPlayerEnt()); var blockX = Math.round(x - 0.5); var blockZ = Math.round(z - 0.5); while(x < 1) x += 1; while(z < 1) z += 1; while(x > 1) x -= 1; while(z > 1) z -= 1; if(Math.round(x * 100) == 31) x -= 0.01; if(Math.round(z * 100) == 31) z -= 0.01; if(Math.round(x * 100) == 69) x += 0.01; if(Math.round(z * 100) == 69) z += 0.01; if(Math.round(x * 100) == 30) blockX--; if(Math.round(z * 100) == 30) blockZ--; if(Math.round(x * 100) == 70) blockX++; if(Math.round(z * 100) == 70) blockZ++; //clientMessage(blockX+";"+blockZ); if(getTile(blockX, Entity.getY(getPlayerEnt()), blockZ) == 0 && getTile(blockX, Entity.getY(getPlayerEnt()) - 1, blockZ) == 0) return false; if(Block.getDestroyTime(getTile(blockX, Entity.getY(getPlayerEnt()) - 1, blockZ)) <= 0.1 && Block.getDestroyTime(getTile(blockX, Entity.getY(getPlayerEnt()), blockZ)) <= 0.1) return false; if(Math.round(x * 100) == 30 || Math.round(x * 100) == 70) return true; if(Math.round(z * 100) == 30 || Math.round(z * 100) == 70) return true; return false; } } }; var Utils = { Block: { isLiquid: function(id) { if(id >= 8 && id <= 11) return true; return false; } }, Player: { isInWater: function() { if(Utils.Block.isLiquid(getTile(Entity.getX(getPlayerEnt()), Entity.getY(getPlayerEnt()) - 1.65, Entity.getZ(getPlayerEnt())))) { return true; } else { return false; } }, isOnGround: function() { var y = Entity.getY(getPlayerEnt()); while(y > 1) y -= 1; if((Math.round(y * 100) >= 61 && Math.round(y * 100) <= 63) && getTile(Entity.getX(getPlayerEnt()), Entity.getY(getPlayerEnt()) - 1.65, Entity.getZ(getPlayerEnt())) != 0 && !Utils.Block.isLiquid(getTile(Entity.getX(getPlayerEnt()), Entity.getY(getPlayerEnt()) - 1.65, Entity.getZ(getPlayerEnt())))) { return true; } if((Math.round(y * 100) >= 11 && Math.round(y * 100) <= 13) && getTile(Entity.getX(getPlayerEnt()), Entity.getY(getPlayerEnt()) - 1.65, Entity.getZ(getPlayerEnt())) != 0 && !Utils.Block.isLiquid(getTile(Entity.getX(getPlayerEnt()), Entity.getY(getPlayerEnt()) - 1.65, Entity.getZ(getPlayerEnt())))) { return true; } else { return false; } }, isCollidedHorizontally: function() { var x = Entity.getX(getPlayerEnt()); var z = Entity.getZ(getPlayerEnt()); var blockX = Math.round(x - 0.5); var blockZ = Math.round(z - 0.5); while(x < 1) x += 1; while(z < 1) z += 1; while(x > 1) x -= 1; while(z > 1) z -= 1; if(Math.round(x * 100) == 31) x -= 0.01; if(Math.round(z * 100) == 31) z -= 0.01; if(Math.round(x * 100) == 69) x += 0.01; if(Math.round(z * 100) == 69) z += 0.01; if(Math.round(x * 100) == 30) blockX--; if(Math.round(z * 100) == 30) blockZ--; if(Math.round(x * 100) == 70) blockX++; if(Math.round(z * 100) == 70) blockZ++; //clientMessage(blockX+";"+blockZ); if(getTile(blockX, Entity.getY(getPlayerEnt()), blockZ) == 0 && getTile(blockX, Entity.getY(getPlayerEnt()) - 1, blockZ) == 0) return false; if(Block.getDestroyTime(getTile(blockX, Entity.getY(getPlayerEnt()) - 1, blockZ)) <= 0.1 && Block.getDestroyTime(getTile(blockX, Entity.getY(getPlayerEnt()), blockZ)) <= 0.1) return false; if(Math.round(x * 100) == 30 || Math.round(x * 100) == 70) return true; if(Math.round(z * 100) == 30 || Math.round(z * 100) == 70) return true; return false; } } }; function crosshairAimAt(ent, pos) { if(ent != null) { var x = Entity.getX(ent) - getPlayerX(); var y = Entity.getY(ent) - getPlayerY(); var z = Entity.getZ(ent) - getPlayerZ(); if(pos != null && pos instanceof Array) { x = Entity.getX(ent) - pos[0]; y = Entity.getY(ent) - pos[1]; z = Entity.getZ(ent) - pos[2]; } if(Entity.getEntityTypeId(ent) != 63) y += 0.5; var a = 0.5 + Entity.getX(ent); var b = Entity.getY(ent); var c = 0.5 + Entity.getZ(ent); var len = Math.sqrt(x * x + y * y + z * z); var y = y / len; var pitch = Math.asin(y); pitch = pitch * 180.0 / Math.PI; pitch = -pitch; var yaw = -Math.atan2(a - (Player.getX() + 0.5), c - (Player.getZ() + 0.5)) * (180 / Math.PI); if(pitch < 89 && pitch > -89) { Entity.setRot(Player.getEntity(), yaw, pitch); } } } function toDirectionalVector(vector, yaw, pitch) { vector[0] = Math.cos(yaw) * Math.cos(pitch); vector[1] = Math.sin(pitch); vector[2] = Math.sin(yaw) * Math.cos(pitch); } function getNearestEntity(maxrange) { var mobs = Entity.getAll(); var players = Server.getAllPlayers(); var small = maxrange; var ent = null; for (var i = 0; i < mobs.length; i++) { var x = Entity.getX(mobs[i]) - getPlayerX(); var y = Entity.getY(mobs[i]) - getPlayerY(); var z = Entity.getZ(mobs[i]) - getPlayerZ(); var dist = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2)); if (dist < small && dist > 0 && Entity.getEntityTypeId(mobs[i]) <= 63 && Entity.getHealth(mobs[i]) >= 1) { small = dist; ent = mobs[i]; } } for (var i = 0; i < players.length; i++) { var x = Entity.getX(players[i]) - getPlayerX(); var y = Entity.getY(players[i]) - getPlayerY(); var z = Entity.getZ(players[i]) - getPlayerZ(); var dist = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2)); if (dist < small && dist > 0 && Entity.getHealth(players[i]) >= 1) { small = dist; ent = players[i]; } } return ent; } function VelToTap(x,y,z) {moveME(getPlayerEnt(),[x+0.5,y+2,z+0.5],0.9); } function getDis(e1, e2){ var xdis = Entity.getX(e1) - e2[0]; var ydis = Entity.getY(e1) - e2[1]; var zdis = Entity.getZ(e1) - e2[2]; var dis = Math.sqrt(xdis*xdis+ydis*ydis+zdis*zdis) return dis; } function moveME(ME, target, speed){ var xdis = target[0] - Entity.getX(ME); var ydis = target[1] - Entity.getY(ME); var zdis = target[2] - Entity.getZ(ME); var dis = getDis(ME, target); xdis /= dis; ydis /= dis; zdis /= dis; xdis *= speed; ydis *= speed; zdis *= speed; setVelX(ME, xdis); setVelY(ME, ydis); setVelZ(ME, zdis); } var playerDir = [0, 0, 0]; var DEG_TO_RAD = Math.PI / 180; var playerFlySpeed = 50; var falling = 0; var next = 0; var px, py, pz, lx, ly, lz, vel, saver; var cd = 0; var s = 0; var Xdiff; var Zdiff; var Xpos; var Zpos; var can = 1; var canGetHP = 1; var HP; var gravity = -0.07840000092983246; var Entities = []; var counter = 0; var time = 0; var time = 2.0; var defaultDestroyTime = [ null, 1.5, 0.6, 0.5, 2, 2, 0, -1, null, null, null, null, 0.5, 0.6, 3, 3, 3, 2, 0.2, 0.6, 0.3, 3, 3, null, 0.8, null, 0.2, 0.7, null, null, 4, 0, 0, null, null, 0.8, null, 0, 0, 0, 0, 3, 5, 2, 2, 2, 0, 1.5, 2, 50, 0, 0, null, 2, 2.5, null, 3, 5, 2.5, 0, 0.6, 3.5, 3.5, 1, 3, 0.4, 0.7, 2, 1, null, null, 5, null, 3, 3, null, null, null, 0.1, 0.5, 0.2, 0.4, 0.6, 0, null, 2, 1, 0.4, 0.3, null, 1, 0.5, null, null, -1, 3, null, 1.5, null, null, 5, 0.3, 1, 0, 0, null, 2, 2, 1.5, null, null, 2, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, 0.8, null, null, null, null, null, 2, 2, 2, null, null, 2, null, 0, 0, null, null, null, null, null, null, null, null, null, null, null, null, 0.8, 0.8, 2, 2, null, null, null, null, null, null, null, null, null, null, null, 0.5, 0.1, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, 3.5, 50, 5, 0.6, 0.6, 5, null, null, null, null, 0 ]; var previousVisualRoadPart=[]; var visualRoadTimer=0; function visualRoad() { visualRoadTimer++; if(visualRoadTimer>=5) { visualRoadTimer=0; var x=Math.floor(getPlayerX()); var y=Math.floor(getPlayerY()); var z=Math.floor(getPlayerZ()); for(var i=0;i= 0.2) { setVelY(getPlayerEnt(),0.6) up = false; } if(Entity.getVelY(Player.getEntity()) < -0.2) { up = true; } } if(hitboxed==true) { Entity.setCollisionSize(Player.getPointedEntity(), 25, 10); } if(awed==true){ var playerDir = [0, 0, 0]; toDirectionalVector(playerDir, (getYaw() + 90) * Math.PI / 180, getPitch() * Math.PI / 180 * -1); setVelX(getPlayerEnt(), 0.2 * playerDir[0]); setVelZ(getPlayerEnt(), 0.2 * playerDir[2]); } if(hitboxed==false){ Entity.setCollisionSize(Player.getPointedEntity(), 1, 2); } if(safeed==true){ Entity.setSneaking(getPlayerEnt(), true); } if(sped==true){ if(getTile(getPlayerX(), getPlayerY() - 3, getPlayerZ()) != 0){ if(curspeed > 0.15){ setVelX(getPlayerEnt(), Entity.getVelX(getPlayerEnt())*1.26); setVelZ(getPlayerEnt(), Entity.getVelZ(getPlayerEnt())*1.26); }}} if(flyed==true){ setVelY(getPlayerEnt(), 0); } if(gled==true){ setVelY(getPlayerEnt(), 0.00000000000); } if(fullbrighted==true){ Entity.addEffect(getPlayerEnt(), 16, 999999*20, 100, true, false); } if(hasteed==true){ Entity.addEffect(getPlayerEnt(), 3, 999999*20, 100, true, false); } if(jesused==true){ if(Utils.Player.isInWater()) setVelY(getPlayerEnt(), 0.2); if(Utils.Player.isInWater()) setVelX(getPlayerEnt(), Entity.getVelX(getPlayerEnt())*1.08); if(Utils.Player.isInWater()) setVelZ(getPlayerEnt(), Entity.getVelZ(getPlayerEnt())*1.08); } if (akbss || Entity.getHealth(getPlayerEnt()) <= 0) { if(this.tick > 0) { tick--; } else { Entity.setImmobile(getPlayerEnt(), false); } if(this.health > Entity.getHealth(getPlayerEnt())){ Entity.setImmobile(getPlayerEnt(), true); this.tick = 1; } this.tick = 0; this.health = Entity.getHealth(getPlayerEnt()); } if(derped==true){ var player = getPlayerEnt(); var yaw = Math.floor(Entity.getYaw(player)); var pitch = Math.floor(Entity.getPitch(player)); Entity.setRot(player, yaw +30, pitch) } if(kklvl==true){ Player.enchant(Player.getSelectedSlotId(), Enchantment.EFFICIENCY,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.INFINITY,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.SMITE,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.DEPTH_STRIDER,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.FIRE_ASPECT,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.FORTUNE,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.FLAME,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.SHARPNESS,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.LOOTING,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.KNOCKBACK,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.UNBREAKING,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.THORNS,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.BLAST_PROTECTION,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.FEATHER_FALLING,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.SILK_TOUCH,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.FIRE_PROTECTION,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.PUNCH,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.POWER,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.RESPIRATION,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.LUCK_OF_THE_SEA,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.PROJECTILE_PROTECTION,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.PROTECTION,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.MENDING,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.LURE,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.FROST_WALKER,1000); Player.enchant(Player.getSelectedSlotId(), Enchantment.BANE_OF_ARTHROPODS,1000); } if(lnged==true){ var hit = getYaw() + 90; var hitY = getPitch() - 180; x = Math.cos(hit * (Math.PI / 180)); y = Math.sin(hitY * (Math.PI / 180)); z = Math.sin(hit * (Math.PI / 180)); setVelX(Player.getEntity(), x * 1); setVelY(Player.getEntity(), y * 1); setVelZ(Player.getEntity(), z * 1); } } function useItem(x, y, z, itemid, blockid, side, itemDamage, blockDamage) { if(taptped==true){ setPosition(getPlayerEnt(), Player.getPointedBlockX(), Player.getPointedBlockY() + 3.0, Player.getPointedBlockZ()) } if(bbed==true){ Block.setDestroyTime(26, 0.0); } if(towered==true){ setVelY(getPlayerEnt(), 0.45); } if(boosted==true){ VelToTap(x,y,z) } if(scfed==true){ if(side == BlockFace.NORTH) { Entity.setPositionRelative(getPlayerEnt(), 0, 0, -1); } else if(side == BlockFace.SOUTH) { Entity.setPositionRelative(getPlayerEnt(), 0, 0, 1); } else if(side == BlockFace.WEST) { Entity.setPositionRelative(getPlayerEnt(), -1, 0, 0); } else if(side == BlockFace.EAST) { Entity.setPositionRelative(getPlayerEnt(), 1, 0, 0); } else if(side == BlockFace.UP) { Entity.setPositionRelative(getPlayerEnt(), 0, 1, 0); } } } function attackHook(attacker, victim){ if(criticaled==true){ setVelY(getPlayerEnt(), 0.25); } if(tpauraed==true){ setPosition(getPlayerEnt(), Entity.getX(victim), Entity.getY(victim) + 2, Entity.getZ(victim)) } if(aimed==true){ var pitch = ((Entity.getPitch(getPlayerEnt()) + 90) * Math.PI)/180; var yaw = ((Entity.getYaw(getPlayerEnt()) + 90) * Math.PI)/180; var X = Math.sin(pitch) * Math.cos(yaw); var Y = Math.cos(pitch); var Z = Math.sin(pitch) * Math.sin(yaw); setVelX(getPlayerEnt(),X*1.5); setVelY(getPlayerEnt(),Y*1.5); setVelZ(getPlayerEnt(),Z*1.5); }} function D(text, showPrefix) { try { var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function () { var thetoast = android.widget.Toast.makeText(com.mojang.minecraftpe.MainActivity.currentMainActivity.get(), "" + text, android.widget.Toast.LENGTH_LONG); var layout = new android.widget.LinearLayout(ctx); var msg = new android.widget.TextView(ctx); if(showPrefix == null) { text = "Xidan: " + text; } else { text = showPrefix + ": " + text; } msg.setText(text); msg.setGravity(android.view.Gravity.CENTER); msg.setTextSize(15); msg.setPadding(10, 10, 10, 10); msg.setTextColor(android.graphics.Color.WHITE); var btnpic = new android.graphics.drawable.GradientDrawable(); btnpic.setColor(android.graphics.Color.BLACK); btnpic.setStroke(5, android.graphics.Color.GREEN); layout.addView(msg); layout.setBackground(btnpic); layout.getBackground().setAlpha(150); thetoast.setView(layout); thetoast.show(); } })); } catch(e) { print(e); } } function F(text, showPrefix) { try { var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function () { var thetoast = android.widget.Toast.makeText(com.mojang.minecraftpe.MainActivity.currentMainActivity.get(), "" + text, android.widget.Toast.LENGTH_LONG); var layout = new android.widget.LinearLayout(ctx); var msg = new android.widget.TextView(ctx); if(showPrefix == null) { text = "SetFov: " + text; } else { text = showPrefix + ": " + text; } msg.setText(text); msg.setGravity(android.view.Gravity.CENTER); msg.setTextSize(15); msg.setPadding(10, 10, 10, 10); msg.setTextColor(android.graphics.Color.BLACK); var btnpic = new android.graphics.drawable.GradientDrawable(); btnpic.setColor(android.graphics.Color.GREEN); btnpic.setStroke(5, android.graphics.Color.BLACK); layout.addView(msg); layout.setBackground(btnpic); layout.getBackground().setAlpha(150); thetoast.setView(layout); thetoast.show(); } })); } catch(e) { print(e); } } function L(text, showPrefix) { try { var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function () { var thetoast = android.widget.Toast.makeText(com.mojang.minecraftpe.MainActivity.currentMainActivity.get(), "" + text, android.widget.Toast.LENGTH_LONG); var layout = new android.widget.LinearLayout(ctx); var msg = new android.widget.TextView(ctx); if(showPrefix == null) { text = " " + text; } else { text = showPrefix + " " + text; } msg.setText(text); msg.setGravity(android.view.Gravity.CENTER); msg.setTextSize(15); msg.setPadding(10, 10, 10, 10); msg.setTextColor(android.graphics.Color.WHITE); var btnpic = new android.graphics.drawable.GradientDrawable(); btnpic.setColor(android.graphics.Color.BLACK); btnpic.setStroke(5, android.graphics.Color.GREEN); layout.addView(msg); layout.setBackground(btnpic); layout.getBackground().setAlpha(150); thetoast.setView(layout); thetoast.show(); } })); } catch(e) { print(e); } } function X(text, showPrefix) { try { var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function () { var thetoast = android.widget.Toast.makeText(com.mojang.minecraftpe.MainActivity.currentMainActivity.get(), "" + text, android.widget.Toast.LENGTH_LONG); var layout = new android.widget.LinearLayout(ctx); var msg = new android.widget.TextView(ctx); if(showPrefix == null) { text = "Xidan: " + text; } else { text = showPrefix + ": " + text; } msg.setText(text); msg.setGravity(android.view.Gravity.CENTER); msg.setTextSize(15); msg.setPadding(10, 10, 10, 10); msg.setTextColor(android.graphics.Color.WHITE); var btnpic = new android.graphics.drawable.GradientDrawable(); btnpic.setColor(android.graphics.Color.BLACK); btnpic.setStroke(5, android.graphics.Color.RED); layout.addView(msg); layout.setBackground(btnpic); layout.getBackground().setAlpha(150); thetoast.setView(layout); thetoast.show(); } })); } catch(e) { print(e); } } function FastEatOn(id) { Item.setProperties(4 + id, { "name": "apple", "id": 4, "icon": "apple", "category": "Miscellaneous", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 4, "saturation_modifier": "low", "is_meat": false } }); Item.setProperties(66 + id, { "name": "golden_apple", "id": 66, "icon": "apple_golden", "category": "Miscellaneous", "stack_by_data": true, "use_animation": "eat", "use_duration": uspe, "foil": false, "hover_text_color": "aqua", "food": { "nutrition": 4, "saturation_modifier": "supernatural", "is_meat": false, "effects": [ { "name": "regeneration", "chance": 1.0, "duration": 5, "amplifier": 1 }, { "name": "absorption", "chance": 1.0, "duration": 120, "amplifier": 0 } ], "enchanted_effects": [ { "name": "regeneration", "chance": 0.66, "duration": 30, "amplifier": 4 }, { "name": "absorption", "chance": 0.66, "duration": 120, "amplifier": 0 }, { "name": "resistance", "chance": 0.66, "duration": 300, "amplifier": 0 }, { "name": "fire_resistance", "chance": 0.66, "duration": 300, "amplifier": 0 } ] } }); Item.setProperties(210 + id, { "name": "appleEnchanted", "id": 210, "icon": "apple_golden", "category": "Miscellaneous", "hand_equipped": false, "stack_by_data": true, "use_animation": "eat", "use_duration": uspe, "foil": true, "hover_text_color": "light_purple", "food": { "nutrition": 4, "saturation_modifier": "supernatural", "is_meat": false, "effects": [ { "name": "regeneration", "chance": 1.0, "duration": 30, "amplifier": 4 }, { "name": "absorption", "chance": 1.0, "duration": 120, "amplifier": 0 }, { "name": "resistance", "chance": 1.0, "duration": 300, "amplifier": 0 }, { "name": "fire_resistance", "chance": 1.0, "duration": 300, "amplifier": 0 } ] } }); Item.setProperties(26 + id, { "name": "mushroom_stew", "id": 26, "icon": "mushroom_stew", "category": "Miscellaneous", "use_animation": "eat", "use_duration": uspe, "max_stack_size": 1, "food": { "nutrition": 6, "saturation_modifier": "normal", "is_meat": false, "using_converts_to": "item.bowl" } }); Item.setProperties(41 + id, { "name": "bread", "id": 41, "icon": "bread", "category": "Miscellaneous", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 5, "saturation_modifier": "normal", "is_meat": false } }); Item.setProperties(63 + id, { "name": "porkchop", "id": 63, "icon": "porkchop_raw", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 3, "saturation_modifier": "low", "is_meat": true } }); Item.setProperties(64 + id, { "name": "porkchop_cooked", "id": 64, "icon": "porkchop_cooked", "category": "Miscellaneous", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 8, "saturation_modifier": "good", "is_meat": true } }); Item.setProperties(93 + id, { "name": "fish", "id": 93, "icon": "fish", "use_animation": "eat", "use_duration": uspe, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 2, "saturation_modifier": "poor", "is_meat": true } }); Item.setProperties(204 + id, { "name": "salmon", "id": 204, "icon": "salmon", "use_animation": "eat", "use_duration": uspe, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 2, "saturation_modifier": "poor", "is_meat": true } }); Item.setProperties(205 + id, { "name": "clownfish", "id": 205, "icon": "clownfish", "use_animation": "eat", "use_duration": uspe, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 1, "saturation_modifier": "poor", "is_meat": true } }); Item.setProperties(206 + id, { "name": "pufferfish", "id": 206, "icon": "pufferfish", "use_animation": "eat", "use_duration": uspe, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 1, "saturation_modifier": "poor", "is_meat": true, "effects": [ { "name": "poison", "duration": 60, "amplifier": 3 }, { "name": "nausea", "duration": 15, "amplifier": 1 }, { "name": "hunger", "duration": 15, "amplifier": 2 } ] } }); Item.setProperties(94 + id, { "name": "cooked_fish", "id": 94, "icon": "cooked_fish", "use_animation": "eat", "use_duration": uspe, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 5, "saturation_modifier": "normal", "eat_sound": "random.burp", "is_meat": true } }); Item.setProperties(207 + id, { "name": "cooked_salmon", "id": 207, "icon": "cooked_salmon", "use_animation": "eat", "use_duration": uspe, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 6, "saturation_modifier": "good", "is_meat": true } }); Item.setProperties(101 + id, { "name": "cookie", "id": 101, "icon": "cookie", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 2, "saturation_modifier": "poor", "is_meat": false } }); Item.setProperties(104 + id, { "name": "melon", "id": 104, "icon": "melon", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 2, "saturation_modifier": "low", "is_meat": false } }); Item.setProperties(107 + id, { "name": "beef", "id": 107, "icon": "beef_raw", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 3, "saturation_modifier": "low", "is_meat": true } }); Item.setProperties(108 + id, { "name": "steak", "id": 108, "icon": "beef_cooked", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 8, "saturation_modifier": "good", "is_meat": true } }); Item.setProperties(109 + id, { "name": "chicken", "id": 109, "icon": "chicken_raw", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 2, "saturation_modifier": "low", "is_meat": true, "effects": [ { "name": "hunger", "chance": 0.3, "duration": 30, "amplifier": 0 } ] } }); Item.setProperties(110 + id, { "name": "cooked_chicken", "id": 110, "icon": "chicken_cooked", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 6, "saturation_modifier": "normal", "is_meat": true } }); Item.setProperties(167 + id, { "name": "muttonRaw", "id": 167, "icon": "mutton_raw", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 2, "saturation_modifier": "low", "is_meat": true } }); Item.setProperties(168 + id, { "name": "muttonCooked", "id": 168, "icon": "mutton_cooked", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 6, "saturation_modifier": "good", "is_meat": true } }); Item.setProperties(111 + id, { "name": "rotten_flesh", "id": 111, "icon": "rotten_flesh", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 4, "saturation_modifier": "poor", "is_meat": true, "effects": [ { "name": "hunger", "chance": 0.3, "duration": 30, "amplifier": 0 } ] } }); Item.setProperties(119 + id, { "name": "spider_eye", "id": 119, "icon": "spider_eye", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 2, "saturation_modifier": "good", "is_meat": false, "effects": [ { "name": "poison", "chance": 1.0, "duration": 5, "amplifier": 0 } ] } }); Item.setProperties(135 + id, { "name": "carrot", "id": 135, "icon": "carrot", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 3, "saturation_modifier": "normal", "is_meat": false }, "seed": { "crop_result": "carrots", "plant_at": "farmland" } }); Item.setProperties(136 + id, { "name": "potato", "id": 136, "icon": "potato", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 1, "saturation_modifier": "low", "is_meat": false }, "seed": { "crop_result": "potatoes", "plant_at": "farmland" } }); Item.setProperties(137 + id, { "name": "baked_potato", "id": 137, "icon": "potato_baked", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 5, "saturation_modifier": "normal", "is_meat": false } }); Item.setProperties(138 + id, { "name": "poisonous_potato", "id": 138, "icon": "potato_poisonous", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 2, "saturation_modifier": "low", "is_meat": false, "effects": [ { "name": "poison", "chance": 0.6, "duration": 5, "amplifier": 0 } ] } }); Item.setProperties(140 + id, { "name": "golden_carrot", "id": 140, "icon": "carrot_golden", "category": "Miscellaneous", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 6, "saturation_modifier": "supernatural", "is_meat": false } }); Item.setProperties(144 + id, { "name": "pumpkin_pie", "id": 144, "icon": "pumpkin_pie", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 8, "saturation_modifier": "low", "is_meat": false } }); Item.setProperties(155 + id, { "name": "rabbit", "id": 155, "icon": "rabbit", "category": "Miscellaneous", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 3, "saturation_modifier": "low", "is_meat": true } }); Item.setProperties(156 + id, { "name": "cooked_rabbit", "id": 156, "icon": "rabbit_cooked", "category": "Miscellaneous", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 5, "saturation_modifier": "normal", "is_meat": true } }); Item.setProperties(157 + id, { "name": "rabbit_stew", "id": 157, "icon": "rabbit_stew", "category": "Miscellaneous", "use_animation": "eat", "use_duration": uspe, "max_stack_size": 1, "food": { "nutrition": 10, "saturation_modifier": "normal", "using_converts_to": "bowl", "is_meat": true } }); Item.setProperties(201 + id, { "name": "beetroot", "id": 201, "icon": "beetroot", "use_animation": "eat", "use_duration": uspe, "food": { "nutrition": 1, "saturation_modifier": "normal", "is_meat": false } }); Item.setProperties(203 + id, { "name": "beetroot_soup", "id": 203, "icon": "beetroot_soup", "use_animation": "eat", "use_duration": uspe, "max_stack_size": 1, "food": { "nutrition": 6, "saturation_modifier": "normal", "using_converts_to": "bowl", "is_meat": false } }); } function FastEatOff(id) { Item.setProperties(4 + id, { "name": "apple", "id": 4, "icon": "apple", "category": "Miscellaneous", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 4, "saturation_modifier": "low", "is_meat": false } }); Item.setProperties(66 + id, { "name": "golden_apple", "id": 66, "icon": "apple_golden", "category": "Miscellaneous", "stack_by_data": true, "use_animation": "eat", "use_duration": 32, "foil": false, "hover_text_color": "aqua", "food": { "nutrition": 4, "saturation_modifier": "supernatural", "is_meat": false, "effects": [ { "name": "regeneration", "chance": 1.0, "duration": 5, "amplifier": 1 }, { "name": "absorption", "chance": 1.0, "duration": 120, "amplifier": 0 } ], "enchanted_effects": [ { "name": "regeneration", "chance": 0.66, "duration": 30, "amplifier": 4 }, { "name": "absorption", "chance": 0.66, "duration": 120, "amplifier": 0 }, { "name": "resistance", "chance": 0.66, "duration": 300, "amplifier": 0 }, { "name": "fire_resistance", "chance": 0.66, "duration": 300, "amplifier": 0 } ] } }); Item.setProperties(210 + id, { "name": "appleEnchanted", "id": 210, "icon": "apple_golden", "category": "Miscellaneous", "hand_equipped": false, "stack_by_data": true, "use_animation": "eat", "use_duration": 32, "foil": true, "hover_text_color": "light_purple", "food": { "nutrition": 4, "saturation_modifier": "supernatural", "is_meat": false, "effects": [ { "name": "regeneration", "chance": 1.0, "duration": 30, "amplifier": 4 }, { "name": "absorption", "chance": 1.0, "duration": 120, "amplifier": 0 }, { "name": "resistance", "chance": 1.0, "duration": 300, "amplifier": 0 }, { "name": "fire_resistance", "chance": 1.0, "duration": 300, "amplifier": 0 } ] } }); Item.setProperties(26 + id, { "name": "mushroom_stew", "id": 26, "icon": "mushroom_stew", "category": "Miscellaneous", "use_animation": "eat", "use_duration": 32, "max_stack_size": 1, "food": { "nutrition": 6, "saturation_modifier": "normal", "is_meat": false, "using_converts_to": "item.bowl" } }); Item.setProperties(41 + id, { "name": "bread", "id": 41, "icon": "bread", "category": "Miscellaneous", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 5, "saturation_modifier": "normal", "is_meat": false } }); Item.setProperties(63 + id, { "name": "porkchop", "id": 63, "icon": "porkchop_raw", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 3, "saturation_modifier": "low", "is_meat": true } }); Item.setProperties(64 + id, { "name": "porkchop_cooked", "id": 64, "icon": "porkchop_cooked", "category": "Miscellaneous", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 8, "saturation_modifier": "good", "is_meat": true } }); Item.setProperties(93 + id, { "name": "fish", "id": 93, "icon": "fish", "use_animation": "eat", "use_duration": 32, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 2, "saturation_modifier": "poor", "is_meat": true } }); Item.setProperties(204 + id, { "name": "salmon", "id": 204, "icon": "salmon", "use_animation": "eat", "use_duration": 32, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 2, "saturation_modifier": "poor", "is_meat": true } }); Item.setProperties(205 + id, { "name": "clownfish", "id": 205, "icon": "clownfish", "use_animation": "eat", "use_duration": 32, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 1, "saturation_modifier": "poor", "is_meat": true } }); Item.setProperties(206 + id, { "name": "pufferfish", "id": 206, "icon": "pufferfish", "use_animation": "eat", "use_duration": 32, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 1, "saturation_modifier": "poor", "is_meat": true, "effects": [ { "name": "poison", "duration": 60, "amplifier": 3 }, { "name": "nausea", "duration": 15, "amplifier": 1 }, { "name": "hunger", "duration": 15, "amplifier": 2 } ] } }); Item.setProperties(94 + id, { "name": "cooked_fish", "id": 94, "icon": "cooked_fish", "use_animation": "eat", "use_duration": 32, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 5, "saturation_modifier": "normal", "eat_sound": "random.burp", "is_meat": true } }); Item.setProperties(207 + id, { "name": "cooked_salmon", "id": 207, "icon": "cooked_salmon", "use_animation": "eat", "use_duration": 32, "max_damage": 0, "stacked_by_data": true, "food": { "nutrition": 6, "saturation_modifier": "good", "is_meat": true } }); Item.setProperties(101 + id, { "name": "cookie", "id": 101, "icon": "cookie", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 2, "saturation_modifier": "poor", "is_meat": false } }); Item.setProperties(104 + id, { "name": "melon", "id": 104, "icon": "melon", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 2, "saturation_modifier": "low", "is_meat": false } }); Item.setProperties(107 + id, { "name": "beef", "id": 107, "icon": "beef_raw", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 3, "saturation_modifier": "low", "is_meat": true } }); Item.setProperties(108 + id, { "name": "steak", "id": 108, "icon": "beef_cooked", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 8, "saturation_modifier": "good", "is_meat": true } }); Item.setProperties(109 + id, { "name": "chicken", "id": 109, "icon": "chicken_raw", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 2, "saturation_modifier": "low", "is_meat": true, "effects": [ { "name": "hunger", "chance": 0.3, "duration": 30, "amplifier": 0 } ] } }); Item.setProperties(110 + id, { "name": "cooked_chicken", "id": 110, "icon": "chicken_cooked", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 6, "saturation_modifier": "normal", "is_meat": true } }); Item.setProperties(167 + id, { "name": "muttonRaw", "id": 167, "icon": "mutton_raw", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 2, "saturation_modifier": "low", "is_meat": true } }); Item.setProperties(168 + id, { "name": "muttonCooked", "id": 168, "icon": "mutton_cooked", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 6, "saturation_modifier": "good", "is_meat": true } }); Item.setProperties(111 + id, { "name": "rotten_flesh", "id": 111, "icon": "rotten_flesh", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 4, "saturation_modifier": "poor", "is_meat": true, "effects": [ { "name": "hunger", "chance": 0.3, "duration": 30, "amplifier": 0 } ] } }); Item.setProperties(119 + id, { "name": "spider_eye", "id": 119, "icon": "spider_eye", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 2, "saturation_modifier": "good", "is_meat": false, "effects": [ { "name": "poison", "chance": 1.0, "duration": 5, "amplifier": 0 } ] } }); Item.setProperties(135 + id, { "name": "carrot", "id": 135, "icon": "carrot", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 3, "saturation_modifier": "normal", "is_meat": false }, "seed": { "crop_result": "carrots", "plant_at": "farmland" } }); Item.setProperties(136 + id, { "name": "potato", "id": 136, "icon": "potato", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 1, "saturation_modifier": "low", "is_meat": false }, "seed": { "crop_result": "potatoes", "plant_at": "farmland" } }); Item.setProperties(137 + id, { "name": "baked_potato", "id": 137, "icon": "potato_baked", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 5, "saturation_modifier": "normal", "is_meat": false } }); Item.setProperties(138 + id, { "name": "poisonous_potato", "id": 138, "icon": "potato_poisonous", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 2, "saturation_modifier": "low", "is_meat": false, "effects": [ { "name": "poison", "chance": 0.6, "duration": 5, "amplifier": 0 } ] } }); Item.setProperties(140 + id, { "name": "golden_carrot", "id": 140, "icon": "carrot_golden", "category": "Miscellaneous", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 6, "saturation_modifier": "supernatural", "is_meat": false } }); Item.setProperties(144 + id, { "name": "pumpkin_pie", "id": 144, "icon": "pumpkin_pie", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 8, "saturation_modifier": "low", "is_meat": false } }); Item.setProperties(155 + id, { "name": "rabbit", "id": 155, "icon": "rabbit", "category": "Miscellaneous", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 3, "saturation_modifier": "low", "is_meat": true } }); Item.setProperties(156 + id, { "name": "cooked_rabbit", "id": 156, "icon": "rabbit_cooked", "category": "Miscellaneous", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 5, "saturation_modifier": "normal", "is_meat": true } }); Item.setProperties(157 + id, { "name": "rabbit_stew", "id": 157, "icon": "rabbit_stew", "category": "Miscellaneous", "use_animation": "eat", "use_duration": 32, "max_stack_size": 1, "food": { "nutrition": 10, "saturation_modifier": "normal", "using_converts_to": "bowl", "is_meat": true } }); Item.setProperties(201 + id, { "name": "beetroot", "id": 201, "icon": "beetroot", "use_animation": "eat", "use_duration": 32, "food": { "nutrition": 1, "saturation_modifier": "normal", "is_meat": false } }); Item.setProperties(203 + id, { "name": "beetroot_soup", "id": 203, "icon": "beetroot_soup", "use_animation": "eat", "use_duration": 32, "max_stack_size": 1, "food": { "nutrition": 6, "saturation_modifier": "normal", "using_converts_to": "bowl", "is_meat": false } }); } var tos; function showToS() { var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function(){ try{ var tosLayout = new android.widget.LinearLayout(ctx); var tosScroll = new android.widget.ScrollView(ctx); var tosLayout1 = new android.widget.LinearLayout(ctx); tosLayout.setOrientation(1); tosLayout1.setOrientation(1); tosScroll.addView(tosLayout); tosLayout1.addView(tosScroll); tosLayout.setBackground(qeq); var tosInfo = new Button(ctx); tosInfo.setTextSize(15); tosInfo.setText("Обновление"); tosInfo.setTextColor(android.graphics.Color.CYAN); tosInfo.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.BLACK)); tosInfo.getBackground().setAlpha(150); tosInfo.setGravity(Gravity.CENTER); tosLayout.addView(tosInfo); var tosInfo = new TextView(ctx); tosInfo.setTextSize(15); tosInfo.setText("Убрана вибрация"); tosInfo.setTextColor(android.graphics.Color.GREEN); tosInfo.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); tosInfo.getBackground().setAlpha(150); tosInfo.setGravity(Gravity.CENTER); tosLayout.addView(tosInfo); var tosInfo = new TextView(ctx); tosInfo.setTextSize(15); tosInfo.setText("Изменен [BIND]"); tosInfo.setTextColor(android.graphics.Color.GREEN); tosInfo.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); tosInfo.getBackground().setAlpha(150); tosInfo.setGravity(Gravity.CENTER); tosLayout.addView(tosInfo); var tosInfo = new TextView(ctx); tosInfo.setTextSize(15); tosInfo.setText("Добавлен JetPack"); tosInfo.setTextColor(android.graphics.Color.GREEN); tosInfo.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); tosInfo.getBackground().setAlpha(150); tosInfo.setGravity(Gravity.CENTER); tosLayout.addView(tosInfo); var tosInfo = new TextView(ctx); tosInfo.setTextSize(15); tosInfo.setText("Добавлен LongJump"); tosInfo.setTextColor(android.graphics.Color.GREEN); tosInfo.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); tosInfo.getBackground().setAlpha(150); tosInfo.setGravity(Gravity.CENTER); tosLayout.addView(tosInfo); var tosInfo = new TextView(ctx); tosInfo.setTextSize(15); tosInfo.setText("Убраны не нужные функции из меню [BIND]"); tosInfo.setTextColor(android.graphics.Color.GREEN); tosInfo.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); tosInfo.getBackground().setAlpha(150); tosInfo.setGravity(Gravity.CENTER); tosLayout.addView(tosInfo); var yesBtn = new android.widget.Button(ctx); yesBtn.setText("exit"); yesBtn.setTextColor(android.graphics.Color.RED); yesBtn.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.BLACK)); yesBtn.getBackground().setAlpha(150); yesBtn.setTextSize(15); yesBtn.setGravity(android.view.Gravity.CENTER); yesBtn.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ tos.dismiss(); showMenuBtn(); } })); tosLayout.addView(yesBtn); tos = new PopupWindow(tosLayout1, ctx.getWindowManager().getDefaultDisplay().getWidth()/2, ctx.getWindowManager().getDefaultDisplay().getHeight()/2); tos.setAnimationStyle(android.R.style.Animation_InputMethod); tos.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); tos.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.CENTER | android.view.Gravity.CENTER, 0, 0); } catch(error) { print("An error occured: " + error); } }})); } showToS(); function mainMenu2(){ var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function(){ try{ var menuLayout = new android.widget.LinearLayout(ctx); var menuScroll = new android.widget.ScrollView(ctx); var menuLayout1 = new android.widget.LinearLayout(ctx); menuLayout.setOrientation(1); menuLayout1.setOrientation(1); menuScroll.addView(menuLayout); menuLayout1.addView(menuScroll); var kekpp = new android.widget.TextView(ctx); kekpp.setText(' '); kekpp.setTextSize(2); kekpp.setTextColor(android.graphics.Color.parseColor('#00F4FC'));//Зелёный menuLayout.addView(kekpp); var luch = new android.widget.Button(ctx); luch.setText('КИТ ЛУЧНИК'); luch.setTextSize(10); luch.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE)); luch.setBackground(bg98); luch.setTextColor(android.graphics.Color.GREEN); luch.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ Player.addItemInventory(261, 1, 0) Player.addItemInventory(262, 64, 0) Player.addItemInventory(297, 20, 0) Player.addItemInventory(466, 32, 0) Player.addItemInventory(302, 1, 0) Player.addItemInventory(303, 1, 0) Player.addItemInventory(304, 1, 0) Player.addItemInventory(305, 1, 0) D('Набор лучника выдан!'); } })); menuLayout.addView(luch); var kekpp1 = new android.widget.TextView(ctx); kekpp1.setText(' '); kekpp1.setTextSize(2); kekpp1.setTextColor(android.graphics.Color.parseColor('#00F4FC'));//Зелёный menuLayout.addView(kekpp1); var kit = new android.widget.Button(ctx); kit.setText('КИТ ЖЕЛЕЗНИК'); kit.setTextSize(10); kit.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE)); kit.setBackground(bg98); kit.setTextColor(android.graphics.Color.GREEN); kit.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ Player.addItemInventory(261, 1, 0) Player.addItemInventory(297, 1, 0) Player.addItemInventory(262, 64, 0) Player.addItemInventory(297, 20, 0) Player.addItemInventory(466, 32, 0) Player.addItemInventory(306, 1, 0) Player.addItemInventory(307, 1, 0) Player.addItemInventory(308, 1, 0) Player.addItemInventory(309, 1, 0) D('Набор железника выдан!'); } })); menuLayout.addView(kit); var kekpp12 = new android.widget.TextView(ctx); kekpp12.setText(' '); kekpp12.setTextSize(2); kekpp12.setTextColor(android.graphics.Color.parseColor('#00F4FC'));//Зелёный menuLayout.addView(kekpp12); var kitt1 = new android.widget.Button(ctx); kitt1.setText('КИТ АЛМАЗНИКА'); kitt1.setTextSize(10); kitt1.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE)); kitt1.setBackground(bg98); kitt1.setTextColor(android.graphics.Color.GREEN); kitt1.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ Player.addItemInventory(310, 1, 0) Player.addItemInventory(296, 1, 0) Player.addItemInventory(311, 1, 0) Player.addItemInventory(312, 1, 0) Player.addItemInventory(313, 1, 0) Player.addItemInventory(450, 1, 0) Player.addItemInventory(396, 32, 0) Player.addItemInventory(466, 32, 0) D('Набор алмазника выдан!'); } })); menuLayout.addView(kitt1); var kekpp1z = new android.widget.TextView(ctx); kekpp1z.setText('Киты будут пополняться'); kekpp1z.setTextSize(12); kekpp1z.setTextColor(android.graphics.Color.parseColor('#00F4FC'));//Зелёный menuLayout.addView(kekpp1z); menulell = new android.widget.PopupWindow(menuLayout1, ctx.getWindowManager().getDefaultDisplay().getWidth()/5, ctx.getWindowManager().getDefaultDisplay().getHeight()/2); menulell.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT)); menulell.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 0, 0); }catch(error){ D('Код не трогай блэт: ' + error); } }})); } function mainMenu100(){ var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function(){ try{ var menuLayout = new android.widget.LinearLayout(ctx); var menuScroll = new android.widget.ScrollView(ctx); var menuLayout1 = new android.widget.LinearLayout(ctx); menuLayout.setOrientation(1); menuLayout1.setOrientation(1); menuScroll.addView(menuLayout); menuLayout1.addView(menuScroll); var buttonh = new android.widget.Button(ctx); buttonh.setText('СКРЫТЬ КНОПКУ'); buttonh.setTextSize(10); buttonh.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE)); buttonh.setBackground(s2); buttonh.setTextColor(android.graphics.Color.RED); buttonh.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ if(GUIme != null && GUIme.isShowing()) { GUIme.dismiss(); } //Close exitlel.dismiss(); menu100.dismiss(); //C D("8856") } })); menuLayout.addView(buttonh); var kekl = new android.widget.TextView(ctx); kekl.setText(' '); kekl.setTextSize(2); kekl.setTextColor(android.graphics.Color.parseColor('#00F4FC'));//Зелёный menuLayout.addView(kekl); var button111 = new android.widget.Button(ctx); button111.setText('ФУНКЦИИ'); button111.setTextSize(10); button111.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE)); button111.setBackground(bg9m); button111.setTextColor(android.graphics.Color.RED); button111.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ mainMenu1(); exit1(); menu100.dismiss(); exitlel.dismiss(); } })); menuLayout.addView(button111); var kekqq = new android.widget.TextView(ctx); kekqq.setText(' '); kekqq.setTextSize(2); kekqq.setTextColor(android.graphics.Color.parseColor('#00F4FC'));//Зелёный menuLayout.addView(kekqq); var button1y11 = new android.widget.Button(ctx); button1y11.setText('ФУНКЦИИ [BIND]'); button1y11.setTextSize(10); button1y11.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE)); button1y11.setBackground(bg9m); button1y11.setTextColor(android.graphics.Color.RED); button1y11.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ mainMenub(); exitb(); menu100.dismiss(); exitlel.dismiss(); } })); menuLayout.addView(button1y11); var lkekqq = new android.widget.TextView(ctx); lkekqq.setText(' '); lkekqq.setTextSize(2); lkekqq.setTextColor(android.graphics.Color.parseColor('#00F4FC'));//Зелёный menuLayout.addView(lkekqq); var button1211 = new android.widget.Button(ctx); button1211.setText('КИТ НАБОРЫ'); button1211.setTextSize(10); button1211.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE)); button1211.setBackground(bg9m); button1211.setTextColor(android.graphics.Color.RED); button1211.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ mainMenu2(); exit3(); menu100.dismiss(); exitlel.dismiss(); } })); menuLayout.addView(button1211); var kek5 = new android.widget.TextView(ctx); kek5.setText(' '); kek5.setTextSize(2); kek5.setTextColor(android.graphics.Color.parseColor('#00F4FC'));//Зелёный menuLayout.addView(kek5); var tpxyz = new android.widget.Button(ctx); tpxyz.setText('Телепортироваться'); tpxyz.setTextSize(8) tpxyz.setBackground(bgz9m) tpxyz.setTextColor(android.graphics.Color.RED); tpxyz.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ Level.playSound(Player.getX(), Player.getY(), Player.getZ(), "random.click", 100, 100); var tpx = new android.app.AlertDialog.Builder(ctx); tpx.setTitle('Телепортация...'); var scroll = new android.widget.ScrollView(ctx); var layout = new android.widget.LinearLayout(ctx); layout.setOrientation(1); var Xx = new android.widget.EditText(ctx); Xx.setHint('Введите координату X'); var Yy = new android.widget.EditText(ctx); Yy.setHint('Введите координату Y'); var Zz = new android.widget.EditText(ctx); Zz.setHint('Введите координату Z'); var params = new android.view.ViewGroup.LayoutParams(-2,-2); layout.addView(Xx,params); layout.addView(Yy,params); layout.addView(Zz,params); tpx.setView(layout); tpx.setNegativeButton('Отмена', new android.content.DialogInterface.OnClickListener(){ onClick: function(viewarg){ Level.playSound(Player.getX(), Player.getY(), Player.getZ(), "random.click", 100, 100); }}); tpx.setPositiveButton('Телепорт', new android.content.DialogInterface.OnClickListener(){ onClick: function(viewarg){ Level.playSound(Player.getX(), Player.getY(), Player.getZ(), "random.click", 100, 100); Entity.setPosition(getPlayerEnt(), Xx.getText().toString(), Yy.getText().toString(), Zz.getText().toString()); }}); var dialog = tpx.create(); dialog.show(); }})); menuLayout.addView(tpxyz); menu100 = new android.widget.PopupWindow(menuLayout1, ctx.getWindowManager().getDefaultDisplay().getWidth()/5, ctx.getWindowManager().getDefaultDisplay().getHeight()/1.4); menu100.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT)); menu100.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 0, 0); }catch(error){ D('Код не трогай блэт: ' + error); } }})); } function showHBtn() { ctx.runOnUiThread(new Runnable({ run: function(){ try{ var layout = new LinearLayout(ctx); layout.setOrientation(1); var toggled = false; var button = new android.widget.ToggleButton(ctx); button.setText('H'); button.setTextOn("H") button.setTextOff("H") button.setPadding(10,10,10,10); button.setChecked(toggled); button.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ if(!toggled){ button.setTextOn('H'); button.setTextColor(Color.GREEN); D('Hitbox [BIND] enabled') button.setBackground(ht) button.setTextSize(15) toggled = true; hitboxss = true; hitboxed = true; htss = true; hted = true; }else{ button.setTextOff('H'); button.setTextColor(Color.RED); X('Hitbox [BIND] disabled') button.setBackground(ht1) htss = false; hted = false; hitboxss = false; hitboxed = false; toggled = false; } button.setChecked(toggled); } })); layout.addView(button); GUI4 = new android.widget.PopupWindow(layout, dip7px(40), dip7px(40)); GUI4.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); GUI4.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 300, 0); }catch(exception){ print(exception); } }})); } function showVRBtn() { ctx.runOnUiThread(new Runnable({ run: function(){ try{ var layout = new LinearLayout(ctx); layout.setOrientation(1); var toggled = false; var button = new android.widget.ToggleButton(ctx); button.setText('V'); button.setTextOn("V") button.setTextOff("V") button.setPadding(10,10,10,10); button.setChecked(toggled); button.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ if(!toggled){ button.setTextOn('V'); button.setTextColor(Color.GREEN); D('VisualRoad [BIND] enabled') button.setBackground(ht) button.setTextSize(15) toggled = true; visaulroadss = true; visualroaded = true; vrss = true; vred = true; }else{ button.setTextOff('V'); button.setTextColor(Color.RED); X('VisualRoad [BIND] disabled') button.setBackground(ht1) vrss = false; vred = false; visualroadss = false; visualroaded = false; toggled = false; } button.setChecked(toggled); } })); layout.addView(button); GUIvr = new android.widget.PopupWindow(layout, dip10px(40), dip10px(40)); GUIvr.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); GUIvr.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 700, 0); }catch(exception){ print(exception); } }})); } function mainMenub(){ var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function(){ try{ var menuLayout = new android.widget.LinearLayout(ctx); var menuScroll = new android.widget.ScrollView(ctx); var menuLayout1 = new android.widget.LinearLayout(ctx); menuLayout.setOrientation(1); menuLayout1.setOrientation(1); menuScroll.addView(menuLayout); menuLayout1.addView(menuScroll); var ams = new Switch(ctx); ams.setText("HitBoost"); ams.setTextColor(android.graphics.Color.RED); ams.setPadding(10, 3, 3, 3); ams.setTextSize(10); ams.setChecked(amed); ams.setBackground(h2); ams.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener({ onCheckedChanged: function(){ if(!amed){ showHBBtn(); amss = true; amed = true; }else{ GUIaim.dismiss(); amss = false; amed = false; } ams.setChecked(amed); } })); menuLayout.addView(ams); var opr = new android.widget.TextView(ctx); opr.setTextSize(2); opr. setText(" ");//Title opr. setTextColor(android.graphics.Color.RED); //Color opr.setGravity(android.view.Gravity.LEFT); menuLayout.addView(opr); var htbs = new Switch(ctx); htbs.setText("Hitbox"); htbs.setTextColor(android.graphics.Color.RED); htbs.setPadding(10, 3, 3, 3); htbs.setTextSize(10); htbs.setChecked(htbed); htbs.setBackground(h2); htbs.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener({ onCheckedChanged: function(){ if(!htbed){ showHBtn(); htbss = true; htbed = true; }else{ GUI4.dismiss(); htbss = false; htbed = false; } htbs.setChecked(htbed); } })); menuLayout.addView(htbs); var opr = new android.widget.TextView(ctx); opr.setTextSize(2); opr. setText(" ");//Title opr. setTextColor(android.graphics.Color.RED); //Color opr.setGravity(android.view.Gravity.LEFT); menuLayout.addView(opr); var vrds = new Switch(ctx); vrds.setText("VisualRoad"); vrds.setTextColor(android.graphics.Color.RED); vrds.setPadding(10, 3, 3, 3); vrds.setTextSize(10); vrds.setChecked(vrded); vrds.setBackground(h2); vrds.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener({ onCheckedChanged: function(){ if(!vrded){ showVRBtn(); vrdss = true; vrded = true; }else{ GUIvr.dismiss(); vrdss = false; vrded = false; } vrds.setChecked(vrded); } })); menuLayout.addView(vrds); var qallq = new android.widget.TextView(ctx); qallq.setTextSize(2); qallq.setText(" ");//Title qallq.setTextColor(android.graphics.Color.RED); //Color qallq.setGravity(android.view.Gravity.LEFT); menuLayout.addView(qallq) var gl1s = new Switch(ctx); gl1s.setText("Glide"); gl1s.setTextColor(android.graphics.Color.RED); gl1s.setPadding(10, 3, 3, 3); gl1s.setTextSize(10); gl1s.setChecked(gl1ed); gl1s.setBackground(h2); gl1s.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener({ onCheckedChanged: function(){ if(!gl1ed){ showGLBtn(); gl1ss = true; gl1ed = true; }else{ GUIgll.dismiss(); gl1ss = false; gl1ed = false; } gl1s.setChecked(gl1ed); } })); menuLayout.addView(gl1s); var qlqa = new android.widget.TextView(ctx); qlqa.setTextSize(2); qlqa.setText(" ");//Title qlqa.setTextColor(android.graphics.Color.RED); //Color qlqa.setGravity(android.view.Gravity.LEFT); menuLayout.addView(qlqa) var ddbs = new Switch(ctx); ddbs.setText("Derp"); ddbs.setTextColor(android.graphics.Color.RED); ddbs.setPadding(10, 3, 3, 3); ddbs.setTextSize(10); ddbs.setChecked(ddbed); ddbs.setBackground(h2); ddbs.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener({ onCheckedChanged: function(){ if(!ddbed){ ddbss = true; ddbed = true; showDPBtn(); }else{ ddbss = false; ddbed = false; GUIdp.dismiss(); } ddbs.setChecked(ddbed); } })); menuLayout.addView(ddbs); var qlqa = new android.widget.TextView(ctx); qlqa.setTextSize(2); qlqa.setText(" ");//Title qlqa.setTextColor(android.graphics.Color.RED); //Color qlqa.setGravity(android.view.Gravity.LEFT); menuLayout.addView(qlqa) var jtpps = new Switch(ctx); jtpps.setText("JetPack"); jtpps.setTextColor(android.graphics.Color.RED); jtpps.setPadding(10, 3, 3, 3); jtpps.setTextSize(10); jtpps.setChecked(jtpped); jtpps.setBackground(h2); jtpps.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener({ onCheckedChanged: function(){ if(!jtpped){ jtppss = true; jtpped = true; showJTPBtn(); }else{ jtppss = false; jtpped = false; GUIjtp.dismiss(); } jtpps.setChecked(jtpped); } })); menuLayout.addView(jtpps); menubind = new android.widget.PopupWindow(menuLayout1, ctx.getWindowManager().getDefaultDisplay().getWidth()/5, ctx.getWindowManager().getDefaultDisplay().getHeight()/2); menubind.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT)); menubind.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 0, 0); }catch(error){ D('Код не трогай блэт: ' + error); } }})); } function showGLBtn() { ctx.runOnUiThread(new Runnable({ run: function(){ try{ var layout = new LinearLayout(ctx); layout.setOrientation(1); var toggled = false; var button = new android.widget.ToggleButton(ctx); button.setText('G'); button.setTextOn("G") button.setTextOff("G") button.setPadding(10,10,10,10); button.setChecked(toggled); button.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ if(!toggled){ button.setTextOn('G'); button.setTextColor(Color.GREEN); D('Glide [BIND] enabled') button.setBackground(ht) button.setTextSize(15) toggled = true; glss = true; gled = true; glbss = true; glbed = true; }else{ button.setTextOff('G'); button.setTextColor(Color.RED); X('Glide [BIND] disabled') button.setBackground(ht1) glbss = false; glbed = false; glss = false; gled = false; toggled = false; } button.setChecked(toggled); } })); layout.addView(button); GUIgll = new android.widget.PopupWindow(layout, dip16px(40), dip16px(40)); GUIgll.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); GUIgll.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 0, 100); }catch(exception){ print(exception); } }})); } function showHBBtn() { ctx.runOnUiThread(new Runnable({ run: function(){ try{ var layout = new LinearLayout(ctx); layout.setOrientation(1); var toggled = false; var button = new android.widget.ToggleButton(ctx); button.setText('HB'); button.setTextOn("HB") button.setTextOff("HB") button.setPadding(10,10,10,10); button.setChecked(toggled); button.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ if(!toggled){ button.setTextOn('HB'); button.setTextColor(Color.GREEN); D('HitBoost [BIND] enabled') button.setBackground(ht) button.setTextSize(15) toggled = true; aimss = true; aimed = true; ambss = true; ambed = true; }else{ button.setTextOff('HB'); button.setTextColor(Color.RED); X('HitBoost [BIND] disabled') button.setBackground(ht1) ambss = false; ambed = false; aimss = false; aimed = false; toggled = false; } button.setChecked(toggled); } })); layout.addView(button); GUIaim = new android.widget.PopupWindow(layout, dip17px(40), dip17px(40)); GUIaim.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); GUIaim.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.LEFT | android.view.Gravity.TOP, 0, 305); }catch(exception){ print(exception); } }})); } function showDPBtn() { ctx.runOnUiThread(new Runnable({ run: function(){ try{ var layout = new LinearLayout(ctx); layout.setOrientation(1); var toggled = false; var button = new android.widget.ToggleButton(ctx); button.setText('D'); button.setPadding(10,10,10,10); button.setTextOn("D") button.setTextOff("D") button.setChecked(toggled); button.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ if(!toggled){ button.setTextOn('D'); button.setTextColor(Color.GREEN); D('Derp [BIND] enabled') button.setBackground(ht) button.setTextSize(15) toggled = true; derpss = true; derped = true; dbss = true; dbed = true; }else{ button.setTextOff("D") button.setTextColor(Color.RED); D('Derp [BIND] disabled') button.setBackground(ht1) dbss = false; dbed = false; derpss = false; derped = false; toggled = false; } button.setChecked(toggled); } })); layout.addView(button); GUIdp = new android.widget.PopupWindow(layout, dip17px(40), dip17px(40)); GUIdp.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); GUIdp.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 0, 250); }catch(exception){ print(exception); } }})); } function showJTPBtn() { ctx.runOnUiThread(new Runnable({ run: function(){ try{ var layout = new LinearLayout(ctx); layout.setOrientation(1); var toggled = false; var button = new android.widget.ToggleButton(ctx); button.setText('J'); button.setPadding(10,10,10,10); button.setTextOn("J") button.setTextOff("J") button.setChecked(toggled); button.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(viewarg){ if(!toggled){ button.setTextOn('J'); button.setTextColor(Color.GREEN); D('JetPack [BIND] enabled') button.setBackground(ht) button.setTextSize(15) toggled = true; lngss = true; lnged = true; jtpbss = true; jtpbed = true; }else{ button.setTextOff("J") button.setTextColor(Color.RED); D('JetPack [BIND] disabled') button.setBackground(ht1) jtpbss = false; jtpbed = false; lngss = false; lnged = false; toggled = false; } button.setChecked(toggled); } })); layout.addView(button); GUIjtp = new android.widget.PopupWindow(layout, dip17px(40), dip17px(40)); GUIjtp.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.DKGRAY)); GUIjtp.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.LEFT | android.view.Gravity.TOP, 20, 150); }catch(exception){ print(exception); } }})); }