Advertisement
Guest User

Untitled

a guest
Apr 19th, 2020
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. local function hasAccessTo(obj)local ret;pcall(function()Instance.new("TextLabel", obj):Destroy()ret = obj;end);return ret;end
  2.  
  3.  
  4.  
  5. local MainGUI = Instance.new("ScreenGui")
  6.  
  7. local Frame = Instance.new("Frame")
  8.  
  9. local Toggle = Instance.new("TextButton")
  10.  
  11. local Save = Instance.new("TextButton")
  12.  
  13.  
  14.  
  15. MainGUI.Name = "MainGUI"
  16.  
  17. MainGUI.Parent = hasAccessTo(game:GetService("CoreGui")) or game:GetService'Players'.LocalPlayer:WaitForChild("PlayerGui")
  18.  
  19. MainGUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  20.  
  21.  
  22.  
  23. Frame.Parent = MainGUI
  24.  
  25. Frame.AnchorPoint = Vector2.new(1, 1)
  26.  
  27. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  28.  
  29. Frame.BackgroundTransparency = 0.500
  30.  
  31. Frame.BorderSizePixel = 0
  32.  
  33. Frame.ClipsDescendants = true
  34.  
  35. Frame.Position = UDim2.new(1, -4, 1, -4)
  36.  
  37. Frame.Size = UDim2.new(0, 103, 0, 28)
  38.  
  39.  
  40.  
  41. Toggle.Name = "Toggle"
  42.  
  43. Toggle.Parent = Frame
  44.  
  45. Toggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  46.  
  47. Toggle.BackgroundTransparency = 0.500
  48.  
  49. Toggle.BorderColor3 = Color3.fromRGB(206, 206, 206)
  50.  
  51. Toggle.Position = UDim2.new(0, 4, 0, 4)
  52.  
  53. Toggle.Size = UDim2.new(1, -8, 0, 20)
  54.  
  55. Toggle.Font = Enum.Font.GothamSemibold
  56.  
  57. Toggle.Text = "Output"
  58.  
  59. Toggle.TextColor3 = Color3.fromRGB(0, 0, 0)
  60.  
  61. Toggle.TextSize = 13.000
  62.  
  63.  
  64.  
  65. Save.Name = "Save"
  66.  
  67. Save.Parent = Frame
  68.  
  69. Save.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  70.  
  71. Save.BackgroundTransparency = 0.500
  72.  
  73. Save.BorderColor3 = Color3.fromRGB(206, 206, 206)
  74.  
  75. Save.Position = UDim2.new(0, 4, 0, 28)
  76.  
  77. Save.Size = UDim2.new(1, -8, 0, 20)
  78.  
  79. Save.Font = Enum.Font.GothamSemibold
  80.  
  81. Save.Text = "Save"
  82.  
  83. Save.TextColor3 = Color3.fromRGB(0, 0, 0)
  84.  
  85. Save.TextSize = 13.000
  86.  
  87. --
  88.  
  89.  
  90.  
  91. local twargs={"Out", "Quad", 0.5, true}
  92.  
  93. function RePosition(what, YPadding)
  94.  
  95. what:TweenPosition(UDim2.new(1, -4, 1, YPadding), unpack(twargs))
  96.  
  97. end
  98.  
  99.  
  100.  
  101. local active = true
  102.  
  103. Toggle.MouseButton1Up:Connect(function()
  104.  
  105. active = not active
  106.  
  107. local s=Frame.Size
  108.  
  109. if active then -- Close
  110.  
  111. RePosition(Frame, -4)
  112.  
  113. Frame:TweenSize(UDim2.new(s.X.Scale, s.X.Offset, s.Y.Scale, 28), unpack(twargs))
  114.  
  115. else -- Open
  116.  
  117. Frame:TweenSize(UDim2.new(s.X.Scale, s.X.Offset, s.Y.Scale, 52), unpack(twargs))
  118.  
  119. RePosition(Frame, -8)
  120.  
  121. end
  122.  
  123. end)
  124.  
  125.  
  126.  
  127.  
  128.  
  129. local Logs={}
  130.  
  131. local strlimit = 200
  132.  
  133.  
  134.  
  135. function stringify()
  136.  
  137. return game:GetService("HttpService"):JSONEncode(Logs);
  138.  
  139. end
  140.  
  141.  
  142.  
  143. function onMessage(Msg, Type) Type = Type.Name
  144.  
  145. if not Logs[Type.Name] then Logs[Type]={} end
  146.  
  147. table.insert(Logs[Type], tostring(Msg):sub(0, strlimit or -1))
  148.  
  149. end
  150.  
  151.  
  152.  
  153. game:GetService("LogService").MessageOut:Connect(onMessage)
  154.  
  155.  
  156.  
  157. Save.MouseButton1Up:Connect(function()
  158.  
  159. (toclipboard or setclipboard or print)(stringify())
  160.  
  161.  
  162.  
  163. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement