· 5 years ago · Sep 21, 2020, 08:12 AM
1local opt = {
2 prefix = ';', -- ;ff me | /ff me
3 tupleSeparator = ',', -- ;ff me,others,all | ;ff me/others/all
4 ui = { -- never did anything with this
5
6 },
7 keybinds = { -- never did anything with this
8
9 },
10}
11
12--[[ VARIABLES ]]--
13local Players = game:GetService("Players")
14local UserInputService = game:GetService("UserInputService")
15local TweenService = game:GetService("TweenService")
16local RunService = game:GetService("RunService")
17local StarterGui = game:GetService("StarterGui")
18local SoundService = game:GetService("SoundService")
19
20local localPlayer = Players.LocalPlayer
21local character = localPlayer.Character
22local mouse = localPlayer:GetMouse()
23local camera = workspace.CurrentCamera
24local camtype = camera.CameraType
25local Commands, Aliases = {}, {}
26player, plr, lp = localPlayer, localPlayer, localPlayer, localPlayer
27
28localPlayer.CharacterAdded:Connect(function(c)
29 character = c
30end)
31
32--[[ COMMAND FUNCTIONS ]]--
33cmd = {}
34cmd.add = function(...)
35 local vars = {...}
36 local aliases, info, func = vars[1], vars[2], vars[3]
37 for i, cmdName in pairs(aliases) do
38 if i == 1 then
39 Commands[cmdName:lower()] = {func, info}
40 else
41 Aliases[cmdName:lower()] = {func, info}
42 end
43 end
44end
45
46cmd.run = function(args)
47 local caller, arguments = args[1], args; table.remove(args, 1);
48 local success, msg = pcall(function()
49 if Commands[caller:lower()] then
50 Commands[caller:lower()][1](unpack(arguments))
51 elseif Aliases[caller:lower()] then
52 Aliases[caller:lower()][1](unpack(arguments))
53 end
54 end)
55 if not success then
56 lib.messageOut("Admin error", msg)
57 end
58end
59
60--[[ LIBRARY FUNCTIONS ]]--
61lib = {}
62lib.wrap = function(f)
63 return coroutine.wrap(f)()
64end
65wrap = lib.wrap
66
67lib.messageOut = function(title, msg)
68 StarterGui:SetCore("SendNotification",
69 {
70 Title = title,
71 Text = msg
72 }
73 )
74end
75
76local wait = function(int)
77 if not int then int = 0 end
78 local t = tick()
79 repeat
80 RunService.Heartbeat:Wait(0)
81 until (tick() - t) >= int
82 return (tick() - t), t
83end
84spawn(function()
85 lib.messageOut("Ehli Whitelisted", "Made by KRISTINA#1111")
86end)
87
88lib.lock = function(instance, par)
89 locks[instance] = true
90 instance.Parent = par or instance.Parent
91 instance.Name = "RightGrip"
92end
93lock = lib.lock
94locks = {}
95if hookfunction then -- i believe this was for hiding stuff like bodyvelocity
96 local pseudo = Instance.new("Motor6D")
97 _1 = hookfunction(pseudo.IsA, function(...)
98 local p, ret = ({...})[1], _1(...)
99 if checkcaller() then return ret end
100 if locks[p] then
101 return false
102 end
103 return ret
104 end)
105 _2 = hookfunction(pseudo.FindFirstChildWhichIsA, function(...)
106 local p = _2(...)
107 if checkcaller() then return p end
108 if locks[p] then
109 return nil
110 end
111 return p
112 end)
113 _3 = hookfunction(pseudo.FindFirstChildOfClass, function(...)
114 local p = _3(...)
115 if checkcaller() then return p end
116 if locks[p] then
117 return nil
118 end
119 return p
120 end)
121 _4 = hookfunction(pseudo.Destroy, function(...)
122 local args = {...}
123 if checkcaller() then return _4(...) end
124 if locks[args[1]] then return end
125 return
126 end)
127
128 local mt = getrawmetatable(game)
129 local _ni = mt.__newindex
130 local _nc = mt.__namecall
131 local _i = mt.__index
132 setreadonly(mt, false)
133
134 mt.__index = newcclosure(function(t, i)
135 if locks[t] and not checkcaller() then
136 return _i(pseudo, i)
137 end
138 return _i(t, i)
139 end)
140 mt.__newindex = newcclosure(function(t, i, v)
141 if locks[t] and not checkcaller() then
142 return _ni(pseudo, i, v)
143 end
144 return _ni(t, i, v)
145 end)
146 mt.__namecall = newcclosure(function(t, ...)
147 if locks[t] and not checkcaller() then
148 return _nc(pseudo, ...)
149 end
150 return _nc(t, ...)
151 end)
152end
153
154lib.find = function(t, v) -- mmmmmm
155 for i, e in pairs(t) do
156 if i == v or e == v then
157 return i
158 end
159 end
160 return nil
161end
162
163lib.parseText = function(text, watch)
164 local parsed = {}
165 if not text then return nil end
166 for arg in text:gmatch("[^" .. watch .. "]+") do
167 arg = arg:gsub("-", "%%-")
168 local pos = text:find(arg)
169 arg = arg:gsub("%%", "")
170 if pos then
171 local find = text:sub(pos - opt.prefix:len(), pos - 1)
172 if (find == opt.prefix and watch == opt.prefix) or watch ~= opt.prefix then
173 table.insert(parsed, arg)
174 end
175 else
176 table.insert(parsed, nil)
177 end
178 end
179 return parsed
180end
181
182lib.parseCommand = function(text)
183 wrap(function()
184 local commands = lib.parseText(text, opt.prefix)
185 for _, parsed in pairs(commands) do
186 local args = {}
187 for arg in parsed:gmatch("[^ ]+") do
188 table.insert(args, arg)
189 end
190 cmd.run(args)
191 end
192 end)
193end
194
195local connections = {}
196
197lib.connect = function(name, connection) -- no :(
198 connections[name .. tostring(math.random(1000000, 9999999))] = connection
199 return connection
200end
201
202lib.disconnect = function(name)
203 for title, connection in pairs(connections) do
204 if title:find(name) == 1 then
205 connection:Disconnect()
206 end
207 end
208end
209
210m = math -- prepare for annoying and unnecessary tool grip math
211rad = m.rad
212clamp = m.clamp
213sin = m.sin
214tan = m.tan
215cos = m.cos
216
217--[[ PLAYER FUNCTIONS ]]--
218argument = {}
219argument.getPlayers = function(str)
220 local playerNames, players = lib.parseText(str, opt.tupleSeparator), {}
221 for _, arg in pairs(playerNames or {"me"}) do
222 arg = arg:lower()
223 local playerList = Players:GetPlayers()
224 if arg == "me" or arg == nil then
225 table.insert(players, localPlayer)
226
227 elseif arg == "all" then
228 for _, plr in pairs(playerList) do
229 table.insert(players, plr)
230 end
231
232 elseif arg == "others" then
233 for _, plr in pairs(playerList) do
234 if plr ~= localPlayer then
235 table.insert(players, plr)
236 end
237 end
238
239 elseif arg == "random" then
240 table.insert(players, playerList[math.random(1, #playerList)])
241
242 elseif arg:find("%%") == 1 then
243 local teamName = arg:sub(2)
244 for _, plr in pairs(playerList) do
245 if tostring(plr.Team):lower():find(teamName) == 1 then
246 table.insert(players, plr)
247 end
248 end
249
250 else
251 for _, plr in pairs(playerList) do
252 if plr.Name:lower():find(arg) == 1 then
253 table.insert(players, plr)
254 end
255 end
256 end
257 end
258 return players
259end
260
261--[[ COMMANDS ]]--
262
263--[ SCRIPT ]--
264cmd.add({"script", "ls", "s", "run"}, {"script <source>", "Run the code requested"}, function(source)
265 loadstring(source)()
266end)
267
268cmd.add({"httpget", "hl", "get"}, {"httpget <url>", "Run the contents of a given URL"}, function(url)
269 loadstring(game:HttpGet(url, true))()
270end)
271
272--[ UTILITY ]--
273cmd.add({"devconsole", "developerconsole", "console"}, {"devconsole", "Open the old developer console"}, function()
274 StarterGui:SetCore("DeveloperConsoleVisible", true)
275end)
276
277cmd.add({"chatlogs", "clogs"}, {"chatlogs", "Open the chat logs"}, function()
278 gui.chatlogs()
279end)
280
281cmd.add({"commands", "cmds"}, {"commands", "Open the command list"}, function()
282 gui.commands()
283end)
284
285cmd.add({"print", "p"}, {"print <tuple>", "Print the given arguments"}, function(...)
286 print(...)
287end)
288
289cmd.add({"warn", "w"}, {"warn <tuple>", "Warn the given arguments"}, function(...)
290 warn(...)
291end)
292
293cmd.add({"rejoin", "rj"}, {"rejoin", "Rejoin the game"}, function()
294 game:GetService("TeleportService"):Teleport(game.PlaceId)
295end)
296
297cmd.add({"place", "game", "join"}, {"place <placeId> [player]", "Join a place with the given PlaceId or a player's server"}, function(placeid, playerName)
298 game:GetService("TeleportService"):Teleport(placeid, playerName)
299end)
300
301cmd.add({"disconnectevents", "disableevents"}, {"disconnectevents <instance> <event>", "Disable the given instance's connections to the event"}, function(objDir, event)
302 local obj = loadstring("return " .. objDir)()
303 local events = getconnections(obj[event])
304 for _, connection in pairs(events) do
305 connection:Disable()
306 end
307end)
308
309cmd.add({"connectevents", "enableevents"}, {"connectevents <instance> <event>", "Enable the given instance's connections to the event"}, function(objDir, event)
310 local obj = loadstring("return " .. objDir)()
311 local events = getconnections(obj[event])
312 for _, connection in pairs(events) do
313 connection:Enable()
314 end
315end)
316
317wrap(function()
318 --i am so not putting an emulator as a command here
319end)
320
321--[ LOCALPLAYER ]--
322local function respawn()
323 character:ClearAllChildren()
324 local newChar = Instance.new("Model", workspace)
325 local hum = Instance.new("Humanoid", newChar)
326 local torso = Instance.new("Part", newChar)
327 newChar.Name = "respawn_"
328 torso.Name = "Torso"
329 torso.Transparency = 1
330 player.Character = newChar
331 newChar:MoveTo(Vector3.new(999999, 999999, 999999))
332 torso.Name = ""
333 torso.CanCollide = false
334end
335
336local function refresh()
337 local cf, p = CFrame.new(), character:FindFirstChild("HumanoidRootPart") or character:FindFirstChild("Head")
338 if p then
339 cf = p.CFrame
340 end
341 respawn()
342 player.CharacterAdded:Wait(); wait(0.2);
343 character:WaitForChild("HumanoidRootPart").CFrame = cf
344end
345
346local abort = 0
347local function getTools(amt)
348 if not amt then amt = 1 end
349 local toolAmount, grabbed = 0, {}
350 local lastCF = character.PrimaryPart.CFrame
351 local ab = abort
352
353 for i, v in pairs(localPlayer:FindFirstChildWhichIsA("Backpack"):GetChildren()) do
354 if v:IsA("BackpackItem") then
355 toolAmount = toolAmount + 1
356 end
357 end
358 if toolAmount >= amt then return localPlayer:FindFirstChildWhichIsA("Backpack"):GetChildren() end
359 if not localPlayer:FindFirstChildWhichIsA("Backpack"):FindFirstChildWhichIsA("BackpackItem") then return end
360
361 repeat
362 repeat wait() until localPlayer:FindFirstChildWhichIsA("Backpack") or ab ~= abort
363 backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
364 wrap(function()
365 repeat wait() until backpack:FindFirstChildWhichIsA("BackpackItem")
366 for _, tool in pairs(backpack:GetChildren()) do
367 if #grabbed >= amt or ab ~= abort then break end
368 if tool:IsA("BackpackItem") then
369 tool.Parent = localPlayer
370 table.insert(grabbed, tool)
371 end
372 end
373 end)
374
375 respawn()
376 wait(.1)
377 until
378 #grabbed >= amt or ab ~= abort
379
380 repeat wait() until localPlayer.Character and tostring(localPlayer.Character) ~= "respawn_" and localPlayer.Character == character
381 wait(.2)
382
383 repeat wait() until localPlayer:FindFirstChildWhichIsA("Backpack") or ab ~= abort
384 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
385 for _, tool in pairs(grabbed) do
386 if tool:IsA("BackpackItem") then
387 tool.Parent = backpack
388 end
389 end
390 wrap(function()
391 repeat wait() until character.PrimaryPart
392 wait(.2)
393 character:SetPrimaryPartCFrame(lastCF)
394 end)
395 wait(.2)
396 return grabbed
397end
398
399cmd.add({"notoolscripts", "nts"}, {"notoolscripts", "Destroy all scripts in backpack"}, function()
400 local bp = player:FindFirstChildWhichIsA("Backpack")
401 for _, item in pairs(bp:GetChildren()) do
402 for _, obj in pairs(item:GetDescendants()) do
403 if obj:IsA("LocalScript") or obj:IsA("Script") then
404 obj.Disabled = true
405 obj:Destroy()
406 end
407 end
408 end
409end)
410
411cmd.add({"clonetools", "dupetools"}, {"clonetools [amount]", "Clone your tools by the given amount"}, function(amt)
412 amt = tonumber(amt) or 1
413 getTools(math.clamp(amt, 1, 100))
414end)
415
416cmd.add({"abort"}, {"abort", "Abort most indefinite operations"}, function(amt)
417 abort = abort + 1 -- terrifying system
418end)
419
420cmd.add({"blockspam"}, {"blockspam [amount]", "Spawn blocks by the given amount"}, function(amt)
421 amt = tonumber(amt) or 1
422 local hatAmount, grabbed = 0, {}
423 local lastCF = character.PrimaryPart.CFrame
424 character:ClearAllChildren()
425 respawn()
426 repeat
427 if character.Name ~= "respawn_" then
428 local c = character
429 repeat wait() until c:FindFirstChildWhichIsA("Accoutrement")
430 c:MoveTo(lastCF.p)
431 wait(1)
432 for i, v in pairs(c:GetChildren()) do
433 if v:IsA("Accoutrement") then
434 v:WaitForChild("Handle")
435 v.Handle.CanCollide = true
436 if v:FindFirstChildWhichIsA("DataModelMesh", true) then
437 v:FindFirstChildWhichIsA("DataModelMesh", true):Destroy()
438 end
439 v.Parent = workspace
440 table.insert(grabbed, v)
441 end
442 end
443 hatAmount = hatAmount + 1
444 end
445 character:ClearAllChildren()
446 respawn()
447 wait()
448 until
449 hatAmount >= amt
450
451 repeat wait() until tostring(localPlayer.Character) ~= "respawn_" and localPlayer.Character
452 wait(0.5)
453
454 spawn(function()
455 repeat wait() until character.PrimaryPart
456 wait(0.2)
457 character:SetPrimaryPartCFrame(lastCF)
458
459 for _, item in pairs(grabbed) do
460 if item:IsA("Accoutrement") and item:FindFirstChild("Handle") then
461 item.Parent = workspace
462 wait()
463 end
464 end
465 end)
466end)
467
468cmd.add({"toolblockspam"}, {"toolblockspam [amount]", "Spawn blocks by the given amount"}, function(amt)
469 if not amt then amt = 1 end
470 amt = tonumber(amt)
471 local tools = getTools(amt)
472 for i, tool in pairs(tools) do
473 wait()
474 spawn(function()
475 wait(0.5)
476 tool.Parent = character
477 tool.CanBeDropped = true
478 wait(0.4)
479 for _, mesh in pairs(tool:GetDescendants()) do
480 if mesh:IsA("DataModelMesh") then
481 mesh:Destroy()
482 end
483 end
484 for _, weld in pairs(character:GetDescendants()) do
485 if weld.Name == "RightGrip" then
486 weld:Destroy()
487 end
488 end
489 wait(0.1)
490 tool.Parent = workspace
491 end)
492 end
493end)
494
495cmd.add({"clonehats", "dupehats"}, {"clonehats [amount]", "Clone your hats by the given amount"}, function(amt)
496 amt = tonumber(amt) or 1
497 local hatAmount, grabbed = 0, {}
498 local lastCF = character.PrimaryPart.CFrame
499 character:ClearAllChildren()
500 respawn()
501 repeat
502 if character.Name ~= "respawn_" then
503 repeat wait() until character:FindFirstChildWhichIsA("Accoutrement")
504 wait(0.75)
505 character:MoveTo(lastCF.p)
506 wait(0.25)
507 for i, v in pairs(character:GetChildren()) do
508 if v:IsA("Accoutrement") then
509 v:WaitForChild("Handle")
510 v.Parent = workspace
511 table.insert(grabbed, v)
512 end
513 end
514 hatAmount = hatAmount + 1
515 end
516 character:ClearAllChildren()
517 respawn()
518 wait()
519 until
520 hatAmount >= amt
521
522 repeat wait() until tostring(localPlayer.Character) ~= "respawn_" and localPlayer.Character
523 wait(0.5)
524
525 spawn(function()
526 repeat wait() until character.PrimaryPart
527 wait(0.2)
528 character:SetPrimaryPartCFrame(lastCF)
529
530 for _, hat in pairs(grabbed) do
531 if hat:IsA("Accoutrement") and hat:FindFirstChild("Handle") then
532 hat.Parent = workspace
533 wait()
534 end
535 end
536 end)
537end)
538
539cmd.add({"equiptools", "equipall"}, {"equiptools", "Equip all of your tools"}, function()
540 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
541 if backpack then
542 for _, tool in pairs(backpack:GetChildren()) do
543 if tool:IsA("Tool") then
544 tool.Parent = character
545 end
546 end
547 end
548end)
549
550cmd.add({"droptools"}, {"droptools", "Drop your equipped tools"}, function()
551 for _, tool in pairs(character:GetChildren()) do
552 if tool:IsA("Tool") then
553 tool.Parent = workspace
554 end
555 end
556end)
557
558cmd.add({"unequiptools"}, {"unequiptools", "Unequip your equipped tools"}, function()
559 local h = character:FindFirstChildWhichIsA("Humanoid")
560 if h then
561 h:UnequipTools()
562 end
563end)
564
565cmd.add({"notools"}, {"notools", "Remove your tools"}, function()
566 for _, tool in pairs(character:GetChildren()) do
567 if tool:IsA("Tool") then
568 tool:Destroy()
569 end
570 end
571 for _, tool in pairs(localPlayer.Backpack:GetChildren()) do
572 if tool:IsA("Tool") then
573 tool:Destroy()
574 end
575 end
576end)
577
578cmd.add({"toolkill"}, {"toolkill <player>", "Kill the given players without FE god"}, function(p)
579 local players = argument.getPlayers(p)
580 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
581 local hum = character:FindFirstChildWhichIsA("Humanoid")
582 local root = character:FindFirstChild("HumanoidRootPart")
583 local point = root.CFrame
584
585 if not backpack:FindFirstChildWhichIsA("Tool") then
586 lib.messageOut("toolkill", "Cannot bring players, no tools found")
587 return
588 end
589
590 if backpack and hum then
591 local tools = getTools(#players+1)
592 wait()
593 for i, v in pairs(tools) do
594 v.Parent = character
595 end
596 wait()
597 for i, v in pairs(tools) do
598 v.Parent = workspace
599 end
600 wait(.2)
601 for key, player in pairs(players) do
602 local target = player.Character
603 if target and player ~= localPlayer then
604 root = character:FindFirstChild("HumanoidRootPart")
605 local assignedTool = tools[key+1]
606 local handle = assignedTool:FindFirstChild("Handle")
607 local targetPart = target:FindFirstChild("HumanoidRootPart")
608 if handle and targetPart then
609 local schar = character
610 repeat
611 wait()
612 root.CFrame = CFrame.new(900, workspace.FallenPartsDestroyHeight+15, 900)
613 root.Velocity = Vector3.new(0, 0, 0)
614 targetPart.CFrame = CFrame.new(root.Position + root.CFrame.rightVector)
615 until
616 assignedTool.Parent ~= workspace or localPlayer.Character ~= schar
617
618 wait(0.1)
619 for i, v in pairs(character:GetDescendants()) do
620 if v.Name:find("Grip") and v:isA("Weld") then
621 v:Destroy()
622 end
623 end
624 wait()
625 root.CFrame = point
626 end
627 end
628 end
629 end
630end)
631
632cmd.add({"void"}, {"void <player>", "Kill the given players without FE god"}, function(p)
633 local players = argument.getPlayers(p)
634 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
635 local hum = character:FindFirstChildWhichIsA("Humanoid")
636 local root = character:FindFirstChild("HumanoidRootPart")
637 local point = root.CFrame
638
639 if not backpack:FindFirstChildWhichIsA("Tool") then
640 lib.messageOut("void", "Cannot bring players, no tools found")
641 return
642 end
643
644 if backpack and hum then
645 local tools = getTools(#players+1)
646 wait()
647 for i, v in pairs(tools) do
648 v.Parent = character
649 end
650 wait()
651 for i, v in pairs(tools) do
652 v.Parent = workspace
653 end
654 wait(.2)
655 for key, player in pairs(players) do
656 local target = player.Character
657 if target and player ~= localPlayer then
658 root = character:FindFirstChild("HumanoidRootPart")
659 local assignedTool = tools[key+1]
660 local handle = assignedTool:FindFirstChild("Handle")
661 local targetPart = target:FindFirstChild("HumanoidRootPart")
662 if handle and targetPart then
663 local schar = character
664 repeat
665 RunService.RenderStepped:Wait()
666 root.CFrame = CFrame.new(800, workspace.FallenPartsDestroyHeight + 5, 800)
667 targetPart.CFrame = CFrame.new(root.Position + root.CFrame.rightVector)
668 until
669 assignedTool.Parent ~= workspace or localPlayer.Character ~= schar
670 root.CFrame = CFrame.new(800, workspace.FallenPartsDestroyHeight + 5, 800)
671 end
672 end
673 end
674 end
675end)
676
677cmd.add({"killall", "toolkillall"}, {"killall", "Kill all players using tools"}, function()
678 local players = Players:GetPlayers()
679 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
680 local hum = character:FindFirstChildWhichIsA("Humanoid")
681 local root = character:FindFirstChild("HumanoidRootPart")
682 local point = root.CFrame
683
684 if not backpack:FindFirstChildWhichIsA("Tool") then
685 lib.messageOut("killall", "Cannot bring players, no tools found")
686 return
687 end
688
689 if backpack and hum then
690 local tools = getTools(#players*3)
691 wait()
692 for i, v in pairs(tools) do
693 v.Grip = v.Grip * CFrame.new(math.random(-16, 16)/8,0,math.random(-16, 16)/8)
694 v.Parent = character
695 end
696 wait()
697 for i, v in pairs(tools) do
698 v.Parent = workspace
699 end
700 wait(.2)
701 for key, player in pairs(players) do
702 local target = player.Character
703 if target and player ~= localPlayer then
704 root = character:FindFirstChild("HumanoidRootPart")
705 local assignedTool = tools[key+1]
706 local handle = assignedTool:FindFirstChild("Handle")
707 local targetPart = target:FindFirstChild("HumanoidRootPart")
708 if handle and targetPart then
709 local schar = character
710 wrap(function()
711 repeat
712 RunService.RenderStepped:Wait()
713 root.CFrame = CFrame.new(900, workspace.FallenPartsDestroyHeight+30, 900)
714 targetPart.CFrame = CFrame.new(root.Position + root.CFrame.rightVector)
715 until
716 assignedTool.Parent ~= workspace or localPlayer.Character ~= schar
717 wait(0.4)
718 for i, v in pairs(character:GetDescendants()) do
719 if v:isA("Weld") then
720 if v.Part0 == handle or v.Part1 == handle then
721 v:Destroy()
722 end
723 end
724 end
725 end)
726 end
727 end
728 end
729 end
730end)
731
732cmd.add({"bringall"}, {"bringall", "Bring all players using tools"}, function()
733 local players = Players:GetPlayers()
734 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
735 local hum = character:FindFirstChildWhichIsA("Humanoid")
736 local root = character:FindFirstChild("HumanoidRootPart")
737 local point = root.CFrame
738
739 if not backpack:FindFirstChildWhichIsA("Tool") then
740 lib.messageOut("bringall", "Cannot bring players, no tools found")
741 return
742 end
743
744 if backpack and hum then
745 local tools = getTools(#players*3)
746 wait()
747 for i, v in pairs(tools) do
748 v.Grip = v.Grip * CFrame.new(math.random(-16, 16)/8,0,math.random(-16, 16)/8)
749 v.Parent = character
750 end
751 wait()
752 for i, v in pairs(tools) do
753 v.Parent = workspace
754 end
755 wait(.2)
756 for key, player in pairs(players) do
757 local target = player.Character
758 if target and player ~= localPlayer then
759 root = character:FindFirstChild("HumanoidRootPart")
760 local assignedTool = tools[key+1]
761 local handle = assignedTool:FindFirstChild("Handle")
762 local targetPart = target:FindFirstChild("HumanoidRootPart")
763 if handle and targetPart then
764 local schar = character
765 wrap(function()
766 repeat
767 wait()
768 root.CFrame = point
769 targetPart.CFrame = CFrame.new(root.Position + root.CFrame.rightVector)
770 until
771 assignedTool.Parent ~= workspace or localPlayer.Character ~= schar
772 root.CFrame = point
773 end)
774 end
775 end
776 end
777 end
778end)
779
780cmd.add({"bring"}, {"bring <player>", "Bring the given player(s)"}, function(p)
781 local players = argument.getPlayers(p)
782 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
783 local hum = character:FindFirstChildWhichIsA("Humanoid")
784 local root = character:FindFirstChild("HumanoidRootPart")
785 local point = root.CFrame
786
787 if not backpack:FindFirstChildWhichIsA("Tool") then
788 lib.messageOut("bring <player>", "Cannot bring players, no tools found")
789 return
790 end
791
792 if backpack and hum then
793 local tools = getTools(#players+1)
794 wait()
795 for i, v in pairs(tools) do
796 v.Parent = character
797 end
798 wait()
799 for i, v in pairs(tools) do
800 v.Parent = workspace
801 end
802 wait()
803 for key, player in pairs(players) do
804 local target = player.Character
805 if target and player ~= localPlayer then
806 root = character:FindFirstChild("HumanoidRootPart")
807 local assignedTool = tools[key+1]
808 local handle = assignedTool:FindFirstChild("Handle")
809 local targetPart = target:FindFirstChild("HumanoidRootPart")
810 if handle and targetPart then
811 local schar = character
812 wrap(function()
813 repeat
814 wait()
815 targetPart.CFrame = handle.CFrame
816 root.CFrame = point
817 until
818 assignedTool.Parent ~= workspace or localPlayer.Character ~= schar
819 for i, v in pairs(character:GetDescendants()) do
820 if v.Name:find("Grip") and v:isA("Weld") then
821 if v.Part0 == handle or v.Part1 == handle then
822 v:Destroy()
823 end
824 end
825 end
826 end)
827 end
828 end
829 end
830 end
831end)
832
833cmd.add({"chatspam"}, {"chatspam <number>", "Repeatedly chat a massive string <N> at a time"}, function(n)
834 local amt = tonumber(n) or 1
835 lib.connect("spam", RunService.RenderStepped:Connect(function()
836 for i = 1, amt do
837 localPlayer:Chat(("?"):rep(120000))
838 end
839 end))
840end)
841
842cmd.add({"errorlag", "animlag", "serverlag"}, {"animlag <number>", "Repeatedly error the server with a massive string <N> at a time"}, function(n)
843 local amt = tonumber(n) or 1
844 local i = 1234
845 local symbols = {"?","❤️","?","?","?","?","?","?","?","?"}
846 local function err(...)
847 i = i + 1
848 if i > 30000 then i = 1000 end
849 local hum = character:FindFirstChildWhichIsA("Humanoid")
850 local animation = Instance.new("Animation")
851 animation.AnimationId = (symbols[math.random(1, #symbols)]):rep(i)
852 hum:LoadAnimation(animation):Play()
853 animation:Destroy()
854 end
855 lib.connect("spam", RunService.RenderStepped:Connect(function()
856 for i = 1, amt do
857 err()
858 end
859 end))
860end)
861
862cmd.add({"soundspam", "playallsounds"}, {"soundspam", "Repeatedly play all sounds"}, function()
863 if SoundService.RespectFilteringEnabled == true then lib.messageOut("soundspam", "Sounds will not replicate") return end
864 local sounds = {}
865 for i, v in pairs(getinstances and getinstances() or game:GetDescendants()) do
866 pcall(function()
867 if v:IsA("Sound") and v:IsDescendantOf(workspace) then
868 table.insert(sounds, v)
869 end
870 end)
871 end
872 local c = lib.connect("spam", RunService.RenderStepped:Connect(function() end))
873 while c.Connected do
874 for _, sound in pairs(sounds) do
875 sound:Play()
876 sound.TimePosition = sound.TimeLength/3
877 end
878 wait(0.15)
879 end
880end)
881
882cmd.add({"remotespam", "exhaust"}, {"remotespam <number>", "Repeatedly fire all remotes <N> at a time"}, function(n)
883 local amt = tonumber(n) or 1
884 local events, functions = {}, {}
885 local str = ("?"):rep(120000)
886 for i, v in pairs(getinstances and getinstances() or game:GetDescendants()) do
887 pcall(function()
888 if v.Name:find("%d") == 1 then return end
889 if v:IsA("RemoteEvent") then
890 table.insert(events, v)
891 elseif v:IsA("RemoteFunction") then
892 table.insert(functions, v)
893 end
894 end)
895 end
896 lib.connect("spam", RunService.Stepped:Connect(function()
897 for i = 1, amt do
898 spawn(function()
899 for _, remote in pairs(events) do
900 remote:FireServer(str)
901 end
902 for _, remote in pairs(functions) do
903 remote:InvokeServer(str)
904 end
905 end)
906 end
907 end))
908end)
909
910cmd.add({"unspam", "unlag", "unchatspam", "unanimlag", "unremotespam"}, {"unspam", "Stop all attempts to lag/spam"}, function()
911 lib.disconnect("spam")
912end)
913
914cmd.add({"ping", "lag"}, {"ping <ms>", "Set your replication lag to a value"}, function(n)
915 local ping = (tonumber(n) or 0)/1000
916 settings():GetService("NetworkSettings").IncommingReplicationLag = ping
917end)
918
919cmd.add({"refresh", "re"}, {"refresh", "Respawn your character and teleport back to your previous position"}, function()
920 local cf, p = CFrame.new(), character:FindFirstChild("HumanoidRootPart") or character:FindFirstChild("Head")
921 if p then
922 cf = p.CFrame
923 end
924 respawn()
925 player.CharacterAdded:Wait(); wait(0.2);
926 character:WaitForChild("HumanoidRootPart").CFrame = cf
927end)
928
929cmd.add({"respawn"}, {"respawn", "Respawn your character"}, function()
930 respawn()
931end)
932
933cmd.add({"trip", "platformstand"}, {"trip", "Trip your player"}, function()
934 local hum = character:FindFirstChildWhichIsA("Humanoid")
935 local hrp = character:FindFirstChild("HumanoidRootPart")
936 if hum then
937 if hrp then
938 hrp.RotVelocity = Vector3.new(-5, 0, 0)
939 end
940 hum.PlatformStand = true
941 end
942end)
943
944cmd.add({"stand", "untrip"}, {"stand", "Stand up"}, function()
945 local hum = character:FindFirstChildWhichIsA("Humanoid")
946 if hum then
947 hum.PlatformStand = false
948 end
949end)
950
951cmd.add({"sit"}, {"sit", "Sit your player"}, function()
952 local hum = character:FindFirstChildWhichIsA("Humanoid")
953 if hum then
954 hum.Sit = true
955 end
956end)
957
958cmd.add({"antikill", "nofekill", "antifekill"}, {"antikill", "Toggle FE kill prevention -Cyrus"}, function()
959 -- from cyrus
960 if connections["antifekill"] then lib.disconnect("antifekill") return end
961 local LP = game:GetService'Players'.LocalPlayer
962 local OldCFrame = LP.Character.Head.CFrame
963 local debounce = false
964 local tools = {}
965 for _,v in pairs(LP.Backpack:GetChildren()) do
966 if v:IsA'Tool' then
967 table.insert(tools,v)
968 end
969 end
970 lib.connect("antifekill", LP.Character.ChildAdded:Connect(function(h)
971 for _,v in pairs(tools) do if h == v then return end end
972 if h:IsA'Tool' then
973 table.insert(tools,h)
974 LP.Backpack:FindFirstChildOfClass'Tool'.Parent = LP.Character
975 LP.Character:FindFirstChildOfClass'Tool'.Parent = LP.Backpack
976 for i = 1,50 do
977 LP.Character.HumanoidRootPart.CFrame = OldCFrame
978 end
979 debounce = true
980 repeat wait(1) until not LP.Character:FindFirstChildOfClass'Tool'
981 debounce = false
982 if not debounce then
983 OldCFrame = LP.Character.Head.CFrame + Vector3.new(0,5,0)
984 end
985 end
986 end))
987
988 lib.connect("antifekill", LP.Character.ChildRemoved:Connect(function(a)
989 if a:IsA'Tool' then
990 table.insert(tools,a)
991 end
992 end))
993end)
994
995cmd.add({"move", "addpos", "translate", "trans"}, {"move <X,Y,Z>", "Moves your character by the given X,Y,Z coordinates"}, function(p)
996 local players = argument.getPlayers(p)
997 local pos = lib.parseText(p, opt.tupleSeparator)
998 if character then
999 if pos and #pos == 3 then
1000 local x,y,z = pos[1], pos[2], pos[3]
1001 character:TranslateBy(Vector3.new(x, y, z))
1002 end
1003 end
1004end)
1005
1006local flyPart
1007cmd.add({"fly"}, {"fly [speed]", "Enable flight"}, function(speed)
1008 if not speed then speed = 5 end
1009 if connections["fly"] then lib.disconnect("fly") character:FindFirstChildWhichIsA("Humanoid").PlatformStand = false end
1010 local dir = {w = false, a = false, s = false, d = false}
1011 local cf = Instance.new("CFrameValue")
1012
1013 flyPart = flyPart or Instance.new("Part")
1014 flyPart.Anchored = true
1015 pcall(function()
1016 flyPart.CFrame = character.HumanoidRootPart.CFrame
1017 end)
1018
1019 lib.connect("fly", RunService.RenderStepped:Connect(function()
1020 if not character:FindFirstChild("HumanoidRootPart") then return end
1021 local primaryPart = character.HumanoidRootPart
1022 local humanoid = character:FindFirstChildWhichIsA("Humanoid")
1023
1024 local x, y, z = 0, 0, 0
1025 if dir.w then z = -1 * speed end
1026 if dir.a then x = -1 * speed end
1027 if dir.s then z = 1 * speed end
1028 if dir.d then x = 1 * speed end
1029 if dir.q then y = 1 * speed end
1030 if dir.e then y = -1 * speed end
1031
1032 for i, v in pairs(character:GetDescendants()) do
1033 if v:IsA("BasePart") then
1034 v.Velocity = Vector3.new(0, 0, 0)
1035 v.RotVelocity = Vector3.new(0, 0, 0)
1036 end
1037 end
1038 flyPart.CFrame = CFrame.new(
1039 flyPart.CFrame.p,
1040 (camera.CFrame * CFrame.new(0, 0, -100)).p
1041 )
1042
1043 local moveDir = CFrame.new(x,y,z)
1044 cf.Value = cf.Value:lerp(moveDir, 0.2)
1045 flyPart.CFrame = flyPart.CFrame:lerp(flyPart.CFrame * cf.Value, 0.2)
1046 primaryPart.CFrame = flyPart.CFrame
1047 humanoid.PlatformStand = true
1048 end))
1049 lib.connect("fly", UserInputService.InputBegan:Connect(function(input, event)
1050 if event then return end
1051 local code, codes = input.KeyCode, Enum.KeyCode
1052 if code == codes.W then
1053 dir.w = true
1054 elseif code == codes.A then
1055 dir.a = true
1056 elseif code == codes.S then
1057 dir.s = true
1058 elseif code == codes.D then
1059 dir.d = true
1060 elseif code == codes.Q then
1061 dir.q = true
1062 elseif code == codes.E then
1063 dir.e = true
1064 elseif code == codes.Space then
1065 dir.q = true
1066 end
1067 end))
1068 lib.connect("fly", UserInputService.InputEnded:Connect(function(input, event)
1069 if event then return end
1070 local code, codes = input.KeyCode, Enum.KeyCode
1071 if code == codes.W then
1072 dir.w = false
1073 elseif code == codes.A then
1074 dir.a = false
1075 elseif code == codes.S then
1076 dir.s = false
1077 elseif code == codes.D then
1078 dir.d = false
1079 elseif code == codes.Q then
1080 dir.q = false
1081 elseif code == codes.E then
1082 dir.e = false
1083 elseif code == codes.Space then
1084 dir.q = false
1085 end
1086 end))
1087end)
1088cmd.add({"unfly"}, {"unfly", "Disable flight"}, function()
1089 lib.disconnect("fly")
1090 flyPart:Destroy()
1091 character:FindFirstChildWhichIsA("Humanoid").PlatformStand = false
1092end)
1093
1094cmd.add({"noclip", "nclip", "nc"}, {"noclip", "Disable your player's collision"}, function()
1095 if connections["noclip"] then lib.disconnect("noclip") return end
1096 lib.connect("noclip", RunService.Stepped:Connect(function()
1097 if not character then return end
1098 for i, v in pairs(character:GetDescendants()) do
1099 if v:IsA("BasePart") then
1100 v.CanCollide = false
1101 end
1102 end
1103 end))
1104end)
1105cmd.add({"clip", "c"}, {"clip", "Enable your player's collision"}, function()
1106 lib.disconnect("noclip")
1107end)
1108
1109cmd.add({"freecam", "fc", "fcam"}, {"freecam [speed]", "Enable free camera"}, function(speed)
1110 if not speed then speed = 5 end
1111 if connections["freecam"] then lib.disconnect("freecam") camera.CameraSubject = character wrap(function() character.PrimaryPart.Anchored = false end) end
1112 local dir = {w = false, a = false, s = false, d = false}
1113 local cf = Instance.new("CFrameValue")
1114 local camPart = Instance.new("Part")
1115 camPart.Transparency = 1
1116 camPart.Anchored = true
1117 camPart.CFrame = camera.CFrame
1118 wrap(function()
1119 character.PrimaryPart.Anchored = true
1120 end)
1121
1122 lib.connect("freecam", RunService.RenderStepped:Connect(function()
1123 local primaryPart = camPart
1124 camera.CameraSubject = primaryPart
1125
1126 local x, y, z = 0, 0, 0
1127 if dir.w then z = -1 * speed end
1128 if dir.a then x = -1 * speed end
1129 if dir.s then z = 1 * speed end
1130 if dir.d then x = 1 * speed end
1131 if dir.q then y = 1 * speed end
1132 if dir.e then y = -1 * speed end
1133
1134 primaryPart.CFrame = CFrame.new(
1135 primaryPart.CFrame.p,
1136 (camera.CFrame * CFrame.new(0, 0, -100)).p
1137 )
1138
1139 local moveDir = CFrame.new(x,y,z)
1140 cf.Value = cf.Value:lerp(moveDir, 0.2)
1141 primaryPart.CFrame = primaryPart.CFrame:lerp(primaryPart.CFrame * cf.Value, 0.2)
1142 end))
1143 lib.connect("freecam", UserInputService.InputBegan:Connect(function(input, event)
1144 if event then return end
1145 local code, codes = input.KeyCode, Enum.KeyCode
1146 if code == codes.W then
1147 dir.w = true
1148 elseif code == codes.A then
1149 dir.a = true
1150 elseif code == codes.S then
1151 dir.s = true
1152 elseif code == codes.D then
1153 dir.d = true
1154 elseif code == codes.Q then
1155 dir.q = true
1156 elseif code == codes.E then
1157 dir.e = true
1158 elseif code == codes.Space then
1159 dir.q = true
1160 end
1161 end))
1162 lib.connect("freecam", UserInputService.InputEnded:Connect(function(input, event)
1163 if event then return end
1164 local code, codes = input.KeyCode, Enum.KeyCode
1165 if code == codes.W then
1166 dir.w = false
1167 elseif code == codes.A then
1168 dir.a = false
1169 elseif code == codes.S then
1170 dir.s = false
1171 elseif code == codes.D then
1172 dir.d = false
1173 elseif code == codes.Q then
1174 dir.q = false
1175 elseif code == codes.E then
1176 dir.e = false
1177 elseif code == codes.Space then
1178 dir.q = false
1179 end
1180 end))
1181end)
1182cmd.add({"unfreecam", "unfc", "unfcam"}, {"unfreecam", "Disable free camera"}, function()
1183 lib.disconnect("freecam")
1184 camera.CameraSubject = character
1185 wrap(function()
1186 character.PrimaryPart.Anchored = false
1187 end)
1188end)
1189
1190cmd.add({"drophats"}, {"drophats", "Drop all of your hats"}, function()
1191 for _, hat in pairs(character:GetChildren()) do
1192 if hat:IsA("Accoutrement") then
1193 hat.Parent = workspace
1194 end
1195 end
1196end)
1197
1198cmd.add({"hatspin"}, {"hatspin <height>", "Make your hats spin"}, function(h)
1199 local head = character:FindFirstChild("Head")
1200 if not head then return end
1201 for _, hat in pairs(character:GetChildren()) do
1202 if hat:IsA("Accoutrement") and hat:FindFirstChild("Handle") then
1203 local handle = hat.Handle
1204 handle:BreakJoints()
1205
1206 local align = Instance.new("AlignPosition")
1207 local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
1208 align.Attachment0, align.Attachment1 = a0, a1
1209 align.RigidityEnabled = true
1210 a1.Position = Vector3.new(0, tonumber(h) or 0.5, 0)
1211 lock(align, handle); lock(a0, handle); lock(a1, head);
1212
1213 local angular = Instance.new("BodyAngularVelocity")
1214 angular.AngularVelocity = Vector3.new(0, math.random(100, 160)/16, 0)
1215 angular.MaxTorque = Vector3.new(0, 400000, 0)
1216 lock(angular, handle);
1217 end
1218 end
1219end)
1220
1221cmd.add({"hatorbit"}, {"hatorbit [height] [distance]", "Make your hats orbit around your head"}, function(h, d)
1222 local head = character:FindFirstChild("Head")
1223 if not head then return end
1224 local i = 3
1225 for _, hat in pairs(character:GetChildren()) do
1226 if hat:IsA("Accoutrement") and hat:FindFirstChild("Handle") then
1227 local handle = hat.Handle
1228 handle:BreakJoints()
1229
1230 local align = Instance.new("AlignPosition")
1231 local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
1232 align.Attachment0, align.Attachment1 = a0, a1
1233 align.RigidityEnabled = true
1234 lock(align, handle); lock(a0, handle); lock(a1, head);
1235 i = i + 0.5
1236 local n = tonumber(d) or i
1237 wrap(function()
1238 local rotX, rotY = 0, math.pi/2
1239 local speed = math.random(25, 100)/1000
1240 while handle and handle.Parent do
1241 rotX, rotY = rotX + speed, rotY + speed
1242 a1.Position = Vector3.new(math.sin(rotX) * (n), tonumber(h) or 0, math.sin(rotY) * (n))
1243 RunService.RenderStepped:Wait(0)
1244 end
1245 end)
1246 end
1247 end
1248end)
1249
1250cmd.add({"limbbounce"}, {"limbbounce [height] [distance]", "Make your limbs bounce around your head"}, function(h, d)
1251 local head = character:FindFirstChild("Head")
1252 if not head then return end
1253 local i = 2
1254 for _, part in pairs(character:GetDescendants()) do
1255 local name = part.Name:lower()
1256 if part:IsA("BasePart") and not part.Parent:IsA("Accoutrement") and not name:find("torso") and not name:find("head") and not name:find("root") then
1257 i = i + math.random(15,50)/100
1258 part:BreakJoints()
1259 local n = tonumber(d) or i
1260
1261 local align = Instance.new("AlignPosition")
1262 local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
1263 align.Attachment0, align.Attachment1 = a0, a1
1264 align.RigidityEnabled = true
1265 lock(align, part); lock(a0, part); lock(a1, head);
1266
1267 wrap(function()
1268 local rotX = 0
1269 local speed = math.random(350, 750)/10000
1270 while part and part.Parent do
1271 rotX = rotX + speed
1272 a1.Position = Vector3.new(0, (tonumber(h) or 0) + math.sin(rotX) * n, 0)
1273 RunService.RenderStepped:Wait(0)
1274 end
1275 end)
1276 end
1277 end
1278end)
1279
1280cmd.add({"limborbit"}, {"limborbit [height] [distance]", "Make your limbs orbit around your head"}, function(h, d)
1281 local head = character:FindFirstChild("Head")
1282 if not head then return end
1283 local i = 2
1284 for _, part in pairs(character:GetDescendants()) do
1285 local name = part.Name:lower()
1286 if part:IsA("BasePart") and not part.Parent:IsA("Accoutrement") and not name:find("torso") and not name:find("head") and not name:find("root") then
1287 i = i + math.random(15,50)/100
1288 part:BreakJoints()
1289 local n = tonumber(d) or i
1290
1291 local align = Instance.new("AlignPosition")
1292 local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
1293 align.Attachment0, align.Attachment1 = a0, a1
1294 align.RigidityEnabled = true
1295 lock(align, part); lock(a0, part); lock(a1, head);
1296
1297 wrap(function()
1298 local rotX, rotY = 0, math.pi/2
1299 local speed = math.random(35, 75)/1000
1300 while part and part.Parent do
1301 rotX, rotY = rotX + speed, rotY + speed
1302 a1.Position = Vector3.new(math.sin(rotX) * (n), tonumber(h) or 0, math.sin(rotY) * (n))
1303 RunService.RenderStepped:Wait(0)
1304 end
1305 end)
1306 end
1307 end
1308end)
1309
1310local function getAllTools()
1311 local tools = {}
1312 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
1313 if backpack then
1314 for i, v in pairs(backpack:GetChildren()) do
1315 if v:IsA("Tool") then
1316 table.insert(tools, v)
1317 end
1318 end
1319 end
1320 for i, v in pairs(character:GetChildren()) do
1321 if v:IsA("Tool") then
1322 table.insert(tools, v)
1323 end
1324 end
1325 return tools
1326end
1327
1328cmd.add({"circlemath", "cm"}, {"circlemath <mode> <size>", "Gay circle math\nModes: abc..."}, function(mode, size)
1329 local mode = mode or "a"
1330 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
1331 lib.disconnect("cm")
1332 if backpack and character.Parent then
1333 local tools = getAllTools()
1334 for i, tool in pairs(tools) do
1335 local cpos, g = (math.pi*2)*(i/#tools), CFrame.new()
1336 local tcon = {}
1337 tool.Parent = backpack
1338
1339 if mode == "a" then
1340 size = tonumber(size) or 2
1341 g = (
1342 CFrame.new(0, 0, size)*
1343 CFrame.Angles(rad(90), 0, cpos)
1344 )
1345 elseif mode == "b" then
1346 size = tonumber(size) or 2
1347 g = (
1348 CFrame.new(i - #tools/2, 0, 0)*
1349 CFrame.Angles(rad(90), 0, 0)
1350 )
1351 elseif mode == "c" then
1352 size = tonumber(size) or 2
1353 g = (
1354 CFrame.new(cpos/3, 0, 0)*
1355 CFrame.Angles(rad(90), 0, cpos*2)
1356 )
1357 elseif mode == "d" then
1358 size = tonumber(size) or 2
1359 g = (
1360 CFrame.new(clamp(tan(cpos), -3, 3), 0, 0)*
1361 CFrame.Angles(rad(90), 0, cpos)
1362 )
1363 elseif mode == "e" then
1364 size = tonumber(size) or 2
1365 g = (
1366 CFrame.new(0, 0, clamp(tan(cpos), -5, 5))*
1367 CFrame.Angles(rad(90), 0, cpos)
1368 )
1369 end
1370 tool.Grip = g
1371 tool.Parent = character
1372
1373 tcon[#tcon] = lib.connect("cm", mouse.Button1Down:Connect(function()
1374 tool:Activate()
1375 end))
1376 tcon[#tcon] = lib.connect("cm", tool.Changed:Connect(function(p)
1377 if p == "Grip" and tool.Grip ~= g then
1378 tool.Grip = g
1379 end
1380 end))
1381
1382 lib.connect("cm", tool.AncestryChanged:Connect(function()
1383 for i = 1, #tcon do
1384 tcon[i]:Disconnect()
1385 end
1386 end))
1387 end
1388 end
1389end)
1390
1391local r = math.rad
1392local center = CFrame.new(1.5, 0.5, -1.5)
1393
1394cmd.add({"toolanimate"}, {"toolanimate <mode> <int>", "Make your tools epic\nModes: ufo/ring/shutter/saturn/portal/wtf/ball/tor"}, function(mode, int)
1395 lib.disconnect("tooldance")
1396 local int = tonumber(int) or 5
1397 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
1398 local primary = character:FindFirstChild("HumanoidRootPart")
1399 if backpack and primary then
1400 local tools = getAllTools()
1401 for i, tool in pairs(tools) do
1402 if tool:IsA("Tool") and tool:FindFirstChild("Handle") then
1403 local circ = (i/#tools)*(math.pi*2)
1404
1405 local function editGrip(tool, cframe, offset)
1406 local origin = CFrame.new(cframe.p):inverse()
1407 local x, y, z = cframe:toEulerAnglesXYZ()
1408 local new = CFrame.Angles(x, y, z)
1409 local grip = (origin * new):inverse()
1410 tool.Parent = backpack
1411 tool.Grip = offset * grip
1412 tool.Parent = character
1413
1414 for i, v in pairs(tool:GetDescendants()) do
1415 if v:IsA("Sound") then
1416 v:Stop()
1417 end
1418 end
1419 end
1420 tool.Handle.Massless = true
1421
1422 if mode == "ufo" then
1423 local s = {}
1424 local x, y = i, i + math.pi / 2
1425 lib.connect("tooldance", RunService.Heartbeat:Connect(function()
1426 s.x = math.sin(x)
1427 s.y = math.sin(y)
1428 x, y = x + 0.1, y + 0.1
1429
1430 local cframe =
1431 center *
1432 CFrame.new() *
1433 CFrame.Angles(r(s.y*10), circ + r(s.y*8), r(s.x*10))
1434 local offset =
1435 CFrame.new(int, 0, 0) *
1436 CFrame.Angles(0, 0, 0)
1437 editGrip(tool, cframe, offset)
1438 end))
1439 elseif mode == "ring" then
1440 local s = {}
1441 local x, y = i, i + math.pi / 2
1442 lib.connect("tooldance", RunService.Heartbeat:Connect(function()
1443 s.x = math.sin(x)
1444 s.y = math.sin(y)
1445 x, y = x + 0.04, y + 0.04
1446
1447 local cframe =
1448 center *
1449 CFrame.new(0, 3, 0) *
1450 CFrame.Angles(0, circ, x)
1451 local offset =
1452 CFrame.new(0, 0, int) *
1453 CFrame.Angles(0, 0, 0)
1454 editGrip(tool, cframe, offset)
1455 end))
1456 elseif mode == "shutter" then
1457 local s = {}
1458 local x, y = 0, math.pi / 2
1459 lib.connect("tooldance", RunService.Heartbeat:Connect(function()
1460 s.x = math.sin(x)
1461 s.y = math.sin(y)
1462 x, y = x + 0.1, y + 0.1
1463
1464 local cframe =
1465 center *
1466 CFrame.new(0, 0, 0) *
1467 CFrame.Angles(0, 0, circ + 0)
1468 local offset =
1469 CFrame.new(s.y*6, 0, int) *
1470 CFrame.Angles(r(-90), 0, 0)
1471 editGrip(tool, cframe, offset)
1472 end))
1473 elseif mode == "saturn" then
1474 local s = {}
1475 local x, y = 0, math.pi / 2
1476 lib.connect("tooldance", RunService.Heartbeat:Connect(function()
1477 s.x = math.sin(x)
1478 s.y = math.sin(y)
1479 x, y = x + 0.1, y + 0.1
1480 local cframe =
1481 center *
1482 CFrame.new(0, 0, 0) *
1483 CFrame.Angles(0, circ, 0)
1484 local offset =
1485 CFrame.new(s.y*6, 0, int) *
1486 CFrame.Angles(0, 0, r(0))
1487 editGrip(tool, cframe, offset)
1488 end))
1489 elseif mode == "portal" then
1490 local s = {}
1491 local x, y = 0, math.pi / 2
1492 lib.connect("tooldance", RunService.Heartbeat:Connect(function()
1493 s.x = math.sin(x)
1494 s.y = math.sin(y)
1495 x, y = x + 0.1, y + 0.1
1496
1497 local cframe =
1498 center *
1499 CFrame.new(0, 0, 0) *
1500 CFrame.Angles(0, 0, circ + r(x*45))
1501 local offset =
1502 CFrame.new(3, 0, int) *
1503 CFrame.Angles(r(-90), 0, 0)
1504 editGrip(tool, cframe, offset)
1505 end))
1506 elseif mode == "ball" then
1507 local s = {}
1508 local n = math.random()*#tools
1509 local x, y = n, n+math.pi / 2
1510 local random = math.random()
1511 lib.connect("tooldance", RunService.Heartbeat:Connect(function()
1512 s.x = math.sin(x)
1513 s.y = math.sin(y)
1514 x, y = x + 0.1, y + 0.1
1515 local cframe =
1516 center *
1517 CFrame.new(0, 0, 0) *
1518 CFrame.Angles(r(y*25), circ, r(y*25))
1519 local offset =
1520 CFrame.new(0, int + random*2, 0) *
1521 CFrame.Angles(r(x*15), 0, 0)
1522 editGrip(tool, cframe, offset)
1523 end))
1524 elseif mode == "wtf" then
1525 local s = {}
1526 local x, y = math.random()^3, math.random()^3+math.pi / 2
1527 lib.connect("tooldance", RunService.Heartbeat:Connect(function()
1528 s.x = math.sin(x)
1529 s.y = math.sin(y)
1530 x, y = x + 0.1 + math.random()/10, y + 0.1 + math.random()/10
1531 local cframe =
1532 center *
1533 CFrame.new(0, 0, 0) *
1534 CFrame.Angles(r(y*100)+math.random(), circ, r(y*100)+math.random())
1535 local offset =
1536 CFrame.new(0, int + math.random()*4, 0) *
1537 CFrame.Angles(r(x*100), 0, 0)
1538 editGrip(tool, cframe, offset)
1539 end))
1540 elseif mode == "tor" then
1541 local s = {}
1542 local x, y = i*1, i*1+math.pi / 2
1543 local random = math.random()
1544 lib.connect("tooldance", RunService.Heartbeat:Connect(function()
1545 s.x = math.sin(x)
1546 s.y = math.sin(y)
1547 x, y = x + (int/75), y+0.1
1548 local cframe =
1549 center *
1550 CFrame.new(1.5, 2, 0) *
1551 CFrame.Angles(r(-90-25), 0, 0)
1552 local offset =
1553 CFrame.new(0, s.x*3, -int+math.sin(y/5)*-int) *
1554 CFrame.Angles(r(int), s.x, -x)
1555 editGrip(tool, cframe, offset)
1556 end))
1557 end
1558 else
1559 table.remove(tools, i)
1560 end
1561 end
1562 end
1563end)
1564
1565cmd.add({"tooldance", "td"}, {"tooldance <mode> <size>", "Make your tools dance\nModes: tor/sph/inf/rng/whl/wht/voi"}, function(mode, size)
1566 local size = tonumber(size) or 5
1567 lib.disconnect("tooldance")
1568 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
1569 local primary = character:FindFirstChild("HumanoidRootPart")
1570 if backpack and primary then
1571 local i, tools = 0, getAllTools()
1572 for _, tool in pairs(tools) do
1573 if tool:IsA("Tool") and tool:FindFirstChild("Handle") then
1574 i=i+1
1575 tool.Parent = character
1576 local n = i
1577 local grip = character:FindFirstChild("RightGrip", true)
1578 local arm = grip.Parent
1579
1580 local function editGrip(cf)
1581 tool.Parent = backpack
1582 tool.Grip = cf
1583 tool.Parent = character
1584
1585 for i, v in pairs(tool:GetDescendants()) do
1586 if v:IsA("Sound") and v.Name:find("sheath") then
1587 v:Destroy()
1588 end
1589 end
1590 end
1591 tool.Handle.Massless = true
1592
1593 if mode == "tor" then
1594 local x, y = n, n+math.pi/2
1595 lib.connect("tooldance", RunService.RenderStepped:Connect(function()
1596 x,y = x+(size/75),y+0.1
1597 local sx,sy = math.sin(x),math.sin(y)
1598 editGrip(
1599 CFrame.new(
1600 Vector3.new(0, math.sin(x * 0.5), size + 3 + math.sin(y / 5) * size)
1601 ) *
1602 CFrame.Angles(
1603 math.rad(size),
1604 math.sin(x),
1605 -x
1606 )
1607 )
1608 end))
1609 elseif mode == "sph" then
1610 local x, y = n, n+math.pi/2
1611 lib.connect("tooldance", RunService.RenderStepped:Connect(function()
1612 x,y = x+.1,y+.1
1613 local sx,sy = math.sin(x),math.sin(y)
1614 editGrip(
1615 CFrame.new(
1616 Vector3.new(0, size, 0)
1617 ) *
1618 CFrame.Angles(
1619 math.deg(x/150),
1620 x + rad(90),
1621 0
1622 )
1623 )
1624 end))
1625 elseif mode == "inf" then
1626 local x, y = n, n+math.pi/2
1627 lib.connect("tooldance", RunService.RenderStepped:Connect(function()
1628 x,y = x+.1,y+.1
1629 local sx,sy = math.sin(x),math.sin(y)
1630 editGrip(
1631 CFrame.new(
1632 Vector3.new(0, size, 0)
1633 ) *
1634 CFrame.Angles(
1635 x,
1636 x + rad(90),
1637 0
1638 )
1639 )
1640 end))
1641 elseif mode == "wht" then
1642 local x, y = n, n+math.pi/2
1643 lib.connect("tooldance", RunService.RenderStepped:Connect(function()
1644 x,y = x+.1,y+.1
1645 local sx,sy = math.sin(x),math.sin(y)
1646 editGrip(
1647 CFrame.new(
1648 Vector3.new(0, size, 0)
1649 ) *
1650 CFrame.Angles(
1651 (y+math.sin(x)*10)/10,
1652 x + rad(90),
1653 0
1654 )
1655 )
1656 end))
1657 elseif mode == "rng" then
1658 local x, y = n, n+math.pi/2
1659 lib.connect("tooldance", RunService.RenderStepped:Connect(function()
1660 x,y = x+0.1,y+0.1
1661 local sx,sy = math.sin(x),math.sin(y)
1662 editGrip(
1663 CFrame.new(
1664 0, 0, size
1665 ) *
1666 CFrame.Angles(
1667 0,
1668 x,
1669 0
1670 )
1671 )
1672 end))
1673 elseif mode == "whl" then
1674 local x, y = n, n+math.pi/2
1675 lib.connect("tooldance", RunService.RenderStepped:Connect(function()
1676 x,y = x+0.1,y+0.1
1677 local sx,sy = math.sin(x),math.sin(y)
1678 editGrip(
1679 CFrame.new(
1680 Vector3.new(0, 0, size)
1681 ) *
1682 CFrame.Angles(
1683 x,
1684 0,
1685 0
1686 )
1687 )
1688 end))
1689 elseif mode == "voi" then
1690 local x, y = n, n+math.pi/2
1691 lib.connect("tooldance", RunService.RenderStepped:Connect(function()
1692 x,y = x+0.1,y+0.1
1693 local sx,sy = math.sin(x),math.sin(y)
1694 editGrip(
1695 CFrame.new(
1696 Vector3.new(size, 0, 0)
1697 ) *
1698 CFrame.Angles(
1699 0,
1700 .6 + sy/3,
1701 (n) + sx + x
1702 )
1703 )
1704 end))
1705 end
1706 end
1707 end
1708 end
1709end)
1710cmd.add({"nodance", "untooldance"}, {"nodance", "Stop making tools dance"}, function()
1711 lib.disconnect("tooldance")
1712end)
1713
1714cmd.add({"toolvis", "audiovis"}, {"toolvis <size>", "Turn your tools into an audio visualizer"}, function(size)
1715 lib.disconnect("tooldance")
1716 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
1717 local primary = character:FindFirstChild("HumanoidRootPart")
1718 local hum = character:FindFirstChild("Humanoid")
1719 local sound
1720 for i, v in pairs(character:GetDescendants()) do
1721 if v:IsA("Sound") and v.Playing then
1722 sound = v
1723 end
1724 end
1725 if backpack and primary and sound then
1726 local tools = getAllTools()
1727 local t = 0
1728 for i, tool in pairs(tools) do
1729 if tool.Parent == character and tool:IsA("BackpackItem") and tool:FindFirstChildWhichIsA("BasePart") and tool.Parent == character then
1730 local grip = character:FindFirstChild("RightGrip", true)
1731 local oldParent = grip.Parent
1732 lib.connect("tooldance", RunService.RenderStepped:Connect(function()
1733 if not sound then lib.disconnect("tooldance") end
1734 tool.Parent = character
1735 grip.Parent = oldParent
1736 end))
1737 end
1738 end
1739 wait()
1740 for i, tool in pairs(tools) do
1741 if tool.Parent == backpack and tool:IsA("BackpackItem") and tool:FindFirstChildWhichIsA("BasePart") then
1742 t = t + 1
1743 tool.Parent = character
1744 local n = i
1745 local grip = character:FindFirstChild("RightGrip", true)
1746 local arm = grip.Parent
1747
1748 local function editGrip(cf)
1749 tool.Parent = backpack
1750 tool.Grip = tool.Grip:lerp(cf, 0.2)
1751 tool.Parent = character
1752 for i, v in pairs(tool:GetDescendants()) do
1753 if v:IsA("Sound") then
1754 v.Parent = nil
1755 end
1756 end
1757 end
1758 tool.Handle.Massless = true
1759
1760 local x,y,z,a = n,n+math.pi/2,n,0
1761 lib.connect("tooldance", RunService.Heartbeat:Connect(function()
1762 if not sound then lib.disconnect("tooldance") end
1763
1764 local mt, loudness = sound.PlaybackLoudness/100, sound.PlaybackLoudness
1765 local sx, sy, sz, sa = math.sin(x), math.sin(y), math.sin(z), math.sin(a)
1766 x,y,z,a = x + 0.22 + mt / 100, y + sx + mt, z + sx/10, a + mt/100 + math.sin(x-n)/100
1767 editGrip(
1768 CFrame.new(
1769 Vector3.new(
1770 0,
1771 2 + ((sx/2) * (mt^3/15))/3 - ((sx+0.5)/1.5 * ((loudness/10)^2/400)),
1772 tonumber(size) or 7
1773 )
1774 ) *
1775 CFrame.Angles(
1776 math.rad((sz+1)/2)*5,
1777 ((math.pi*2)*(n/t)) - (a),
1778 math.rad(sx)*5
1779 )
1780 )
1781 end))
1782 end
1783 end
1784 end
1785end)
1786
1787cmd.add({"toolspin"}, {"toolspin [height] [amount]", "Make your tools spin on your head"}, function(h, amt)
1788 if not amt then amt = 1000 end
1789 local head = character:FindFirstChild("Head")
1790 if not head then return end
1791 for i, tool in pairs(localPlayer.Backpack:GetChildren()) do
1792 if tool:IsA("Tool") and tool:FindFirstChild("Handle") then
1793 if i >= (tonumber(amt) or 1000) then break end
1794 if tool:FindFirstChildWhichIsA("LocalScript") then
1795 tool:FindFirstChildWhichIsA("LocalScript").Disabled = true
1796 end
1797 tool.Parent = character
1798 end
1799 end
1800 wait(0.5)
1801 for _, tool in pairs(character:GetChildren()) do
1802 if tool:IsA("Tool") then
1803 wrap(function()
1804 tool:WaitForChild("Handle")
1805 for i, part in pairs(tool:GetDescendants()) do
1806 if part:IsA("BasePart") then
1807 part:BreakJoints()
1808
1809 local align = Instance.new("AlignPosition")
1810 local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
1811 align.Attachment0, align.Attachment1 = a0, a1
1812 align.RigidityEnabled = true
1813 a1.Position = Vector3.new(0, tonumber(h) or 0, 0)
1814 lock(align, part); lock(a0, part); lock(a1, head);
1815
1816 local angular = Instance.new("BodyAngularVelocity")
1817 angular.AngularVelocity = Vector3.new(0, math.random(100, 160)/16, 0)
1818 angular.MaxTorque = Vector3.new(0, 400000, 0)
1819 lock(angular, part);
1820
1821 spawn(function()
1822 repeat wait() until tool.Parent ~= character
1823 angular:Destroy()
1824 align:Destroy()
1825 end)
1826 end
1827 end
1828 end)
1829 end
1830 end
1831end)
1832
1833cmd.add({"toolorbit"}, {"toolorbit [height] [distance] [amount]", "Make your tools orbit around your head"}, function(h, d, amt)
1834 if not amt then amt = 1000 end
1835 local head = character:FindFirstChild("Head")
1836 if not head then return end
1837 for i, tool in pairs(localPlayer.Backpack:GetChildren()) do
1838 if tool:IsA("Tool") and tool:FindFirstChild("Handle") then
1839 if i >= (tonumber(amt) or 1000) then break end
1840 if tool:FindFirstChildWhichIsA("LocalScript") then
1841 tool:FindFirstChildWhichIsA("LocalScript").Disabled = true
1842 end
1843 tool.Parent = character
1844 end
1845 end
1846 wait(0.5)
1847 for _, tool in pairs(character:GetChildren()) do
1848 if tool:IsA("Tool") then
1849 wrap(function()
1850 tool:WaitForChild("Handle")
1851 for i, part in pairs(tool:GetDescendants()) do
1852 if part:IsA("BasePart") then
1853 part:BreakJoints()
1854
1855 local align = Instance.new("AlignPosition")
1856 local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
1857 align.Attachment0, align.Attachment1 = a0, a1
1858 align.RigidityEnabled = true
1859 lock(align, part); lock(a0, part); lock(a1, head);
1860 wrap(function()
1861 local rotX, rotY = 0, math.pi/2
1862 local speed = math.random(25, 100)/1000
1863 local n = tonumber(d) or math.random(300, 700)/100
1864 local y = tonumber(h) or math.random(-100, 100)/100/2
1865 rotY, rotX = rotY + n, rotX + n
1866
1867 part.CollisionGroupId = math.random(1000000,9999999)
1868 part.Anchored = false
1869 part.CFrame = head.CFrame * CFrame.new(0, 3, 0)
1870
1871 while part and part.Parent and tool.Parent == character do
1872 rotX, rotY = rotX + speed, rotY + speed
1873 a1.Position = Vector3.new(math.sin(rotX) * n, y, math.sin(rotY) * n)
1874 RunService.RenderStepped:Wait(0)
1875 end
1876 end)
1877 end
1878 end
1879 end)
1880 end
1881 end
1882end)
1883
1884cmd.add({"blockhats"}, {"blockhats", "Remove the meshes in your hats"}, function()
1885 for _, hat in pairs(character:GetChildren()) do
1886 if hat:IsA("Accoutrement") and hat:FindFirstChild("Handle") then
1887 local handle = hat.Handle
1888 if handle:FindFirstChildWhichIsA("SpecialMesh") then
1889 handle:FindFirstChildWhichIsA("SpecialMesh"):Destroy()
1890 end
1891 end
1892 end
1893end)
1894
1895cmd.add({"blocktools"}, {"blocktools", "Remove the meshes in your tools"}, function()
1896 for _, tool in pairs(character:GetChildren()) do
1897 if tool:IsA("Tool") then
1898 for _, mesh in pairs(tool:GetDescendants()) do
1899 if mesh:IsA("DataModelMesh") then
1900 mesh:Destroy()
1901 end
1902 end
1903 end
1904 end
1905end)
1906
1907cmd.add({"nomeshes", "nomesh", "blocks"}, {"nomeshes", "Remove all character meshes"}, function()
1908 for _, mesh in pairs(character:GetDescendants()) do
1909 if mesh:IsA("DataModelMesh") then
1910 mesh:Destroy()
1911 end
1912 end
1913end)
1914
1915cmd.add({"nodecals", "nodecal", "notextures"}, {"nodecals", "Remove all character images"}, function()
1916 for _, img in pairs(character:GetDescendants()) do
1917 if img:IsA("Decal") or img:IsA("Texture") then
1918 img:Destroy()
1919 end
1920 end
1921end)
1922
1923cmd.add({"godmode"}, {"godmode", "Fling anyone that touches you using angular velocity"}, function()
1924 lib.disconnect("pfling")
1925 local char = player.Character
1926 local hum = char:FindFirstChildWhichIsA("Humanoid")
1927
1928 if char then
1929 local cf = char.HumanoidRootPart.CFrame
1930 local bv = Instance.new("BodyAngularVelocity", char.HumanoidRootPart)
1931 bv.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
1932 bv.P = math.huge
1933 bv.AngularVelocity = Vector3.new(0, 9e5, 0)
1934 bv.Name = "hum"
1935 lock(bv)
1936
1937 wait()
1938 char.HumanoidRootPart.CFrame = cf
1939 char.HumanoidRootPart.Velocity = Vector3.new(0, 0, 0)
1940
1941 for i,v in pairs(char:GetDescendants()) do
1942 if v:IsA('BasePart') then
1943 v.Massless = true
1944 v.Velocity = Vector3.new(0, 0, 0)
1945 end
1946 end
1947
1948 local c = lib.connect("pfling", game:GetService('RunService').Stepped:Connect(function()
1949 for i,v in pairs(char:GetDescendants()) do
1950 if v:IsA('BasePart') then
1951 v.CanCollide = false
1952 end
1953 end
1954 end))
1955 repeat
1956 wait()
1957 until
1958 character ~= char or not c.Connected
1959
1960 lib.disconnect("pfling")
1961 if lp.Character == char then
1962 char:SetPrimaryPartCFrame(cf)
1963 bv:Destroy()
1964 char.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
1965 char.HumanoidRootPart.RotVelocity = Vector3.new(0,0,0)
1966 end
1967 end
1968end)
1969
1970cmd.add({"toolfling"}, {"toolfling", "Fling anyone that touches you using an accessory"}, function()
1971 lib.disconnect("pfling")
1972 local char = player.Character
1973 local hrp = char:FindFirstChild("HumanoidRootPart")
1974 local hum = char:FindFirstChildWhichIsA("Humanoid")
1975 local tors = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
1976 if char then
1977 local c = lib.connect("pfling", RunService.Stepped:Connect(function()
1978 for i, v in pairs(char:GetDescendants()) do
1979 if v:IsA("BasePart") then
1980 v.CanCollide = false
1981 end
1982 end
1983 end))
1984 tors.Anchored = true
1985 local tool = Instance.new("Tool", localPlayer.Backpack)
1986 local hat = char:FindFirstChildOfClass("Accessory")
1987 local hathandle = hat.Handle
1988
1989 hathandle.Parent = tool
1990 hathandle.Massless = true
1991 tool.GripPos = Vector3.new(0, 9e99, 0)
1992 tool.Parent = localPlayer.Character
1993
1994 repeat wait() until char:FindFirstChildOfClass("Tool") ~= nil
1995 tool.Grip = CFrame.new(Vector3.new(0, 0, 0))
1996 tors.Anchored = false
1997
1998 repeat
1999 hrp.CFrame = hrp.CFrame
2000 wait()
2001 until not c.Connected
2002
2003 hum:UnequipTools()
2004 hathandle.Parent = hat
2005 hathandle.Massless = false
2006 tool:Destroy()
2007 end
2008end)
2009
2010cmd.add({"ungodmode", "untoolfling", "ungod"}, {"ungodmode", "Disable permanent fling"}, function()
2011 lib.disconnect("pfling")
2012end)
2013
2014--[ PLAYER ]--
2015cmd.add({"orbit"}, {"orbit <player> <distance>", "Orbit around a player"}, function(p,d)
2016 lib.disconnect("orbit")
2017 local players = argument.getPlayers(p)
2018 local target = players[1]
2019 if not target then return end
2020
2021 local tchar, char = target.Character, character
2022 local thrp = tchar:FindFirstChild("HumanoidRootPart")
2023 local hrp = char:FindFirstChild("HumanoidRootPart")
2024 local dist = tonumber(d) or 4
2025
2026 if tchar and char and thrp and hrp then
2027 local sineX, sineZ = 0, math.pi/2
2028 lib.connect("orbit", RunService.Stepped:Connect(function()
2029 sineX, sineZ = sineX + 0.05, sineZ + 0.05
2030 local sinX, sinZ = math.sin(sineX), math.sin(sineZ)
2031 if thrp.Parent and hrp.Parent then
2032 hrp.Velocity = Vector3.new(0, 0, 0)
2033 hrp.CFrame = CFrame.new(sinX * dist, 0, sinZ * dist) *
2034 (hrp.CFrame - hrp.CFrame.p) +
2035 thrp.CFrame.p
2036 end
2037 end))
2038 end
2039end)
2040
2041cmd.add({"uporbit"}, {"uporbit <player> <distance>", "Orbit around a player on the Y axis"}, function(p,d)
2042 lib.disconnect("orbit")
2043 local players = argument.getPlayers(p)
2044 local target = players[1]
2045 if not target then return end
2046
2047 local tchar, char = target.Character, character
2048 local thrp = tchar:FindFirstChild("HumanoidRootPart")
2049 local hrp = char:FindFirstChild("HumanoidRootPart")
2050 local dist = tonumber(d) or 4
2051
2052 if tchar and char and thrp and hrp then
2053 local sineX, sineY = 0, math.pi/2
2054 lib.connect("orbit", RunService.Stepped:Connect(function()
2055 sineX, sineY = sineX + 0.05, sineY + 0.05
2056 local sinX, sinY = math.sin(sineX), math.sin(sineY)
2057 if thrp.Parent and hrp.Parent then
2058 hrp.Velocity = Vector3.new(0, 0, 0)
2059 hrp.CFrame = CFrame.new(sinX * dist, sinY * dist, 0) *
2060 (hrp.CFrame - hrp.CFrame.p) +
2061 thrp.CFrame.p
2062 end
2063 end))
2064 end
2065end)
2066
2067cmd.add({"unorbit"}, {"unorbit", "Stop orbiting a player"}, function()
2068 lib.disconnect("orbit")
2069end)
2070
2071cmd.add({"fixcam", "fix"}, {"fixcam", "Fix your camera"}, function()
2072 camera.CameraSubject = character:FindFirstChildWhichIsA("Humanoid")
2073 camera.CameraType = camtype
2074end)
2075
2076cmd.add({"fekill", "kill"}, {"fekill <player>", "Kill a player using a tool and FE god"}, function(p)
2077 local target = argument.getPlayers(p)[1]
2078 if not target then return end
2079
2080 local char = character
2081 local tchar = target.Character
2082 local hrp = character:FindFirstChild("HumanoidRootPart")
2083 local hrp2 = tchar:FindFirstChild("HumanoidRootPart")
2084 local backpack = localPlayer:FindFirstChildWhichIsA("Backpack")
2085 local hum = character:FindFirstChildWhichIsA("Humanoid")
2086
2087 if hrp and hrp2 and backpack and hum then
2088 hum.Name = "1"
2089 local newHum = hum:Clone()
2090 newHum.Parent = char
2091 newHum.Name = "Humanoid"
2092
2093 wait(0.1)
2094 hum:Destroy()
2095 camera.CameraSubject = char
2096 newHum.DisplayDistanceType = "None"
2097 wait(0.1)
2098
2099 for i, v in pairs(localPlayer.Backpack:GetChildren()) do
2100 v.Parent = char
2101 hrp.CFrame = hrp2.CFrame * CFrame.new(0, 0, 0) * CFrame.new(math.random(-100, 100)/200,math.random(-100, 100)/200,math.random(-100, 100)/200)
2102 RunService.Stepped:Wait(0)
2103 end
2104
2105 local n = 0
2106 repeat
2107 RunService.RenderStepped:Wait(0)
2108 n = n + 1
2109 hrp.CFrame = hrp2.CFrame
2110 until (not hrp or not hrp2 or not hrp.Parent or not hrp2.Parent or tchar:FindFirstChild("RightGrip", true) or n > 250) and n > 2
2111
2112 hrp.CFrame = CFrame.new(999999, workspace.FallenPartsDestroyHeight + 5,999999)
2113 camera.CameraType = Enum.CameraType.Custom
2114 end
2115end)
2116
2117cmd.add({"fling"}, {"fling <player>", "Fling the given player"}, function(p)
2118 local players = argument.getPlayers(p)
2119 local char = player.Character
2120 local hum = char:FindFirstChildWhichIsA("Humanoid")
2121 local cf = char.HumanoidRootPart.CFrame
2122 for i, plr in pairs(players) do
2123 if char and plr and plr.Character then
2124 local enemy = plr.Character
2125 local bv = Instance.new("BodyAngularVelocity", char.HumanoidRootPart)
2126 bv.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
2127 bv.P = math.huge
2128 bv.AngularVelocity = Vector3.new(9e5, 9e5, 0)
2129 bv.Name = "hum"
2130
2131 wait()
2132 char.HumanoidRootPart.CFrame = cf
2133
2134 for i,v in pairs(char:GetDescendants()) do
2135 if v:IsA('BasePart') then
2136 v.Massless = true
2137 end
2138 end
2139
2140 local c = lib.connect("fling", game:GetService('RunService').Stepped:Connect(function()
2141 for i,v in pairs(char:GetDescendants()) do
2142 if v:IsA('BasePart') then
2143 v.CanCollide = false
2144 v.Velocity = Vector3.new(0, 0, 0)
2145 end
2146 end
2147 if char.PrimaryPart and enemy.PrimaryPart then
2148 char.HumanoidRootPart.CFrame = enemy.HumanoidRootPart.CFrame
2149 char.HumanoidRootPart.Velocity = Vector3.new(0, 0, 0)
2150 end
2151 end))
2152 repeat
2153 wait()
2154 until
2155 character ~= char or not enemy or not enemy.Parent or not c.Connected or not enemy.PrimaryPart or enemy.PrimaryPart.Velocity.magnitude > 100
2156
2157 lib.disconnect("fling")
2158 if lp.Character == char then
2159 char:SetPrimaryPartCFrame(cf)
2160 bv:Destroy()
2161 char.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
2162 char.HumanoidRootPart.RotVelocity = Vector3.new(0,0,0)
2163 end
2164 if not c.Connected then
2165 break
2166 end
2167 end
2168 end
2169end)
2170cmd.add({"unfling"}, {"unfling", "Stop all attempts to fling"}, function()
2171 lib.disconnect("fling")
2172end)
2173
2174cmd.add({"goto", "to", "tp", "teleport"}, {"goto <player/X,Y,Z>", "Teleport to the given player or X,Y,Z coordinates"}, function(p)
2175 local players = argument.getPlayers(p)
2176 local pos = lib.parseText(p, opt.tupleSeparator)
2177 if character then
2178 if pos and #pos == 3 then
2179 local x,y,z = pos[1], pos[2], pos[3]
2180 character:MoveTo(Vector3.new(x, y, z))
2181 elseif players[1] and players[1].Character then
2182 character:MoveTo((players[1].Character:GetPrimaryPartCFrame() * CFrame.new(1, 0, 2)).p)
2183 end
2184 end
2185end)
2186
2187cmd.add({"watch", "view"}, {"watch <player>", "Watch the given player"}, function(p)
2188 local players = argument.getPlayers(p)
2189 if players[1] and players[1].Character then
2190 camera.CameraSubject = players[1].Character:FindFirstChildWhichIsA("Humanoid")
2191 end
2192end)
2193cmd.add({"unwatch", "unview"}, {"unwatch", "Stop watching a player"}, function()
2194 if character then
2195 camera.CameraSubject = character:FindFirstChildWhichIsA("Humanoid")
2196 end
2197end)
2198
2199cmd.add({"copyaudio", "getaudio"}, {"copyaudio <player>", "Copy all sounds a player is playing to your clipboard -Cyrus"}, function(p)
2200 local players = argument.getPlayers(p)
2201 local audios = ""
2202 for _, player in pairs(players) do
2203 local char = player.Character
2204 if char then
2205 audios = audios .. ("<<[ %s ]>>"):format(player.Name)
2206 for i, v in pairs(char:GetDescendants()) do
2207 if v:IsA("Sound") and v.Playing then
2208 audios = audios .. ("\n[ %s ]: %s"):format(v.Name, v.SoundId)
2209 end
2210 end
2211 end
2212 end
2213 setclipboard(audios)
2214end)
2215
2216cmd.add({"saveaudio", "stealaudio", "steal"}, {"saveaudio <player>", "Save all sounds a player is playing to a file -Cyrus"}, function(p)
2217 local players = argument.getPlayers(p)
2218 local audios = ""
2219 for _, player in pairs(players) do
2220 local char = player.Character
2221 if char then
2222 audios = audios .. ("<<[ %s ]>>"):format(player.Name)
2223 for i, v in pairs(char:GetDescendants()) do
2224 if v:IsA("Sound") and v.Playing then
2225 audios = audios .. ("\n[ %s ]: %s"):format(v.Name, v.SoundId)
2226 end
2227 end
2228 end
2229 end
2230 writefile(("Audio-Logs_%c"):format(math.random(1000, 9999)), audios)
2231end)
2232
2233cmd.add({"follow", "stalk", "walk"}, {"follow <player>", "Follow a player wherever they go"}, function(p)
2234 lib.disconnect("follow")
2235 local players = argument.getPlayers(p)
2236 local targetPlayer = players[1]
2237 lib.connect("follow", RunService.Stepped:Connect(function()
2238 local target = targetPlayer.Character
2239 if target and character then
2240 local hum = character:FindFirstChildWhichIsA("Humanoid")
2241 if hum then
2242 local targetPart = target:FindFirstChild("Head")
2243 local targetPos = targetPart.Position
2244 hum:MoveTo(targetPos)
2245 end
2246 end
2247 end))
2248end)
2249
2250cmd.add({"pathfind"}, {"pathfind <player>", "Follow a player using the pathfinder API wherever they go"}, function(p)
2251 lib.disconnect("follow")
2252 local players = argument.getPlayers(p)
2253 local targetPlayer = players[1]
2254 local debounce = false
2255 lib.connect("follow", RunService.Stepped:Connect(function()
2256 if debounce then return end
2257 debounce = true
2258 local target = targetPlayer.Character
2259 if target and character then
2260 local hum = character:FindFirstChildWhichIsA("Humanoid")
2261 local main = target:FindFirstChild("HumanoidRootPart")
2262 if hum then
2263 local targetPart = target:FindFirstChild("HumanoidRootPart") or target:FindFirstChild("Head")
2264 local targetPos = (targetPart.CFrame * CFrame.new(0, 0, -0.5)).p
2265 local PathService = game:GetService("PathfindingService")
2266 local path = PathService:CreatePath({
2267 AgentRadius = 2,
2268 AgentHeight = 5,
2269 AgentCanJump = true
2270 })
2271 local points = path:ComputeAsync(main.Position, targetPos)
2272
2273 if path.Status then
2274 local waypoints = path:GetWaypoints()
2275 for i, waypoint in pairs(waypoints) do
2276 if i > 2 then break end
2277 if waypoint.Action == Enum.PathWaypointAction.Jump then
2278 hum.Jump = true
2279 end
2280 hum:MoveTo(waypoint.Position)
2281 local distance = 5
2282 repeat
2283 wait()
2284 distance = (waypoint.Position - main.Position).magnitude
2285 until
2286 (targetPos - targetPart.Position).magnitude > 2 or distance < 1
2287
2288 if (targetPos - targetPart.Position).magnitude > 2 then
2289 break
2290 end
2291 end
2292 end
2293 end
2294 end
2295 debounce = false
2296 end))
2297end)
2298
2299cmd.add({"unfollow", "unstalk", "unwalk", "unpathfind"}, {"unfollow", "Stop all attempts to follow a player"}, function()
2300 lib.disconnect("follow")
2301end)
2302
2303--[[ FUNCTIONALITY ]]--
2304localPlayer.Chatted:Connect(function(str)
2305 lib.parseCommand(str)
2306end)
2307
2308
2309--[[ GUI VARIABLES ]]--
2310local ScreenGui
2311if not RunService:IsStudio() then
2312 ScreenGui = game:GetObjects("rbxassetid://4281507772")[1]
2313else
2314 repeat wait() until player:FindFirstChild("AdminUI", true)
2315 ScreenGui = player:FindFirstChild("AdminUI", true)
2316end
2317
2318local description = ScreenGui.Description
2319local cmdBar = ScreenGui.CmdBar
2320 local centerBar = cmdBar.CenterBar
2321 local cmdInput = centerBar.Input
2322 local cmdAutofill = cmdBar.Autofill
2323 local cmdExample = cmdAutofill.Cmd
2324 local leftFill = cmdBar.LeftFill
2325 local rightFill = cmdBar.RightFill
2326local chatLogsFrame = ScreenGui.ChatLogs
2327 local chatLogs = chatLogsFrame.Container.Logs
2328 local chatExample = chatLogs.TextLabel
2329local commandsFrame = ScreenGui.Commands
2330 local commandsFilter = commandsFrame.Container.Filter
2331 local commandsList = commandsFrame.Container.List
2332 local commandExample = commandsList.TextLabel
2333local resizeFrame = ScreenGui.Resizeable
2334local resizeXY = {
2335 Top = {Vector2.new(0, -1), Vector2.new(0, -1), "rbxassetid://2911850935"},
2336 Bottom = {Vector2.new(0, 1), Vector2.new(0, 0), "rbxassetid://2911850935"},
2337 Left = {Vector2.new(-1, 0), Vector2.new(1, 0), "rbxassetid://2911851464"},
2338 Right = {Vector2.new(1, 0), Vector2.new(0, 0), "rbxassetid://2911851464"},
2339
2340 TopLeft = {Vector2.new(-1, -1), Vector2.new(1, -1), "rbxassetid://2911852219"},
2341 TopRight = {Vector2.new(1, -1), Vector2.new(0, -1), "rbxassetid://2911851859"},
2342 BottomLeft = {Vector2.new(-1, 1), Vector2.new(1, 0), "rbxassetid://2911851859"},
2343 BottomRight = {Vector2.new(1, 1), Vector2.new(0, 0), "rbxassetid://2911852219"},
2344}
2345
2346cmdExample.Parent = nil
2347chatExample.Parent = nil
2348commandExample.Parent = nil
2349resizeFrame.Parent = nil
2350
2351local rPlayer = Players:FindFirstChildWhichIsA("Player")
2352local coreGuiProtection = {}
2353
2354pcall(function()
2355 for i, v in pairs(ScreenGui:GetDescendants()) do
2356 coreGuiProtection[v] = rPlayer.Name
2357 end
2358 ScreenGui.DescendantAdded:Connect(function(v)
2359 coreGuiProtection[v] = rPlayer.Name
2360 end)
2361 coreGuiProtection[ScreenGui] = rPlayer.Name
2362
2363 local meta = getrawmetatable(game)
2364 local tostr = meta.__tostring
2365 setreadonly(meta, false)
2366 meta.__tostring = newcclosure(function(t)
2367 if coreGuiProtection[t] and not checkcaller() then
2368 return coreGuiProtection[t]
2369 end
2370 return tostr(t)
2371 end)
2372end)
2373if not RunService:IsStudio() then
2374 local newGui = game:GetService("CoreGui"):FindFirstChildWhichIsA("ScreenGui")
2375 newGui.DescendantAdded:Connect(function(v)
2376 coreGuiProtection[v] = rPlayer.Name
2377 end)
2378 for i, v in pairs(ScreenGui:GetChildren()) do
2379 v.Parent = newGui
2380 end
2381 ScreenGui = newGui
2382end
2383
2384--[[ GUI FUNCTIONS ]]--
2385gui = {}
2386gui.txtSize = function(ui, x, y)
2387 local textService = game:GetService("TextService")
2388 return textService:GetTextSize(ui.Text, ui.TextSize, ui.Font, Vector2.new(x, y))
2389end
2390gui.commands = function()
2391 if not commandsFrame.Visible then
2392 commandsFrame.Visible = true
2393 commandsList.CanvasSize = UDim2.new(0, 0, 0, 0)
2394 end
2395 for i, v in pairs(commandsList:GetChildren()) do
2396 if v:IsA("TextLabel") then
2397 Destroy(v)
2398 end
2399 end
2400 local i = 0
2401 for cmdName, tbl in pairs(Commands) do
2402 local Cmd = commandExample:Clone()
2403 Cmd.Parent = commandsList
2404 Cmd.Name = cmdName
2405 Cmd.Text = " " .. tbl[2][1]
2406 Cmd.MouseEnter:Connect(function()
2407 description.Visible = true
2408 description.Text = tbl[2][2]
2409 end)
2410 Cmd.MouseLeave:Connect(function()
2411 if description.Text == tbl[2][2] then
2412 description.Visible = false
2413 description.Text = ""
2414 end
2415 end)
2416 i = i + 1
2417 end
2418 commandsList.CanvasSize = UDim2.new(0, 0, 0, i*20+10)
2419 commandsFrame.Position = UDim2.new(0.5, -283/2, 0.5, -260/2)
2420end
2421gui.chatlogs = function()
2422 if not chatLogsFrame.Visible then
2423 chatLogsFrame.Visible = true
2424 end
2425 chatLogsFrame.Position = UDim2.new(0.5, -283/2+5, 0.5, -260/2+5)
2426end
2427
2428gui.tween = function(obj, style, direction, duration, goal)
2429 local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle[style], Enum.EasingDirection[direction])
2430 local tween = TweenService:Create(obj, tweenInfo, goal)
2431 tween:Play()
2432 return tween
2433end
2434gui.mouseIn = function(guiObject, range)
2435 local pos1, pos2 = guiObject.AbsolutePosition, guiObject.AbsolutePosition + guiObject.AbsoluteSize
2436 local mX, mY = mouse.X, mouse.Y
2437 if mX > pos1.X-range and mX < pos2.X+range and mY > pos1.Y-range and mY < pos2.Y+range then
2438 return true
2439 end
2440 return false
2441end
2442gui.resizeable = function(ui, min, max)
2443 local rgui = resizeFrame:Clone()
2444 rgui.Parent = ui
2445
2446 local mode
2447 local UIPos
2448 local lastSize
2449 local lastPos = Vector2.new()
2450
2451 local function update(delta)
2452 local xy = resizeXY[(mode and mode.Name) or '']
2453 if not mode or not xy then return end
2454 local delta = (delta * xy[1]) or Vector2.new()
2455 local newSize = Vector2.new(lastSize.X + delta.X, lastSize.Y + delta.Y)
2456 newSize = Vector2.new(
2457 math.clamp(newSize.X, min.X, max.X),
2458 math.clamp(newSize.Y, min.Y, max.Y)
2459 )
2460 ui.Size = UDim2.new(0, newSize.X, 0, newSize.Y)
2461 ui.Position = UDim2.new(
2462 UIPos.X.Scale,
2463 UIPos.X.Offset + (-(newSize.X - lastSize.X) * xy[2]).X,
2464 UIPos.Y.Scale,
2465 UIPos.Y.Offset + (delta * xy[2]).Y
2466 )
2467 end
2468
2469 mouse.Move:Connect(function()
2470 update(Vector2.new(mouse.X, mouse.Y) - lastPos)
2471 end)
2472
2473 for _, button in pairs(rgui:GetChildren()) do
2474 local isIn = false
2475 button.InputBegan:Connect(function(input)
2476 if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
2477 mode = button
2478 lastPos = Vector2.new(mouse.X, mouse.Y)
2479 lastSize = ui.AbsoluteSize
2480 UIPos = ui.Position
2481 end
2482 end)
2483 button.InputEnded:Connect(function(input)
2484 if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
2485 mode = nil
2486 end
2487 end)
2488 button.MouseEnter:Connect(function()
2489 mouse.Icon = resizeXY[button.Name][3]
2490 end)
2491 button.MouseLeave:Connect(function()
2492 if mouse.Icon == resizeXY[button.Name][3] then
2493 mouse.Icon = ""
2494 end
2495 end)
2496 end
2497end
2498gui.draggable = function(ui, dragui)
2499 if not dragui then dragui = ui end
2500 local UserInputService = game:GetService("UserInputService")
2501
2502 local dragging
2503 local dragInput
2504 local dragStart
2505 local startPos
2506
2507 local function update(input)
2508 local delta = input.Position - dragStart
2509 ui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
2510 end
2511
2512 dragui.InputBegan:Connect(function(input)
2513 if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
2514 dragging = true
2515 dragStart = input.Position
2516 startPos = ui.Position
2517
2518 input.Changed:Connect(function()
2519 if input.UserInputState == Enum.UserInputState.End then
2520 dragging = false
2521 end
2522 end)
2523 end
2524 end)
2525
2526 dragui.InputChanged:Connect(function(input)
2527 if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
2528 dragInput = input
2529 end
2530 end)
2531
2532 UserInputService.InputChanged:Connect(function(input)
2533 if input == dragInput and dragging then
2534 update(input)
2535 end
2536 end)
2537end
2538gui.menuify = function(menu)
2539 local exit = menu:FindFirstChild("Exit", true)
2540 local mini = menu:FindFirstChild("Minimize", true)
2541 local minimized = false
2542 local sizeX, sizeY = Instance.new("IntValue", menu), Instance.new("IntValue", menu)
2543 mini.MouseButton1Click:Connect(function()
2544 minimized = not minimized
2545 if minimized then
2546 sizeX.Value = menu.Size.X.Offset
2547 sizeY.Value = menu.Size.Y.Offset
2548 gui.tween(menu, "Quart", "Out", 0.5, {Size = UDim2.new(0, 200, 0, 25)})
2549 else
2550 gui.tween(menu, "Quart", "Out", 0.5, {Size = UDim2.new(0, sizeX.Value, 0, sizeY.Value)})
2551 end
2552 end)
2553 exit.MouseButton1Click:Connect(function()
2554 menu.Visible = false
2555 end)
2556 gui.draggable(menu, menu.Topbar)
2557 menu.Visible = false
2558end
2559gui.barSelect = function(speed)
2560 centerBar.Visible = true
2561 gui.tween(centerBar, "Sine", "Out", speed or 0.25, {Size = UDim2.new(0, 250, 1, 15)})
2562 gui.tween(leftFill, "Quad", "Out", speed or 0.3, {Position = UDim2.new(0, 0, 0.5, 0)})
2563 gui.tween(rightFill, "Quad", "Out", speed or 0.3, {Position = UDim2.new(1, 0, 0.5, 0)})
2564 gui.loadCommands()
2565end
2566gui.barDeselect = function(speed)
2567 gui.tween(centerBar, "Sine", "Out", speed or 0.25, {Size = UDim2.new(0, 250, 0, 0)})
2568 gui.tween(leftFill, "Sine", "In", speed or 0.3, {Position = UDim2.new(-0.5, 100, 0.5, 0)})
2569 gui.tween(rightFill, "Sine", "In", speed or 0.3, {Position = UDim2.new(1.5, -100, 0.5, 0)})
2570 for i, v in pairs(cmdAutofill:GetChildren()) do
2571 if v:IsA("Frame") then
2572 wrap(function()
2573 wait(math.random(1, 200)/2000)
2574 gui.tween(v, "Back", "In", 0.35, {Size = UDim2.new(0, 0, 0, 25)})
2575 end)
2576 end
2577 end
2578end
2579gui.loadCommands = function()
2580 for i, v in pairs(cmdAutofill:GetChildren()) do
2581 if v.Name ~= "UIListLayout" then
2582 Destroy(v)
2583 end
2584 end
2585 local last = nil
2586 local i = 0
2587 for name, tbl in pairs(Commands) do
2588 local info = tbl[2]
2589 local btn = cmdExample:Clone()
2590 btn.Parent = cmdAutofill
2591 btn.Name = name
2592 btn.Input.Text = info[1]
2593 i = i + 1
2594
2595 local size = btn.Size
2596 btn.Size = UDim2.new(0, 0, 0, 25)
2597 btn.Size = size
2598 end
2599end
2600gui.searchCommands = function()
2601 local _1, _2, _3, _0 = {}, {}, {}, {}
2602 local str = cmdInput.Text:gmatch("[^ ;]+")()
2603 if str then str = str:lower() else str = "" end
2604
2605 for i, v in pairs(cmdAutofill:GetChildren()) do
2606 if v:IsA("Frame") then
2607 local found = Commands[v.Name]
2608 if Commands[v.Name] then
2609 if str ~= "" and v.Name:find(str) == 1 then
2610 v.LayoutOrder = 1
2611 table.insert(_1, v)
2612 end
2613 if str ~= "" and v.Name:find(str) and v.LayoutOrder ~= 1 then
2614 v.LayoutOrder = 2
2615 table.insert(_2, v)
2616 end
2617 if str == "" or v.Name:find(str) == nil then
2618 v.LayoutOrder = 3
2619 table.insert(_3, v)
2620 end
2621 end
2622 for CmdName, tbl in pairs(Aliases) do
2623 if Commands[v.Name][1] == tbl[1] then
2624 if str ~= "" and CmdName:find(str) == 1 then
2625 v.LayoutOrder = 1
2626 table.insert(_1, v)
2627 end
2628 if str ~= "" and CmdName:find(str) then
2629 v.LayoutOrder = 2
2630 table.insert(_2, v)
2631 end
2632 if str == "" or CmdName:find(str) == nil then
2633 v.LayoutOrder = 3
2634 table.insert(_3, v)
2635 end
2636 break
2637 end
2638 end
2639 end
2640 end
2641
2642 for i, v in pairs(_1) do if not lib.find(_0, v) then table.insert(_0, v) end end
2643 for i, v in pairs(_2) do if not lib.find(_0, v) then table.insert(_0, v) end end
2644 for i, v in pairs(_3) do if not lib.find(_0, v) then table.insert(_0, v) end end
2645
2646 local last
2647 for i, v in pairs(_0) do
2648 local n = (i ^ -0.5) * 125
2649 if last then
2650 local pos = last.Value.Value
2651 local newPos = UDim2.new(0.5, 0, 0, pos + 25 + 3)
2652 gui.tween(v, "Quint", "Out", 0.3, {
2653 Size = UDim2.new(0.5, n, 0, 25)
2654 })
2655 v.Value.Value = newPos.Y.Offset
2656 v.LayoutOrder = i
2657 else
2658 gui.tween(v, "Quint", "Out", 0.3, {
2659 Size = UDim2.new(0.5, n, 0, 25)
2660 })
2661 v.Value.Value = 0
2662 v.LayoutOrder = i
2663 end
2664 last = v
2665 end
2666end
2667
2668--[[ GUI FUNCTIONALITY ]]--
2669mouse.KeyDown:Connect(function(k)
2670 if k:lower() == opt.prefix then
2671 gui.barSelect()
2672 cmdInput.Text = ''
2673 cmdInput:CaptureFocus()
2674 end
2675end)
2676
2677cmdInput.FocusLost:Connect(function(enterPressed)
2678 if enterPressed then
2679 wrap(function()
2680 lib.parseCommand(opt.prefix .. cmdInput.Text)
2681 end)
2682 end
2683 gui.barDeselect()
2684end)
2685
2686cmdInput.Changed:Connect(function(p)
2687 if p ~= "Text" then return end
2688 gui.searchCommands()
2689end)
2690
2691gui.barDeselect(0)
2692cmdBar.Visible = true
2693gui.menuify(chatLogsFrame)
2694gui.menuify(commandsFrame)
2695gui.resizeable(chatLogsFrame, Vector2.new(173,58), Vector2.new(1000,1000))
2696gui.resizeable(commandsFrame, Vector2.new(184,84), Vector2.new(1000,1000))
2697
2698commandsFilter.Changed:Connect(function(p)
2699 if p ~= "Text" then return end
2700 for i, v in pairs(commandsList:GetChildren()) do
2701 if v:IsA("TextLabel") then
2702 if v.Name:find(commandsFilter.Text:lower()) and v.Name:find(commandsFilter.Text:lower()) <= 2 then
2703 v.Visible = true
2704 else
2705 v.Visible = false
2706 end
2707 end
2708 end
2709end)
2710
2711local function bindToChat(plr, msg)
2712 local chatMsg = chatExample:Clone()
2713 for i, v in pairs(chatLogs:GetChildren()) do
2714 if v:IsA("TextLabel") then
2715 v.LayoutOrder = v.LayoutOrder + 1
2716 end
2717 end
2718 chatMsg.Parent = chatLogs
2719 chatMsg.Text = ("[%s]: %s"):format(plr.Name, msg)
2720
2721 local txtSize = gui.txtSize(chatMsg, chatMsg.AbsoluteSize.X, 100)
2722 chatMsg.Size = UDim2.new(1, -5, 0, txtSize.Y)
2723end
2724
2725for i, plr in pairs(Players:GetPlayers()) do
2726 plr.Chatted:Connect(function(msg)
2727 bindToChat(plr, msg)
2728 end)
2729end
2730Players.PlayerAdded:Connect(function(plr)
2731 plr.Chatted:Connect(function(msg)
2732 bindToChat(plr, msg)
2733 end)
2734end)
2735
2736mouse.Move:Connect(function()
2737 description.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
2738 local size = gui.txtSize(description, 200, 100)
2739 description.Size = UDim2.new(0, size.X, 0, size.Y)
2740end)
2741
2742RunService.Stepped:Connect(function()
2743 chatLogs.CanvasSize = UDim2.new(0, 0, 0, chatLogs.UIListLayout.AbsoluteContentSize.Y)
2744 commandsList.CanvasSize = UDim2.new(0, 0, 0, commandsList.UIListLayout.AbsoluteContentSize.Y)
2745end)
2746
2747function Destroy(guiObject)
2748 if not pcall(function()guiObject.Parent = game:GetService("CoreGui")end) then
2749 guiObject.Parent = nil
2750 end
2751end