#Script Hack.lua
#Script Hack.lua
function Main()
if read_file(gg.EXT_STORAGE.."/SaveUser.DieuXL") ~= nil and
string.len(read_file(gg.EXT_STORAGE.."/SaveUser.DieuXL")) > 2 then
Choice = gg.choice({"➤ Vào Kịch Bản","➤ Đăng Xuất"})
if not Choice then
return
end
if Choice == 1 then
__ = read_file(gg.EXT_STORAGE.."/SaveUser.DieuXL")
ResponseContent = MakeRequest(LoginURL,__)
Data = split(ResponseContent,"{SeParator}{SeParator}{Separator}")
gg.alert(Data[1])
load(Data[2])()
return;
else
WriteText(gg.EXT_STORAGE.."/SaveUser.DieuXL","")
end
end
Prompt = gg.prompt({"Tài Khoản","Mật Khẩu"},nil,{"text","text"})
if not Prompt then
return
end
if Prompt[3] then
return
end
TempLogin = JSONStringify({"Username",Prompt[1],"Password",Prompt[2]})
ResponseContent = MakeRequest(LoginURL,TempLogin)
Data = split(ResponseContent,"{SeParator}{SeParator}{Separator}")
if #Data >1 then
if read_file(gg.EXT_STORAGE.."/SaveUser.DieuXL") == nil or
string.len(read_file(gg.EXT_STORAGE.."/SaveUser.DieuXL")) < 2 then
WriteText(gg.EXT_STORAGE.."/SaveUser.DieuXL",TempLogin)
end
gg.alert(Data[1])
if not Data[2] then
Main()
end
load(Data[2])()
else
load(Data[1])()
Main()
end
end
Main()