Advertisement
emilixs

knife

Apr 16th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.91 KB | None | 0 0
  1. --By Rufus14
  2. mouse = game.Players.LocalPlayer:GetMouse()
  3. knife = Instance.new("Part", game.Players.LocalPlayer.Character)
  4. knife.Size = Vector3.new(0.5, 1, 2)
  5. knife.CanCollide = false
  6. knife:BreakJoints()
  7. weld = Instance.new("Weld", knife)
  8. weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  9. weld.Part1 = knife
  10. mesh = Instance.new("SpecialMesh", knife)
  11. mesh.MeshId = "http://www.roblox.com/asset/?id=121944778"
  12. mesh.TextureId = "http://www.roblox.com/asset/?id=155519104"
  13. mesh.Scale = Vector3.new(0.5, 0.7, 0.5)
  14. weld.C0 = weld.C0 * CFrame.new(0,-1,-0.7) * CFrame.Angles(-1.5,0,0)
  15. using = false
  16. plr = game.Players
  17. char = plr.LocalPlayer.Character
  18. rig = char.Torso
  19. khit = Instance.new("Sound", knife)
  20. khit.SoundId = "rbxassetid://187227291"
  21. kthrow = Instance.new("Sound", knife)
  22. kthrow.SoundId = "rbxassetid://187227291"
  23. function throw(key)
  24.     key = key:lower()
  25.     if key == "q" then
  26.         if not using then
  27.         using = true
  28.         local krot = rig.CFrame
  29.         for i = 0,1 , 0.05 do
  30.             wait()
  31.             workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * CFrame.new():lerp(CFrame.Angles(0.02,0,0),i)
  32.             rig["Left Shoulder"].C0 = rig["Left Shoulder"].C0 * CFrame.new():lerp(CFrame.Angles(0,0,-0.08),i)
  33.             rig["Right Shoulder"].C0 = rig["Right Shoulder"].C0 * CFrame.new():lerp(CFrame.Angles(0,0,0.40),i)
  34.         end
  35.         wait(0.3)
  36.         for i = 1,3 do
  37.             wait()
  38.             workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(-0.05,0,0)
  39.             rig["Left Shoulder"].C0 = rig["Left Shoulder"].C0 * CFrame.Angles(0,0,0.1)
  40.             rig["Right Shoulder"].C0 = rig["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.40)
  41.         end
  42.         local lookv = game.Players.LocalPlayer.Character.Torso.CFrame
  43.         local knife1 = Instance.new("Part", workspace)
  44.         knife1.Size = Vector3.new(0.5, 1, 0.5)
  45.         knife1.CanCollide = false
  46.         knife1:BreakJoints()
  47.         knife.Transparency = 1
  48.         local mesh1 = Instance.new("SpecialMesh", knife1)
  49.         mesh1.MeshId = "http://www.roblox.com/asset/?id=121944778"
  50.         mesh1.TextureId = "http://www.roblox.com/asset/?id=155519104"
  51.         mesh1.Scale = Vector3.new(0.5, 0.7, 0.5)
  52.         knife1.CFrame = knife.CFrame
  53.         local vel = Instance.new("BodyVelocity", knife1)
  54.         vel.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  55.         vel.Velocity = mouse.Hit.lookVector * 80
  56.         local ms = mouse.Hit.lookVector
  57.         knife1.Rotation = mouse.Hit.lookVector
  58.         local vel1 = Instance.new("BodyAngularVelocity", knife1)
  59.         vel1.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  60.         vel1.AngularVelocity = mouse.Hit.rightVector * -8
  61.         kthrow:Play()
  62.         for i = 1,3 do
  63.             wait()
  64.             workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(-0.05,0,0)
  65.             rig["Left Shoulder"].C0 = rig["Left Shoulder"].C0 * CFrame.Angles(0,0,0.1)
  66.             rig["Right Shoulder"].C0 = rig["Right Shoulder"].C0 * CFrame.Angles(0,0,-0.40)
  67.         end
  68.         rig["Left Shoulder"].C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  69.         rig["Right Shoulder"].C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  70.         local kthrowhit = Instance.new("Sound", knife1)
  71.         kthrowhit.SoundId = "rbxassetid://162135544"
  72.         kthrowhit.TimePosition = 0.55
  73.         local kthrowhith = Instance.new("Sound", knife1)
  74.         kthrowhith.SoundId = "rbxassetid://187227291"
  75.         local candmg = true
  76.         wait(0.02)
  77.         local function stick(part)
  78.             local gr = part.Parent:findFirstChild("Humanoid")
  79.             knife1.Anchored = true
  80.             local pes = knife1.CFrame
  81.             kthrowhit:Play()
  82.             knife1.CanCollide = false
  83.             if gr and candmg then
  84.                 candmg = false
  85.                 kthrowhit:destroy()
  86.                 gr.Health = gr.Health - 200
  87.                 kthrowhith:Play()
  88.                 knife1.Transparency = 1
  89.                 wait(1.3)
  90.             end
  91.             candmg = false
  92.             wait(1.4)
  93.             kthrowhit.Volume = 0
  94.             wait(10)
  95.             for i = 1,100 do
  96.                 wait()
  97.                 knife1.Transparency = knife1.Transparency + 0.01
  98.             end
  99.             knife1:destroy()
  100.         end
  101.         knife1.Touched:connect(stick)
  102.         wait(1)
  103.         for i = 1,50 do
  104.             wait()
  105.             knife.Transparency = knife.Transparency + -0.03
  106.         end
  107.         using = false
  108.     end
  109.     end
  110. end
  111. function stabstabstaab()
  112.     if not using then
  113.     using = true
  114.     for i = 0,1 , 0.1 do
  115.         wait()
  116.         rig["Right Shoulder"].C0 = rig["Right Shoulder"].C0 * CFrame.new():lerp(CFrame.Angles(0,0,-0.2),i)
  117.     end
  118.     local sn = Instance.new("Part", knife)
  119.     sn.Size = Vector3.new(0.5, 1, 1)
  120.     sn:BreakJoints()
  121.     local snw = Instance.new("Weld", sn)
  122.     snw.Part0 = knife
  123.     snw.Part1 = sn
  124.     sn.Transparency = 1
  125.     sn.CanCollide = false
  126.     local function kill(part)
  127.         local hum = part.Parent:findFirstChild("Humanoid")
  128.         if hum then
  129.             khit:Play()
  130.             hum.Health = hum.Health - 100
  131.         end
  132.     end
  133.     sn.Touched:connect(kill)
  134.     for i = 0,1 , 0.1 do
  135.         wait()
  136.         rig["Right Shoulder"].C0 = rig["Right Shoulder"].C0 * CFrame.new():lerp(CFrame.Angles(0,0,0.6),i)
  137.     end
  138.     for i = 0,1 , 0.1 do
  139.         wait()
  140.         rig["Right Shoulder"].C0 = rig["Right Shoulder"].C0 * CFrame.new():lerp(CFrame.Angles(0,0,-0.4),i)
  141.     end
  142.     using = false
  143.     sn:destroy()
  144.     end
  145. end
  146. mouse.Button1Down:connect(stabstabstaab)
  147. mouse.KeyDown:connect(throw)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement