Guest User

YanSimSuckScript

a guest
Jan 31st, 2022
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class SuckScript : MonoBehaviour
  4. {
  5. public StudentScript Student; // For people who dont understant this code, I am gonna show yall
  6.  
  7. public float Strength; // The Strengh of it...
  8.  
  9. private void Update()
  10. {
  11. Strength += Time.deltaTime; // Increase strengh each frame
  12. base.transform.position = Vector3.MoveTowards(base.transform.position, Student.Yandere.Hips.position + base.transform.up * 0.25f, Time.deltaTime * Strength); // Moving yandere chans hips up and down based on the strengh
  13. if (Vector3.Distance(base.transform.position, Student.Yandere.Hips.position + base.transform.up * 0.25f) < 1f)
  14. { // Checking if the distance is less than 0.25 between yan chan and her hips
  15. base.transform.localScale = Vector3.MoveTowards(base.transform.localScale, Vector3.zero, Time.deltaTime);
  16. if (base.transform.localScale == Vector3.zero)
  17. {
  18. base.transform.parent.parent.parent.gameObject.SetActive(value: false);
  19. }
  20. // Changing the scale to an object and setting its parent.
  21. }
  22. }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment