abc
This commit is contained in:
parent
4298f85632
commit
d835487616
|
|
@ -41,14 +41,13 @@ function keepAlive(LeavingPlayer)
|
||||||
["PlayerList"] = update(LeavingPlayer),
|
["PlayerList"] = update(LeavingPlayer),
|
||||||
})
|
})
|
||||||
|
|
||||||
game:GetService("HttpService"):PostAsync("https://dungblx.cf/API/KeepAlive", body)
|
return game:GetService("HttpService"):PostAsync("https://dungblx.cf/API/KeepAlive", body)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if not success then
|
if not success then
|
||||||
local message = Instance.new("Message")
|
local Hint = Instance.new("Hint")
|
||||||
message.Text = "Ping Error: " .. result
|
Hint.Text = result
|
||||||
message.Parent = workspace
|
Hint.Parent = workspace
|
||||||
game:GetService("Debris"):AddItem(message, 5)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -128,8 +127,7 @@ end
|
||||||
------------------------------ RENEW GAME JOB SERVICE -------------------------------
|
------------------------------ RENEW GAME JOB SERVICE -------------------------------
|
||||||
|
|
||||||
spawn(function()
|
spawn(function()
|
||||||
while true do
|
while wait(30) do
|
||||||
wait(30)
|
|
||||||
if #game.Players:GetPlayers() == 0 then
|
if #game.Players:GetPlayers() == 0 then
|
||||||
pcall(function() game:HttpGet(baseUrl .. "/arbiter/" .. jobId .. "/kill") end)
|
pcall(function() game:HttpGet(baseUrl .. "/arbiter/" .. jobId .. "/kill") end)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ app.post("/:token", async (request, response) => {
|
||||||
if (!game) return response.status(404).json({ error: "Game is not running" })
|
if (!game) return response.status(404).json({ error: "Game is not running" })
|
||||||
|
|
||||||
const { script } = request.body
|
const { script } = request.body
|
||||||
const jobResponse = await game.Execute(randomUUID(), script)
|
const jobResponse = await game.Execute(randomUUID(), script).catch((_) => _)
|
||||||
|
|
||||||
return response.json({ response: jobResponse })
|
return response.json({ response: jobResponse })
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue