Player is going down instead of jumping up

Hi everyone, so I was able figured out how to implement a jumpbutton guiteaxture and now I’m trying to use it on a Charactercontroller layout similar to the Penelope one, but whenever I press the jump button the character moves down, instead of up, and I don’t know what is wrong. Thanks for taking the time to read this, and thanks in advance for all and any help.

[RequireComponent(typeof(CharacterController))]
public class Playercontrols : MonoBehaviour {
	
	
	
	public MPJoystick moveJoystick;
	public float speed = 6.0f;
	public Transform cameraTransform;
	public float jumpSpeed = 8.0f;
	public float inAirMultiplier  = 0.25f;
	public GUITexture jumpButton;
	public GameObject target;
	public GameObject spawn;
	
	private Vector3 velocity;
	private Transform thisTransform;
	private CharacterController character;
	
	
	
	
	// Use this for initialization
	
	
	void Start () {
	thisTransform = (Transform)GetComponent(typeof(Transform)); 
	character = (CharacterController)GetComponent(typeof(CharacterController));
	
		
	GameObject spawn = GameObject.Find("PlayerSpawn");
        
        if (spawn)
            thisTransform.position = spawn.transform.position;
        
	}
	
	// Update is called once per frame
	void Update () {
		movement ();
		FaceMovementDirection ();
	
}
	
public virtual void movement(){
		
	Vector3 movement = cameraTransform.TransformDirection(new Vector3( moveJoystick.position.x, 0.0f, moveJoystick.position.y ) );
	// We only want the camera-space horizontal direction
	movement.y = 0.0f;
	movement.Normalize(); // Adjust magnitude after ignoring vertical movement
	
	// Let's use the largest component of the joystick position for the speed.
	Vector2  absJoyPos = new Vector2( Mathf.Abs( moveJoystick.position.x ), Mathf.Abs( moveJoystick.position.y ) );
	movement *= speed * ( ( absJoyPos.x > absJoyPos.y ) ? absJoyPos.x : absJoyPos.y );
	
	// Check for jump
	if(Input.touchCount > 0 ){
 
				for(int i = 0; i < Input.touchCount; i++){

				Touch touch = Input.GetTouch(i);
 					 {
	if ( character.isGrounded )
	{
		if ( touch.phase == TouchPhase.Ended && jumpButton.HitTest(touch.position) )
		{
			// Apply the current movement to launch velocity
			velocity = character.velocity;
			velocity.y = jumpSpeed;
		}
	}
	else
	{			
		// Apply gravity to our velocity to diminish it over time
		velocity.y += Physics.gravity.y * Time.deltaTime;
		
		// Adjust additional movement while in-air
		movement.x *= inAirMultiplier;
		movement.z *= inAirMultiplier;
	}}
	
	movement += velocity;
	movement += Physics.gravity;
	movement *= Time.deltaTime;
	
	// Actually move the character
	character.Move( movement );
	
				
	if ( character.isGrounded )
		// Remove any persistent velocity after landing
		 velocity = Vector3.zero;
					}
	
		}
		
		
	}




	 void FaceMovementDirection(){ 
 Vector3 horizontalVelocity = character.velocity;
 	horizontalVelocity.y = 0;  
 
	if ( horizontalVelocity.magnitude > 0.1 )
   		thisTransform.forward = horizontalVelocity.normalized;
	
}
	
}

I reworked everything and it works out perfectly. Now i just need to adjust some things in the inspector to get the jump correctl.