Parallaxox

Click GUI

Apr 22nd, 2025 (edited)
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.20 KB | None | 0 0
  1. --https://youtu.be/j5h2DvXeHEU
  2. local player = game.Players.LocalPlayer
  3. local playerGui = player:WaitForChild("PlayerGui")
  4.  
  5. local screenGui = Instance.new("ScreenGui")
  6. screenGui.Name = "ScreenGui"
  7. screenGui.Parent = playerGui
  8.  
  9. local clickButton = Instance.new("TextButton")
  10. clickButton.Size = UDim2.new(0.2, 0, 0.1, 0)
  11. clickButton.Position = UDim2.new(0.02, 0, 0.45, 0)
  12. clickButton.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
  13. clickButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  14. clickButton.Font = Enum.Font.SourceSansBold
  15. clickButton.TextSize = 24
  16. clickButton.Text = "Click Me"
  17. clickButton.Parent = screenGui
  18.  
  19. local countLabel = Instance.new("TextLabel")
  20. countLabel.Size = UDim2.new(0.2, 0, 0.08, 0)
  21. countLabel.Position = UDim2.new(0.02, 0, 0.35, 0)
  22. countLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  23. countLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  24. countLabel.Font = Enum.Font.SourceSansBold
  25. countLabel.TextSize = 24
  26. countLabel.Text = "Clicks: 0"
  27. countLabel.Parent = screenGui
  28.  
  29. local clickCount = 0
  30.  
  31. local function updateCounter()
  32.     countLabel.Text = "Clicks: " .. clickCount
  33. end
  34.  
  35. clickButton.MouseButton1Click:Connect(function()
  36.     clickCount = clickCount + 1
  37.     updateCounter()
  38. end)
  39.  
Advertisement
Add Comment
Please, Sign In to add comment