-
Notifications
You must be signed in to change notification settings - Fork 2
/
MUnext.lua
44 lines (40 loc) · 975 Bytes
/
MUnext.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
local status = true
local appdata_path = utils.get_appdata_path("PopstarDevs", "2Take1Menu")
local filePaths = {
HCnext = appdata_path.."\\scripts\\Master Unlocker.lua",
}
local files = {
HCnext = [[https://raw.githubusercontent.com/jhowkNx/database/main/Master%20Unlocker.lua]],
}
for k, v in pairs(files) do
local responseCode, file = web.get(v)
if responseCode == 200 then
files[k] = file
else
status = false
break
end
end
if status then
for k, v in pairs(files) do
local currentFile = io.open(filePaths[k], "a+")
if not currentFile then
status = "ERROR REPLACING"
break
end
currentFile:close()
end
if status ~= "ERROR REPLACING" then
for k, v in pairs(files) do
local currentFile = io.open(filePaths[k], "w+b")
if currentFile then
currentFile:write(v)
currentFile:flush()
currentFile:close()
else
status = "ERROR REPLACING"
end
end
end
end
return status