Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Entry doors activated")
- s1 = false
- s2 = false
- s3 = false
- s4 = false
- s5 = false
- sd = false
- function onChat(text,recep)
- finaltext=string.lower(text)
- s1 = false
- s2 = false
- s3 = false
- s4 = false
- s5 = false
- sX = false
- if string.find(finaltext, "computer")~= nil then
- s1 = true
- if string.find(finaltext, "entry")~= nil then
- s2 = true
- end
- if string.find(finaltext, "doors")~= nil then
- s3 = true
- end
- if string.find(finaltext, "open")~= nil then
- s4 = true
- end
- if string.find(finaltext, "close")~= nil then
- s5 = true
- end
- end
- if s5 == true then
- sX = true
- end
- if s1 == true and s2 == true and s3 == true and s4 == true and sX == false then
- UnlockDoors()
- elseif s1 == true and s2 == true and s3 == true and sX == true then
- LockDoors()
- end
- end
- function UnlockDoors()
- if sd == false then
- sd = true
- for i = 1,80 do
- script.Parent.R1.CFrame = script.Parent.R1.CFrame + Vector3.new(0.1, 0, 0)
- script.Parent.R2.CFrame = script.Parent.R2.CFrame + Vector3.new(0.1, 0, 0)
- script.Parent.L1.CFrame = script.Parent.L1.CFrame + Vector3.new(-0.10, 0, 0)
- script.Parent.L2.CFrame = script.Parent.L2.CFrame + Vector3.new(-0.10, 0, 0)
- wait()
- end
- end
- end
- function LockDoors()
- if sd == true then
- sd = false
- for i = 1,80 do
- script.Parent.R1.CFrame = script.Parent.R1.CFrame + Vector3.new(-0.1, 0, 0)
- script.Parent.R2.CFrame = script.Parent.R2.CFrame + Vector3.new(-0.1, 0, 0)
- script.Parent.L1.CFrame = script.Parent.L1.CFrame + Vector3.new(0.1, 0, 0)
- script.Parent.L2.CFrame = script.Parent.L2.CFrame + Vector3.new(0.1, 0, 0)
- wait()
- end
- end
- end
- trains = {"jammy101101","Videaogame5","Rykarz","Hibobjoebill","SilentSwords","owen0202","supermansdog","Basketsgolba","drako72","Basketsgolba","AmazingAnt","Prometherion","dizzdazz4","Lucario1611","donut222","WIJPromotions","WIJManagement","cj10127","BallinOHehir21","lupine","yoshislayer","cymru792","cymru72","iRykorz","Daugion","Eeyore19718","JuHDude","Bloxmaster998144","shotsoon","Encladeus","piepiechris","Ultimateguy","Rovert10","dakotag11","STAInstructor","neo1014131","sk8rboy179","greekdagreat","bioniclehero","scaryblokhead","jack0800","LavaRocks894","ROBLOCKSuser","tallconnor123","KillerWarewolf","LORDORKY","wuppii","7035"}
- function onPlayerEntered(newPlayer)
- for i = 1,#trains do
- if newPlayer.Name == trains[i] then
- newPlayer.Chatted:connect(function(text,recep) onChat(text,recep,player) end)
- end
- end
- end
- game.Players.PlayerAdded:connect(onPlayerEntered)
Add Comment
Please, Sign In to add comment