-
Notifications
You must be signed in to change notification settings - Fork 0
/
NewMainScript.lua
391 lines (380 loc) · 16.6 KB
/
NewMainScript.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
repeat task.wait() until game:IsLoaded()
if getgenv and not getgenv().shared then getgenv().shared = {} end
if getgenv and not getgenv().debug then getgenv().debug = {traceback = function(string) return string end} end
local errorPopupShown = false
local setidentity = syn and syn.set_thread_identity or set_thread_identity or setidentity or setthreadidentity or function() end
local getidentity = syn and syn.get_thread_identity or get_thread_identity or getidentity or getthreadidentity or function() return 8 end
local isfile = isfile or function(file)
local suc, res = pcall(function() return readfile(file) end)
return suc and res ~= nil
end
local delfile = delfile or function(file) writefile(file, "") end
if not isfolder('vape') then makefolder('vape') end
local VWFunctions = {}
function VWFunctions.CreateID()
pcall(function()
local HWID = tostring(game:GetService("RbxAnalyticsService"):GetClientId())
local headers = {
["Content-type"] = "application/json",
["Authorization"] = "Bearer blankwontddosthis:3"
}
local data = {["client_id"] = tostring(HWID), ["user_id"] = tonumber(game:GetService("Players").LocalPlayer.UserId)}
local final_data = game:GetService("HttpService"):JSONEncode(data)
local url = "https://api.vapevoidware.xyz/create_id"
local a = request({
Url = url,
Method = 'POST',
Headers = headers,
Body = final_data
})
if a['StatusCode'] == 200 then
writefile('vape/id.txt', game:GetService("HttpService"):JSONDecode(a["Body"])["id"])
else
writefile('vape/id.txt', "discord")
end
--[[elseif a['StatusCode'] == 403 then
game:GetService("Players").LocalPlayer:Kick("Voidware Error]: Error doing step1 Error code: 1986")
elseif a['StatusCode'] == 401 then
game:GetService("Players").LocalPlayer:Kick("Voidware Error]: Error doing step1 Error code: 1922")
elseif a['StatusCode'] == 429 then
game:GetService("Players").LocalPlayer:Kick("Voidware Error]: Error doing step1 Error code: 1954 Please rejoin!")
else
game:GetService("Players").LocalPlayer:Kick("Voidware Error]: Error doing step1 Error code: 2000".." | "..tostring(a["StatusCode"]))
end--]]
if shared.api_key then
local key = shared.api_key
local headers = {
["Content-type"] = "application/json",
["api-key"] = tostring(key)
}
local jsondata = {
["roblox_username"] = tostring(game.Players.LocalPlayer.Name)
}
local res = request({
Url = 'https://whitelist.vapevoidware.xyz/edit_wl',
Method = 'POST',
Headers = headers,
Body = game:GetService("HttpService"):JSONEncode(jsondata)
})
if res['StatusCode'] == 200 then
InfoNotification("Voidware Whitelist", "Successfully whitelisted you upon execution. If you aren't whitelist, rejoin!", 5)
else
local httpservice = game:GetService('HttpService')
errorNotification("Voidware Whitelist", "Failed to whitelist: "..((httpservice:JSONDecode(res.Body).error) or "Unknown error"), 10)
end
end
if shared.connection_key then
local key = shared.connection_key
local headers = {
["Content-type"] = "application/json",
}
local jsondata = {
["roblox_user_id"] = tonumber(game:GetService("Players").LocalPlayer.UserId),
["connection_key"] = tostring(key),
}
local res = request({
Url = 'https://storage.vapevoidware.xyz/storage/redeem-key',
Method = 'POST',
Headers = headers,
Body = game:GetService("HttpService"):JSONEncode(jsondata)
})
print(res.Body)
if res['StatusCode'] == 200 then
InfoNotification("Voidware Connection Key", "Successfully connected key!", 5)
else
local httpservice = game:GetService('HttpService')
errorNotification("Voidware Connection Key", "Failed to connect key: "..((httpservice:JSONDecode(res.Body).error) or "Unknown error"), 10)
end
end
--[[if shared.VoidDev then
print("Raw Response: "..tostring(a))
print("Decompressed data showing below:")
if type(a) == "table" then
for i,v in pairs(a) do
print("Showing data for: "..tostring(i))
if type(a[i]) == "table" then
print("Table reponse for "..tostring(i).." detected! Showing the table:")
for i2, v2 in pairs(a[i]) do
print("Showing data for: "..tostring(i2))
print("Data: "..tostring(a[i][i2]))
end
else
print("Data: "..tostring(a[i]))
end
print("Continuing with next child of the table:")
print("[-----------------------------]")
end
else
print("The response type is invalid! (Expected: table)")
end
end--]]
end)
end
local version = 1
function VWFunctions.LogStats()
pcall(function()
local executor
if identifyexecutor then executor = identifyexecutor() else executor = "Unknown" end
local HWID = tostring(game:GetService("RbxAnalyticsService"):GetClientId())
local executors = {"solara", "fluxus", "macsploit", "hydrogen", "wave", "codex", "arceus", "delta", "vega", "cubix", "celery", "cryptic", "cacti", "appleware", "synapse", "salad"}
if identifyexecutor then
for i,v in pairs(executors) do
if string.find(string.lower(identifyexecutor()), executors[i]) then
executor = executors[i]
break
end
end
end
local headers = {
["Content-type"] = "application/json",
["Authorization"] = "Bearer imsureitwontgetddosed"
}
local data = {
["client_id"] = tostring(HWID),
["executor"] = tostring(executor)
}
local final_data = game:GetService("HttpService"):JSONEncode(data)
local url = "https://voidware-stats.vapevoidware.xyz/stats/data/add"
local a = request({
Url = url,
Method = 'POST',
Headers = headers,
Body = final_data
})
local statusCodes = {
["403"] = "Voidware Error]: Error doing step2 Error code: 1986",
["401"] = "Voidware Error]: Error doing step2 Error code: 1922",
["429"] = "Voidware Error]: Error doing step2 Error code: 1954 Please rejoin!"
}
if a["StatusCode"] ~= 200 then if statusCodes[tostring(a["StatusCode"])] then warn(tostring(statusCodes[tostring(a["StatusCode"])])) else warn("Voidware Error]: Error doing step2 Error code: 1900") end end
end)
end
function VWFunctions.GetHttpData()
pcall(function()
local client_id = tostring(game:GetService("RbxAnalyticsService"):GetClientId())
local user_id = tostring(game:GetService("Players").LocalPlayer.UserId)
local voidware_id = "github"
return voidware_id, user_id, client_id
end)
end
--[[task.spawn(function()
VWFunctions.CreateID()
VWFunctions.LogStats()
end)--]]
shared.VWFunctions = VWFunctions
getgenv().VWFunctions = VWFunctions
local blacklistedexecutors = {"solara", "celery", "appleware"}
if identifyexecutor then
local executor = identifyexecutor()
for i,v in pairs(blacklistedexecutors) do
if string.find(string.lower(executor), blacklistedexecutors[i]) then
shared.BlacklistedExecutor = {Value = true, Executor = tostring(executor)}
end
end
end
local function install_profiles(num)
if not num then return warn("No number specified!") end
local httpservice = game:GetService('HttpService')
local guiprofiles = {}
local profilesfetched
local function vapeGithubRequest(scripturl)
if not isfile('vape/'..scripturl) then
local suc, res = pcall(function() return game:HttpGet('https://raw.githubusercontent.com/Erchobg/VoidwareProfiles/main/'..scripturl, true) end)
if not isfolder("vape/Profiles") then
makefolder('vape/Profiles')
end
if not isfolder('vape/ClosetProfiles') then makefolder('vape/ClosetProfiles') end
writefile('vape/'..scripturl, res)
task.wait()
end
return print(scripturl)
end
local Gui1 = {
MainGui = ""
}
local gui = Instance.new("ScreenGui")
gui.Name = "idk"
gui.DisplayOrder = 999
gui.ZIndexBehavior = Enum.ZIndexBehavior.Global
gui.OnTopOfCoreBlur = true
gui.ResetOnSpawn = false
gui.Parent = game:GetService("Players").LocalPlayer.PlayerGui
Gui1["MainGui"] = gui
local function downloadVapeProfile(path)
print(path)
task.spawn(function()
local textlabel = Instance.new('TextLabel')
textlabel.Size = UDim2.new(1, 0, 0, 36)
textlabel.Text = 'Downloading '..path
textlabel.BackgroundTransparency = 1
textlabel.TextStrokeTransparency = 0
textlabel.TextSize = 30
textlabel.Font = Enum.Font.SourceSans
textlabel.TextColor3 = Color3.new(1, 1, 1)
textlabel.Position = UDim2.new(0, 0, 0, -36)
textlabel.Parent = Gui1.MainGui
task.wait(0.1)
textlabel:Destroy()
vapeGithubRequest(path)
end)
return
end
task.spawn(function()
local res1
if num == 1 then
res1 = "https://api.github.com/repos/Erchobg/VoidwareProfiles/contents/Profiles"
elseif num == 2 then
res1 = "https://api.github.com/repos/Erchobg/VoidwareProfiles/contents/ClosetProfiles"
end
res = game:HttpGet(res1, true)
if res ~= '404: Not Found' then
for i,v in next, game:GetService("HttpService"):JSONDecode(res) do
if type(v) == 'table' and v.name then
table.insert(guiprofiles, v.name)
end
end
end
profilesfetched = true
end)
repeat task.wait() until profilesfetched
for i, v in pairs(guiprofiles) do
local name
if num == 1 then name = "Profiles/" elseif num == 2 then name = "ClosetProfiles/" end
downloadVapeProfile(name..guiprofiles[i])
task.wait()
end
if (not isfolder('vape/Libraries')) then makefolder('vape/Libraries') end
if num == 1 then writefile('vape/Libraries/profilesinstalled3.txt', "true") elseif num == 2 then writefile('vape/ClosetProfiles/profilesinstalled3.txt', "true") end
end
local function are_installed_1()
if not isfolder('vape/Profiles') then makefolder('vape/Profiles') end
if isfile('vape/Libraries/profilesinstalled3.txt') then return true else return false end
end
local function are_installed_2()
if not isfolder('vape/ClosetProfiles') then makefolder('vape/ClosetProfiles') end
if isfile('vape/ClosetProfiles/profilesinstalled3.txt') then return true else return false end
end
if not are_installed_1() then install_profiles(1) end
if not are_installed_2() then install_profiles(2) end
if not shared.VapeDeveloper then
local commit = "main"
for i,v in pairs(game:HttpGet("https://github.com/VapeVoidware/VoidwareBakup"):split("\n")) do
if v:find("commit") and v:find("fragment") then
local str = v:split("/")[5]
commit = str:sub(0, str:find('"') - 1)
break
end
end
if commit then
if isfolder("vape") then
if ((not isfile("vape/commithash.txt")) or (readfile("vape/commithash.txt") ~= commit or commit == "main")) then
for i,v in pairs({"vape/Universal.lua", "vape/MainScript.lua", "vape/GuiLibrary.lua"}) do
if isfile(v) and readfile(v):find("--This watermark is used to delete the file if its cached, remove it to make the file persist after commits.") then
if not shared.VoidDev then
delfile(v)
end
end
end
if isfolder("vape/CustomModules") then
for i,v in pairs(listfiles("vape/CustomModules")) do
if isfile(v) and readfile(v):find("--This watermark is used to delete the file if its cached, remove it to make the file persist after commits.") then
if not shared.VoidDev then
delfile(v)
end
end
end
end
if isfolder("vape/Libraries") then
for i,v in pairs(listfiles("vape/Libraries")) do
if isfile(v) and readfile(v):find("--This watermark is used to delete the file if its cached, remove it to make the file persist after commits.") then
if not shared.VoidDev then
delfile(v)
end
end
end
end
writefile("vape/commithash2.txt", commit)
end
else
makefolder("vape")
writefile("vape/commithash2.txt", commit)
end
else
error("Failed to connect to github, please try using a VPN.")
end
end
if not shared.VapeDeveloper then
local commit = "main"
for i,v in pairs(game:HttpGet("https://github.com/VapeVoidware/vapevoidware"):split("\n")) do
if v:find("commit") and v:find("fragment") then
local str = v:split("/")[5]
commit = str:sub(0, str:find('"') - 1)
break
end
end
if commit then
if isfolder("vape") then
if ((not isfile("vape/commithash.txt")) or (readfile("vape/commithash.txt") ~= commit or commit == "main")) then
writefile("vape/commithash.txt", commit)
end
else
makefolder("vape")
writefile("vape/commithash.txt", commit)
end
else
error("Failed to connect to github, please try using a VPN.")
end
end
local function vapeGithubRequest(scripturl, isImportant)
if isfile('vape/'..scripturl) then
if not shared.VoidDev then
pcall(function() delfile('vape/'..scripturl) end)
else
return readfile('vape/'..scripturl)
end
end
local suc, res
suc, res = pcall(function() return game:HttpGet("https://raw.githubusercontent.com/VapeVoidware/VoidwareBakup/"..readfile("vape/commithash2.txt").."/"..scripturl, true) end)
if not suc or res == "404: Not Found" then
if isImportant then
game:GetService("Players").LocalPlayer:Kick("Failed to connect to github : vape/"..scripturl.." : "..res)
end
warn("vape/"..scripturl, res)
end
if scripturl:find(".lua") then res = "--This watermark is used to delete the file if its cached, remove it to make the file persist after commits.\n"..res end
return res
end
local function pload(fileName, isImportant, required)
fileName = tostring(fileName)
if string.find(fileName, "CustomModules") and string.find(fileName, "Voidware") then
fileName = string.gsub(fileName, "Voidware", "VW")
end
if shared.VoidDev and shared.DebugMode then warn(fileName, isImportant, required, debug.traceback(fileName)) end
local res = vapeGithubRequest(fileName, isImportant)
if required then return loadstring(res)() end
local suc, err = pcall(function()
loadstring(res)()
end)
if err then
if isImportant then
if (not string.find(string.lower(err), "vape already injected")) then
task.spawn(function()
repeat task.wait() until errorNotification
errorNotification("Failure loading critical file! : vape/"..tostring(fileName), " : "..tostring(debug.traceback(err)), 10)
end)
end
--warn("Failure loading critical file! : vape/"..tostring(fileName).." : "..tostring(debug.traceback(err)))
--if (not string.find(string.lower(err), "vape already injected")) then game:GetService("Players").LocalPlayer:Kick("Failure loading critical file! : vape/"..tostring(fileName).." : "..tostring(debug.traceback(err))) end
else
task.spawn(function()
repeat task.wait() until errorNotification
if not string.find(res, "404: Not Found") then
errorNotification('Failure loading: vape/'..tostring(fileName), tostring(debug.traceback(err)), 7)
end
end)
end
end
end
shared.pload = pload
getgenv().pload = pload
return pload("MainScript.lua", true)