Keypad/ SSC-32U coding

I have coded a board to receive input from a keypad to power a pin, which will eventually connect to a ssc-32u. Though I can get the code to work, the if statements and other things necessary for it to work are not working

#include <Key.h>
#include <Keypad.h>
const byte Rows= 4; //number of rows on the keypad i.e. 4
const byte Cols= 3; //number of columns on the keypad i,e, 3
//we will definne the key map as on the key pad:
char keymap[Rows][Cols]=
{
{'1', '2', '3'},
{'4', '5', '6'},
{'7', '8', '9'},
{'*', '0', '#'}
};
//  a char array is defined as it can be seen on the above
//keypad connections to the arduino terminals is given as:
byte rPins[Rows]= {13, 12, 11, 10}; //Rows 0 to 3
byte cPins[Cols]= {9, 8, 7}; //Columns 0 to 2
// command for library forkeypad
//initializes an instance of the Keypad class
Keypad kpd= Keypad(makeKeymap(keymap), rPins, cPins, Rows, Cols);
int maxnum = 5;
int count = 0;
int tens = 10;
int ones = 1;
int tenths = .1;
int hundredths = .01;
int number = 0;
int distance = 1;
int velocity = 1;
int Time = 0;
void setup()
{
pinMode(6, OUTPUT); //Set 13 as the car start button
pinMode(5, INPUT);
pinMode(13-7, INPUT);
const int motors = 6;
const int start_button = 5;
Serial.begin(9600);  // initializing serail monitor
}
//If key is pressed, this key is stored in 'keypressed' variable
//If key is not equal to 'NO_KEY', then this key is printed out
void loop()
{count = 0;
char keypressed = kpd.getKey();
if (keypressed != NO_KEY); (count <maxnum);
  {
  Serial.println(keypressed);
  count = count + 1; }
if (keypressed = '#'); 
   { count = 6;}
if (keypressed = '*');
   { count = 6;}
  {
    if (count = 1); 
  tens = tens * keypressed; }
  {
    if (count = 2); 
  ones = ones * keypressed;}
  {
    if (count = 3); 
  tenths = tenths * keypressed;}
  {{
    if (count = 4);
  hundredths = hundredths * keypressed;
  number = tens + ones + tenths + hundredths;
  Time = number / velocity ;}
        if (digitalRead(5) == HIGH); 
         { digitalWrite(6, HIGH);
          delay(1000*Time);
          digitalWrite(6, LOW); }}
          
  if (count > 3);
   { count = 0;}
}

I tried a test program for the keypad, but it did not work either.

#include <Key.h>
#include <Keypad.h>
const byte Rows= 4; //number of rows on the keypad i.e. 4
const byte Cols= 3; //number of columns on the keypad i,e, 3
//we will definne the key map as on the key pad:
char keymap[Rows][Cols]=
{
{'1', '2', '3'},
{'4', '5', '6'},
{'7', '8', '9'},
{'*', '0', '#'}
};
//  a char array is defined as it can be seen on the above
//keypad connections to the arduino terminals is given as:
byte rPins[Rows]= {12, 11, 10, 9}; //Rows 0 to 3
byte cPins[Cols]= {8, 7, 6}; //Columns 0 to 2
// command for library forkeypad
//initializes an instance of the Keypad class
Keypad kpd= Keypad(makeKeymap(keymap), rPins, cPins, Rows, Cols);
int blinks = 0;

void setup() {
pinMode(13, OUTPUT);

}

void loop() {
 digitalWrite(13, LOW);
char keypressed = kpd.getKey();
if (keypressed != NO_KEY);
  
  Serial.println(keypressed);
 if (keypressed > 0);
    digitalWrite(13, HIGH);
}

Also, How could I set up and code the servo board through the Arduino. The time the servos have to run is equal to the variable Time in the first expression, and the velocity is a constant to be adjusted later. I would Really Appreciate any answers.

Though I can get the code to work, the if statements and other things necessary for it to work are not working

Of course the if statements work. That what they do doesn't match your expectations means simply that your expectations are wrong, given the code you wrote.

So, what does the code do, and what do you expect it to do?

pinMode(13-7, INPUT);

Strange way to set pin 6 as input...

const int motors = 6;
const int start_button = 5;

Local variables that immediately go out of scope. How useful.

if (keypressed != NO_KEY); (count <maxnum);

Explain what YOU think this is doing. It is not doing anything useful. Making it do something useful depends on what you expect this collection of tokens to accomplish.

if (keypressed = '#');

Its usually pointless to assign a value to a variable using an if statement.

Its usually pointless to use a ; as the body of an if statement.

for the project, pin 13 through 6 are inputs for a keypad., it is a 3X4 keypad and since the # and * are not numbers, i do not want to include them, the count is so it only pulls 4 numbers to compute the final distance.

for the project, pin 13 through 6 are inputs for a keypad

So, you think you can set the pin mode for a range of pins using that code? Have I got news for you...