Advertisement
Inori_-

[REL] Plates of Fate: Mayhem | CMD Bar

Dec 24th, 2017
4,711
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.74 KB | None | 0 0
  1. if game.CoreGui:FindFirstChild("UI Workspace") then game.CoreGui:FindFirstChild("UI Workspace"):Destroy() end
  2. repeat wait() until game:GetService("Players").LocalPlayer and game:GetService("Players").LocalPlayer.Character
  3. local plr, char = game:GetService("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character
  4.  
  5. local globalStop = false
  6. local globalColor = 33/255
  7. local util = {}
  8.  
  9. -- Objects
  10.  
  11. local UIWorkspace = Instance.new("ScreenGui")
  12. local TextLabel = Instance.new("TextLabel")
  13. local TextBox = Instance.new("TextBox")
  14.  
  15. -- Properties
  16.  
  17. UIWorkspace.Archivable = false
  18. UIWorkspace.Name = "UI Workspace"
  19. UIWorkspace.Parent = game.CoreGui
  20.  
  21. TextLabel.Parent = UIWorkspace
  22. TextLabel.BackgroundColor3 = Color3.new(globalColor, globalColor, globalColor)
  23. TextLabel.BackgroundTransparency = 0.05
  24. TextLabel.BorderSizePixel = 0
  25. TextLabel.Position = UDim2.new(0, 0, 0.800000012, 0)
  26. TextLabel.Size = UDim2.new(0, 80, 0, 30)
  27. TextLabel.Font = Enum.Font.SourceSans
  28. TextLabel.FontSize = Enum.FontSize.Size28
  29. TextLabel.Text = ">"
  30. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  31. TextLabel.TextSize = 26
  32. TextLabel.TextXAlignment = Enum.TextXAlignment.Right
  33.  
  34. TextBox.Parent = UIWorkspace
  35. TextBox.BackgroundColor3 = Color3.new(globalColor, globalColor, globalColor)
  36. TextBox.BackgroundTransparency = 0.05
  37. TextBox.BorderSizePixel = 0
  38. TextBox.Position = UDim2.new(0, 85, 0.800000012, 0)
  39. TextBox.Size = UDim2.new(1, 0, 0, 30)
  40. TextBox.Font = Enum.Font.SciFi
  41. TextBox.FontSize = Enum.FontSize.Size18
  42. TextBox.TextColor3 = Color3.new(1, 1, 1)
  43. TextBox.TextSize = 18
  44. TextBox.TextXAlignment = Enum.TextXAlignment.Left
  45.  
  46. local mouse = game.Players.LocalPlayer:GetMouse()
  47. mouse.KeyDown:Connect(function(Key)
  48.     if string.byte(Key) == 13 then
  49.         TextBox:CaptureFocus()
  50.         TextBox.Text = ""
  51.     end
  52. end)
  53.  
  54. --==--==--==--==--==--==--==--
  55. --EDIT STUFF HERE--
  56. local cmds = {
  57.     "PRINT COMMANDS | [cmds]",
  58.     "KILL DA' FOOLS | [kill] [plrName/all/others]",
  59.     "KILL FOOLS 2.0 | [loopkill/loopk] [plrName/all/others]",
  60.     "MEGUMIN: EXPLOSION | [explode] [plrName/all/others]",
  61.     "BECOME GOD ITSELF | [god] [plrName/all/others] (buggy may not work)",
  62.     "HARRY POTTER | [teleport/tp] [plrName]",
  63.     "RECEIVE LE' COINS | [coins] [value]",
  64.     "STEAL THE TOOLS | [tool] [toolName/all]",
  65.     "EXPAND PLATES | [expand] [plrName/all/others] [val]",
  66.     "SHRINK PLATES | [shrink] [plrName/all/others] [val]",
  67.     "PLATEWALK LIKE JESUS | [platewalk] (run again to toggle on/off) --BROKEN",
  68.     "DECAL PLATES | [decal] [decalId]",
  69.     "(subtract 1 from decalId until it works, e.g. 55555 --> 55554 etc)",
  70.     "",
  71.     "STOP DA' LOOPZ | [stoploops/stop]"
  72. }
  73. --END--
  74. --==--==--==--==--==--==
  75.  
  76. TextBox.FocusLost:connect(function(enterPressed)
  77.     if enterPressed then
  78.         secondaryInit()
  79.         local args = util.splitArgs(TextBox.Text)
  80.        
  81.         --==--==--==--==--==--==--==--
  82.         --EDIT STUFF HERE--
  83.         local takeDamageEvent = game:GetService("Workspace").RemoteEvents:FindFirstChild("TakeDamageEvent")
  84.         local placeMineEvent = game:GetService("Workspace").RemoteEvents:FindFirstChild("PlaceMineEvent")
  85.         local placePlateEvent = game:GetService("Workspace").RemoteEvents:FindFirstChild("PlacePlateEvent")
  86.         local changePlateSize = game:GetService("Workspace").RemoteEvents:FindFirstChild("ChangePlateSize")
  87.         local addDecal = game:GetService("Workspace").RemoteEvents:FindFirstChild("AddDecal")
  88.         local addSound = game:GetService("Workspace").RemoteEvents:FindFirstChild("AddSound")
  89.         if #args > 0 then
  90.            
  91.             if args[1] == "kill" then
  92.                 if #args > 1 then
  93.                     if args[2] == "all" then
  94.                         for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  95.                             vHum = v.Character:FindFirstChild("Humanoid")
  96.                             if vHum then
  97.                                 takeDamageEvent:FireServer(vHum, 666666, "D=9Vb7aMuZt!8aMH")
  98.                             end
  99.                         end
  100.                     elseif args[2] == "others" then
  101.                         for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  102.                             vHum = v.Character:FindFirstChild("Humanoid")
  103.                             if vHum and v ~= plr then
  104.                                 takeDamageEvent:FireServer(vHum, 666666, "D=9Vb7aMuZt!8aMH")
  105.                             end
  106.                         end
  107.                     else
  108.                         local victim = util.findPlayer(args[2])
  109.                         if victim and victim.Character then
  110.                             victimHum = victim.Character:FindFirstChild("Humanoid")
  111.                             if victimHum then
  112.                                 takeDamageEvent:FireServer(victimHum, 666666, "D=9Vb7aMuZt!8aMH")
  113.                             end
  114.                         end
  115.                     end
  116.                 end
  117.             end
  118.            
  119.             if args[1] == "loopkill" or args[1] == "loopk" then
  120.                 if #args > 1 then
  121.                     if args[2] == "all" then
  122.                         globalStop = false
  123.                         local tempRoutine = coroutine.create(function()
  124.                             repeat wait()
  125.                                 for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  126.                                     vHum = v.Character:FindFirstChild("Humanoid")
  127.                                     if vHum then
  128.                                         takeDamageEvent:FireServer(vHum, 666666, "D=9Vb7aMuZt!8aMH")
  129.                                     end
  130.                                 end
  131.                             until globalStop
  132.                         end)
  133.                         coroutine.resume(tempRoutine)
  134.                     elseif args[2] == "others" then
  135.                         globalStop = false
  136.                         local tempRoutine = coroutine.create(function()
  137.                             repeat wait()
  138.                                 for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  139.                                     vHum = v.Character:FindFirstChild("Humanoid")
  140.                                     if vHum and v ~= plr then
  141.                                         takeDamageEvent:FireServer(vHum, 666666, "D=9Vb7aMuZt!8aMH")
  142.                                     end
  143.                                 end
  144.                             until globalStop
  145.                         end)
  146.                         coroutine.resume(tempRoutine)
  147.                     else
  148.                         globalStop = false
  149.                         local tempRoutine = coroutine.create(function()
  150.                             repeat wait()
  151.                                 local victim = util.findPlayer(args[2])
  152.                                 if victim and victim.Character then
  153.                                     victimHum = victim.Character:FindFirstChild("Humanoid")
  154.                                     if victimHum then
  155.                                         takeDamageEvent:FireServer(victimHum, 666666, "D=9Vb7aMuZt!8aMH")
  156.                                     end
  157.                                 end
  158.                             until globalStop
  159.                         end)
  160.                         coroutine.resume(tempRoutine)
  161.                     end
  162.                 end
  163.             end
  164.            
  165.             if args[1] == "explode" then
  166.                 if #args > 1 and args[2] == "all" then
  167.                         --[[
  168.                             pos = v.Character.HumanoidRootPart.Position
  169.                             workspace.RemoteEvents.PlaceMineEvent:FireServer(Vector3.new(pos.X,pos.Y,pos.Z),"D=9Vb7aMuZt!8aMH")
  170.                         --]]
  171.                     for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  172.                         vPos = v.Character:FindFirstChild("HumanoidRootPart").Position
  173.                         if vPos then
  174.                             placeMineEvent:FireServer(vPos, "D=9Vb7aMuZt!8aMH")
  175.                         end
  176.                     end
  177.                 elseif #args > 1 and args[2] == "others" then
  178.                     for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  179.                         vPos = v.Character:FindFirstChild("HumanoidRootPart").Position
  180.                         if vPos and v ~= plr then
  181.                             placeMineEvent:FireServer(vPos, "D=9Vb7aMuZt!8aMH")
  182.                         end
  183.                     end
  184.                 elseif #args > 1 then
  185.                     local victim = util.findPlayer(args[2])
  186.                     if victim and victim.Character then
  187.                         victimPos = victim.Character:FindFirstChild("HumanoidRootPart").Position
  188.                         if victimPos then
  189.                             placeMineEvent:FireServer(victimPos, "D=9Vb7aMuZt!8aMH")
  190.                         end
  191.                     end
  192.                 end
  193.             end
  194.            
  195.             if args[1] == "god" then
  196.                 if #args > 1 then
  197.                     if args[2] == "all" then
  198.                         for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  199.                             vHum = v.Character:FindFirstChild("Humanoid")
  200.                             if vHum then
  201.                                 takeDamageEvent:FireServer(vHum, -math.huge, "D=9Vb7aMuZt!8aMH")
  202.                             end
  203.                         end
  204.                     elseif args[2] == "others" then
  205.                         for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  206.                             vHum = v.Character:FindFirstChild("Humanoid")
  207.                             if vHum and v ~= plr then
  208.                                 takeDamageEvent:FireServer(vHum, -math.huge, "D=9Vb7aMuZt!8aMH")
  209.                             end
  210.                         end
  211.                     else
  212.                         local victim = util.findPlayer(args[2])
  213.                         if victim and victim.Character then
  214.                             victimHum = victim.Character:FindFirstChild("Humanoid")
  215.                             if victimHum then
  216.                                 takeDamageEvent:FireServer(victimHum, -math.huge, "D=9Vb7aMuZt!8aMH")
  217.                             end
  218.                         end
  219.                     end
  220.                 end
  221.             end
  222.            
  223.             if args[1] == "teleport" or args[1] == "tp" then
  224.                 if #args > 1 then
  225.                     local victim = util.findPlayer(args[2])
  226.                     if victim and victim.Character then
  227.                         local victimPos = victim.Character:FindFirstChild("HumanoidRootPart").Position
  228.                         if victimPos then
  229.                             game:GetService("Workspace").RemoteEvents:FindFirstChild("ToolTeleportEvent"):FireServer(victimPos, "D=9Vb7aMuZt!8aMH")
  230.                         end
  231.                     end
  232.                 end
  233.             end
  234.            
  235.             if args[1] == "coins" then
  236.                 if #args > 1 then
  237.                     if tonumber(args[2]) then
  238.                         local val = tonumber(args[2])
  239.                         game:GetService("Workspace").RemoteEvents:FindFirstChild("ShopBuyEvent"):FireServer(-val, "D=9Vb7aMuZt!8aMH")
  240.                     end
  241.                 else
  242.                     game:GetService("Workspace").RemoteEvents:FindFirstChild("ShopBuyEvent"):FireServer(-1000000, "D=9Vb7aMuZt!8aMH")
  243.                 end
  244.             end
  245.            
  246.             if args[1] == "tool" then
  247.                 if #args > 1 then
  248.                     if args[2] == "all" then
  249.                         for _, v in pairs(game:GetService("ReplicatedStorage"):children()) do
  250.                             if v:IsA("Tool") and not string.find(string.lower(v.Name), "potato") then
  251.                                 v:Clone().Parent = plr.Backpack
  252.                             end
  253.                         end
  254.                     else
  255.                         for _, v in pairs(game:GetService("ReplicatedStorage"):children()) do
  256.                             if string.lower(v.Name) == string.lower(args[2]) or string.find(string.lower(v.Name), string.lower(args[2])) then
  257.                                 if v:IsA("Tool") then
  258.                                     v:Clone().Parent = plr.Backpack
  259.                                 end
  260.                             end
  261.                         end
  262.                     end
  263.                 end
  264.             end
  265.            
  266.             if args[1] == "expand" then
  267.                 if #args > 2 then
  268.                     if tonumber(args[3]) then val = tonumber(args[3]) else val = 1 end
  269.                     if args[2] == "all" then
  270.                         for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  271.                             if v.gamestats.Plate then
  272.                                 changePlateSize:FireServer(v.gamestats.Plate.Value, val, "D=9Vb7aMuZt!8aMH")
  273.                             end
  274.                         end
  275.                     elseif args[2] == "others" then
  276.                         for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  277.                             if v ~= plr and v.gamestats.Plate then
  278.                                 changePlateSize:FireServer(v.gamestats.Plate.Value, val, "D=9Vb7aMuZt!8aMH")
  279.                             end
  280.                         end
  281.                     else
  282.                         local victim = util.findPlayer(args[2])
  283.                         if victim.gamestats.Plate then
  284.                             changePlateSize:FireServer(victim.gamestats.Plate.Value, val, "D=9Vb7aMuZt!8aMH")
  285.                         end
  286.                     end
  287.                 end
  288.             end
  289.            
  290.             if args[1] == "shrink" then
  291.                 if #args > 2 then
  292.                     if tonumber(args[3]) then val = -tonumber(args[3]) else val = -1 end
  293.                     if args[2] == "all" then
  294.                         for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  295.                             if v.gamestats.Plate then
  296.                                 changePlateSize:FireServer(v.gamestats.Plate.Value, val, "D=9Vb7aMuZt!8aMH")
  297.                             end
  298.                         end
  299.                     elseif args[2] == "others" then
  300.                         for _, v in pairs(game:GetService("Players"):GetPlayers()) do
  301.                             if v ~= plr and v.gamestats.Plate then
  302.                                 changePlateSize:FireServer(v.gamestats.Plate.Value, val, "D=9Vb7aMuZt!8aMH")
  303.                             end
  304.                         end
  305.                     else
  306.                         local victim = util.findPlayer(args[2])
  307.                         if victim.gamestats.Plate then
  308.                             changePlateSize:FireServer(victim.gamestats.Plate.Value, val, "D=9Vb7aMuZt!8aMH")
  309.                         end
  310.                     end
  311.                 end
  312.             end
  313.            
  314.            
  315.             --idk why the below isn't working, removed for now. e.e.
  316.             --[[
  317.             if args[1] == "platewalk" then
  318.                 if plr:FindFirstChild("Platewalk") then
  319.                     plr:FindFirstChild("Platewalk"):Destroy()
  320.                 elseif not plr:FindFirstChild("Platewalk") then
  321.                     local plate = Instance.new("StringValue", plr)
  322.                     plate.Name = "Platewalk"
  323.                     repeat wait(.25)
  324.                         local latestPos = plr:FindFirstChild("HumanoidRootPart").Position
  325.                         placePlateEvent:FireServer(Vector3.new(latestPos.X, latestPos.Y - 2.5, latestPos.Z), "D=9Vb7aMuZt!8aMH")
  326.                     until not plr:FindFirstChild("Platewalk")
  327.                 end
  328.             end
  329.             --]]
  330.            
  331.             if args[1] == "decal" then
  332.                 if #args > 1 then
  333.                     for _, v in pairs(game:GetService("Workspace").Plates:children()) do
  334.                         addDecal:FireServer(args[2], v, "D=9Vb7aMuZt!8aMH")
  335.                     end
  336.                 end
  337.             end    
  338.            
  339.            
  340.             if args[1] == "cmds" then
  341.                 if game.CoreGui:FindFirstChild("CatchMeIfYaCan") then
  342.                     game.CoreGui:FindFirstChild("CatchMeIfYaCan"):Destroy()
  343.                 end
  344.                 local curOff = -20
  345.                 local ScrGui = Instance.new("ScreenGui", game.CoreGui)
  346.                 ScrGui.Name = "CatchMeIfYaCan"
  347.                 local Frame = Instance.new("Frame")
  348.                 local ScrollingFrame = Instance.new("ScrollingFrame")
  349.                 local TextButton = Instance.new("TextButton")              
  350.                    
  351.                 Frame.Parent = ScrGui
  352.                 Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  353.                 Frame.BackgroundTransparency = 0.5
  354.                 Frame.BorderSizePixel = 0
  355.                 Frame.Position = UDim2.new(0.200000003, 0, 0.200000003, 0)
  356.                 Frame.Size = UDim2.new(0, 400, 0, 20)
  357.                 Frame.Active = true
  358.                 Frame.Draggable = true
  359.                    
  360.                 ScrollingFrame.Parent = Frame
  361.                 ScrollingFrame.BackgroundColor3 = Color3.new(0, 0, 0)
  362.                 ScrollingFrame.BackgroundTransparency = 0.20000000298023
  363.                 ScrollingFrame.BorderSizePixel = 0
  364.                 ScrollingFrame.Position = UDim2.new(0, 0, 0, 20)
  365.                 ScrollingFrame.Size = UDim2.new(0, 400, 0, 200)
  366.                 ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
  367.                    
  368.                 for i, v in pairs(cmds) do
  369.                     curOff = curOff + 20
  370.                     local TextLabel = Instance.new("TextLabel")
  371.                     ScrollingFrame.CanvasSize = UDim2.new(0,0,0,curOff + 20)
  372.                     TextLabel.Parent = ScrollingFrame
  373.                     TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  374.                     TextLabel.BackgroundTransparency = 1
  375.                     TextLabel.BorderSizePixel = 0
  376.                     TextLabel.Position = UDim2.new(0, 10, 0, curOff)
  377.                     TextLabel.Size = UDim2.new(0, 350, 0, 20)
  378.                     TextLabel.Font = Enum.Font.SourceSans
  379.                     TextLabel.FontSize = Enum.FontSize.Size14
  380.                     TextLabel.Text = v
  381.                     TextLabel.TextColor3 = Color3.new(1, 1, 1)
  382.                     TextLabel.TextSize = 14
  383.                     TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  384.                 end
  385.                    
  386.                 TextButton.Parent = Frame
  387.                 TextButton.BackgroundColor3 = Color3.new(1, 1, 1)
  388.                 TextButton.BorderSizePixel = 0
  389.                 TextButton.Position = UDim2.new(0, 380, 0, 0)
  390.                 TextButton.Size = UDim2.new(0, 20, 0, 20)
  391.                 TextButton.Font = Enum.Font.SourceSans
  392.                 TextButton.FontSize = Enum.FontSize.Size18
  393.                 TextButton.Text = "X"
  394.                 TextButton.TextSize = 16
  395.                 TextButton.MouseButton1Down:connect(function(closecmds)
  396.                     ScrGui:Destroy()
  397.                 end)
  398.             end
  399.            
  400.             if args[1] == "stoploops" or args[1] == "stop" then
  401.                 globalStop = true
  402.             end
  403.            
  404.         end
  405.         --END--
  406.         --==--==--==--==--==--==--==--
  407.        
  408.     end
  409. end)
  410.  
  411. function init()
  412.     repeat wait() until game:GetService("Players").LocalPlayer and game:GetService("Players").LocalPlayer.Character
  413.     plr, char = game:GetService("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character
  414.     util.printf("Welcome, "..plr.Name)
  415.    
  416.     --==--==--==--==--==--==--==--
  417.     --EDIT STUFF HERE--
  418.     util.log("GAME INFO: 'PLATES OF FATE: MAYHEM'")
  419.     util.log("COMMANDS (not case-sensitive):")
  420.     for i = 1, #cmds do
  421.         util.log(i.." | "..cmds[i])
  422.     end
  423.     --END--
  424.     --==--==--==--==--==--==--==--
  425.    
  426. end
  427.  
  428. function secondaryInit()
  429.     repeat wait() until game:GetService("Players").LocalPlayer and game:GetService("Players").LocalPlayer.Character
  430.     plr, char = game:GetService("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character
  431. end
  432.  
  433. function util.findPlayer(str)
  434.     for i, v in pairs(game:GetService("Players"):GetPlayers()) do
  435.         if string.lower(v.Name) == string.lower(str) or string.find(string.lower(v.Name), string.lower(str)) then
  436.             return v
  437.         end
  438.     end
  439. end
  440.  
  441. function util.splitArgs(str)
  442.     local tempArgs = {}
  443.     for i in string.gmatch(str, "%S+") do
  444.         table.insert(tempArgs, string.lower(i))
  445.     end
  446.     return tempArgs
  447. end
  448.  
  449. function util.printf(str)
  450.         TextBox.Text = ""
  451.         for i = 1, #str do
  452.             TextBox.Text = TextBox.Text..string.sub(str, i, i)
  453.             wait(.05)
  454.         end
  455.         wait(1)
  456.         TextBox.Text = ""
  457. end
  458.  
  459. function util.log(str)
  460.     print("[--INORI--] "..str)
  461. end
  462.  
  463. init()
  464. char:FindFirstChild("Humanoid").Died:connect(function()
  465.     secondaryInit()
  466. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement