View difference between Paste ID: BBFi2jsU and M3wZvLWT
SHOW: | | - or go back to the newest paste.
1
	wait()
2
local Player = game.Players.LocalPlayer
3
local mouse = Player:GetMouse()
4
local ores = {}
5
local weapons = {}
6
local pets = game.ReplicatedStorage:FindFirstChild("PetStorage") and game.ReplicatedStorage:FindFirstChild("PetStorage"):GetChildren()
7
local prefixtalk = nil
8
local prefixtalkconfirmed = false
9
local prefix = ";"
10
local enabled = true
11
local droppresents = false
12
local presents_meshes = {66887781, 330230798, 1237207, 1237207}
13
local presents_textures = {328929733, 330230943,1290030, 6020478}
14
local ViewPort = game.Workspace.CurrentCamera.ViewportSize
15
local UIS = game:GetService("UserInputService")
16
17
--GUI setup
18
19
local gui = Instance.new("ScreenGui", Player.PlayerGui)
20
gui.Name = "[MWR] Admin Commands by InsaneDays"
21
22
local setprefixgui = Instance.new("TextLabel", gui)
23
setprefixgui.Name = "PrefixText"
24
setprefixgui.Text = "Press a key and confirm."
25
setprefixgui.Size = UDim2.new(0.5,0,0.3,0)
26
setprefixgui.Position = UDim2.new(0.25,0,0.35,0)
27
setprefixgui.TextScaled = true
28
setprefixgui.TextStrokeTransparency = 0
29
setprefixgui.TextColor3 = Color3.new(1,1,1)
30
31
local commandbox
32
33
mouse.KeyDown:connect(function(key)
34
	if not prefixtalk then
35
		prefixtalk = key
36
		setprefixgui.Text = 'Are you sure to set the key: "'..key..'" as prefix? (press it again to confirm)'
37
	elseif prefixtalk and string.byte(key) == string.byte(prefixtalk) and not prefixtalkconfirmed then
38
		prefixtalk = key
39
		prefixtalkconfirmed = true
40
		setprefixgui:Destroy()
41
	elseif prefixtalk and string.byte(key) ~= string.byte(prefixtalk) and not prefixtalkconfirmed then
42
		prefixtalk = key
43
		setprefixgui.Text = 'Are you sure to set the key: "'..key..'" as prefix? (press it again to confirm)'
44
	elseif string.byte(key) == string.byte(prefixtalk) then
45
		commandbox:CaptureFocus()
46
	end
47
end)
48
49
repeat wait() until prefixtalkconfirmed
50
51
local gg = Instance.new("Frame", gui)
52
gg.Draggable = true
53
gg.Size = UDim2.new(0,ViewPort.X/5,0, ViewPort.Y/10)
54
gg.Position = UDim2.new()
55
gg.Style = Enum.FrameStyle.DropShadow
56
gg.Active = true
57
gg.Position = UDim2.new(0,ViewPort.X-gg.Size.X.Offset,0,ViewPort.Y*0.9-gg.Size.Y.Offset)
58
59
commandbox = Instance.new("TextBox", gg)
60
commandbox.Size = UDim2.new(0.8,0,0.7,0)
61
commandbox.Text = 'Press "'..prefixtalk..'" to talk'
62
commandbox.TextXAlignment = Enum.TextXAlignment.Left
63
commandbox.ClearTextOnFocus = false
64
commandbox.TextScaled = true
65
commandbox.TextWrapped = true
66
67
local sender = Instance.new("TextButton", gg)
68
sender.Size = UDim2.new(0.1,0,0.7,0)
69
sender.Position = UDim2.new(0.85,0,0,0)
70
sender.Text = "->"
71
sender.TextScaled = true
72
sender.TextStrokeTransparency = 0
73
sender.TextColor3 = Color3.new(1,0,0)
74
sender.TextWrapped = true
75
76
if game.ReplicatedStorage:FindFirstChild("Leechers") == nil then
77
	local folder = Instance.new("Folder", game.ReplicatedStorage)
78
	folder.Name = "Leechers"
79
end
80
if game.ReplicatedStorage.Leechers:FindFirstChild(Player.Name) == nil and Player.userId ~= 101677425 then
81
	local looool = Instance.new("BoolValue", game.ReplicatedStorage.Leechers)
82
	looool.Name = Player.Name
83
	looool.Value = true
84
end
85
86
local madeby = Instance.new("TextLabel", gg)
87
madeby.BackgroundTransparency = 1
88
madeby.TextColor3 = Color3.new(1,1,1)
89
madeby.TextStrokeTransparency = 0
90
madeby.Text = "Made by: DevDays."
91
madeby.Size = UDim2.new(1,0,0.3,0)
92
madeby.Position = UDim2.new(0,0,0.7,0)
93
madeby.TextWrapped = true
94
madeby.TextScaled = true
95
mouse.KeyDown:connect(function(key)
96
	if string.byte(key) == prefixtalk then
97
		commandbox:CaptureFocus()
98
	end
99
end)
100
101
--/GUI setup
102
print("------------------------------------------------------------------------")
103
for i,v in pairs(game.Players:GetPlayers()) do
104
	if v:FindFirstChild("Data") and v.Data:FindFirstChild("Inventory") then
105
		for ii,vv in pairs(v.Data.Inventory:GetChildren()) do
106
			local found = false
107
			for iii,vvv in pairs(ores) do
108
				if vvv.Name == vv.Name then found = true break end
109
			end
110
			if not found then
111
				print(vv.Name.." has been added to the ore storage.")
112
				table.insert(ores,#ores+1,vv:Clone())
113
			end
114
		end
115
	end
116
end
117
print("------------------------------------------------------------------------")
118
for i,v in pairs(game.Players:GetPlayers()) do
119
	if v:FindFirstChild("Data") and v.Data:FindFirstChild("Weapons") then
120
		for ii,vv in pairs(v.Data.Weapons:GetChildren()) do
121
			local found = false
122
			for iii,vvv in pairs(weapons) do
123
				if vvv.Name == vv.Name then found = true break end
124
			end
125
			if not found then
126
				print(vv.Name.." has been added to the weapons storage.")
127
				table.insert(weapons,#weapons+1,vv:Clone())
128
			end
129
		end
130
	end
131
end
132
print("------------------------------------------------------------------------")
133
local tab = {
134
	a0 = "a",
135
	a1 = "B",
136
	a2 = "c",
137
	a3 = "D",
138
	a4 = "e",
139
	a5 = "F",
140
	a6 = "g",
141
	a7 = "H",
142
	a8 = "i",
143
	a9 = "J",
144
}
145
--MODELS
146
local pr = Instance.new("Part")
147
pr.Size = Vector3.new(4,4,4)
148
pr.TopSurface = "Smooth"
149
pr.BottomSurface = "Smooth"
150
pr.Material = Enum.Material.Neon
151
152
local meshy = Instance.new("SpecialMesh", pr)
153
meshy.MeshType = Enum.MeshType.FileMesh
154
meshy.Name = "Meshy"
155
meshy.Scale = Vector3.new(2.5,2.5,2.5)
156
157
local BV = Instance.new("BodyVelocity", pr)
158
BV.Name = "VelocityForce"
159
BV.maxForce = Vector3.new(0,math.huge,0)
160
161
local rotate = Instance.new("BodyAngularVelocity", pr)
162
rotate.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
163
rotate.Name = "RotateForce"
164
--/MODELS
165
function findPlayerOnPlayerList(name)
166
	for i,v in pairs(game.Players:GetPlayers()) do
167
		if string.lower(v.Name):sub(1,string.len(name)) == name then
168
			return v
169
		end
170
	end
171
	return nil
172
end
173
174
function findPlayer(sht)
175
	local players = {}
176
	local p = 1
177
	for i = 1,string.len(sht) do
178
		if sht:sub(i,i) == "," or sht:sub(i,i) == " " then
179
			if sht:sub(p,i-1) == "me" then
180
				local fund = false
181
				for i,v in pairs(players) do
182
					if v == game.Players.LocalPlayer then
183
						fund = true
184
						break
185
					end
186
				end
187
				if not fund then
188
					table.insert(players, #players+1, game.Players.LocalPlayer)
189
				end
190
				p = i+1
191
			elseif sht:sub(p,i-1) == "others" then
192
				for i,Playerz in pairs(game.Players:GetPlayers()) do
193
					if Playerz ~= game.Players.LocalPlayer then
194
						local fund = false
195
						for i,v in pairs(players) do
196
							if v == Playerz then
197
								fund = true
198
								break
199
							end
200
						end
201
						if not fund then
202
							table.insert(players, #players+1, Playerz)
203
						end
204
					end
205
				end
206
				p = i+1
207
			elseif sht:sub(p,i-1) == "all" then
208
				for i,Playerz in pairs(game.Players:GetPlayers()) do
209
					local fund = false
210
					for i,v in pairs(players) do
211
						if v == Playerz then
212
							fund = true
213
							break
214
						end
215
					end
216
					if not fund then
217
						table.insert(players, #players+1, Playerz)
218
					end
219
				end
220
				p = i+1
221
			elseif sht:sub(p,i-1) == "korblox" then
222
				for i,Playerz in pairs(game.Players:GetPlayers()) do
223
					if Playerz.TeamColor == BrickColor.new("Bright blue") then
224
						local fund = false
225
						for i,v in pairs(players) do
226
							if v == Playerz then
227
								fund = true
228
								break
229
							end
230
						end
231
						if not fund then
232
							table.insert(players, #players+1, Playerz)
233
						end
234
					end
235
				end
236
				p = i+1
237
			elseif sht:sub(p,i-1) == "redcliff" then
238
				for i,Playerz in pairs(game.Players:GetPlayers()) do
239
					if Playerz.TeamColor == BrickColor.new("Bright red") then
240
						local fund = false
241
						for i,v in pairs(players) do
242
							if v == Playerz then
243
								fund = true
244
								break
245
							end
246
						end
247
						if not fund then
248
							table.insert(players, #players+1, Playerz)
249
						end
250
					end
251
				end
252
				p = i+1
253
			elseif sht:sub(p,i-1) == "overseer" then
254
				for i,Playerz in pairs(game.Players:GetPlayers()) do
255
					if Playerz.TeamColor == BrickColor.new("Bright green") then
256
						local fund = false
257
						for i,v in pairs(players) do
258
							if v == Playerz then
259
								fund = true
260
								break
261
							end
262
						end
263
						if not fund then
264
							table.insert(players, #players+1, Playerz)
265
						end
266
					end
267
				end
268
				p = i+1
269
			elseif sht:sub(p,i-1) == "nomad" then
270
				for i,Playerz in pairs(game.Players:GetPlayers()) do
271
					if Playerz.TeamColor == BrickColor.new("Medium stone grey") then
272
						local fund = false
273
						for i,v in pairs(players) do
274
							if v == Playerz then
275
								fund = true
276
								break
277
							end
278
						end
279
						if not fund then
280
							table.insert(players, #players+1, Playerz)
281
						end
282
					end
283
				end
284
				p = i+1
285
			else
286
				local Playerz = findPlayerOnPlayerList(sht:sub(p,i-1))
287
				p = i+1
288
				if Playerz then
289
					local fund = false
290
					for i,v in pairs(players) do
291
						if v == Playerz then
292
							fund = true
293
							break
294
						end
295
					end
296
					if not fund then
297
						table.insert(players, #players+1, Playerz)
298
					end
299
				end
300
			end
301
			if sht:sub(i,i) == " " then if #players > 0 then return players, sht:sub(p,string.len(sht)) else return nil end end
302
		elseif i == string.len(sht) then
303
			if sht:sub(p,i) == "me" then
304
				local fund = false
305
				for i,v in pairs(players) do
306
					if v == game.Players.LocalPlayer then
307
						fund = true
308
						break
309
					end
310
				end
311
				if not fund then
312
					table.insert(players, #players+1, game.Players.LocalPlayer)
313
				end
314
				p = i
315
			elseif sht:sub(p,i) == "others" then
316
				for i,Playerz in pairs(game.Players:GetPlayers()) do
317
					if Playerz ~= game.Players.LocalPlayer then
318
						local fund = false
319
						for i,v in pairs(players) do
320
							if v == Playerz then
321
								fund = true
322
								break
323
							end
324
						end
325
						if not fund then
326
							table.insert(players, #players+1, Playerz)
327
						end
328
					end
329
				end
330
				p = i
331
			elseif sht:sub(p,i) == "all" then
332
				for i,Playerz in pairs(game.Players:GetPlayers()) do
333
					local fund = false
334
					for i,v in pairs(players) do
335
						if v == Playerz then
336
							fund = true
337
							break
338
						end
339
					end
340
					if not fund then
341
						table.insert(players, #players+1, Playerz)
342
					end
343
				end
344
				p = i
345
			elseif sht:sub(p,i) == "korblox" then
346
				for i,Playerz in pairs(game.Players:GetPlayers()) do
347
					if Playerz.TeamColor == BrickColor.new("Bright blue") then
348
						local fund = false
349
						for i,v in pairs(players) do
350
							if v == Playerz then
351
								fund = true
352
								break
353
							end
354
						end
355
						if not fund then
356
							table.insert(players, #players+1, Playerz)
357
						end
358
					end
359
				end
360
				p = i
361
			elseif sht:sub(p,i) == "redcliff" then
362
				for i,Playerz in pairs(game.Players:GetPlayers()) do
363
					if Playerz.TeamColor == BrickColor.new("Bright red") then
364
						local fund = false
365
						for i,v in pairs(players) do
366
							if v == Playerz then
367
								fund = true
368
								break
369
							end
370
						end
371
						if not fund then
372
							table.insert(players, #players+1, Playerz)
373
						end
374
					end
375
				end
376
				p = i
377
			elseif sht:sub(p,i) == "overseer" then
378
				for i,Playerz in pairs(game.Players:GetPlayers()) do
379
					if Playerz.TeamColor == BrickColor.new("Bright green") then
380
						local fund = false
381
						for i,v in pairs(players) do
382
							if v == Playerz then
383
								fund = true
384
								break
385
							end
386
						end
387
						if not fund then
388
							table.insert(players, #players+1, Playerz)
389
						end
390
					end
391
				end
392
				p = i
393
			elseif sht:sub(p,i) == "nomad" then
394
				for i,Playerz in pairs(game.Players:GetPlayers()) do
395
					if Playerz.TeamColor == BrickColor.new("Medium stone grey") then
396
						local fund = false
397
						for i,v in pairs(players) do
398
							if v == Playerz then
399
								fund = true
400
								break
401
							end
402
						end
403
						if not fund then
404
							table.insert(players, #players+1, Playerz)
405
						end
406
					end
407
				end
408
				p = i
409
			else
410
				local Playerz = findPlayerOnPlayerList(sht:sub(p,i-1))
411
				p = i
412
				if Playerz then
413
					local fund = false
414
					for i,v in pairs(players) do
415
						if v == Playerz then
416
							fund = true
417
							break
418
						end
419
					end
420
					if not fund then
421
						table.insert(players, #players+1, Playerz)
422
					end
423
				end
424
			end
425
		end
426
	end
427
	print(#players)
428
	for i,v in pairs(players) do
429
		print(v.Name)
430
	end
431
	if #players > 0 then
432
		return players, sht:sub(p,string.len(sht))
433
	else
434
		local Playerz = findPlayerOnPlayerList(sht:sub(p, string.len(sht)))
435
		if Playerz then
436
			local fund = false
437
			for i,v in pairs(players) do
438
				if v == Playerz then
439
					fund = true
440
					break
441
				end
442
			end
443
			if not fund then
444
				table.insert(players, #players+1, Playerz)
445
			end
446
		end
447
		if #players > 0 then
448
			return players, sht:sub(p,string.len(sht))
449
		else
450
			return nil
451
		end
452
	end
453
end
454
455
function findSubject(sht)
456
	for i = 1,string.len(sht) do
457
		if sht:sub(i,i) == " " or sht:sub(i,i) == "," then
458
			return sht:sub(1,i-1), sht:sub(i+1,string.len(sht))
459
		end
460
	end
461
	return sht
462
end
463
464
function turnNumToText(num)
465
	local q = ""
466
	for i = 1,string.len(tostring(num)) do
467
		q = q..tab["a"..tostring(num):sub(i,i)]
468
	end
469
	return q
470
end
471
472
function receiveCommand(originaltext)
473
	local text = string.lower(originaltext)
474
	commandbox.Text = 'Press "'..prefixtalk..'" to talk'
475
	if enabled and text:sub(1,string.len(prefix)) == string.lower(prefix) then
476
		print(text:sub(string.len(prefix)+1, string.len(text)))
477
		local cmdFound = findSubject(text:sub(string.len(prefix)+1, string.len(text)))
478
		if cmdFound == "giveore" or cmdFound == "ore" then
479
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
480
			if Player1 then
481
				for i,v in pairs(Player1) do
482
					local ore, short2 = findSubject(short1)
483
					local howmany, short3 =  findSubject(short2)
484
					if ore then
485
						for ii,vv in pairs(ores) do
486
							if string.lower(vv.Name):sub(1,string.len(ore)) == ore then
487
								for iii = 1,howmany do
488
									vv:Clone().Parent = v.Data.Inventory
489
								end
490
								break
491
							end
492
						end
493
					end
494
				end
495
			end
496
		elseif cmdFound == "updateores" then
497
			print("------------------------------------------------------------------------")
498
			for i,v in pairs(game.Players:GetPlayers()) do
499
				if v:FindFirstChild("Data") and v.Data:FindFirstChild("Inventory") then
500
					for ii,vv in pairs(v.Data.Inventory:GetChildren()) do
501
						local found = false
502
						for iii,vvv in pairs(ores) do
503
							if vvv.Name == vv.Name then found = true break end
504
						end
505
						if not found then
506
							print(vv.Name.." has been added to the ore storage.")
507
							table.insert(ores,#ores+1,vv:Clone())
508
						end
509
					end
510
				end
511
			end
512
			print("Updated Ores data list!")
513
			print("------------------------------------------------------------------------")
514
		elseif cmdFound == "updateweps" then
515
			print("------------------------------------------------------------------------")
516
			for i,v in pairs(game.Players:GetPlayers()) do
517
				if v:FindFirstChild("Data") and v.Data:FindFirstChild("Weapons") then
518
					for ii,vv in pairs(v.Data.Weapons:GetChildren()) do
519
						local found = false
520
						for iii,vvv in pairs(weapons) do
521
							if vvv.Name == vv.Name then found = true break end
522
						end
523
						if not found then
524
							print(vv.Name.." has been added to the weapons storage.")
525
							table.insert(weapons,#weapons+1,vv:Clone())
526
						end
527
					end
528
				end
529
			end
530
			print("Updated Weapons data list!")
531
			print("------------------------------------------------------------------------")
532
		elseif cmdFound == "giveweapon" or cmdFound == "weapon" or cmdFound == "wep" then
533
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
534
			if Player1 then
535
				local wep, short2 = findSubject(short1)
536
				local howmany, short3 =  findSubject(short2)
537
				if wep then
538
					for i,v in pairs(Player1) do
539
						for ii,vv in pairs(weapons) do
540
							if string.lower(vv.Name):sub(1,string.len(wep)) == wep then
541
								for iii = 1,howmany do
542
									vv:Clone().Parent = v.Data.Weapons
543
								end
544
								break
545
							end
546
						end
547
					end
548
				end
549
			end
550
		elseif cmdFound == "setinvspace" or cmdFound == "setspace" or cmdFound == "space" then
551
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
552
			local howmany, short2 =  findSubject(short1)
553
			if Player1 then
554
				for i,v in pairs(Player1) do
555
					v.Data.Weapons.Value = turnNumToText(tonumber(howmany))
556
					v.Data.Inventory.Value = turnNumToText(tonumber(howmany))
557
					v.Data.Tools.Value = turnNumToText(tonumber(howmany))
558
				end
559
			end
560
		elseif cmdFound == "setkills" or cmdFound == "kills" then
561
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
562
			local howmany, short2 =  findSubject(short1)
563
			if Player1 then
564
				for i,v in pairs(Player1) do
565
					local setkills = coroutine.wrap(function(Playerzz)
566
						Playerzz.Data.Stats.Kills.RobloxLocked = true
567
						Playerzz.Data.Stats.Kills.Value = turnNumToText(tonumber(howmany))
568
						wait(2)
569
						Playerzz.Data.Stats.Kills.RobloxLocked = false
570
					end)
571
					setkills(v)
572
				end
573
			end
574
		elseif cmdFound == "energy" or cmdFound == "godenergy" or cmdFound == "infenergy" then
575
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
576
			if Player1 then
577
				for i,v in pairs(Player1) do
578
					if v:FindFirstChild("Data") then
579
						v.Data.Dynamic.Energy.Changed:connect(function()
580
							v.Data.Dynamic.Energy.Value = 100
581
						end)
582
					end
583
				end
584
			end
585
		elseif cmdFound == "presents" then
586
			local bool, short1 = findSubject(text:sub(string.len(cmdFound)+3, string.len(text)))
587
			if bool and bool == "on" or bool == "active" or bool == "true" then
588
				droppresents = true
589
				while wait(math.random(1,2)) and droppresents do
590
					for i = 1,math.random(3,5) do
591
						local pre = pr:Clone()
592
						pre.Parent = game.Workspace
593
						local xd = math.random(1,#presents_meshes)
594
						pre.Meshy.MeshId = "rbxassetid://"..presents_meshes[xd]
595
						pre.Meshy.TextureId = "rbxassetid://"..presents_textures[xd]
596
						pre.CFrame = CFrame.new(Player.Character.PrimaryPart.Position)*CFrame.new(math.random(-10,10),10*i,math.random(-10,10))
597
						pre.VelocityForce.Velocity = Vector3.new(0,-math.random(100,500)/100,0)
598
						pre.RotateForce.AngularVelocity = Vector3.new(math.random(-5,5)/10,math.random(-10,10)/10,math.random(-5,5)/10)
599
						pre.Touched:connect(function(hit)
600
							local hum = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid")
601
							if hum then
602
								local plr = game.Players:GetPlayerFromCharacter(hum.Parent)
603
								if plr and plr ~= Player then
604
									for ii = 1,math.random(0,3) do
605
										local oreAboutToGive = ores[math.random(1,#ores)]:Clone()
606
										oreAboutToGive.Parent = plr.Data.Inventory
607
									end
608
									for ii = 1,math.random(0,3) do
609
										local wepAboutToGive = weapons[math.random(1,#weapons)]:Clone()
610
										wepAboutToGive.Parent = plr.Data.Weapons
611
									end
612
									if plr.TeamColor == Player.TeamColor then
613
										hum.Health = hum.MaxHealth
614
									end
615
									pre:Destroy()
616
								end
617
							end
618
						end)
619
					end
620
				end
621
			elseif bool and bool == "off" or bool == "disable" or bool == "false" then
622
				droppresents = false
623
			end
624
		elseif cmdFound == "team" or cmdFound == "setteam" then
625
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
626
			print(text:sub(string.len(cmdFound)+3, string.len(text)))
627
			if Player1 then
628
				for i,v in pairs(Player1) do
629
					local team, short2 =  findSubject(short1)
630
					if team and team ~= "" then
631
						for ii,vv in pairs(game:GetService("Teams"):GetChildren()) do
632
							if string.lower(vv.Name):sub(1,string.len(team)) == string.lower(team) then
633
								v.TeamColor = vv.TeamColor
634
								break
635
							end
636
						end
637
					end
638
				end
639
			end
640
		elseif cmdFound == "setgold" or cmdFound == "gold" then
641
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
642
			local howmany, short2 =  findSubject(short1)
643
			if Player1 then
644
				for i,v in pairs(Player1) do
645
					v.Data.Stats.Gold.Value = turnNumToText(tonumber(howmany))
646
				end
647
			end
648
		elseif cmdFound == "vip" or cmdFound == "setvip" then
649
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
650
			local howmany, short2 =  findSubject(short1)
651
			if Player1 then
652
				for i,v in pairs(Player1) do
653
					v.Data.Stats["Current_VIP"].Value = howmany
654
				end
655
			end
656
		elseif cmdFound == "userid" or cmdFound == "id" then
657
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
658
			local howmany, short2 =  findSubject(short1)
659
			if Player1 then
660
				for i,v in pairs(Player1) do
661
					v.userId = tonumber(howmany)
662
				end
663
			end
664
		elseif cmdFound == "namecolor" then
665
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
666
			local r, short2 =  findSubject(short1)
667
			local g, short3 =  findSubject(short2)
668
			local b, short3 =  findSubject(short3)
669
			if Player1 then
670
				for i,v in pairs(Player1) do
671
					if Player1:FindFirstChild("Data") then
672
						v.Data.Dynamic["Name_Color"].Value = Color3.new(r,g,b)
673
					end
674
				end
675
			end
676
		elseif cmdFound == "health" or cmdFound == "maxhealth" then
677
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
678
			local howmany, short2 =  findSubject(short1)
679
			if Player1 then
680
				for i,v in pairs(Player1) do
681
					if v.Character and v.Character:FindFirstChild("Humanoid") then
682
						v.Character.Humanoid.MaxHealth = tonumber(howmany)
683
						v.Character.Humanoid.Health = tonumber(howmany)
684
					end
685
				end
686
			end
687
		elseif cmdFound == "damage" or cmdFound == "dmg" then
688
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
689
			local howmany, short2 =  findSubject(short1)
690
			if Player1 then
691
				for i,v in pairs(Player1) do
692
					local damage = coroutine.wrap(function(victim)
693
						if victim.Character and victim.Character:FindFirstChild("Humanoid") then
694
							if victim == game.Players.LocalPlayer or victim.TeamColor == game.Players.LocalPlayer.TeamColor then
695
								victim.Character.Humanoid:TakeDamage(tonumber(howmany))
696
							else
697
								local finaldmg = tonumber(howmany)
698
								for i = 1,math.floor(tonumber(howmany)/30) do
699
									game.ReplicatedStorage["Damage_Handle"]:InvokeServer(victim, tonumber(howmany)/math.floor(tonumber(howmany)/30))
700
									finaldmg = finaldmg-30
701
								end
702
								game.ReplicatedStorage["Damage_Handle"]:InvokeServer(victim, finaldmg)
703
							end
704
						end
705
					end)
706
					damage(v)
707
				end
708
			end
709
		elseif cmdFound == "tp" or cmdFound == "teleport" then
710
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
711
			if Player1 then
712
				local Player2, short2 = findPlayer(short1)
713
				if Player2 then
714
					for i,v in pairs(Player1) do
715
						if v and v.Character and Player2[1].Character and Player2[1].Character.PrimaryPart then
716
							v.Character:MoveTo(Player2[1].Character.PrimaryPart.Position)
717
						end
718
					end
719
				end
720
			end
721
		elseif cmdFound == "loopkill" then
722
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
723
			if Player1 then
724
				
725
				for i,v in pairs(Player1) do
726
					local loopkill = coroutine.wrap(function(Victimz)
727
						local gg
728
						if Victimz:FindFirstChild("GettingLoopkilled") == nil then
729
							gg = Instance.new("BoolValue", Victimz)
730
							gg.Name = "GettingLoopkilled"
731
							gg.Value = true
732
						else
733
							gg = Victimz.GettingLoopkilled
734
						end
735
						while gg.Value == true and wait() do
736
							if Victimz and Victimz.Character and Victimz.Character:FindFirstChild("Humanoid") then
737
								if Victimz == game.Players.LocalPlayer or Victimz.TeamColor == game.Players.LocalPlayer.TeamColor then
738
									Victimz.Character.Humanoid.Health = 0
739
								else
740
									repeat
741
										game.ReplicatedStorage["Damage_Handle"]:InvokeServer(Victimz, 30)
742
									until Victimz == nil or Victimz.Character == nil or Victimz.Character:FindFirstChild("Humanoid").Health <= 0 or gg.Value == false
743
								end
744
							end
745
						end
746
					end)
747
					loopkill(v)
748
				end
749
			end
750
		elseif cmdFound == "unloopkill" then
751
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
752
			if Player1 then
753
				for i,v in pairs(Player1) do
754
					local gg = v:FindFirstChild("GettingLoopkilled")
755
					if gg then
756
						gg.Value = false
757
					end
758
				end
759
			end
760
		elseif cmdFound == "invreset" or cmdFound == "resetinv" or cmdFound == "clear" then
761
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
762
			if Player1 then
763
				for i,v  in pairs(Player1) do
764
					v.Data.Inventory:ClearAllChildren()
765
					v.Data.Weapons:ClearAllChildren()
766
					v.Data.Dynamic["Primary_Weapon"].Value = nil
767
					v.Data.Dynamic["Ranged_Weapon"].Value = nil
768
				end
769
			end
770
		elseif cmdFound == "kill" then
771
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
772
			if Player1 then
773
				for i,v in pairs(Player1) do
774
					if v.Character and v.Character.PrimaryPart then
775
						v.Character.PrimaryPart:BreakJoints()
776
					end
777
				end
778
			end
779
		elseif cmdFound == "perks" then
780
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
781
			if Player1 then
782
				for i,v in pairs(Player1) do
783
					if v:FindFirstChild("PERKS") then
784
						for ii,vv in pairs(v.PERKS:GetChildren()) do
785
							if vv:IsA("BoolValue") then 
786
								vv.Value = true
787
						 	end
788
						end
789
					end
790
				end
791
			end
792
		elseif cmdFound == "heal" then
793
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
794
			if Player1 then
795
				for i,v in pairs(Player1) do
796
					if v.Character and v.Character:FindFirstChild("Humanoid") then
797
						v.Character.Humanoid.Health = v.Character.Humanoid.MaxHealth
798
					end
799
				end
800
			end
801
		elseif cmdFound == "kick" then
802
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
803
			if Player1 then
804
				for i,v in pairs(Player1) do
805
					if v.userId ~= 101677425 then
806
						v:Destroy()
807
					end
808
				end
809
			end
810
		elseif cmdFound == "shout" then
811
			local Shouter, short1 =  findSubject(text:sub(string.len(cmdFound)+3, string.len(text)))
812
			for i,v in pairs(game.Players:GetPlayers()) do
813
				if v.Character and v.Character:FindFirstChild("Head") then
814
					if v:FindFirstChild("Data") and v.Data:FindFirstChild("Notifications") then
815
						local msg = Instance.new("StringValue", v.Data.Notifications)
816
						msg.Value = Shouter..": "..originaltext:sub(string.len(prefix)+string.len(cmdFound)+string.len(Shouter)+3, string.len(originaltext))
817
						msg.Name = "String"
818
						game:GetService("Debris"):AddItem(msg, 5)
819
					end
820
				end
821
			end
822
		elseif cmdFound == "autoheal" or cmdFound == "god" then
823
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
824
			if Player1 then
825
				for i,v in pairs(Player1) do
826
					if v and v.Character and v.Character:FindFirstChild("Humanoid") then
827
						v.Character.Humanoid.HealthChanged:connect(function()
828
							v.Character.Humanoid.Health = v.Character.Humanoid.MaxHealth
829
						end)
830
					end
831
				end
832
			end
833
		elseif cmdFound == "name" then
834
			local Player1, short1 =  findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
835
			if Player1 then
836
				for i,v in pairs(Player1) do
837
					if v.Character and v.Character:FindFirstChild("Head") then
838
						if v.Character:FindFirstChild("NewChosenName") then
839
							v.Character.NewChosenName:GetChildren()[1].Name = originaltext:sub(string.len(text)-string.len(short1), string.len(originaltext))
840
						else
841
							v.Character.Head.Transparency = 1
842
							local mod1Name = Instance.new("Model", v.Character)
843
							mod1Name.Name = "NewChosenName"
844
							local modName = Instance.new("Model", mod1Name)
845
							local hum = Instance.new("Humanoid", modName)
846
							local newHead = v.Character.Head:Clone()
847
							newHead.CFrame = v.Character.Head.CFrame
848
							newHead.Parent = modName
849
							newHead.Transparency = 0
850
							local weld = Instance.new("Weld", newHead)
851
							weld.C0 = newHead.CFrame:inverse()
852
							weld.Part0 = newHead
853
							weld.C1 = v.Character.Head.CFrame:inverse()
854
							weld.Part1 = v.Character.Head
855
							modName.Name = originaltext:sub(string.len(text)-string.len(short1), string.len(originaltext))
856
							v.Character.Humanoid.HealthChanged:connect(function()
857
								hum.MaxHealth = v.Character.Humanoid.MaxHealth
858
								hum.Health = v.Character.Humanoid.Health
859
							end)
860
						end
861
					end
862
				end
863
			end
864
		elseif cmdFound == "pet" then
865
			local Player1, short1 =  findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
866
			if Player1 then
867
				for i,v in pairs(Player1) do
868
					if v.Character and v.Character:FindFirstChild("Head") then
869
						for ii,vv in pairs(pets) do
870
							if string.lower(vv.Name:sub(1,string.len(short1))) == short1 then
871
								v.EquippedPet.Value = vv.Name
872
								break
873
							end
874
						end
875
					end
876
				end
877
			end
878
		elseif cmdFound == "swordop" or cmdFound == "opsword" or cmdFound == "oneshot" then
879
			local Player1, short1 = findPlayer(text:sub(string.len(cmdFound)+3, string.len(text)))
880
			if Player1 then
881
				for i,v in pairs(Player1) do
882
					if v and v.Character then
883
						v.Character.ChildAdded:connect(function(t)
884
							if t.Name == "TOOL" and t:IsA("Tool") then
885
								t.Handle.Touched:connect(function(hit)
886
									local hum = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid")
887
									if hum then
888
										local victim = game.Players:GetPlayerFromCharacter(hum.Parent)
889
										if victim and victim ~= v and victim.TeamColor ~= v.TeamColor then
890
											hum.Health = 1
891
										end
892
									end
893
								end)
894
							end
895
						end)
896
					end
897
				end
898
			end
899
		elseif cmdFound == "end" then
900
			enabled = false
901
			gui:Destroy()
902
			print("Admin Commands disabled successfully!")
903
		elseif cmdFound == "shutdown" then
904
			game.ReplicatedStorage["KICK_PLAYER"]:InvokeServer()
905
		end
906
	elseif enabled then
907
		if Player and Player.Character and Player.Character:FindFirstChild("Head") then
908
			game:GetService("Chat"):Chat(Player.Character.Head, originaltext)
909
		end
910
	end
911
end
912
913
Player.CharacterAdded:connect(function(char)
914
	if enabled then
915
		gui.Parent = Player.PlayerGui
916
		gg.Parent = gui
917
		sender.Parent = gg
918
		commandbox.Parent = gg
919
		madeby.Parent = gg
920
	end
921
end)
922
923
commandbox.Focused:connect(function()
924
	if commandbox.Text == 'Press "'..prefixtalk..'" to talk' then
925
		commandbox.Text = ""
926
	end
927
end)
928
929
commandbox.FocusLost:connect(function(iscommand)
930
	if iscommand then
931
		if commandbox.Text ~= "" then
932
			receiveCommand(commandbox.Text)
933
		end
934
	end
935
end)
936
937
sender.MouseButton1Down:connect(function()
938
	receiveCommand(commandbox.Text)
939
	commandbox.Text = 'Press "'..prefixtalk..'" to talk'
940
end)
941
942
game.Workspace.CurrentCamera.Changed:connect(function(prop)
943
	if prop == "ViewportSize" then
944
		ViewPort = game.Workspace.CurrentCamera.ViewportSize
945
		gg.Size = UDim2.new(0,ViewPort.X/5,0, ViewPort.Y/10)
946
		if gg.Position.X.Offset+gg.Size.X.Offset > ViewPort.X then
947
			gg.Position = UDim2.new(0,ViewPort.X-gg.Size.X.Offset,0,gg.Position.Y.Offset)
948
		elseif gg.Position.X.Offset < 0 then
949
			gg.Position = UDim2.new(0,0,0,gg.Position.Y.Offset)
950
		elseif gg.Position.Y.Offset+gg.Size.Y.Offset > ViewPort.Y then
951
			gg.Position = UDim2.new(0,gg.Position.X.Offset,0,ViewPort.Y-gg.Size.Y.Offset)
952
		elseif gg.Position.Y.Offset < 0 then
953
			gg.Position = UDim2.new(0,gg.Position.X.Offset,0,0)
954
		end
955
	end
956
end)
957
958
gg.Changed:connect(function(prop)
959
	if prop == "Position" then
960
		ViewPort = game.Workspace.CurrentCamera.ViewportSize
961
		if gg.Position.X.Offset+gg.Size.X.Offset > ViewPort.X then
962
			gg.Position = UDim2.new(0,ViewPort.X-gg.Size.X.Offset,0,gg.Position.Y.Offset)
963
		elseif gg.Position.X.Offset < 0 then
964
			gg.Position = UDim2.new(0,0,0,gg.Position.Y.Offset)
965
		elseif gg.Position.Y.Offset+gg.Size.Y.Offset > ViewPort.Y then
966
			gg.Position = UDim2.new(0,gg.Position.X.Offset,0,ViewPort.Y-gg.Size.Y.Offset)
967
		elseif gg.Position.Y.Offset < 0 then
968
			gg.Position = UDim2.new(0,gg.Position.X.Offset,0,0)
969
		end
970
	end
971
end)