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