Advertisement
Al_Tasin

Script Tool

Apr 30th, 2020
559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.98 KB | None | 0 0
  1. Lang = {
  2. "sᴇʟᴇᴄɪᴏɴᴇ ᴏ ᴀʀǫᴜɪᴠᴏ",
  3. "sᴇʟᴇᴄᴛ ғɪʟᴇ",
  4. "⚠ᴇʀʀᴏ⚠\nᴇsᴄᴏʟʜᴀʀ ᴜᴍ ᴀʀǫᴜɪᴠᴏ ᴠᴀʟɪᴅᴏ",
  5. "⚠ᴇʀʀᴏʀ⚠\nᴄʜᴏᴏsᴇ ᴀ ᴠᴀʟɪᴅ ғɪʟᴇ",
  6. "❌ᴀᴅc ᴀɴᴛɪ-ʀᴇɴᴏᴍᴇᴀʀ",
  7. "❌ᴀᴅᴅ ᴀɴᴛɪ-ʀᴇɴᴀᴍᴇ",
  8. "❌ᴀᴅc ʟᴏɢɪɴ",
  9. "❌ᴀᴅᴅ ʟᴏɢɪɴ",
  10. "❌ᴀᴅc ᴇxᴘɪʀᴀçᴀᴏ",
  11. "❌ᴀᴅᴅ ᴇxᴘɪʀᴀᴛɪᴏɴ",
  12. "❌ᴀᴅc ɪɴғᴏʀᴍᴀçᴏᴇs ᴅᴏ ᴀᴘᴘ",
  13. "❌ᴀᴅᴅ ᴀᴘᴘ ɪɴғᴏ",
  14. "❌ᴀᴅc ᴄᴀʀʀᴇɢᴀʀ",
  15. "❌ᴀᴅᴅ ʟᴏᴀᴅɪɴɢ",
  16. "🔁ᴀᴅc ᴍᴇɴsᴀɢᴇᴍ ɴᴏ ɪɴɪᴄɪᴏ",
  17. "🔁ᴀᴅᴅ ᴍᴇssᴀɢᴇ ᴀᴛ sᴛᴀʀᴛᴜᴘ",
  18. "ᴀᴜᴛᴏᴍᴀᴛɪᴄᴏ",
  19. "ᴀᴜᴛᴏᴍᴀᴛɪᴄ",
  20. "ᴄᴜsᴛᴏᴍɪᴢᴀʀ",
  21. "ᴄᴜsᴛᴏᴍ",
  22. "❌ᴜᴍᴀ ʟɪɴʜᴀ",
  23. "❌ᴏɴᴇ ʟɪɴᴇ",
  24. "⚠ғᴇʀʀᴀᴍᴇɴᴛᴀ ᴊᴀ ᴀᴅɪᴄɪᴏɴᴀᴅᴀ⚠",
  25. "⚠ᴛᴏᴏʟ ᴀʟʀᴇᴀᴅʏ ᴀᴅᴅᴇᴅ⚠",
  26. "ɴᴏᴍᴇ ᴅᴏ sᴄʀɪᴘᴛ",
  27. "sᴄʀɪᴘᴛ ɴᴀᴍᴇ",
  28. "sᴇɴʜᴀ",
  29. "ᴘᴀssᴡᴏʀᴅ",
  30. "ᴅᴀᴛᴀ",
  31. "ᴅᴀᴛᴇ",
  32. "ᴅᴀᴛᴀ ɪɴᴠᴀʟɪᴅᴀ",
  33. "ɪɴᴠᴀʟɪᴅ ᴅᴀᴛᴇ",
  34. "ʙᴀʀʀᴀ ᴅᴇ ᴘʀᴏɢʀᴇssᴏ",
  35. "ᴘʀᴏɢʀᴇssʙᴀʀ",
  36. "ᴘᴏʀᴄᴇɴᴛᴀɢᴇᴍ",
  37. "ᴘᴇʀᴄᴇɴᴛᴀɢᴇ",
  38. "💾sᴀʟᴠᴀʀ ᴀʀǫᴜɪᴠᴏ",
  39. "💾sᴀᴠᴇ ғɪʟᴇ",
  40. "ɴᴏᴍᴇ ᴅᴏ ᴀʀǫᴜɪᴠᴏ",
  41. "ɴᴀᴍᴇ ғɪʟᴇ"
  42. }
  43.  
  44. Menu = {}
  45. Limit = {}
  46. FunctionLevel = {}
  47. SetLang = {}
  48. FileContent = nil
  49. file_name= nil
  50. OneLine = false
  51. Dir  = nil
  52.  
  53. function GetMenuToArray(MsM)
  54. array = {} array["name"] ={} array["Title"] = {} array["function"] = {} for key,value in pairs(MsM) do  if tonumber(key)  == 1 then array["Title"] = value else if type(value) == "string" then array["name"][#array["name"] + 1] = value end if type(value) == "function" then array["function"][#array["function"] + 1] = value end end end return array
  55. end
  56. function OneLinee(Index)
  57.  
  58. OneLine = true
  59. Menu["name"][Index] = Menu["name"][Index]:gsub("❌","✔")
  60. Limit[Index] = true
  61.  
  62. end
  63. function Add_AppInfo(Index)
  64.  
  65.  
  66. FunctionLevel[6] = 'gg.alert("========App info========\\nApp Name: "..gg.getTargetInfo()["name"].."\\nApp Version: "..gg.getTargetInfo()["versionName"].."\\nPackage Name: "..gg.getTargetInfo()["packageName"].."\\nInstallation Date: "..os.date("%x", gg.getTargetInfo()["firstInstallTime"]).."\\nLast Update: "..os.date("%x", gg.getTargetInfo()["lastUpdateTime"]).."\\n=======================")'
  67.  
  68. Menu["name"][Index] = Menu["name"][Index]:gsub("❌","✔")
  69. Limit[Index] = true
  70. return
  71. end
  72. function Add_Expiration(Index)
  73. local Function = 'Check_Expiration = os.time({year=Year, month=Month, day=Day}) >= os.time() or (function() gg.alert("⚠EXPIRED⚠\\n Script expired in: Day/Month/Year"); while true do os.exit() end end)()'
  74.  
  75. Choice  = gg.choice({SetLang[10]}) or nil
  76. if not Choice then
  77. return
  78. end
  79. if Choice == 1 then
  80. Prompt = gg.prompt({SetLang[15]},{"00/00/0000"},{"text"})or os.exit()
  81. if not Prompt then
  82. return
  83. end
  84. Date = {}
  85. for v  in (Prompt[1].."/"):gmatch("(%d.-)/") do
  86.  
  87. table.insert(Date,tonumber(v))
  88. end
  89. if #Date  < 3   then
  90. gg.alert(SetLang[16])
  91. return
  92. end
  93. for x = 1, 2 do
  94.  
  95. Date[x] = (function(fix) if tostring(fix):len()  < 2 then return "0"..fix end return fix end)(Date[x])
  96.  
  97. end
  98. Function = Function:gsub("Day",Date[1]):gsub("Month",Date[2]):gsub("Year",Date[3])
  99.  
  100.  
  101. end
  102.  
  103. FunctionLevel[3] = Function
  104. Menu["name"][Index] = Menu["name"][Index]:gsub("❌","✔")
  105. Limit[Index] = true
  106. end
  107.  
  108. function Add_Message()
  109. Function  = 'MessageTool = gg.alert([[MESSAGE]])'
  110. Choice  = gg.choice({SetLang[10]}) or nil
  111. if not Choice then
  112. return
  113. end
  114. if Choice == 1 then
  115. Prompt = gg.prompt({"ᴍᴇɴsᴀɢᴇᴍ"},{""},{"text"})or os.exit()
  116. if not Prompt then
  117. return
  118. end
  119. Function  = Function:gsub("MESSAGE",Prompt[1])
  120. end
  121. FunctionLevel[1] =  FunctionLevel[1] or {}
  122. table.insert(FunctionLevel[1],Function)
  123.  
  124.  
  125. end
  126.  
  127. function Add_Loading(Index)
  128. local Function = 'ProgressBar = "║░░░░░░░░░░░░░░░║";for x = 1,15,1 do gg.sleep(500) ProgressBar = ProgressBar:gsub("░","▓",1);gg.toast(ProgressBar) end gg.toast("Loaded")'
  129. local Function2  = 'for x = 20,100,100/5 do gg.sleep(500);gg.toast("⌛Loading ["..x.."%]") end '
  130.  
  131. local Choice = gg.choice({SetLang[9]}) or nil
  132. if not Choice then
  133. return
  134. end
  135. if Choice == 1 then
  136. local Method = gg.choice({SetLang[17],SetLang[18]}) or nil
  137. if not Method then
  138. return
  139. end
  140. if Method == 1 then
  141. FunctionLevel[4] = Function
  142.  
  143. else
  144.  
  145. FunctionLevel[4] = Function2
  146. end
  147. end
  148.  
  149. Menu["name"][Index] = Menu["name"][Index]:gsub("❌","✔")
  150. Limit[Index] = true
  151. end
  152.  
  153. function Add_Login(Index)
  154.  
  155. local Function = 'Check_Login1 = gg.prompt({"⚠Enter Password⚠"},nil,{"text"}) or (function() while true do os.exit() end end)();Check_Login2 = Check_Login1[1] == "str" or (function() gg.alert("⚠ERRO⚠\\n➡Password Wrong"); while true do os.exit() end end)()'
  156.  
  157. Choice = gg.choice({SetLang[9],SetLang[10]}) or nil
  158. if not Choice  then
  159. return
  160. end
  161.  if Choice == 1 then
  162.  local Password = tostring(math.random(4994,48884774))
  163.  Function = Function:gsub("str",Password)
  164.  
  165.  end
  166.  if Choice == 2 then
  167.  Prompt = gg.prompt({SetLang[14]},nil,{"text"}) or nil
  168.  if  not Prompt then
  169.  return
  170.  end
  171.  
  172. Function = Function:gsub("str",Prompt[1])
  173.  
  174. end
  175.  
  176. FunctionLevel[5] = Function
  177. Menu["name"][Index] = Menu["name"][Index]:gsub("❌","✔")
  178. Limit[Index] = true
  179. end
  180. function Add_Rename(Index)
  181.  
  182. local Function = 'Rename_Check = gg.getFile():match("[^/]+$")  == "str"  or (function() local __ = gg.alert("⚠DETECTED⚠\\n➡Script name wrong\\n➡Rename script to: str","Copy name");__ = __ or 0; if __ == 1 then gg.copyText("str",false) end while true do os.exit() end end)()'
  183.  
  184. Choice = gg.choice({SetLang[9],SetLang[10]}) or nil
  185. if not Choice  then
  186. return
  187. end
  188.  if Choice == 1 then
  189. Function = Function:gsub("str",file_name)
  190.  end
  191.  if Choice == 2 then
  192.  Prompt = gg.prompt({SetLang[13]},nil,{"text"}) or nil
  193.  if  not Prompt then
  194.  return
  195.  end
  196.  
  197. Function = Function:gsub("str",Prompt[1])
  198. file_name = Prompt[1]
  199. end
  200. FunctionLevel[2] = Function
  201.  
  202. Menu["name"][Index] = Menu["name"][Index]:gsub("❌","✔")
  203. Limit[Index] = true
  204. end
  205.  
  206. function TableOrganize(Table)
  207. t = {}
  208. for x , y in pairs(Table) do
  209. if type(y) == "table" then
  210. for x = 1,#y,1 do
  211. table.insert(t,y[x])
  212. end
  213. else
  214. table.insert(t,y)
  215. end
  216. end
  217. return t
  218. end
  219. function Add_Tools()
  220.  
  221. Choice = gg.choice(Menu["name"],nil,Menu["Title"])
  222. if not Choice then
  223. return
  224. else
  225. if Limit[Choice] then
  226. gg.alert(SetLang[12])
  227.  
  228. else
  229. Menu["function"][Choice](Choice)
  230.  
  231. end
  232.  
  233. end
  234.  
  235.  
  236.  
  237. Add_Tools()
  238. end
  239. function SaveFile()
  240. TableFixed = TableOrganize(FunctionLevel)
  241. Prompt = gg.prompt({SetLang[20]},{file_name},{"Text"}) or nil
  242. if not Prompt then
  243. return
  244. end
  245. file = io.open(Dir..Prompt[1],"w")
  246. Functions = table.concat(TableFixed,"\n")
  247. if OneLine == true then
  248. FileContent =  FileContent:gsub("\n","  ")
  249. Functions = table.concat(TableFixed,"  ")
  250. end
  251. file:write(Functions.." "..FileContent)
  252. file:close()
  253. gg.alert("Saved: "..Dir..Prompt[1])
  254. end
  255. function SerializeOpenFile()
  256.  Dir = gg.prompt({SetLang[1]},{gg.EXT_STORAGE.."/"},{"file"}) or os.exit()
  257. local file = io.open(Dir[1],"r") or ExitErro(SetLang[2])
  258. FileContent = "\n"..file:read("*a")
  259. file:close()
  260. file_name = Dir[1]:match("[^/]+$")
  261. Dir = Dir[1]:match("^.+/")
  262. Menu = GetMenuToArray({"sᴄʀɪᴘᴛs ᴛᴏᴏʟs v1.0(ᴅᴀʀᴋɪɴɢᴄʜᴇᴀᴛᴇʀ)",SetLang[3],Add_Rename,SetLang[4],Add_Login,SetLang[5],Add_Expiration,SetLang[6],Add_AppInfo,SetLang[7],Add_Loading,SetLang[11],OneLinee,SetLang[8],Add_Message,SetLang[19],SaveFile})
  263. Add_Tools()
  264. end
  265.  
  266. function SelectLang()
  267. local Start = gg.choice({"ᴘᴏʀᴛᴜɢᴜᴇs","ᴇɴɢʟɪsʜ"},"","sᴇʟᴇᴄᴛ ʟᴀɴɢᴜᴀɢᴇ") or os.exit()
  268. for x = Start,#Lang, 2 do
  269. table.insert(SetLang,Lang[x])
  270. end
  271. SerializeOpenFile()
  272. end
  273.  
  274. function ExitErro(Erro)
  275. print(Erro);os.exit()
  276. end
  277.  
  278. SelectLang()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement