ThreadManager = luajava.bindClass("android.ext.rx") LinearLayout = luajava.bindClass("android.widget.LinearLayout") Button = luajava.bindClass("android.widget.Button") ScrollView = luajava.bindClass("android.widget.ScrollView") SeekBar = luajava.bindClass("android.widget.SeekBar") Gravity = luajava.bindClass("android.view.Gravity") BaseActivity = luajava.bindClass("android.ext.ar") Tools = luajava.bindClass("android.ext.Tools") Build = luajava.bindClass("android.os.Build") Orientation = luajava.bindClass("android.graphics.drawable.GradientDrawable$Orientation") GradientDrawable = luajava.bindClass("android.graphics.drawable.GradientDrawable") MotionEvent = luajava.bindClass("android.view.MotionEvent") ImageView = luajava.bindClass("android.widget.ImageView") Switch = luajava.bindClass("android.widget.Switch") TextView = luajava.bindClass("android.widget.TextView") Context = Tools:e():getApplicationContext() context = Tools:e() WindowManager = luajava.bindClass("android.view.WindowManager") window = Context:getSystemService("window") PixelFormat = luajava.bindClass("android.graphics.PixelFormat") activity = luajava.bindClass("android.app.Activity") function ShortcutKey(buju1,buju4,buju2,text,textColor,textsize,function1) buju4 = layoutParams1(buju4,175,115,300,500) buju1 = luajava.new(TextView,context) buju1:setText('\n> '..text) buju1:setTextColor(textColor) buju1:setTextSize(textsize) buju2 = luajava.new(LinearLayout,context) buju2:setOrientation(LinearLayout.VERTICAL) buju2:addView(buju1) local time = 0 if _ENV[text] then jianbianshili(0xFF00FFFF,0xFFF58F98,100,buju2) end if not _ENV[text] then jianbianshili(0xFFFFFFFF,0xFFFFFFFF,100,buju2) end if _ENV[text] == nil then _ENV[text] = false jianbianshili(0xFFFFFFFF,0xFFFFFFFF,100,buju2) end buju2:setOnTouchListener(luajava.createProxy("android.view.View$OnTouchListener",{ onTouch = function (v,e) if e:getAction() == MotionEvent.ACTION_DOWN then time = os.clock() firstX = e:getRawX() firstY = e:getRawY() wmX = buju4.x wmY = buju4.y elseif e:getAction() == MotionEvent.ACTION_MOVE then dx = e:getRawX() - firstX dy = e:getRawY() - firstY buju4.x = wmX + dx buju4.y = wmY + dy window:updateViewLayout(buju2,buju4) elseif e:getAction() == MotionEvent.ACTION_UP then local pressDuration = os.clock() - time if pressDuration >= 0.01 and pressDuration <= 0.3 then _ENV[text] = not _ENV[text] if _ENV[text] then jianbianshili(0xFF00FFFF,0xFFF58F98,100,buju2) buju1:setText('\n> '..text) gg.toast('['..text..'] > 开启') pcall(func1) else jianbianshili(0xFFFFFFFF,0xFFFFFFFF,100,buju2) buju1:setText('\n< '..text) gg.toast('['..text..'] > 关闭') end end end return true end, })) Runnable = luajava.createProxy("java.lang.Runnable",{ run = function () window:addView(buju2,buju4) end, }) ThreadManager:a(Runnable) _ENV[text..'View'] = buju2 end function layoutParams1(name,x,y,s,a) name = luajava.new(WindowManager.LayoutParams) if Build.VERSION.SDK_INT >= 26 then name.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY else name.type = WindowManager.LayoutParams.TYPE_PHONE end name.format = PixelFormat.RGBA_8888 name.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE name.gravity = Tonumber(Gravity.LEFT) | Tonumber(Gravity.TOP) name.x = s name.y = a name.width = WindowManager.LayoutParams.WRAP_CONTENT name.height = WindowManager.LayoutParams.WRAP_CONTENT name.width = x name.height = y return name end function jianbianshili(color,color2,r,locd) local gradientDrawable = luajava.new(GradientDrawable,context) gradientDrawable:setGradientType("LINEAR_GRADIENT") gradientDrawable:setOrientation(luajava.bindClass("android.graphics.drawable.GradientDrawable$Orientation").TL_BR) locd:setBackgroundDrawable(gradientDrawable) gradientDrawable:setShape(GradientDrawable.RECTANGLE) gradientDrawable:setCornerRadii({ r, r, r, r, r, r, r, r }) local amax = color local bmax = color2 colors = {amax,bmax} gradientDrawable:setColors(colors) end gg.setVisible(false) AutoJump, KillAura = false, true ShortcutKey(0,0,0,'KillAura', 0xFF000000, 17) ShortcutKey(0,0,0,'AutoJump', 0xFF000000, 17) gg.sleep(5000) window:removeView(KillAuraView) window:removeView(AutoJumpView)