Advertisement
HenloMyDude

shin's dance

Dec 8th, 2019
437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1.  
  2. local PLAYER = owner
  3. local CHARACTER = PLAYER.Character
  4.  
  5. local ROOT = CHARACTER.HumanoidRootPart
  6. local HEAD = CHARACTER.Head
  7. local TORSO = CHARACTER.Torso
  8. local RIGHTARM = CHARACTER["Right Arm"]
  9. local LEFTARM = CHARACTER["Left Arm"]
  10. local RIGHTLEG = CHARACTER["Right Leg"]
  11. local LEFTLEG = CHARACTER["Left Leg"]
  12. local ROOTJOINT = ROOT["RootJoint"]
  13. local NECK = TORSO["Neck"]
  14. local RIGHTSHOULDER = TORSO["Right Shoulder"]
  15. local LEFTSHOULDER = TORSO["Left Shoulder"]
  16. local RIGHTHIP = TORSO["Right Hip"]
  17. local LEFTHIP = TORSO["Left Hip"]
  18. local MOUSEPOS = ROOT.Position
  19.  
  20. IT = Instance.new
  21. CF = CFrame.new
  22. VT = Vector3.new
  23. RAD = math.rad
  24. C3 = Color3.new
  25. UD2 = UDim2.new
  26. BRICKC = BrickColor.new
  27. ANGLES = CFrame.Angles
  28. EULER = CFrame.fromEulerAnglesXYZ
  29. COS = math.cos
  30. ACOS = math.acos
  31. SIN = math.sin
  32. ASIN = math.asin
  33. ABS = math.abs
  34. MRANDOM = math.random
  35. FLOOR = math.floor
  36.  
  37. --//====================================================\\--
  38. --|| BACKGROUND VALUES
  39. --\\====================================================//--
  40.  
  41. local ANIM_SPEED = 3
  42. local FRAME_SPEED = 1 / 60 -- (1 / 30) OR (1 / 60)
  43. local CHANGE = 2 / ANIM_SPEED
  44. local SINE = 0
  45. local Debris = game:GetService("Debris")
  46. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  47. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  48. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  49. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  50.  
  51. --//====================================================\\--
  52. --|| HEARTBEAT
  53. --\\====================================================//--
  54.  
  55. function Swait(number)
  56. if number == 0 or number == nil then
  57. game:GetService("RunService").Heartbeat:Wait()
  58. else
  59. for i = 1,number do
  60. game:GetService("RunService").Heartbeat:Wait()
  61. end
  62. end
  63. end
  64.  
  65. local I = 0
  66.  
  67. function Clerp(a, b, t)
  68. return a:lerp(b, t)
  69. end
  70.  
  71. local HUM = CHARACTER:FindFirstChildOfClass("Humanoid")
  72. HUM.Name = "Humanoid"
  73. HUM:ClearAllChildren()
  74.  
  75. while true do
  76. Swait()
  77. HUM.Name = "Humanoid"
  78. I = I + 1
  79. SINE = SINE + CHANGE
  80. ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0 - 0.32 * SIN(I / 10), 0, -0.05 - 0.05 * COS(I / 5)) * ANGLES(RAD(0), RAD(0 - 20 * SIN(I / 10)), RAD(0)), 0.5 / ANIM_SPEED)
  81. NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0 - 20 * COS(I / 10)), RAD(0)), 0.5 / ANIM_SPEED)
  82. RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(170), RAD(10), RAD(-35 * COS(I/10))) *CF(0,-1,0) * RIGHTSHOULDERC0, 0.5 / ANIM_SPEED)
  83. LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(170), RAD(-10), RAD(-35 * COS(I/10))) * CF(0,-1,0) * LEFTSHOULDERC0, 0.5 / ANIM_SPEED)
  84. RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -0.975 + 0.36 * SIN(I / 10) + 0.05 * COS(I / 5), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-12 - 19 * SIN(I / 10)), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
  85. LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -0.975 - 0.36 * SIN(I / 10) + 0.05 * COS(I / 5), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-12 + 19 * SIN(I / 10)), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
  86. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement