Поиск в блоге

неділя, 1 грудня 2024 р.

Гра Хрестики нолики в Roblox Studio

 



buttons = script.Parent.Buttons:GetChildren()
script.Parent.Result.Text = "Result"
 
function check_win_X()
         if buttons[1].Text == "X" and buttons[2].Text == "X" and buttons[3].Text == "X" then
                   script.Parent.Result.Text = "X win"        
         end
         if buttons[4].Text == "X" and buttons[5].Text == "X" and buttons[6].Text == "X" then
                   script.Parent.Result.Text = "X win"        
         end
         if buttons[7].Text == "X" and buttons[8].Text == "X" and buttons[9].Text == "X" then
                   script.Parent.Result.Text = "X win"        
         end
 
         if buttons[1].Text == "X" and buttons[4].Text == "X" and buttons[7].Text == "X" then
                   script.Parent.Result.Text = "X win"        
         end
         if buttons[2].Text == "X" and buttons[5].Text == "X" and buttons[8].Text == "X" then
                   script.Parent.Result.Text = "X win"        
         end
         if buttons[3].Text == "X" and buttons[6].Text == "X" and buttons[9].Text == "X" then
                   script.Parent.Result.Text = "X win"        
         end
 
         if buttons[1].Text == "X" and buttons[5].Text == "X" and buttons[9].Text == "X" then
                   script.Parent.Result.Text = "X win"        
         end
         if buttons[3].Text == "X" and buttons[5].Text == "X" and buttons[7].Text == "X" then
                   script.Parent.Result.Text = "X win"        
         end
end