-----------------------------------------------------------------------------------------

function split(szFullString, szSeparator) 
local nFindStartIndex = 1 
local nSplitIndex = 1 
local nSplitArray = {} 
while true do 
local nFindLastIndex = string.find
(szFullString, szSeparator, nFindStartIndex) 
if not nFindLastIndex then 
nSplitArray[nSplitIndex] = 
string.sub(szFullString, nFindStartIndex, string.len
(szFullString)) 
break end 
nSplitArray[nSplitIndex] = string.sub
(szFullString, nFindStartIndex, nFindLastIndex - 1) 
nFindStartIndex = nFindLastIndex + string.len
(szSeparator) 
nSplitIndex = nSplitIndex + 1 end return 
nSplitArray end 
function xgxc(szpy, qmxg) 
for x = 1, #(qmxg) do 
xgpy = szpy + qmxg[x]["offset"] 
xglx = qmxg[x]["type"] 
xgsz = qmxg[x]["value"] 
xgdj = qmxg[x]["freeze"] 
if xgdj == nil or xgdj == "" then 
gg.setValues({[1] 
= {address = xgpy, flags = xglx, value = xgsz}}) 
else 
gg.addListItems({[1] 
= {address = xgpy, flags = xglx, 
freeze = xgdj, value = xgsz}}) end 
xgsl = xgsl + 1 xgjg = true end end 
function xqmnb(qmnb) 
gg.clearResults() 
gg.setRanges(qmnb[1]["memory"]) 
gg.searchNumber(qmnb[3]["value"], qmnb[3]["type"]) 
if gg.getResultCount() == 0 then 
gg.toast(qmnb[2]["name"] .. "开启失败") 
else 
gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"])
gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) 
gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) 
if gg.getResultCount() == 0 then 
gg.toast(qmnb[2]["name"] .. "开启失败") 
else 
        sl = gg.getResults(999999) 
sz = gg.getResultCount() 
        xgsl = 0 if sz > 999999 then 
sz = 999999 end for i = 1, sz do 
pdsz = true for v = 4, #(qmnb) do if 
pdsz == true then 
pysz = {} pysz[1] 
= {} pysz[1].address 
= sl[i].address + qmnb[v]["offset"] pysz[1].flags 
= qmnb[v]["type"] 
szpy = gg.getValues(pysz) 
pdpd = qmnb[v]["lv"] .. ";" .. szpy[1].value szpd 
= split(pdpd, ";") tzszpd 
= szpd[1] pyszpd = szpd[2] 
if tzszpd == pyszpd then 
pdjg = true pdsz = true else 
pdjg = false pdsz = false end end end if 
pdjg == true then szpy 
= sl[i].address xgxc(szpy, qmxg) end end 
if xgjg == true then 
gg.toast(qmnb[2]["name"] .. "开启成功,共修改" .. xgsl .. "条数据") 
else 
gg.toast(qmnb[2]["name"] .. "开启失败") 
end 
end 
end 
end
-------配置↑↑↑勿修改-------
-------支持冻结------
-----------------------------------------------------------------------------------------
function Main()
  SN = gg.choice({
  "一键开启",
  "扩大视野关闭",
  "小视野开启",
  "小视野关闭",   
   "锁头像透视开启",
  "锁头像透视关闭",
  "高视角(小型)",
  "高视角(小型关闭)",
  "高视角(中型)",
  "高视角(中型关闭)",
  "高视角(大型)",
  "高视角(大型关闭)",
   "高视角(巨型)",
  "高视角(巨型关闭)",  
"退出脚本"
}, nil, "辅助反馈群:767674587:墨子:收徒")
  if SN == 1 then a() end
  if SN == 2 then b() end
  if SN == 3 then c() end
  if SN == 4 then d() end
  if SN == 5 then e() end
  if SN == 6 then f() end
  
  if SN == 7 then g() end
  if SN == 8 then h() end
    if SN == 9 then i() end
  if SN == 10 then j() end
  if SN == 11 then k() end
  if SN == 12 then l() end
  if SN == 13 then m() end
  if SN == 14 then n() end


  if SN == 15 then os.exit() end XGCK = -1 end
     

function a()
qmnb = {
{["memory"] = gg.REGION_C_ALLOC},
{["name"] ="视野扩大开启"},
{["value"] =1089, ["type"] = 4},
{["lv"] = 257, ["offset"] = -4, ["type"] = 4},
{["lv"] = 9216, ["offset"] = 4, ["type"] = 4},
{["lv"] = 33, ["offset"] = -8, ["type"] = 4},
 }
qmxg = {
{["value"] =1, ["offset"] = 20, ["type"] = 4},
}
xqmnb(qmnb)
qmnb = {
{["memory"] = gg.REGION_C_ALLOC},
{["name"] ="小视野开启"},
{["value"] =1114636288, ["type"] = 4},
{["lv"] = 1114898432, ["offset"] = -4, ["type"] = 4},
{["lv"] = 1107645781, ["offset"] = -12, ["type"] = 4},
{["lv"] = 1172156416, ["offset"] = -24, ["type"] = 4},
 }
qmxg = {
{["value"] =1, ["offset"] = 12, ["type"] = 4},
}
xqmnb(qmnb)
gg.clearResults()
	 gg.setRanges(37)
	 gg.searchNumber("13.24429988861", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	 gg.getResults(100)
	 gg.editAll("35.1234567", gg.TYPE_FLOAT)
	 gg.toast("中型高视角开启成功")
	 gg.clearResults()
qmnb = {
{["memory"] = gg.REGION_C_ALLOC},
{["name"] ="锁头像透视开启"},
{["value"] =1082654720, ["type"] = 4},
{["lv"] = 1050253722, ["offset"] = -12, ["type"] = 4},
{["lv"] = 1077936128, ["offset"] = -24, ["type"] = 4},
{["lv"] = 1084227584, ["offset"] = -32, ["type"] = 4},
 }
qmxg = {
{["value"] =1, ["offset"] = -64, ["type"] = 4,["freeze"] = true},
}
xqmnb(qmnb)


end


function b()
qmnb = {
{["memory"] = gg.REGION_C_ALLOC},
{["name"] ="视野扩大关闭"},
{["value"] =1089, ["type"] = 4},
{["lv"] = 257, ["offset"] = -4, ["type"] = 4},
{["lv"] = 9216, ["offset"] = 4, ["type"] = 4},
{["lv"] = 33, ["offset"] = -8, ["type"] = 4},
 }
qmxg = {
{["value"] =1050253722, ["offset"] = 20, ["type"] = 4},
}
xqmnb(qmnb)
end

function c()
qmnb = {
{["memory"] = gg.REGION_C_ALLOC},
{["name"] ="小视野开启"},
{["value"] =1114636288, ["type"] = 4},
{["lv"] = 1114898432, ["offset"] = -4, ["type"] = 4},
{["lv"] = 1107645781, ["offset"] = -12, ["type"] = 4},
{["lv"] = 1172156416, ["offset"] = -24, ["type"] = 4},
 }
qmxg = {
{["value"] =1, ["offset"] = 12, ["type"] = 4},
}
xqmnb(qmnb)
gg.clearResults()
	 gg.setRanges(37)
	 gg.searchNumber("13.24429988861", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	 gg.getResults(100)
	 gg.editAll("35.1234567", gg.TYPE_FLOAT)
	 gg.toast("中型高视角开启成功")
	 gg.clearResults()

end

function d()
qmnb = {
{["memory"] = gg.REGION_C_ALLOC},
{["name"] ="小视野关闭"},
{["value"] =1114636288, ["type"] = 4},
{["lv"] = 1114898432, ["offset"] = -4, ["type"] = 4},
{["lv"] = 1107645781, ["offset"] = -12, ["type"] = 4},
{["lv"] = 1172156416, ["offset"] = -24, ["type"] = 4},
 }
qmxg = {
{["value"] =0, ["offset"] = 12, ["type"] = 4},
}
xqmnb(qmnb)
end


function e()
qmnb = {
{["memory"] = gg.REGION_C_ALLOC},
{["name"] ="锁头像透视开启"},
{["value"] =1082654720, ["type"] = 4},
{["lv"] = 1050253722, ["offset"] = -12, ["type"] = 4},
{["lv"] = 1077936128, ["offset"] = -24, ["type"] = 4},
{["lv"] = 1084227584, ["offset"] = -32, ["type"] = 4},
 }
qmxg = {
{["value"] =1, ["offset"] = -64, ["type"] = 4,["freeze"] = true},
}
xqmnb(qmnb)
end

function f()
qmnb = {
{["memory"] = gg.REGION_C_ALLOC},
{["name"] ="锁头像透视关闭"},
{["value"] =1082654720, ["type"] = 4},
{["lv"] = 1050253722, ["offset"] = -12, ["type"] = 4},
{["lv"] = 1077936128, ["offset"] = -24, ["type"] = 4},
{["lv"] = 1084227584, ["offset"] = -32, ["type"] = 4},
 }
qmxg = {
{["value"] =1, ["offset"] = -64, ["type"] = 4,["freeze"] = false},
}
xqmnb(qmnb)
end



function g()
	 gg.clearResults()
	 gg.setRanges(37)
	 gg.searchNumber("13.24429988861", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	 gg.getResults(100)
	 gg.editAll("30", gg.TYPE_FLOAT)
	 gg.toast("小型高视角开启成功")
	 gg.clearResults()
end

function h()
gg.clearResults()
	 gg.setRanges(37)
	 gg.searchNumber("25.1234567", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	 gg.getResults(100)
	 gg.editAll("13.24429988861", gg.TYPE_FLOAT)
	 gg.toast("小型高视角关闭成功")
	 gg.clearResults()
end

function i()
gg.clearResults()
	 gg.setRanges(37)
	 gg.searchNumber("13.24429988861", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	 gg.getResults(100)
	 gg.editAll("35.1234567", gg.TYPE_FLOAT)
	 gg.toast("中型高视角开启成功")
	 gg.clearResults()
end

function j()
gg.clearResults()
	 gg.setRanges(37)
	 gg.searchNumber("35.1234567", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	 gg.getResults(100)
	 gg.editAll("13.24429988861", gg.TYPE_FLOAT)
	 gg.toast("中型高视角关闭成功")
	 gg.clearResults()
end


function k()
gg.clearResults()
	 gg.setRanges(37)
	 gg.searchNumber("13.24429988861", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	 gg.getResults(100)
	 gg.editAll("45.1234567", gg.TYPE_FLOAT)
	 gg.toast("大型高视角开启成功")
	 gg.clearResults()
end


function l()
gg.clearResults()
	 gg.setRanges(37)
	 gg.searchNumber("45.1234567", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	 gg.getResults(100)
	 gg.editAll("13.24429988861", gg.TYPE_FLOAT)
	 gg.toast("大型高视角关闭成功")
	 gg.clearResults()
end


function m()
gg.clearResults()
	 gg.setRanges(37)
	 gg.searchNumber("13.24429988861", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	 gg.getResults(100)
	 gg.editAll("55.1234567", gg.TYPE_FLOAT)
	 gg.toast("巨型高视角开启成功")
	 gg.clearResults()
end


function n()
gg.clearResults()
	 gg.setRanges(37)
	 gg.searchNumber("55.1234567", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
	 gg.getResults(100)
	 gg.editAll("13.24429988861", gg.TYPE_FLOAT)
	 gg.toast("巨型高视角关闭成功")
	 gg.clearResults()
end







while true do

  if gg.isVisible(true) then
    XGCK = 1
    gg.setVisible(false)
  end
  gg.clearResults()
  if XGCK == 1 then
    Main()
  end
end
