Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local TextBox = Instance.new("TextBox")
- local TextButton = Instance.new("TextButton")
- local MessageCountBox = Instance.new("TextBox")
- local UserInputService = game:GetService("UserInputService")
- local Label = Instance.new("TextLabel")
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- Frame.Parent = ScreenGui
- Frame.Size = UDim2.new(0, 200, 0, 140)
- Frame.Position = UDim2.new(0.5, -100, 0.5, -70)
- Frame.BackgroundColor3 = Color3.fromRGB(0, 102, 204)
- Frame.Active = true
- Frame.Draggable = true
- Label.Parent = Frame
- Label.Size = UDim2.new(1, 0, 0.15, 0)
- Label.Position = UDim2.new(0, 0, 0, 0)
- Label.BackgroundColor3 = Color3.fromRGB(0, 51, 153)
- Label.TextColor3 = Color3.fromRGB(255, 255, 255)
- Label.Text = "BY DAMPICK"
- MessageCountBox.Parent = Frame
- MessageCountBox.Size = UDim2.new(1, 0, 0.2, 0)
- MessageCountBox.Position = UDim2.new(0, 0, 0.15, 0)
- MessageCountBox.BackgroundColor3 = Color3.fromRGB(173, 216, 230)
- MessageCountBox.TextColor3 = Color3.fromRGB(0, 0, 0)
- MessageCountBox.Text = "Quantity: 0"
- MessageCountBox.ClearTextOnFocus = false
- MessageCountBox.TextEditable = false
- TextBox.Parent = Frame
- TextBox.Size = UDim2.new(1, 0, 0.3, 0)
- TextBox.Position = UDim2.new(0, 0, 0.35, 0)
- TextBox.BackgroundColor3 = Color3.fromRGB(173, 216, 230)
- TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextBox.PlaceholderText = "Write the name of the fish..."
- TextButton.Parent = Frame
- TextButton.Size = UDim2.new(1, 0, 0.3, 0)
- TextButton.Position = UDim2.new(0, 0, 0.65, 0)
- TextButton.Text = "Dupe-Fish"
- TextButton.BackgroundColor3 = Color3.fromRGB(0, 51, 153)
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- local MessageCount = 0
- TextButton.MouseButton1Click:Connect(function()
- local message = TextBox.Text
- if message ~= "" then
- MessageCount = MessageCount + 1
- MessageCountBox.Text = "Quantity: " .. MessageCount
- game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("Все было сделано!", "All")
- TextBox.Text = ""
- end
- end)
- -- Добавление возможности перемещения меню
- local dragging, dragInput, dragStart, startPos
- Frame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = Frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- Frame.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- local delta = input.Position - dragStart
- Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement