Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local A = "1111"--ด้านใน""คือรหัสผ่านที่ถูกต้องซึ่งสามารถเปลี่ยนได้
- local B = ""
- for i, v in pairs(script.Parent.PadGroup:GetChildren()) do
- v.ClickDetector.MouseClick:Connect(function()
- B = B..v.Name
- script.Parent.Screen.SurfaceGui.TextLabel.Text = B
- ----- ส่วนตรงนี้เป็นการเปลี่ยนสีPartที่เป็นปุ่ม
- v.BrickColor = BrickColor.new("Bright green")
- wait(0.15)
- v.BrickColor = BrickColor.new("Fossil")
- -----------------------------------------------------------------
- end)
- end
- script.Parent.ResetButton.ClickDetector.MouseClick:Connect(function()
- B = ""
- script.Parent.Screen.SurfaceGui.TextLabel.Text = B
- end)
- script.Parent.EnterButton.ClickDetector.MouseClick:Connect(function()
- if B == A then
- ----ส่วนตรงนี้เป็นส่วนที่จะทำให้ประตูมันเปิด(สามารถตัดส่วนนี้ออกแล้วเปลี่ยนเป็นอย่างอื่นที่ไม่ใช่การเปิดประตูแทนก็ได้)
- script.Parent.Door.Transparency = 1
- script.Parent.Door.CanCollide = false
- print("True")
- script.Parent.Screen.BrickColor = BrickColor.new("Bright green")
- wait(1.5)
- script.Parent.Screen.BrickColor = BrickColor.new("Fossil")
- -----------------------------------------------------------------
- else
- print("False")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement