Advertisement
luchitasin9

Open/Close Local Script

Feb 6th, 2025
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | Source Code | 0 0
  1. local button = script.Parent
  2. local screenGui = button.Parent
  3. local frame = screenGui:FindFirstChild("DonateFrame")
  4.  
  5. local isFrameVisible = false
  6.  
  7. button.MouseButton1Click:Connect(function()
  8.     isFrameVisible = not isFrameVisible
  9.    
  10.     frame.Visible = isFrameVisible
  11.    
  12.     if isFrameVisible then
  13.         button.BackgroundColor3 = Color3.new(1, 0.422446, 0.421729)
  14.         button.Text = "CLOSE"
  15.     else
  16.         button.BackgroundColor3 = Color3.new(0.451, 1, 0.467)
  17.         button.Text = "DONATE"
  18.     end
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement