Advertisement
loueque

GateScript1

Sep 1st, 2020
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. local Selection = script.Parent.SelectionBox
  2. local Light = script.Parent.PointLight
  3. local Gate = game.Workspace.Gate
  4. local Detector = script.Parent.ClickDetector
  5. local Audio = script.Parent.Button
  6.  
  7. script.Parent.ClickDetector.MouseClick:Connect(function(click)
  8.    
  9.     --CODE:
  10.     Audio:Play()
  11.     Detector:Destroy()
  12.     Selection.Color3 = Color3.new(255, 255, 0)
  13.     script.Parent.BrickColor = BrickColor.new("Bright yellow")
  14.     Light.Color = Color3.new(255, 255, 0)
  15.    
  16.     wait(6)
  17.    
  18.     Audio:Stop()
  19.     Selection.Color3 = Color3.new(255, 0, 0)
  20.     script.Parent.BrickColor = BrickColor.new("Bright red")
  21.     Light.Color = Color3.new(255, 0, 0)
  22.     Gate:Destroy()
  23. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement