9_cVv

Better Console

May 6th, 2021 (edited)
703
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local BetterConsole = Instance.new("ScreenGui")
  7. local frame = Instance.new("Frame")
  8. local grayGradient = Instance.new("UIGradient")
  9. local title = Instance.new("TextLabel")
  10. local UIGradient = Instance.new("UIGradient")
  11. local UICorner = Instance.new("UICorner")
  12. local container = Instance.new("ScrollingFrame")
  13. local UIListLayout = Instance.new("UIListLayout")
  14. local template = Instance.new("TextButton")
  15. local size_drag = Instance.new("Frame")
  16. local info2 = Instance.new("TextButton")
  17. local UIGradient_2 = Instance.new("UIGradient")
  18. local info1 = Instance.new("TextButton")
  19. local UIGradient_3 = Instance.new("UIGradient")
  20. local info3 = Instance.new("TextButton")
  21. local UIGradient_4 = Instance.new("UIGradient")
  22.  
  23. --Properties:
  24.  
  25. BetterConsole.Name = "BetterConsole"
  26. pcall(function() syn.protect_gui(BetterConsole) end)
  27. pcall(function() BetterConsole.Parent = game:GetService('CoreGui') end)
  28. BetterConsole.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  29.  
  30. frame.Name = "frame"
  31. frame.Parent = BetterConsole
  32. frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  33. frame.BorderSizePixel = 0
  34. frame.Position = UDim2.new(0.146764606, 0, 0.142260358, 0)
  35. frame.Size = UDim2.new(0, 756, 0, 588)
  36.  
  37. grayGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(80, 80, 80)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(0, 0, 0))}
  38. grayGradient.Rotation = 90
  39. grayGradient.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.30), NumberSequenceKeypoint.new(1.00, 0.30)}
  40. grayGradient.Name = "grayGradient"
  41. grayGradient.Parent = frame
  42.  
  43. title.Name = "title"
  44. title.Parent = frame
  45. title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  46. title.BackgroundTransparency = 1.000
  47. title.BorderSizePixel = 0
  48. title.Position = UDim2.new(0.00263852254, 0, 0, 0)
  49. title.Size = UDim2.new(0, 756, 0, 27)
  50. title.Font = Enum.Font.Gotham
  51. title.Text = "Better Console"
  52. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  53. title.TextScaled = true
  54. title.TextSize = 14.000
  55. title.TextWrapped = true
  56.  
  57. UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(0.50, Color3.fromRGB(0, 0, 0)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 255, 255))}
  58. UIGradient.Offset = Vector2.new(-1, 0)
  59. UIGradient.Parent = title
  60.  
  61. UICorner.CornerRadius = UDim.new(0, 4)
  62. UICorner.Parent = frame
  63.  
  64. container.Name = "container"
  65. container.Parent = frame
  66. container.Active = true
  67. container.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  68. container.BackgroundTransparency = 1.000
  69. container.BorderSizePixel = 0
  70. container.Position = UDim2.new(0.00263855956, 0, 0.13329865, 0)
  71. container.Size = UDim2.new(0, 756, 0, 508)
  72. container.CanvasSize = UDim2.new(0, 0, 0, 0)
  73. container.ScrollBarThickness = 8
  74.  
  75. UIListLayout.Parent = container
  76. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  77.  
  78. template.Name = "template"
  79. template.Parent = container
  80. template.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  81. template.BackgroundTransparency = 1.000
  82. template.BorderSizePixel = 0
  83. template.Size = UDim2.new(1, 0, 0, 21)
  84. template.Visible = false
  85. template.Font = Enum.Font.Gotham
  86. template.Text = "printed"
  87. template.TextColor3 = Color3.fromRGB(255, 255, 255)
  88. template.TextScaled = true
  89. template.TextSize = 14.000
  90. template.TextWrapped = true
  91. template.TextXAlignment = Enum.TextXAlignment.Left
  92.  
  93. size_drag.Name = "size_drag"
  94. size_drag.Parent = frame
  95. size_drag.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  96. size_drag.BorderSizePixel = 0
  97. size_drag.Position = UDim2.new(0.96123147, 0, 0.948012233, 0)
  98. size_drag.Size = UDim2.new(0, 34, 0, 34)
  99. size_drag.Visible = false
  100.  
  101. info2.Name = "info2"
  102. info2.Parent = frame
  103. info2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  104. info2.BackgroundTransparency = 1.000
  105. info2.BorderSizePixel = 0
  106. info2.Position = UDim2.new(0.00132275128, 0, 0.0743417293, 0)
  107. info2.Size = UDim2.new(0, 753, 0, 17)
  108. info2.Font = Enum.Font.Gotham
  109. info2.Text = "Clear is LeftShift + K."
  110. info2.TextColor3 = Color3.fromRGB(255, 255, 255)
  111. info2.TextSize = 25.000
  112. info2.TextWrapped = true
  113.  
  114. UIGradient_2.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(0.50, Color3.fromRGB(0, 0, 0)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 255, 255))}
  115. UIGradient_2.Offset = Vector2.new(-1, 0)
  116. UIGradient_2.Parent = info2
  117.  
  118. info1.Name = "info1"
  119. info1.Parent = frame
  120. info1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  121. info1.BackgroundTransparency = 1.000
  122. info1.BorderSizePixel = 0
  123. info1.Position = UDim2.new(0.00132275128, 0, 0.044296369, 0)
  124. info1.Size = UDim2.new(0, 753, 0, 17)
  125. info1.Font = Enum.Font.Gotham
  126. info1.Text = "Keybind is LeftControl."
  127. info1.TextColor3 = Color3.fromRGB(255, 255, 255)
  128. info1.TextSize = 25.000
  129. info1.TextWrapped = true
  130.  
  131. UIGradient_3.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(0.50, Color3.fromRGB(0, 0, 0)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 255, 255))}
  132. UIGradient_3.Offset = Vector2.new(-1, 0)
  133. UIGradient_3.Parent = info1
  134.  
  135. info3.Name = "info3"
  136. info3.Parent = frame
  137. info3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  138. info3.BackgroundTransparency = 1.000
  139. info3.BorderSizePixel = 0
  140. info3.Position = UDim2.new(0, 0, 0.10438709, 0)
  141. info3.Size = UDim2.new(0, 753, 0, 17)
  142. info3.Font = Enum.Font.Gotham
  143. info3.Text = "Print BC.cmds for a list of commands."
  144. info3.TextColor3 = Color3.fromRGB(255, 255, 255)
  145. info3.TextSize = 25.000
  146. info3.TextWrapped = true
  147.  
  148. UIGradient_4.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(0.50, Color3.fromRGB(0, 0, 0)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 255, 255))}
  149. UIGradient_4.Offset = Vector2.new(-1, 0)
  150. UIGradient_4.Parent = info3
  151.  
  152. -- Scripts:
  153.  
  154. local function JIDP_fake_script() -- frame.mainScript
  155.     local script = Instance.new('LocalScript', frame)
  156.  
  157.     --locals
  158.     local container = script.Parent.container
  159.     local keybind = 'LeftControl'
  160.     local tween = game:GetService('TweenService')
  161.     local uis = game:GetService('UserInputService')
  162.     local commands = {}
  163.     --functions
  164.    
  165.     function tablelength(t)
  166.         local _ = 0
  167.         for a,b in pairs(t) do
  168.             if b then
  169.                 _ += 1
  170.             end
  171.         end
  172.         return _
  173.     end
  174.     function subEnd(str, int)
  175.         local a = ''
  176.         return string.reverse(string.sub(string.reverse(str), int))
  177.     end
  178.     function printed(str, _type, rawtext)
  179.         if str then
  180.             if not rawtext then rawtext = str end
  181.             local split = string.split(rawtext, '.')
  182.             if split[1] == 'BC' then
  183.                 local secondsplit = string.split(split[2], ' ')
  184.                 local command = secondsplit[1]
  185.                 if getfenv(0)[command] then
  186.                     getfenv(0)[command](secondsplit[2])
  187.                 else
  188.                     printed('BC_OUTPUT: '..command..' is not a command',Enum.MessageType.MessageOutput)
  189.                 end
  190.             else
  191.                 local clone = container.template:Clone()
  192.                 clone.Parent = container
  193.                 clone.Name = str
  194.                 clone.Text = str
  195.                 if _type == Enum.MessageType.MessageOutput or _type == 1 then
  196.                     tween:Create(clone, TweenInfo.new(.3), {TextColor3=Color3.fromRGB(255,255,255)}):Play()
  197.                 elseif _type == Enum.MessageType.MessageInfo or _type == 2 then
  198.                     tween:Create(clone, TweenInfo.new(.3), {TextColor3=Color3.fromRGB(0,135,255)}):Play()
  199.                 elseif _type == Enum.MessageType.MessageWarning or _type == 3 then
  200.                     tween:Create(clone, TweenInfo.new(.3), {TextColor3=Color3.fromRGB(255,255,0)}):Play()
  201.                 elseif _type == Enum.MessageType.MessageError or _type == 4 then
  202.                     tween:Create(clone, TweenInfo.new(.3), {TextColor3=Color3.fromRGB(255,0,0)}):Play()
  203.                 end
  204.                 clone.Visible = true
  205.                 clone.MouseButton1Click:connect(function()
  206.                     tween:Create(clone, TweenInfo.new(.25), {TextTransparency=1}):Play()
  207.                     wait(.25)
  208.                     pcall(function() setclipboard(rawtext) end)
  209.                     tween:Create(clone, TweenInfo.new(.25), {TextTransparency=0}):Play()
  210.                 end)
  211.                 container.CanvasSize = UDim2.new(0, 0, container.CanvasSize.Y.Scale+.037, 0)
  212.             end
  213.         end
  214.     end
  215.     function localTime(date)
  216.         local dateString = "{hour}:{min}"
  217.         local result = string.gsub(dateString, "{(%w+)}", date)
  218.         return result
  219.     end
  220.     --commands
  221.     function changekeybind(a)
  222.         if a then
  223.             local input = a
  224.             if #a == 1 then input = string.upper(a) end
  225.             local s,r = pcall(function() if Enum.KeyCode[input] then return true else return false end end)
  226.             if r == true then
  227.                 keybind = input
  228.                 printed('BC_OUTPUT: Keybind changed to '..keybind, 1)
  229.             elseif string.lower(input) == 'default' then
  230.                 keybind = 'LeftControl'
  231.                 printed('BC_OUTPUT: Keybind changed to '..keybind, 1)
  232.             else
  233.                 printed('BC_OUTPUT: '..input..' is not a member of Enum.KeyCode', 1)
  234.             end
  235.             script.Parent.info1.Text = 'Keybind is '..keybind..'.'
  236.         else
  237.             printed('BC_OUTPUT: No perimeter given.', 1)
  238.         end
  239.     end table.insert(commands, 'changekeybind <KeyCode>')
  240.     function cmds()
  241.         local _ = ''
  242.         for a,b in pairs(commands) do
  243.             if b then
  244.                 if a == tablelength(commands) then
  245.                     _ = _ .. b
  246.                 else
  247.                     _ = _ .. b .. ', '
  248.                 end
  249.             end
  250.         end
  251.         printed('BC_OUTPUT: '.._, 1)
  252.     end
  253.     table.insert(commands, 'cmds')
  254.     function cooltext1(input)
  255.         local _ = ''
  256.         local function spaces(i)
  257.             if i==0 then return '' end
  258.             local __ = ''
  259.             for a=0,i do
  260.                 __ = __ .. ' '
  261.             end
  262.             return __
  263.         end
  264.         for i = 0,10 do
  265.             wait()
  266.             printed(spaces(i) .. input .. '\n',1)
  267.         end
  268.         for i = 10, 0, -1 do
  269.             wait()
  270.             printed(spaces(i) .. input .. '\n', 1)
  271.         end
  272.     end
  273.     table.insert(commands, 'cooltext1 <string>')
  274.    
  275.     --main
  276.     game:GetService('LogService').MessageOut:connect(function(message, _type)
  277.         printed(localTime(os.date("*t", os.time()))..' - '..message, _type, message)
  278.     end)
  279.    
  280.     uis.InputBegan:connect(function(input)
  281.         if input then
  282.             if input.KeyCode == Enum.KeyCode[keybind] then
  283.                 script.Parent.Visible = not script.Parent.Visible
  284.             elseif input.KeyCode == Enum.KeyCode.K then
  285.                 if uis:IsKeyDown(Enum.KeyCode.LeftShift) == true then
  286.                     --yes ik the next 2 loops are tedious and there probably is a better workaround but it works
  287.                     for a,b in pairs(container:GetChildren()) do
  288.                         if b.Name ~= 'info2' and b.Name ~= 'info1' and b.Name ~= 'UIListLayout' and b.Name ~= 'template' then
  289.                             tween:Create(b, TweenInfo.new(.3), {TextTransparency=1}):Play()
  290.                             container.CanvasSize = UDim2.new(0, 0, 0, 0)
  291.                         end
  292.                     end
  293.                     wait(.3)
  294.                     for a,b in pairs(container:GetChildren()) do
  295.                         if b.Name ~= 'info2' and b.Name ~= 'info1' and b.Name ~= 'UIListLayout' and b.Name ~= 'template' then
  296.                             b:Destroy()
  297.                         end
  298.                     end
  299.                 end
  300.             end
  301.         end
  302.     end)
  303. end
  304. coroutine.wrap(JIDP_fake_script)()
  305. local function HYIKV_fake_script() -- frame.smooth_drag
  306.     local script = Instance.new('LocalScript', frame)
  307.  
  308.     function dragify(Frame)
  309.         local dragToggle = nil
  310.         local dragSpeed = .25
  311.         local dragInput = nil
  312.         local dragStart = nil
  313.         local dragPos = nil
  314.        
  315.         function updateInput(input)
  316.             local Delta = input.Position - dragStart
  317.             local Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
  318.             game:GetService("TweenService"):Create(Frame, TweenInfo.new(.25), {Position = Position}):Play()
  319.         end
  320.        
  321.         Frame.InputBegan:Connect(function(input)
  322.             if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
  323.                 dragToggle = true
  324.                 dragStart = input.Position
  325.                 startPos = Frame.Position
  326.                 input.Changed:Connect(function()
  327.                     if (input.UserInputState == Enum.UserInputState.End) then
  328.                         dragToggle = false
  329.                     end
  330.                 end)
  331.             end
  332.         end)
  333.        
  334.         Frame.InputChanged:Connect(function(input)
  335.             if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  336.                 dragInput = input
  337.             end
  338.         end)
  339.        
  340.         game:GetService("UserInputService").InputChanged:Connect(function(input)
  341.             if input == dragInput and dragToggle then
  342.                 updateInput(input)
  343.             end
  344.         end)   
  345.     end
  346.    
  347.     dragify(script.Parent)
  348. end
  349. coroutine.wrap(HYIKV_fake_script)()
  350. -- size_drag.smooth_drag_size is disabled.
  351. local function EPZPTIB_fake_script() -- frame.gradientAnimationHandler
  352.     local script = Instance.new('LocalScript', frame)
  353.  
  354.     for a,b in pairs(script.Parent:GetDescendants()) do
  355.         if b then
  356.             if b.Name == 'UIGradient' then
  357.                 local clone = script.gradientAnimation:Clone()
  358.                 clone.Parent = b
  359.                 clone.Disabled = false
  360.             end
  361.         end
  362.     end
  363. end
  364. coroutine.wrap(EPZPTIB_fake_script)()
  365. -- nil.gradientAnimation is disabled.
  366.  
RAW Paste Data