SHARE
TWEET

kArMa v999

ItzPartapika Apr 21st, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     Karma V999
  3.     Made By ItzPartapika
  4. --]]
  5.  
  6. --[[
  7.     *E*
  8. --]]
  9.  
  10. local Players = game:GetService("Players")
  11. if owner ~= nil then
  12.     Player = owner
  13. else
  14.     Player = Players:FindFirstChild(script.Parent.Parent.Name)
  15. end
  16. local SONG = 1010460329
  17.  
  18. wait(.5)
  19.  
  20. Character = Player.Character
  21. Humanoid = Character.Humanoid
  22. RootPart = Character["HumanoidRootPart"]
  23. Torso = Character["Torso"]
  24. Head = Character["Head"]
  25. RightArm = Character["Right Arm"]
  26. LeftArm = Character["Left Arm"]
  27. RightLeg = Character["Right Leg"]
  28. LeftLeg = Character["Left Leg"]
  29. RootJoint = RootPart["RootJoint"]
  30. Neck = Torso["Neck"]
  31. RightShoulder = Torso["Right Shoulder"]
  32. LeftShoulder = Torso["Left Shoulder"]
  33. RightHip = Torso["Right Hip"]
  34. LeftHip = Torso["Left Hip"]
  35. MAINRUINCOLOR = BrickColor.new("Really red")
  36.  
  37. IT = Instance.new
  38. CF = CFrame.new
  39. RAD = math.rad
  40. C3 = Color3.new
  41. ANGLES = CFrame.Angles
  42. COS = math.cos
  43. ACOS = math.acos
  44. SIN = math.sin
  45. MRANDOM = math.random
  46.  
  47. local sickTP = 0
  48. local sick = IT("Sound", Character)
  49. sick.Name = "kArMa"
  50. sick.TimePosition = 0
  51. sick.SoundId = "rbxassetid://"..SONG
  52. sick.Looped = true
  53. sick.Pitch = 1
  54. sick.Volume = 1
  55. sick:Play()
  56.  
  57. --//=================================\\
  58. --||          CUSTOMIZATION
  59. --\\=================================//
  60.  
  61. Animation_Speed = 3
  62. local Speed = 175
  63.  
  64. --//=================================\\
  65. --||      END OF CUSTOMIZATION
  66. --\\=================================//
  67.  
  68. --//=================================\\
  69. --||          USEFUL VALUES
  70. --\\=================================//
  71.  
  72. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  73. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  74. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  75. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  76. local ANIM = "Idle"
  77. local EQUIPPED = false
  78. local SINE = 0
  79. local KEYHOLD = false
  80. local CHANGE = 2 / Animation_Speed
  81. local ANIMATOR = Humanoid.Animator
  82. local ANIMATE = Character.Animate
  83. local UNANCHOR = true
  84. local RandomPitchActive = false
  85.  
  86. --//=================================\\
  87. --||          SOME FUNCTIONS
  88. --\\=================================//
  89.  
  90. function QuaternionFromCFrame(cf)
  91.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  92.     local trace = m00 + m11 + m22
  93.     if trace > 0 then
  94.         local s = math.sqrt(1 + trace)
  95.         local recip = 0.5 / s
  96.         return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  97.     else
  98.         local i = 0
  99.         if m11 > m00 then
  100.             i = 1
  101.         end
  102.         if m22 > (i == 0 and m00 or m11) then
  103.             i = 2
  104.         end
  105.         if i == 0 then
  106.             local s = math.sqrt(m00 - m11 - m22 + 1)
  107.             local recip = 0.5 / s
  108.             return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  109.         elseif i == 1 then
  110.             local s = math.sqrt(m11 - m22 - m00 + 1)
  111.             local recip = 0.5 / s
  112.             return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  113.         elseif i == 2 then
  114.             local s = math.sqrt(m22 - m00 - m11 + 1)
  115.             local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  116.         end
  117.     end
  118. end
  119.  
  120. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  121.     local xs, ys, zs = x + x, y + y, z + z
  122.     local wx, wy, wz = w * xs, w * ys, w * zs
  123.     local xx = x * xs
  124.     local xy = x * ys
  125.     local xz = x * zs
  126.     local yy = y * ys
  127.     local yz = y * zs
  128.     local zz = z * zs
  129.     return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  130. end
  131.  
  132. function QuaternionSlerp(a, b, t)
  133.     local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  134.     local startInterp, finishInterp;
  135.     if cosTheta >= 0.0001 then
  136.         if (1 - cosTheta) > 0.0001 then
  137.             local theta = ACOS(cosTheta)
  138.             local invSinTheta = 1 / SIN(theta)
  139.             startInterp = SIN((1 - t) * theta) * invSinTheta
  140.             finishInterp = SIN(t * theta) * invSinTheta
  141.         else
  142.             startInterp = 1 - t
  143.             finishInterp = t
  144.         end
  145.     else
  146.         if (1 + cosTheta) > 0.0001 then
  147.             local theta = ACOS(-cosTheta)
  148.             local invSinTheta = 1 / SIN(theta)
  149.             startInterp = SIN((t - 1) * theta) * invSinTheta
  150.             finishInterp = SIN(t * theta) * invSinTheta
  151.         else
  152.             startInterp = t - 1
  153.             finishInterp = t
  154.         end
  155.     end
  156.     return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  157. end
  158.  
  159. function Clerp(a, b, t)
  160.     local qa = {QuaternionFromCFrame(a)}
  161.     local qb = {QuaternionFromCFrame(b)}
  162.     local ax, ay, az = a.x, a.y, a.z
  163.     local bx, by, bz = b.x, b.y, b.z
  164.     local _t = 1 - t
  165.     return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  166. end
  167.  
  168. function RandomCapitals(String)
  169.     local NewString = ""
  170.     for i = 1, #String do
  171.         if(math.random(1, 2) == 1)then
  172.             NewString = NewString .. (String:sub(i, i):upper())
  173.         else
  174.             NewString = NewString .. String:sub(i, i)
  175.         end
  176.     end
  177.     return NewString
  178. end
  179.  
  180. function NewColor(Table)
  181.     return C3(Table[1], Table[2], Table[3])
  182. end
  183.  
  184. --//=================================\\
  185. --\\=================================//
  186.  
  187. local BillboardGui = Instance.new("BillboardGui", Head)
  188. BillboardGui.Adornee = Head
  189. BillboardGui.Name = "NameDetect"
  190. BillboardGui.Size = UDim2.new(4, 0, 1.2, 0)
  191. BillboardGui.StudsOffset = Vector3.new(-8, 5.333333333333333, 0)
  192. local ScriptLabel = Instance.new("TextLabel", BillboardGui)
  193. ScriptLabel.Size = UDim2.new(5, 0, 3.5, 0)
  194. ScriptLabel.FontSize = "Size8"
  195. ScriptLabel.TextScaled = true
  196. ScriptLabel.BackgroundTransparency = 1
  197. ScriptLabel.TextStrokeTransparency = 0
  198. ScriptLabel.Font = "Antique"
  199. ScriptLabel.Text = "kArMa v999"
  200.  
  201. function unanchor()
  202.     if UNANCHOR == true then
  203.         local g = Character:GetChildren()
  204.         for i = 1, #g do
  205.             if g[i].ClassName == "Part" then
  206.                 g[i].Anchored = false
  207.             end
  208.         end
  209.     end
  210. end
  211.  
  212. --//=================================\\
  213. --||    WRAP THE WHOLE SCRIPT UP
  214. --\\=================================//
  215.  
  216. while game:GetService("RunService").Heartbeat:Wait() do
  217.     ANIMATE.Parent = nil
  218.     SINE = SINE + CHANGE
  219.     RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 + 0.25 * COS(SINE / 43), 0 - 0.25 * COS(SINE / 53),2 + 1 * COS(SINE / 32)) * ANGLES(RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360))), 0.15)
  220.     Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360))), 0.3)
  221.     RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360))) * RIGHTSHOULDERC0, 0.15)
  222.     LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360))) * LEFTSHOULDERC0, 0.15)
  223.     RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360))) * ANGLES(RAD(MRANDOM(-360, 360)), RAD(0), RAD(0)), 0.1)
  224.     LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360))) * ANGLES(RAD(MRANDOM(-360, 360)), RAD(0), RAD(0)), 0.1)
  225.     unanchor()
  226.     Humanoid.WalkSpeed = Speed
  227.     Humanoid.MaxHealth = "inf"
  228.     Humanoid.Health = "inf"
  229.     if Character:FindFirstChild("kArMa") == nil then
  230.         sick = IT("Sound", Character)
  231.         sick.Name = "kArMa"
  232.         sick.TimePosition = sickTP
  233.         sick.SoundId = "rbxassetid://"..SONG
  234.         sick.Looped = true
  235.         sick.Pitch = 0.95
  236.         sick.Volume = 1
  237.     end
  238.     ScriptLabel.Text = RandomCapitals("kArMa v999")
  239.     ScriptLabel.TextColor3 = NewColor({
  240.         MRANDOM(1, 255) / 255,
  241.         MRANDOM(1, 255) / 255,
  242.         MRANDOM(1, 255) / 255
  243.     })
  244.     ScriptLabel.TextStrokeColor3 = NewColor({
  245.         MRANDOM(1, 255) / 255,
  246.         MRANDOM(1, 255) / 255,
  247.         MRANDOM(1, 255) / 255
  248.     })
  249.     if Character:FindFirstChild("kArMa") ~= nil then
  250.         sick.Name = "kArMa"
  251.         sickTP = sick.TimePosition
  252.         sick.SoundId = "rbxassetid://"..SONG
  253.         sick.Looped = true
  254.         if RandomPitchActive == false then
  255.             sick.Pitch = 0.95
  256.         elseif RandomPitchActive == true then
  257.             if MRANDOM(1, 10) == 3 then
  258.                 local randomPitch = MRANDOM(1, 10) / 10
  259.                 if randomPitch <= 0.5 then
  260.                     sick.Pitch = randomPitch * 2
  261.                 else
  262.                     sick.Pitch = randomPitch
  263.                 end
  264.             end
  265.         end
  266.         sick.Volume = 1
  267.         sick:Resume()
  268.     end
  269.     local MATHS = {"0","1"}
  270.     Humanoid.Name = MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]..MATHS[MRANDOM(1,#MATHS)]
  271.     Humanoid.PlatformStand = false
  272. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top