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