Advertisement
Showy19

Tienda Gui Script

Jan 24th, 2021
4,338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. local abrir = script.Parent.Abrir  --Boton para abrir la tienda y cerrar
  2. local frame = script.Parent.Frame  --Frame de la tienda
  3. local cerrar = frame.Cerrar        --Boton para cerrar la tienda
  4.  
  5. local estaAbierto = false          --Determina si la tienda esta abierta o no
  6.  
  7.  
  8. frame.Visible = false  --Hace que la tienda no sea visible (por defecto)
  9.  
  10. abrir.MouseButton1Click:Connect(function()
  11.     if estaAbierto == false then
  12.         frame.Visible = true      --Hace visible el frame            
  13.         estaAbierto = true        --La tienda esta abierta
  14.     elseif estaAbierto == true then
  15.         frame.Visible = false     --Hace que la tienda sea invisible
  16.         estaAbierto = false       --La tienda esta cerrada
  17.     end
  18. end)
  19.  
  20.  
  21. cerrar.MouseButton1Click:Connect(function()
  22.     if estaAbierto == true then
  23.         frame.Visible = false     --Hace el frame invisible
  24.         estaAbierto = false
  25.     end
  26. end)
  27.  
  28.  
  29.  
  30. --Script hecho por Showy19! Disfrutalo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement