-
-
Notifications
You must be signed in to change notification settings - Fork 234
Expand file tree
/
Copy pathProcess.luau
More file actions
210 lines (181 loc) · 6.77 KB
/
Copy pathProcess.luau
File metadata and controls
210 lines (181 loc) · 6.77 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
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
client = nil
service = nil
Pcall = nil
Routine = nil
GetEnv = nil
origEnv = nil
logError = nil
log = nil
--// Processing
return function(Vargs, GetEnv)
local env = GetEnv(nil, {script = script})
setfenv(1, env)
local _G, game, script, getfenv, setfenv, workspace,
getmetatable, setmetatable, loadstring, coroutine,
rawequal, typeof, print, math, warn, error, pcall,
xpcall, select, rawset, rawget, ipairs, pairs,
next, Rect, Axes, os, time, Faces, unpack, string, Color3,
newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor,
NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint,
NumberSequenceKeypoint, PhysicalProperties, Region3int16,
Vector3int16, require, table, type, wait,
Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay =
_G, game, script, getfenv, setfenv, workspace,
getmetatable, setmetatable, loadstring, coroutine,
rawequal, typeof, print, math, warn, error, pcall,
xpcall, select, rawset, rawget, ipairs, pairs,
next, Rect, Axes, os, time, Faces, unpack, string, Color3,
newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor,
NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint,
NumberSequenceKeypoint, PhysicalProperties, Region3int16,
Vector3int16, require, table, type, wait,
Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay
local script = script
local service = Vargs.Service
local client = Vargs.Client
local Anti, Core, Functions, Process, Remote, UI, Variables
local function Init()
UI = client.UI;
Anti = client.Anti;
Core = client.Core;
Variables = client.Variables
Functions = client.Functions;
Process = client.Process;
Remote = client.Remote;
Process.Init = nil;
end
local function RunLast()
Process.RunLast = nil;
end
local function RunAfterLoaded(data)
--// Events
--service.NetworkClient.ChildRemoved:Connect(function() wait(30) client.Anti.Detected("crash", "Network client disconnected") end)
--service.NetworkClient.ChildAdded:Connect(function() client.Anti.Detected("crash", "Network client reconnected?") end)
service.TextChatService.SendingMessage:Connect(service.EventTask("Event: ProcessChat", Process.Chat))
service.Player.CharacterRemoving:Connect(service.EventTask("Event: CharacterRemoving", Process.CharacterRemoving))
service.Player.CharacterAdded:Connect(service.Threads.NewEventTask("Event: CharacterAdded", Process.CharacterAdded))
service.LogService.MessageOut:Connect(Process.LogService) --service.Threads.NewEventTask("EVENT:MessageOut",client.Process.LogService,60))
service.ScriptContext.Error:Connect(Process.ErrorMessage) --service.Threads.NewEventTask("EVENT:ErrorMessage",client.Process.ErrorMessage,60))
--// Get RateLimits
Process.RateLimits = Remote.Get("RateLimits") or Process.RateLimits;
--// Hide TextChatComands
task.defer(function()
if Remote.Get("Variable", "ChatCreateRobloxCommands") then
Process.HandleTextChatCommands()
end
end)
Process.RunAfterLoaded = nil;
end
getfenv().client = nil
getfenv().service = nil
getfenv().script = nil
client.Process = {
Init = Init;
RunLast = RunLast;
RunAfterLoaded = RunAfterLoaded;
TextChatCommands = {};
RateLimits = { --// Defaults; Will be updated with server data at client run
Remote = 0.02;
Command = 0.1;
Chat = 0.1;
RateLog = 10;
};
Remote = function(data, com, ...)
local args = table.pack(...)
Remote.Received += 1
if type(com) == "string" then
if com == `{client.DepsName}GIVE_KEY` then
if not Core.Key then
log("~! Set remote key")
Core.Key = args[1]
log("~! Call Finish_Loading()")
client.Finish_Loading()
end
elseif Core.Key then
local comString = Remote.NewDecrypt(com,Core.Key)
local command = (data.Mode == "Get" and Remote.Returnables[comString]) or Remote.Commands[comString]
if command then
local rets = table.pack(service.TrackTask(`Remote: {comString}`, command, false, args))
if not rets[1] then
logError(rets[2])
else
return table.pack(table.unpack(rets, 2))
end
end
end
end
end;
LogService = function(Message, Type)
--service.FireEvent("Output", Message, Type)
end;
ErrorMessage = function(Message, Trace, Script)
--service.FireEvent("ErrorMessage", Message, Trace, Script)
if Message and Message ~= "nil" and Message ~= "" and (string.find(Message,":: Adonis ::") or string.find(Message,script.Name) or Script == script) then
logError(`{Message} - {Trace}`)
end
end;
Chat = function(msg)
--service.FireEvent("Chat",msg)
if not service.Player or service.Player.Parent ~= service.Players then
Remote.Fire("ProcessChat",msg)
end
end;
CharacterAdded = function(...)
service.Events.CharacterAdded:Fire(...)
task.wait()
UI.GetHolder()
end;
CharacterRemoving = function()
if Variables.UIKeepAlive then
for ind,g in client.GUIs do
if g.Class == "ScreenGui" or g.Class == "GuiMain" or g.Class == "TextLabel" then
if not (g.Object:IsA("ScreenGui") and not g.Object.ResetOnSpawn) and g.CanKeepAlive then
g.KeepAlive = true
g.KeepParent = g.Object.Parent
g.Object.Parent = nil
elseif not g.CanKeepAlive then
pcall(g.Destroy, g)
end
end
end
end
if Variables.ChatEnabled then
service.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
end
if Variables.PlayerListEnabled then
service.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
end
local textbox = service.UserInputService:GetFocusedTextBox()
if textbox and service.CheckProperty(textbox, "ReleaseFocus") then
textbox:ReleaseFocus()
end
service.Events.CharacterRemoving:Fire()
end;
HandleTextChatCommands = function()
local data = Remote.Get("PlayerData")
local adminLevel, isDonor = data.AdminLevel, data.isDonor
if service.TextChatService and service.TextChatService.ChatVersion == Enum.ChatVersion.TextChatService then
local function onCommandAdded(command)
if not command:IsA("TextChatCommand") then
return
elseif string.sub(command.Name, 1, 7) ~= "Adonis_" then
return
elseif not Process.TextChatCommands[command.Name] then
Process.TextChatCommands[command.Name] = command
elseif Process.TextChatCommands[command.Name] ~= command then
Process.TextChatCommands[command.Name]:Destroy()
Process.TextChatCommands[command.Name] = command
end
local commandLevel = command:GetAttribute("AdminLevel")
if type(commandLevel) == "number" and commandLevel > adminLevel or commandLevel == "Donors" and not isDonor then
command.Parent = nil
end
end
for _, v in service.TextChatService:GetDescendants() do
onCommandAdded(v)
end
service.TextChatService.DescendantAdded:Connect(onCommandAdded)
end
end;
}
end