public void DecreaseHealth() { //if ghost is a player if (this.gameObject.tag == "Player") { dollah.SubtractDollah(1f); currentHealth -= 7f; if (currentHealth <= 0f) { //End Game Procedures Debug.Log("Player Died"); SceneManager.LoadScene(1); } } //if ghost is a scrub else { currentHealth -= 30.0f; dollah.IncreaseCombo(); emotions.SetEmotion(Emotions.SAD); Instantiate(dollahParticles, gameObject.transform.position, Quaternion.identity); if (currentHealth <= 0f) { audio.PlayOneShot(money); dollah.AddDollah(false, this.GetComponent <Ghost>().goldInventory); Debug.Log("Spirit Died"); Destroy(gameObject); } } //scales numbers for healthbar float calculateHealth = currentHealth / maxHealth; SetHealthBar(calculateHealth); }