Idk
This commit is contained in:
parent
3204aede8a
commit
75eacef99f
|
|
@ -31,12 +31,25 @@ function update(LeavingPlayer)
|
||||||
end
|
end
|
||||||
|
|
||||||
function keepAlive(LeavingPlayer)
|
function keepAlive(LeavingPlayer)
|
||||||
game:GetService("HttpService"):PostAsync("https://dungblx.cf/API/KeepAlive", game:GetService("HttpService"):JSONEncode({
|
local success, result = pcall(function()
|
||||||
["ServerIP"] = jobId,
|
game:GetService("HttpService").HttpEnabled = true
|
||||||
["PlaceId"] = game.PlaceId,
|
|
||||||
["PlayerCount"] = #game:GetService("Players"):GetPlayers(),
|
local body = game:GetService("HttpService"):JSONEncode({
|
||||||
["PlayerList"] = update(LeavingPlayer),
|
["ServerIP"] = jobId,
|
||||||
}))
|
["PlaceId"] = game.PlaceId,
|
||||||
|
["PlayerCount"] = #game:GetService("Players"):GetPlayers(),
|
||||||
|
["PlayerList"] = update(LeavingPlayer),
|
||||||
|
})
|
||||||
|
|
||||||
|
game:GetService("HttpService"):PostAsync("https://dungblx.cf/API/KeepAlive", body)
|
||||||
|
end)
|
||||||
|
|
||||||
|
if not success then
|
||||||
|
local message = Instance.new("Message")
|
||||||
|
message.Text = "Ping Error: " .. result
|
||||||
|
message.Parent = workspace
|
||||||
|
game:GetService("Debris"):AddItem(message, 5)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------END UTILITY FUNCTIONS -------------------------
|
-----------------------------------END UTILITY FUNCTIONS -------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue