Advertisement
Dampick

testDampick

Feb 27th, 2025
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.07 KB | Writing | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local Frame = Instance.new("Frame")
  3. local TextBox = Instance.new("TextBox")
  4. local TextButton = Instance.new("TextButton")
  5. local MessageCountBox = Instance.new("TextBox")
  6. local UserInputService = game:GetService("UserInputService")
  7. local Label = Instance.new("TextLabel")
  8.  
  9. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  10.  
  11. Frame.Parent = ScreenGui
  12. Frame.Size = UDim2.new(0, 200, 0, 140)
  13. Frame.Position = UDim2.new(0.5, -100, 0.5, -70)
  14. Frame.BackgroundColor3 = Color3.fromRGB(0, 102, 204)
  15. Frame.Active = true
  16. Frame.Draggable = true
  17.  
  18. Label.Parent = Frame
  19. Label.Size = UDim2.new(1, 0, 0.15, 0)
  20. Label.Position = UDim2.new(0, 0, 0, 0)
  21. Label.BackgroundColor3 = Color3.fromRGB(0, 51, 153)
  22. Label.TextColor3 = Color3.fromRGB(255, 255, 255)
  23. Label.Text = "BY DAMPICK"
  24.  
  25. MessageCountBox.Parent = Frame
  26. MessageCountBox.Size = UDim2.new(1, 0, 0.2, 0)
  27. MessageCountBox.Position = UDim2.new(0, 0, 0.15, 0)
  28. MessageCountBox.BackgroundColor3 = Color3.fromRGB(173, 216, 230)
  29. MessageCountBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  30. MessageCountBox.Text = "Quantity: 0"
  31. MessageCountBox.ClearTextOnFocus = false
  32. MessageCountBox.TextEditable = false
  33.  
  34. TextBox.Parent = Frame
  35. TextBox.Size = UDim2.new(1, 0, 0.3, 0)
  36. TextBox.Position = UDim2.new(0, 0, 0.35, 0)
  37. TextBox.BackgroundColor3 = Color3.fromRGB(173, 216, 230)
  38. TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  39. TextBox.PlaceholderText = "Write the name of the fish..."
  40.  
  41. TextButton.Parent = Frame
  42. TextButton.Size = UDim2.new(1, 0, 0.3, 0)
  43. TextButton.Position = UDim2.new(0, 0, 0.65, 0)
  44. TextButton.Text = "Dupe-Fish"
  45. TextButton.BackgroundColor3 = Color3.fromRGB(0, 51, 153)
  46. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  47.  
  48. local MessageCount = 0
  49. TextButton.MouseButton1Click:Connect(function()
  50.     local message = TextBox.Text
  51.     if message ~= "" then
  52.         MessageCount = MessageCount + 1
  53.         MessageCountBox.Text = "Quantity: " .. MessageCount
  54.         game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("Все было сделано!", "All")
  55.         TextBox.Text = ""
  56.     end
  57. end)
  58.  
  59. -- Добавление возможности перемещения меню
  60. local dragging, dragInput, dragStart, startPos
  61. Frame.InputBegan:Connect(function(input)
  62.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  63.         dragging = true
  64.         dragStart = input.Position
  65.         startPos = Frame.Position
  66.         input.Changed:Connect(function()
  67.             if input.UserInputState == Enum.UserInputState.End then
  68.                 dragging = false
  69.             end
  70.         end)
  71.     end
  72. end)
  73.  
  74. Frame.InputChanged:Connect(function(input)
  75.     if input.UserInputType == Enum.UserInputType.MouseMovement then
  76.         dragInput = input
  77.     end
  78. end)
  79.  
  80. UserInputService.InputChanged:Connect(function(input)
  81.     if input == dragInput and dragging then
  82.         local delta = input.Position - dragStart
  83.         Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  84.     end
  85. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement