From 861dd3a8ed8045836a2a64daf583b5fbd196f148 Mon Sep 17 00:00:00 2001 From: kaiserandaxl <122803145+kaiserandaxl@users.noreply.github.com> Date: Wed, 20 Mar 2024 18:02:49 -0500 Subject: [PATCH 1/2] Update Process.lua --- MainModule/Server/Core/Process.lua | 48 +++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/MainModule/Server/Core/Process.lua b/MainModule/Server/Core/Process.lua index 1afa5ac3f6..719aecd27b 100644 --- a/MainModule/Server/Core/Process.lua +++ b/MainModule/Server/Core/Process.lua @@ -317,21 +317,41 @@ return function(Vargs, GetEnv) if type(com) == "string" then if com == `{keys.Special}GET_KEY` then - if keys.LoadingStatus == "WAITING_FOR_KEY" then - Remote.Fire(p, `{keys.Special}GIVE_KEY`, keys.Key) - keys.LoadingStatus = "LOADING" - keys.RemoteReady = true - - AddLog("Script", string.format("%s requested client keys", p.Name)) - --else - --Anti.Detected(p, "kick","Communication Key Error (r10003)") - end + if cliData.Mode == "Get" then + AddLog("RemoteFires", { + Text = `{p.Name} requested key from server`, + Desc = "Player requested key from server", + Player = p; + }) - AddLog("RemoteFires", { - Text = `{p.Name} requested key from server`, - Desc = "Player requested key from server", - Player = p; - }) + if keys.LoadingStatus == "WAITING_FOR_KEY" then + keys.LoadingStatus = "LOADING" + keys.RemoteReady = true + AddLog("Script", string.format("%s requested client keys", p.Name)) + + return keys.Key + --else + --Anti.Detected(p, "kick","Communication Key Error (r10003)") + end + elseif cliData.Mode == "Fire" then + if keys.LoadingStatus == "WAITING_FOR_KEY" then + Remote.Fire(p, `{keys.Special}GIVE_KEY`, keys.Key) + keys.LoadingStatus = "LOADING" + keys.RemoteReady = true + + AddLog("Script", string.format("%s requested client keys", p.Name)) + --else + --Anti.Detected(p, "kick","Communication Key Error (r10003)") + end + + AddLog("RemoteFires", { + Text = `{p.Name} requested key from server`, + Desc = "Player requested key from server", + Player = p; + }) + else + Anti.Detected(p, "kick","Communication Key Error (r10003)") + end elseif rateLimitCheck and string.len(com) <= Remote.MaxLen then local comString = Decrypt(com, keys.Key, keys.Cache) local command = (cliData.Mode == "Get" and Remote.Returnables[comString]) or Remote.Commands[comString] From 51f69bb06ca0506cae96e577824e79128cc59103 Mon Sep 17 00:00:00 2001 From: kaiserandaxl <122803145+kaiserandaxl@users.noreply.github.com> Date: Wed, 20 Mar 2024 18:06:22 -0500 Subject: [PATCH 2/2] Update Core.lua --- MainModule/Client/Core/Core.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MainModule/Client/Core/Core.lua b/MainModule/Client/Core/Core.lua index a6162ea4b6..d961346940 100644 --- a/MainModule/Client/Core/Core.lua +++ b/MainModule/Client/Core/Core.lua @@ -168,7 +168,12 @@ return function(Vargs, GetEnv) if not Core.Key then log("~! Getting key from server") - Remote.Fire(`{client.DepsName}GET_KEY`) + Core.Key = Remote.Get(`{client.DepsName}GET_KEY`) + if Core.Key then + client.Finish_Loading() + else + Remote.Fire(`{client.DepsName}GET_KEY`) + end end end end