dollcrds

minsung crd co codes

Jul 15th, 2022
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. ---text animation---
  2.  
  3. <style>
  4. #gay {
  5. -webkit-animation: pop 1s ease-in-out infinite alternate;
  6. animation: pop 1s ease-in-out infinite alternate;
  7. -moz-animation: pop 1s ease-in-out infinite alternate;
  8. }
  9. @keyframes pop {
  10. from {
  11. transform:scale(0.95)
  12. }
  13. 50% {
  14. transform:scale(1)
  15. }
  16. to {
  17. transform:scale(0.95)
  18. }
  19. }
  20. @-webkit-keyframes pop {
  21. from {
  22. -webkit-transform:scale(0.95)
  23. }
  24. 50% {
  25. -webkit-transform:scale(1)
  26. }
  27. to {
  28. -webkit-transform:scale(0.95)
  29. }
  30. }
  31. </style>
  32.  
  33. ---scrollbar---
  34.  
  35. <style>
  36.  
  37. /* width */
  38. ::-webkit-scrollbar {
  39. width: 5px;
  40. }
  41.  
  42. /* Handle */
  43. ::-webkit-scrollbar-thumb {
  44. background: #ffffff80;
  45. }
  46.  
  47. </style>
  48.  
  49. ---cursor---
  50.  
  51. <script>
  52.  
  53. var b = document.body;
  54.  
  55. var imgurl = "https://media.discordapp.net/attachments/965819507794907138/997610748186476674/9d571600_original.png";
  56.  
  57. var size = [20, 30];
  58.  
  59. function rand(min, max)
  60.  
  61. {
  62.  
  63. return Math.floor(Math.random() * (max - min + 1) + min)
  64.  
  65. }
  66.  
  67. function getSize()
  68.  
  69. {
  70.  
  71. return rand(size[0], size[1]);
  72.  
  73. }
  74.  
  75. function lerp(a,b,f)
  76.  
  77. {
  78.  
  79. return (b-a)*f+a;
  80.  
  81. }
  82.  
  83. function heart(x,y)
  84.  
  85. {
  86.  
  87. var s = getSize();
  88.  
  89. x -= s/2;
  90.  
  91. y -= s/2;
  92.  
  93. x = Math.floor(x) + rand(-5, 5);
  94.  
  95. y = Math.floor(y) + rand(-5, 5);
  96.  
  97. var fx = x + rand(-40, 40);
  98.  
  99. var fy = y + rand(-40, 40);
  100.  
  101. var i = document.createElement("img");
  102.  
  103. i.src = imgurl;
  104.  
  105. i.style = `pointer-events: none; position: fixed; width: ${s}px; left: ${x}px; top: ${y}px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; z-index: 1000000;`;
  106.  
  107. b.appendChild(i);
  108.  
  109. var f = 0;
  110.  
  111. var interval;
  112.  
  113. interval = setInterval(function() {
  114.  
  115. var _x = Math.floor(lerp(x, fx, f));
  116.  
  117. var _y = Math.floor(lerp(y, fy, f));
  118.  
  119. i.style = `pointer-events: none; position: fixed; width: ${s}px; left: ${_x}px; top: ${_y}px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; z-index: 1000000;`;
  120.  
  121. i.style.opacity = 1-f;
  122.  
  123. f += 0.01;
  124.  
  125. if (f > 1)
  126.  
  127. {
  128.  
  129. clearInterval(interval);
  130.  
  131. b.removeChild(i);
  132.  
  133. }
  134.  
  135. }, 10);
  136.  
  137. }function bro(x,y){for (var i = 0; i < 5; i++){heart(x,y);}}b.addEventListener("click", function(event){var x = event.clientX;var y = event.clientY;bro(x,y);});
  138.  
  139. </script>
Advertisement
Add Comment
Please, Sign In to add comment