SHOW:
|
|
- or go back to the newest paste.
1 | local console = game.CoreGui:WaitForChild("DevConsoleMaster") | |
2 | local consoleframe = console:WaitForChild("DevConsoleWindow") | |
3 | ||
4 | local mouse = game.Players.LocalPlayer:GetMouse() | |
5 | ||
6 | consoleframe.InputBegan:connect(function(input) | |
7 | if input.UserInputType == Enum.UserInputType.MouseButton2 then | |
8 | local guisAtPosition = game.CoreGui:GetGuiObjectsAtPosition(mouse.X, mouse.Y) | |
9 | for i=1,#guisAtPosition do | |
10 | if guisAtPosition[i].Parent.Name == "ClientLog" then | |
11 | local selectedLog = guisAtPosition[i] | |
12 | if consoleframe:findFirstChild("RightClickFrame") then | |
13 | consoleframe:findFirstChild("RightClickFrame"):remove() | |
14 | end | |
15 | ||
16 | local RightClickFrame = Instance.new("Frame") | |
17 | local CopyButton = Instance.new("TextButton") | |
18 | local DeleteButton = Instance.new("TextButton") | |
19 | ||
20 | RightClickFrame.Name = "RightClickFrame" | |
21 | RightClickFrame.Parent = consoleframe | |
22 | RightClickFrame.BackgroundColor3 = Color3.new(0, 0, 0) | |
23 | RightClickFrame.BackgroundTransparency = 0.36 | |
24 | RightClickFrame.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
25 | RightClickFrame.BorderSizePixel = 2 | |
26 | RightClickFrame.Position = UDim2.new(0, (mouse.x-consoleframe.AbsolutePosition.X)-5, 0, (mouse.y-consoleframe.AbsolutePosition.Y)-5) | |
27 | RightClickFrame.Size = UDim2.new(0, 150, 0, 50) | |
28 | ||
29 | CopyButton.Name = "CopyButton" | |
30 | CopyButton.Parent = RightClickFrame | |
31 | CopyButton.BackgroundColor3 = Color3.new(0, 0, 0) | |
32 | CopyButton.BackgroundTransparency = 1 | |
33 | CopyButton.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
34 | CopyButton.BorderSizePixel = 0 | |
35 | CopyButton.Size = UDim2.new(1, 0, 0.5, 0) | |
36 | CopyButton.ZIndex = 2 | |
37 | CopyButton.Font = Enum.Font.Code | |
38 | CopyButton.FontSize = Enum.FontSize.Size14 | |
39 | CopyButton.Text = "Copy" | |
40 | CopyButton.TextColor3 = Color3.new(1, 1, 1) | |
41 | CopyButton.TextSize = 14 | |
42 | ||
43 | DeleteButton.Name = "DeleteButton" | |
44 | DeleteButton.Parent = RightClickFrame | |
45 | DeleteButton.BackgroundColor3 = Color3.new(0, 0, 0) | |
46 | DeleteButton.BackgroundTransparency = 1 | |
47 | DeleteButton.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
48 | DeleteButton.BorderSizePixel = 0 | |
49 | DeleteButton.Position = UDim2.new(0, 0, 0.5, 0) | |
50 | DeleteButton.Size = UDim2.new(1, 0, 0.5, 0) | |
51 | DeleteButton.ZIndex = 2 | |
52 | DeleteButton.Font = Enum.Font.Code | |
53 | DeleteButton.FontSize = Enum.FontSize.Size14 | |
54 | DeleteButton.Text = "Delete" | |
55 | DeleteButton.TextColor3 = Color3.new(1, 1, 1) | |
56 | DeleteButton.TextSize = 14 | |
57 | ||
58 | local action = false | |
59 | spawn(function() | |
60 | wait(1) | |
61 | if action == false then | |
62 | RightClickFrame:remove() | |
63 | end | |
64 | end) | |
65 | RightClickFrame.MouseEnter:connect(function() | |
66 | action = true | |
67 | end) | |
68 | RightClickFrame.MouseLeave:connect(function() | |
69 | RightClickFrame:remove() | |
70 | end) | |
71 | ||
72 | CopyButton.MouseButton1Down:connect(function() | |
73 | setclipboard(selectedLog.msg.Text) | |
74 | RightClickFrame:remove() | |
75 | end) | |
76 | DeleteButton.MouseButton1Down:connect(function() | |
77 | selectedLog.Visible = false -- just makes them go until you open and close the logs again (even with remove so yeah..) | |
78 | RightClickFrame:remove() | |
79 | end) | |
80 | ||
81 | end | |
82 | end | |
83 | end | |
84 | end) |