Advertisement
Guest User

Grab Knife V2 (Update 2)

a guest
Feb 18th, 2017
4,063
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.28 KB | None | 0 0
  1. me = game.Players.LocalPlayers
  2. char = me.Character
  3. selected = false
  4. attacking = false
  5. hurt = false
  6. grabbed = nil
  7. mode = "kill"
  8. bloodcolors = {"Bright red", "Really red", "Crimson"}
  9. enabled = true
  10. enabled2 = true
  11.  
  12. local breaksound = Instance.new("Sound")
  13. breaksound.SoundId = "http://www.roblox.com/asset/?id=2801263"
  14. breaksound.Parent = game.Workspace
  15. breaksound.Volume = 0.8
  16.  
  17. local killsound = Instance.new("Sound")
  18. killsound.SoundId = "http://www.roblox.com/asset/?id=2801263"
  19. killsound.Pitch = 0.65
  20. killsound.Parent = game.Workspace
  21.  
  22. local drainsound = Instance.new("Sound")
  23. drainsound.SoundId = "http://www.roblox.com/asset/?id=2785493"
  24. drainsound.Pitch = 0.7
  25.  
  26.  
  27. function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  28. part.Parent = parent
  29. part.formFactor = form
  30. part.CanCollide = collide
  31. part.Transparency = tran
  32. part.Reflectance = ref
  33. part.Size = Vector3.new(x,y,z)
  34. part.BrickColor = BrickColor.new(color)
  35. part.TopSurface = 0
  36. part.BottomSurface = 0
  37. part.Anchored = anchor
  38. part.Locked = true
  39. part:BreakJoints()
  40. end
  41.  
  42. function weld(w, p, p1, a, b, c, x, y, z)
  43. w.Parent = p
  44. w.Part0 = p
  45. w.Part1 = p1
  46. w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
  47. end
  48.  
  49. function mesh(mesh, parent, x, y, z, type)
  50. mesh.Parent = parent
  51. mesh.Scale = Vector3.new(x, y, z)
  52. mesh.MeshType = type
  53. end
  54.  
  55. function remgui()
  56. for _,v in pairs(me.PlayerGui:GetChildren()) do
  57. if v.Name == "Modeshow" then
  58. v:remove()
  59. end
  60. end
  61. end
  62.  
  63. function inform(text,delay)
  64. remgui()
  65. local sc = Instance.new("ScreenGui")
  66. sc.Parent = me.PlayerGui
  67. sc.Name = "Modeshow"
  68. local bak = Instance.new("Frame",sc)
  69. bak.BackgroundColor3 = Color3.new(1,1,1)
  70. bak.Size = UDim2.new(0.94,0,0.1,0)
  71. bak.Position = UDim2.new(0.03,0,0.037,0)
  72. bak.BorderSizePixel = 0
  73. local gi = Instance.new("TextLabel",sc)
  74. gi.Size = UDim2.new(0.92,0,0.09,0)
  75. gi.BackgroundColor3 = Color3.new(0,0,0)
  76. gi.Position = UDim2.new(0.04,0,0.042,0)
  77. gi.TextColor3 = Color3.new(1,1,1)
  78. gi.FontSize = "Size14"
  79. gi.Text = text
  80. coroutine.resume(coroutine.create(function()
  81. wait(delay)
  82. sc:remove()
  83. end))
  84. end
  85.  
  86. if char:findFirstChild("Bricks",true) then
  87. char:findFirstChild("Bricks",true):remove()
  88. end
  89.  
  90. bricks = Instance.new("Model",me.Character)
  91. bricks.Name = "Bricks"
  92.  
  93. --Parts-------------------------Parts-------------------------Parts-------------------------Parts----------------------
  94.  
  95. rarm = char:findFirstChild("Right Arm")
  96. larm = char:findFirstChild("Left Arm")
  97. lleg = char:findFirstChild("Left Leg")
  98. torso = char:findFirstChild("Torso")
  99. hum = char:findFirstChild("Humanoid")
  100. rleg = char:findFirstChild("Right Leg")
  101.  
  102. righthold = Instance.new("Part")
  103. prop(righthold, bricks, false, 1, 0, 0.1, 0.1, 0.1, "Mid gray", false, "Custom")
  104. w11 = Instance.new("Weld")
  105. weld(w11, rarm, righthold, 0, 0, 0, 0, 1, 0)
  106.  
  107. lefthold = Instance.new("Part")
  108. prop(lefthold, bricks, false, 1, 0, 0.1, 0.1, 0.1, "Mid gray", false, "Custom")
  109. w12 = Instance.new("Weld")
  110. weld(w12, larm, lefthold, 0, 0, 0, 0, 1, 0)
  111.  
  112. hold = Instance.new("Part")
  113. prop(hold, bricks, false, 0, 0, 0.2, 0.3, 0.3, "Black", false, "Custom")
  114. oh = Instance.new("Weld")
  115. weld(oh, torso, hold, -math.pi/-0.86, 1.5, math.rad(0), -0.35, -0.4, -0.5)
  116.  
  117. knife = Instance.new("Part")
  118. knife.Material = "Wood"
  119. prop(knife, bricks, false, 0, 0, 0.25, 1.1, 0.3, "Pine Cone", false, "Custom")
  120. orr = Instance.new("Weld")
  121. weld(orr, hold, knife, 0, 0, 0, 0, 0.7, 0)
  122. ar = Instance.new("Weld")
  123. weld(ar, lefthold, nil, math.pi/2, 0, math.pi, 0, 0, 0)
  124.  
  125. blade = Instance.new("Part")
  126. blade.Material = "Neon"
  127. prop(blade, bricks, false, 0, 0, 0.1, 2.5, 0.25, "Mid gray", false, "Custom")
  128. Instance.new("BlockMesh",blade).Scale = Vector3.new(0.3,1,1)
  129. w2 = Instance.new("Weld")
  130. weld(w2, knife, blade, 0, 0, 0, 0, -0.65, 0)
  131.  
  132. blade2 = Instance.new("Part")
  133. blade2.Material = "Neon"
  134. prop(blade2, bricks, false, 0, 0, 0.1, 0.4, 0.25, "Mid gray", false, "Custom")
  135. local mew = Instance.new("SpecialMesh",blade2)
  136. mew.MeshType = "Wedge"
  137. mew.Scale = Vector3.new(0.3,1,1)
  138. w3 = Instance.new("Weld")
  139. weld(w3, blade, blade2, 0, 0, 0, 0, -1.45, 0)
  140.  
  141.  
  142. rb = Instance.new("Part")
  143. prop(rb, bricks, false, 1, 0, 0.1, 0.1, 0.1, "Bright red", false, "Custom")
  144. w13 = Instance.new("Weld")
  145. weld(w13, torso, rb, 0, 0, 0, -1.5, -0.5, 0)
  146.  
  147. lb = Instance.new("Part")
  148. prop(lb, bricks, false, 1, 0, 0.1, 0.1, 0.1, "Bright red", false, "Custom")
  149. w14 = Instance.new("Weld")
  150. weld(w14, torso, lb, 0, 0, 0, 1.5, -0.5, 0)
  151.  
  152. rw = Instance.new("Weld")
  153. weld(rw, rb, nil, 0, 0, 0, 0, 0.5, 0)
  154.  
  155. lw = Instance.new("Weld")
  156. weld(lw, lb, nil, 0, 0, 0, 0, 0.5, 0)
  157.  
  158. grabweld = nil
  159. platlol = nil
  160. lolhum = nil
  161.  
  162. function touch(h)
  163. if hurt then
  164. if grabbed == nil then
  165. local hu = h.Parent:findFirstChild("Humanoid")
  166. local head = h.Parent:findFirstChild("Head")
  167. local torz = h.Parent:findFirstChild("Torso")
  168. if hu ~= nil and head ~= nil and torz ~= nil and h.Parent.Name ~= name then
  169. if hu.Health > 0 then
  170. grabbed = torz
  171. hu.PlatformStand = true
  172. local w = Instance.new("Weld")
  173. weld(w,righthold,grabbed,math.pi/2,0.2,0,0.7,-0.9,-0.6)
  174. grabweld = w
  175. lolhum = hu
  176. local lolxd = true
  177. platlol = lolxd
  178. hu.Changed:connect(function(prop)
  179. if prop == "PlatformStand" and platlol then
  180. hu.PlatformStand = true
  181. end
  182. end)
  183. end
  184. end
  185. end
  186. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement