-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDarkHubV4.lua
More file actions
46 lines (42 loc) · 1.6 KB
/
Copy pathDarkHubV4.lua
File metadata and controls
46 lines (42 loc) · 1.6 KB
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
setclipboard('https://darkhub-v4.maxt.church/')
local Request = http_request or syn and syn.request or request or nil
local CurrentDiscordInvite = isfile('Invite.DARKHUB') and readfile('Invite.DARKHUB') or nil
local Invite = 'kTt5aGCUDd'
if not CurrentDiscordInvite or CurrentDiscordInvite ~= Invite then
if Request then
Request(
{
['Method'] = 'POST',
['Headers'] = {
["origin"] = 'https://discord.com',
["Content-Type"] = "application/json"
},
['Url'] = 'http://127.0.0.1:6463/rpc?v=1',
['Body'] = game:GetService('HttpService'):JSONEncode({cmd="INVITE_BROWSER",args={code=Invite},nonce=game:GetService('HttpService'):GenerateGUID(false):lower()})
}
)
writefile('Invite.DARKHUB',Invite)
end
end
local SupportedGamesJSON = game:GetService("HttpService"):JSONDecode(game:HttpGet('https://raw.githubusercontent.com/RandomAdamYT/DarkHub_V4/main/SupportedGames',true))
local GitHubBase = 'https://raw.githubusercontent.com/RandomAdamYT/DarkHub_V4/main/'
function IsSupported()
for i,v in pairs(SupportedGamesJSON) do
if v == game.GameId then
return true
end
end
return false
end
task.spawn(function()
if IsSupported() then
for i,v in pairs(SupportedGamesJSON) do
if v == game.GameId then
loadstring(game:HttpGet(GitHubBase..i,true))()
return
end
end
else
loadstring(game:HttpGet(GitHubBase..'Universal',true))()
end
end)