01 | -- locals |
02 | local text = script.Parent.input |
03 | local buttons = text.Parent.buttons |
04 |
05 | -- setup |
06 | local r = math.random( 1 , 5 ) |
07 | if r = = 1 then code = 2928 end if r = = 2 then code = 9742 end if r = = 3 then code = 2437 end if r = = 4 then code = 5975 end if r = = 5 then code = 4443 end |
08 | local input_code = "" |
09 | text.Text = input_code |
10 | workspace [ "gameSetup_(v1)" ] .game.required.paper.text.text.Text = "Uh, hey, Jack! U always forget the passcode for the door, the code is: " ..code |
11 |
12 | -- handler |
13 | for i,button in pairs (buttons:GetChildren()) do |
14 | button.MouseButton 1 Click:Connect( function () |
15 | if tonumber (button.Name) and text.Parent.Parent.BrickColor = = BrickColor.new( "Steel blue" ) then |