-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathLoader.server.luau
318 lines (287 loc) · 8.61 KB
/
Loader.server.luau
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
--[[
TheNexusAvenger
Loads Nexus Admin.
Loader version: V.2.8.4
GitHub: https://github.com/thenexusavenger/nexus-admin
For the change log, view the GitHub Releases (except V.1.0.0, V.1.0.1, V.1.1.0, and V.1.2.0).
For adding custom commands, view the GitHub documentation.
For bugs or feature requests (including new commands), use the GitHub Issues.
--]]
local Config = {
--Prefix for standard commands.
CommandPrefix = ":",
--Keybinds for opening the command bar.
--WARNING: Keybinds that are set here become unusable in the command bar.
ActivationKeys = {Enum.KeyCode.F2,},
--Default rank a new player would have.
DefaultAdminLevel = -1,
--This is for setting up other admins in your game. You don't need to add yourself as long as you are the owner
--[[
Set up:
Admins = {
[SomeId] = AdminLevel,
[261] = 4,
[1] = 3,
[99] = 1,
[6] = 2,
}
--]]
Admins = {
},
--This is for setting up certain ranks in a group being able to use certain levels of commands.
--You will need to have access to the roles in the group admin page for the rank ids.
--Each rank will default to the highest admin level
--[[
Set up:
GroupAdminLevels = {
[GroupId] = {
[RankId] = 2,
[RankId] = 3,
[RankId] = 4,
},
[1] = {
[10] = 1,
[15] = 5,
},
[12] = {
[100] = 1,
[150] = 5,
},
... (You can add/remove groups)
},
--]]
GroupAdminLevels = {
},
--Banned users is for preventing certain users from entering the game.
--Setting an id equal to true doesn't give a message, and a string is the ban message.
--[[
Set up:
BannedUsers = {
[UserId] = true, --Banned without a ban message
[UserId] = "Some Ban Message", --Bans with a ban message
[1] = "Banned for being ROBLOX",
[261] = true, --Too awesome to have a ban message
}
--]]
BannedUsers = {
},
--The names of the admin levels.
AdminNames = {
[-1] = "Non-Admin", --Basic commands, like !help and !quote
[0] = "Debug Admin", --Only debug commands
[1] = "Moderator", --Some commands, can't kick, no "fun" commands
[2] = "Admin", --Most commands, can't ban or shutdown
[3] = "Super Admin",--All commands, can be kicked by full admin
[4] = "Owner Admin", --All commands, except :admin
[5] = "Creator Admin", --All commands, including :admin
},
--Default admin levels needed to use a set of default commands.
AdministrativeLevel = 1,
BuildUtilityLevel = 1,
BasicCommandsLevel = 1,
UsefulFunCommandsLevel = 2,
FunCommandsLevel = 3,
PersistentCommandsLevel = 4,
--Configurations for internal commands.
--If a value is nil, it will default to the command's default setting.
--If a value is not nil, the setting will override the default setting.
CommandConfigurations = {
--Default Admin Level for Server Lock (slock). Defaults to 0, but can be any number.
DefaultServerLockAdminLevel = nil,
},
--Below is for overriding the defaults levels
--If a value is nil, it will default to the default command level of the group
--If a value is a number, it will override the default command level of the group
--This can be useful to make an abusive command un-usable or make a useful command usable.
CommandLevelOverrides = {
Administrative = {
admin = 5,
unadmin = 5,
ban = 3,
unban = 3,
kick = 2,
slock = 2,
keybind = -1,
unkeybind = -1,
keybinds = -1,
alias = -1,
cmds = -1,
cmdbar = 0,
debug = 0,
localdebug = nil,
system = nil,
snapshot = nil,
checkconsistency = nil,
characterhistory = nil,
logs = 0,
admins = 0,
bans = nil,
usage = -1,
featureflag = nil,
featureflags = nil,
featureflaglogs = nil,
},
BasicCommands = {
vote = nil,
pchat = nil,
track = nil,
untrack = nil,
chatlogs = nil,
killlogs = nil,
joinlogs = nil,
batch = nil,
delay = nil,
loop = nil,
stoploops = nil,
playerstep = nil,
m = nil,
h = nil,
sm = nil,
sh = nil,
mute = nil,
unmute = nil,
crash = nil,
shutdown = nil,
countdown = nil,
stopcountdown = nil,
age = nil,
refresh = nil,
clean = nil,
punish = nil,
respawn = nil,
team = nil,
tools = nil,
give = nil,
startergive = nil,
startertool = nil,
sword = nil,
atksword = nil,
removetools = nil,
resetstats = nil,
change = nil,
gear = nil,
inventory = nil,
createteam = nil,
removeteam = nil,
renameteam = nil,
sortteams = nil,
},
BuildUtility = {
clearterrain = nil,
fixlighting = nil,
time = nil,
brightness = nil,
ambient = nil,
outdoorambient = nil,
fogcolor = nil,
fogend = nil,
fogstart = nil,
shadows = nil,
btools = nil,
s = nil,
insert = nil,
},
UsefulFunCommands = {
name = nil,
unname = nil,
ff = nil,
unff = nil,
kill = nil,
damage = nil,
heal = nil,
health = nil,
god = nil,
ungod = nil,
walkspeed = nil,
place = nil,
tp = nil,
to = nil,
bring = nil,
where = nil,
tpto = nil,
thru = nil,
flip = nil,
stun = nil,
unstun = nil,
jump = nil,
sit = nil,
unsit = nil,
lock = nil,
unlock = nil,
clone = nil,
explode = nil,
view = nil,
jail = nil,
unjail = nil,
fling = nil,
grav = nil,
setgrav = nil,
fly = nil,
unfly = nil,
collide = nil,
uncollide = nil,
},
FunCommands = {
removehats = nil,
play = nil,
volume = nil,
pause = nil,
resume = nil,
stop = nil,
blind = nil,
unblind = nil,
char = nil,
unchar = nil,
hat = nil,
disco = nil,
spin = nil,
unspin = nil,
freeze = nil,
thaw = nil,
invisible = nil,
visible = nil,
light = nil,
unlight = nil,
fire = nil,
unfire = nil,
smoke = nil,
unsmoke = nil,
sparkles = nil,
unsparkles = nil,
face = nil,
rocket = nil,
unrocket = nil,
vibrate = nil,
unvibrate = nil,
},
PersistentCommands = {
pban = nil,
unpban = nil,
pbans = nil,
},
},
--Overrides for features as part of Nexus Admin. Most likely, you will
--not have to change anything; it is meant for developer use.
FeatureFlagOverrides = {
},
}
--This is where the actual loading happens. Feel free to use this in another script
--Doubt you will need to, but here it is.
xpcall(function()
--Require the development module from ServerScriptService.
local NexusAdminModule
for _,Module in pairs(game:GetService("ServerScriptService"):GetChildren()) do
if Module:IsA("ModuleScript") and Module:FindFirstChild("NexusAdmin") then
NexusAdminModule = require(Module)
break
end
end
--Require the Roblox module if there isn't a development one in ServerScriptService.
if NexusAdminModule == nil then
NexusAdminModule = require(386507112)
end
--Load Nexus admin.
NexusAdminModule(script,Config)
end, function(ErrorMessage: string)
warn(`NEXUS ADMIN FAILED TO LOAD: {ErrorMessage}\n{debug.traceback()}`)
end)