Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admins = {"Username"}
- game.Players.PlayerAdded:connect(function(p)
- for _,a in pairs (admins) do
- if p.Name == a then
- p.Chatted:connect(function(msg)
- if (msg:lower()== "open") then
- script.Parent.CanCollide = false
- script.Parent.BrickColor = BrickColor.new("Bright green")
- script.Parent.SurfaceGui.TextLabel.Text = "OPEN"
- script.Parent.SurfaceGui2.TextLabel.Text = "OPEN"
- script.Parent.Beep:Play()
- script.Parent.Transparency = .5
- elseif (msg:lower() == "close") then
- script.Parent.CanCollide = true
- script.Parent.BrickColor = BrickColor.new("Bright red")
- script.Parent.SurfaceGui.TextLabel.Text = "CLOSED"
- script.Parent.SurfaceGui2.TextLabel.Text = "CLOSED"
- script.Parent.Beep:Play()
- script.Parent.Transparency = .2
- end
- end)
- end
- end
- end)
- script.Parent.Touched:connect(function()
- if (script.Parent.SurfaceGui.TextLabel.Text == "CLOSED") then
- script.Parent.Transparency = .5
- script.Parent.FF:Play()
- wait(.1)
- script.Parent.Transparency = .2
- else
- script.Parent.Transparency = .2
- script.Parent.FF:Play()
- wait(.1)
- script.Parent.Transparency = .5
- end
- end)
Add Comment
Please, Sign In to add comment