Created
December 30, 2023 20:39
-
-
Save acs/7810ddced17922723376cb153ec851b4 to your computer and use it in GitHub Desktop.
Open door and show panel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local clickDetector = script.Parent | |
local candado = clickDetector.Parent.Parent | |
local puerta = candado.Parent.Puerta | |
local pared = game.Workspace.Invisible | |
clickDetector.MouseClick:Connect(function(player) | |
print("Opening the door", player.Backpack) | |
local banner = player.PlayerGui.ScreenGui.Frame1 | |
local banner2 = player.PlayerGui.ScreenGui.Frame2 | |
local banner3 = player.PlayerGui.ScreenGui.Frame3 | |
local backpack = player.Backpack | |
local card = backpack:FindFirstChild('TarjetaVerde') | |
if card then | |
print("Player with the card!") | |
puerta:Destroy() | |
banner.Visible = true | |
wait(3) | |
banner.Visible = false | |
banner2.Visible = true | |
wait(3) | |
banner2.Visible = false | |
banner3.Visible = true | |
wait(3) | |
banner3.Visible = false | |
pared:Destroy() | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment