daily pastebin goal
49%
SHARE
TWEET

Untitled

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