Dark_EccentricYT

Untitled

Aug 27th, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.38 KB | None | 0 0
  1. -- Caeso
  2. -- TochigiGrenade
  3.  
  4. local function weldBetween(a, b)
  5. local weld = Instance.new("Motor6D")
  6. weld.Part0 = a
  7. weld.Part1 = b
  8. weld.C0 = CFrame.new()
  9. weld.C1 = b.CFrame:inverse()*a.CFrame
  10. weld.Parent = a
  11. return weld;
  12. end
  13.  
  14. local function jointBetween(a, b, cfa, cfb)
  15. local weld = Instance.new("Motor6D")
  16. weld.Part0 = a
  17. weld.Part1 = b
  18. weld.C0 = cfa
  19. weld.C1 = cfb
  20. weld.Parent = a
  21. return weld;
  22. end
  23.  
  24. local CharItems=game.Players:GetCharacterAppearanceAsync(8016111)
  25. function CreateRig() -- lol thx animation editor
  26. local parent = Instance.new("Model")
  27.  
  28. local Root = Instance.new("Part")
  29. Root.Name = "HumanoidRootPart"
  30. Root.Anchored = true
  31. Root.CanCollide = true
  32. Root.Transparency = 1
  33. Root.Size = Vector3.new(2, 2, 1)
  34. Root.Parent = parent
  35. Root.CFrame = CFrame.new(0, 5.2, 4.5)
  36. Root.BottomSurface = "Smooth"
  37. Root.TopSurface = "Smooth"
  38. parent.PrimaryPart = Root
  39.  
  40. local Torso = Instance.new("Part")
  41. Torso.Name = "Torso"
  42. Torso.Anchored = false
  43. Torso.CanCollide = false
  44. Torso.Size = Vector3.new(2, 2, 1)
  45. Torso.Parent = parent
  46. Torso.CFrame = CFrame.new(0, 5.2, 4.5)
  47. Torso.BottomSurface = "Smooth"
  48. Torso.TopSurface = "Smooth"
  49.  
  50. local RCA = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0 )
  51. local RCB = RCA
  52. local RootHip = jointBetween(Root, Torso, RCA, RCB)
  53. RootHip.Name = "Root Hip"
  54. RootHip.MaxVelocity = 0.1
  55.  
  56.  
  57. local LeftLeg = Instance.new("Part", parent)
  58. LeftLeg.Name = "Left Leg"
  59. LeftLeg.Anchored = false
  60. LeftLeg.CanCollide = false
  61. LeftLeg.Size = Vector3.new(1, 2, 1)
  62. LeftLeg.CFrame = CFrame.new(0.5, 3.2, 4.5)
  63. LeftLeg.BottomSurface = "Smooth"
  64. LeftLeg.TopSurface = "Smooth"
  65.  
  66. local LHCA = CFrame.new(-1, -1, 0) * CFrame.fromAxisAngle(Vector3.new(0, 1, 0), -math.pi/2)
  67. local LHCB = CFrame.new(-0.5, 1, 0) * CFrame.fromAxisAngle(Vector3.new(0, 1, 0), -math.pi/2)
  68. local LeftHip = jointBetween(Torso, LeftLeg, LHCA, LHCB)
  69. LeftHip.Name = "Left Hip"
  70. LeftHip.MaxVelocity = 0.1
  71.  
  72.  
  73. local RightLeg = Instance.new("Part", parent)
  74. RightLeg.Name = "Right Leg"
  75. RightLeg.Anchored = false
  76. RightLeg.CanCollide = false
  77. RightLeg.Size = Vector3.new(1, 2, 1)
  78. RightLeg.CFrame = CFrame.new(-0.5, 3.2, 4.5)
  79. RightLeg.BottomSurface = "Smooth"
  80. RightLeg.TopSurface = "Smooth"
  81.  
  82.  
  83. local RHCA = CFrame.new(1, -1, 0) * CFrame.fromAxisAngle(Vector3.new(0, -1, 0), -math.pi/2)
  84. local RHCB = CFrame.new(0.5, 1, 0) * CFrame.fromAxisAngle(Vector3.new(0, 1, 0), math.pi/2)
  85. local RightHip = jointBetween(Torso, RightLeg, RHCA, RHCB)
  86. RightHip.Name = "Right Hip"
  87. RightHip.MaxVelocity = 0.1
  88.  
  89.  
  90. local LeftArm = Instance.new("Part", parent)
  91. LeftArm.Name = "Left Arm"
  92. LeftArm.Anchored = false
  93. LeftArm.CanCollide = false
  94. LeftArm.Size = Vector3.new(1, 2, 1)
  95. LeftArm.CFrame = CFrame.new(1.5, 5.2, 4.5)
  96. LeftArm.BottomSurface = "Smooth"
  97. LeftArm.TopSurface = "Smooth"
  98.  
  99.  
  100. local LSCA = CFrame.new(-1.0, 0.5, 0) * CFrame.fromAxisAngle(Vector3.new(0, 1, 0), -math.pi/2)
  101. local LSCB = CFrame.new(0.5, 0.5, 0) * CFrame.fromAxisAngle(Vector3.new(0, 1, 0), -math.pi/2)
  102. local LeftShoulder = jointBetween(Torso, LeftArm, LSCA, LSCB)
  103. LeftShoulder.Name = "Left Shoulder"
  104. LeftShoulder.MaxVelocity = 0.1
  105.  
  106.  
  107. local RightArm = Instance.new("Part", parent)
  108. RightArm.Name = "Right Arm"
  109. RightArm.Anchored = false
  110. RightArm.CanCollide = false
  111. RightArm.Size = Vector3.new(1, 2, 1)
  112. RightArm.CFrame = CFrame.new(-1.5, 5.2, 4.5)
  113. RightArm.BottomSurface = "Smooth"
  114. RightArm.TopSurface = "Smooth"
  115.  
  116. local RSCA = CFrame.new(1.0, 0.5, 0) * CFrame.fromAxisAngle(Vector3.new(0, -1, 0), -math.pi/2)
  117. local RSCB = CFrame.new(-0.5, 0.5, 0) * CFrame.fromAxisAngle(Vector3.new(0, 1, 0), math.pi/2)
  118. local RightShoulder = jointBetween(Torso, RightArm, RSCA, RSCB)
  119. RightShoulder.Name = "Right Shoulder"
  120. RightShoulder.MaxVelocity = 0.1
  121.  
  122.  
  123. local Head = Instance.new("Part", parent)
  124. Head.Name = "Head"
  125. Head.Anchored = false
  126. Head.CanCollide = true
  127. Head.Size = Vector3.new(2, 1, 1)
  128. Head.CFrame = CFrame.new(0, 6.7, 4.5)
  129. Head.BottomSurface = "Smooth"
  130. Head.TopSurface = "Smooth"
  131.  
  132. local NCA = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  133. local NCB = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  134. local Neck = jointBetween(Torso, Head, NCA, NCB)
  135. Neck.Name = "Neck"
  136. Neck.MaxVelocity = 0.1
  137.  
  138. local Face = Instance.new("Decal", Head)
  139. Face.Name = "Face"
  140. Face.Texture = "rbxasset://textures/face.png"
  141.  
  142. Instance.new("SpecialMesh",Head).Scale=Vector3.new(1.25,1.25,1.25)
  143.  
  144. Instance.new("Humanoid", parent)
  145.  
  146. return parent
  147. end
  148. local rig=CreateRig()
  149. for _,v in pairs(CharItems:GetChildren()) do
  150. if v:IsA("Accessory") or v:IsA("BodyColors") then
  151. v.Parent=rig
  152. end
  153. end
  154.  
  155. local character=game.Players.LocalPlayer.Character
  156. local humanoid=character:WaitForChild("Humanoid")
  157. game:GetService("UserInputService").InputBegan:connect(function (input)
  158. if input.UserInputType==Enum.UserInputType.MouseButton1 and game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftShift) then
  159. local newrig=rig:clone()
  160. newrig.Parent=workspace
  161. newrig.Name="Tochigi Grenade"
  162. newrig.HumanoidRootPart.Anchored=false
  163. local targetPos = game.Players.LocalPlayer:GetMouse().Hit.p
  164. local lookAt = (targetPos - character.Head.Position).unit
  165. local spawnPos = character.PrimaryPart.Position
  166. spawnPos = spawnPos + (lookAt * 5)
  167. newrig:MoveTo(spawnPos)
  168. newrig.HumanoidRootPart.Velocity=lookAt*200+Vector3.new(0,50,0)
  169. newrig.Humanoid.Touched:wait()
  170. Instance.new("Explosion",workspace).Position=newrig.Torso.Position
  171. wait(3)
  172. newrig:Destroy()
  173. end
  174. end)
Add Comment
Please, Sign In to add comment