Advertisement
Guest User

Untitled

a guest
May 20th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1.  
  2.  
  3.  
  4. local p = game.Players.LocalPlayer
  5. local char = p.Character
  6. local mouse = p:GetMouse()
  7. local larm = char["Left Arm"]
  8. local rarm = char["Right Arm"]
  9. local lleg = char["Left Leg"]
  10. local rleg = char["Right Leg"]
  11. local hed = char.Head
  12. local torso = char.Torso
  13. local hum = char.Humanoid
  14. local cam = game.Workspace.CurrentCamera
  15. local root = char.HumanoidRootPart
  16. local deb = false
  17. local shot = 0
  18. local l = game:GetService("Lighting")
  19. local rs = game:GetService("RunService").RenderStepped
  20. local stanceToggle = "Normal"
  21. math.randomseed(os.time())
  22. hum.WalkSpeed = 7
  23. char.Health:Destroy()
  24. hum.MaxHealth = 50000
  25. wait(0.01)
  26. hum.Health = 50000
  27. ----------------------------------------------------
  28. ----------------------------------------------------
  29. shirt = Instance.new("Shirt", char)
  30. shirt.Name = "Shirt"
  31. pants = Instance.new("Pants", char)
  32. pants.Name = "Pants"
  33. char.Shirt.ShirtTemplate = "rbxassetid://237906462"
  34. char.Pants.PantsTemplate = "rbxassetid://237906462"
  35. ----------------------------------------------------
  36. ----------------------------------------------------
  37. Debounces = {
  38. on = false;
  39. ks = false;
  40. CanAttack = true;
  41. CanJoke = true;
  42. NoIdl = false;
  43. Slashing = false;
  44. Slashed = false;
  45. Grabbing = false;
  46. Grabbed = false;
  47. }
  48. local Touche = {char.Name, }
  49. ----------------------------------------------------
  50. function lerp(a, b, t) -- Linear interpolation
  51. return a + (b - a)*t
  52. end
  53.  
  54. function slerp(a, b, t) --Spherical interpolation
  55. dot = a:Dot(b)
  56. if dot > 0.99999 or dot < -0.99999 then
  57. return t <= 0.5 and a or b
  58. else
  59. r = math.acos(dot)
  60. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  61. end
  62. end
  63.  
  64. function matrixInterpolate(a, b, t)
  65. local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components()
  66. local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components()
  67. local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position
  68. local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right
  69. local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up
  70. local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back
  71. local t = v1:Dot(v2)
  72. if not (t < 0 or t == 0 or t > 0) then -- Failsafe
  73. return CFrame.new()
  74. end
  75. return CFrame.new(
  76. v0.x, v0.y, v0.z,
  77. v1.x, v1.y, v1.z,
  78. v2.x, v2.y, v2.z,
  79. v3.x, v3.y, v3.z)
  80. end
  81. -----------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement