SHARE
TWEET

Untitled

a guest Aug 19th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Knife Module Script
  2.  
  3. --Perhapz
  4.  
  5. wait(.2)
  6. local toool = Instance.new("Tool",game.Players.benli45.Backpack)
  7. toool.Name = "QuickScope"
  8.  
  9. local hndle = Instance.new("Part",toool)
  10. hndle.Name = "Handle"
  11.  
  12. local mesh = Instance.new("SpecialMesh",hndle)
  13. mesh.MeshId = "http://www.roblox.com/asset/?id=121944778"
  14. mesh.TextureId = "http://www.roblox.com/asset/?id=121944805"
  15. mesh.Scale = Vector3.new(.7,.7,.7)
  16.  
  17. local sound = Instance.new("Sound",hndle)
  18.  
  19.  
  20. script.Parent = toool
  21.  
  22.  
  23.  
  24.  
  25. local tool=script.Parent
  26.  
  27. local player=owner
  28.  
  29. local char=player.Character
  30.  
  31. local humanoid=char:FindFirstChild("Humanoid")
  32.  
  33. local camera=workspace.CurrentCamera
  34.  
  35. local rightC1 = CFrame.new(-0.5, 0.7, 0) * CFrame.Angles(0, (math.pi / 2), 0)
  36.  
  37. local leftC1 = CFrame.new(0, 0.7, 0) * CFrame.Angles(0, (math.pi / 2), 0)
  38.  
  39. local equipping=false
  40.  
  41. local gettingknife=false
  42.  
  43. local laserCharge=false
  44.  
  45. local playcharge=false
  46.  
  47. local justthrown=false
  48.  
  49. local canLaser=true
  50.  
  51. local justattacked=false
  52.  
  53. local thrownkniferotation=0
  54.  
  55. local Damage=110
  56.  
  57. local Attacking=false
  58.  
  59. local handle=nil
  60.  
  61. local WalkSpeeds={16,20}
  62.  
  63. local fasterthrow = .2
  64.  
  65. local knifespeed = 225
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. --[[if player.Gamepass4.Value == true then
  74.  
  75. fasterthrow = 0.5
  76.  
  77. else
  78.  
  79. fasterthrow = 0.2
  80.  
  81. end
  82.  
  83. if player.Gamepass5.Value == true then
  84.  
  85. knifespeed = 305
  86.  
  87. else
  88.  
  89. knifespeed = 225
  90.  
  91. end
  92. --]]
  93.  
  94.  
  95.  
  96.  
  97.  
  98. SOUNDS={
  99.  
  100. throwing={"153647554","153647549"},
  101.  
  102. laserthrowing={"193444173"},
  103.  
  104. shouts={"241084057","224360245","199837759","168209314"},
  105.  
  106. striking={"153647529","153647534","153647539","153647540"},
  107.  
  108. equip="153647514",
  109.  
  110. wallhit={"153647563","153647564"},
  111.  
  112. hitplayer={"153676325"},
  113.  
  114. deaths={"241084057","146457047","146594648","168209314"},
  115.  
  116. }
  117.  
  118.  
  119.  
  120. SETTINGS={
  121.  
  122.  
  123. tool={
  124.  
  125. tool_size=Vector3.new(0.4, 3, 0.7),
  126.  
  127. tool_transparency=0,
  128.  
  129. tool_color=BrickColor.Black(),
  130.  
  131. default_tool_size=0.6,
  132.  
  133. },
  134.  
  135.  
  136. }
  137.  
  138.  
  139.  
  140. function DamageObject(hit)
  141.  
  142. local char=hit.Parent
  143.  
  144. if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" then
  145.  
  146. local h=char:FindFirstChild("Humanoid")
  147.  
  148. if h and h.Health > 0 then
  149.  
  150.  
  151.  
  152. h:TakeDamage(Damage)
  153.  
  154. PlaySound("Hit1",char.Torso)
  155.  
  156. local explosion = Instance.new("Explosion")
  157.  
  158. explosion.ExplosionType = 'NoCraters'
  159.  
  160. explosion.Position = humanoid.Torso.CFrame.p
  161.  
  162. explosion.BlastPressure=0
  163.  
  164. explosion.Parent=workspace
  165.  
  166. if h.Health == 0 then
  167.  
  168. PlaySound("Hit2")
  169.  
  170. end
  171.  
  172. end
  173.  
  174. end
  175.  
  176. end
  177.  
  178.  
  179.  
  180. function PlaySound(name,ctorso)
  181.  
  182. if name=="Throw" then
  183.  
  184. tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.throwing[math.random(1,#SOUNDS.throwing)]
  185.  
  186. tool.Handle.Sound:Play()
  187.  
  188. elseif name=="ThrowLaser" then
  189.  
  190. tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.laserthrowing[math.random(1,#SOUNDS.laserthrowing)]
  191.  
  192. tool.Handle.Sound:Play()
  193.  
  194. elseif name=="Equip" then
  195.  
  196. tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.equip
  197.  
  198. tool.Handle.Sound:Play()
  199.  
  200. elseif name=="Swing" then
  201.  
  202. tool.Handle.Sound.SoundId = "rbxassetid://" .. SOUNDS.striking[math.random(1,#SOUNDS.striking)]
  203.  
  204. tool.Handle.Sound:Play()
  205.  
  206. elseif name=="Hit1" then
  207.  
  208. local NewSound=tool.Handle.Sound:clone()
  209.  
  210. NewSound.Parent=ctorso
  211.  
  212. NewSound.SoundId = "rbxassetid://" .. SOUNDS.hitplayer[math.random(1,#SOUNDS.hitplayer)]
  213.  
  214. NewSound:Play()
  215.  
  216. NewSound:Destroy()
  217.  
  218. --elseif name=="Hit2" then
  219.  
  220. --local NewSound=tool.Handle.Sound:clone()
  221.  
  222. --NewSound.Parent=ctorso
  223.  
  224. --NewSound.SoundId = "rbxassetid://" .. SOUNDS.deaths[math.random(1,#SOUNDS.deaths)]
  225.  
  226. --NewSound:Play()
  227.  
  228. --      NewSound:Destroy()
  229.  
  230. elseif name=="Laser" then
  231.  
  232. local NewSound=tool.Handle.Sound:Clone()
  233.  
  234. NewSound.Parent = ctorso
  235. NewSound.SoundId = "rbxassetid://" .. SOUNDS.shouts[math.random(1,#SOUNDS.shouts)]
  236.  
  237. NewSound:Play()
  238.  
  239.  
  240. end
  241.  
  242. end
  243.  
  244.  
  245.  
  246. function Throwtool(dPos)
  247.  
  248. if not tool.Handle then return end
  249.  
  250. local throwingHandle = tool.Handle:Clone()
  251.  
  252. game:GetService("Debris"):AddItem(throwingHandle, 5)
  253.  
  254. throwingHandle.Transparency=0
  255.  
  256. throwingHandle.Parent = workspace
  257.  
  258. if player.Character and player.Character.Humanoid then
  259.  
  260. throwingHandle.Velocity = (player.Character.Humanoid.TargetPoint - throwingHandle.CFrame.p).unit * knifespeed
  261.  
  262. if canLaser then
  263.  
  264. throwingHandle.Velocity = (player.Character.Humanoid.TargetPoint - throwingHandle.CFrame.p).unit * 15000
  265.  
  266. end
  267.  
  268. if mouse.Target ~= nil then
  269.  
  270. if mouse.Target.Parent.Name~="Arms_Model" and mouse.Target.Name~="ThrownKnife" and mouse.Target.Name~="Handle" then
  271.  
  272. targetpos=player.Character.Humanoid.TargetPoint
  273.  
  274. else
  275.  
  276. targetpos=Vector3.new(0,-10,0)
  277.  
  278. end
  279.  
  280. end
  281.  
  282. -- set the orientation to the direction it is being thrown in
  283.  
  284. throwingHandle.CFrame = CFrame.new(throwingHandle.CFrame.p, throwingHandle.CFrame.p + throwingHandle.Velocity) * CFrame.Angles(0, 0, math.rad(-90))
  285.  
  286. local floatingForce = Instance.new('BodyForce', throwingHandle)
  287.  
  288. floatingForce.force = Vector3.new(0, 196.2 * throwingHandle:GetMass() * 0.98, 0)
  289.  
  290. local spin = Instance.new('BodyAngularVelocity', throwingHandle)
  291.  
  292. spin.angularvelocity = throwingHandle.CFrame:vectorToWorldSpace(Vector3.new(0, -400, 0))
  293.  
  294. spawnPos=player.Character.PrimaryPart.Position
  295.  
  296. spawnPos = spawnPos + dPos*5
  297.  
  298. if canLaser then
  299.  
  300. local Ray = Ray.new(tool.Handle.CFrame.p,(mouse.Hit.p - tool.Handle.CFrame.p).unit * 999)
  301.  
  302.         local Hit,Position = game.Workspace:FindPartOnRay(Ray,char)
  303.  
  304.        if Hit then
  305.  
  306.     if Hit.Parent:FindFirstChild("Humanoid") then
  307.  
  308. throwingHandle:Destroy()
  309.  
  310.         Hit.Parent.Humanoid:TakeDamage(110)
  311. PlaySound("Laser",Hit.Parent.Torso)
  312. PlaySound("Hit1",Hit.Parent.Torso)
  313. laserCharge=true
  314.  
  315.  
  316.  
  317. local explosion = Instance.new("Explosion")
  318.  
  319. explosion.Position=Hit.Parent.Torso.Position
  320.  
  321. explosion.BlastRadius=explosion.BlastRadius*2
  322.  
  323. explosion.Parent=workspace
  324.  
  325. end end
  326.  
  327.         local RayPart = Instance.new("Part",workspace)
  328.  
  329. RayPart.Name = "RayPart"
  330.  
  331. RayPart.BrickColor = BrickColor.new("White")
  332.  
  333. RayPart.Transparency = 0
  334.  
  335. RayPart.Anchored = true
  336.  
  337. RayPart.CanCollide = false
  338.  
  339. RayPart.TopSurface = Enum.SurfaceType.Smooth
  340.  
  341. RayPart.BottomSurface = Enum.SurfaceType.Smooth
  342.  
  343. RayPart.formFactor = Enum.FormFactor.Custom
  344.  
  345. local Distance = (Position-tool.Handle.CFrame.p).magnitude
  346.  
  347. RayPart.Size = Vector3.new(0.2,0.2,Distance)
  348.  
  349. RayPart.CFrame = CFrame.new(Position,tool.Handle.CFrame.p) * CFrame.new(0,0,-Distance/2)
  350.  
  351. game.Debris:addItem(RayPart,.5)
  352.  
  353.  
  354. end
  355.  
  356. end
  357.  
  358. if throwingHandle then
  359.  
  360.  
  361.  
  362. local touchedConn = throwingHandle.Touched:connect(function(hit)
  363.  
  364. local char=hit.Parent
  365.  
  366. camera.CameraSubject=humanoid
  367.  
  368. camera.CameraType=Enum.CameraType.Custom
  369.  
  370. if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and hit.Name~="RayPart" then
  371.  
  372. local h=char:FindFirstChild("Humanoid")
  373.  
  374. if h and h.Health > 0 then
  375.  
  376. throwingHandle:Destroy()
  377.  
  378. laserCharge=true
  379.  
  380. if hit.Name~="Head" or hit.className=="Hat" then
  381.  
  382. h:TakeDamage(Damage)
  383.  
  384. --      player.Credits.Value = player.Credits.Value + 15
  385.  
  386. --player.PlayerGui.NormalKillGui.Script.Disabled = false
  387.  
  388. local explosion = Instance.new("Explosion")
  389.  
  390. explosion.Position=h.Parent.Torso.Position
  391.  
  392. explosion.BlastRadius=explosion.BlastRadius*2
  393.  
  394. explosion.Parent=workspace
  395.  
  396.  
  397. if h.Health == 0 then
  398.  
  399. PlaySound("Hit2",char.Torso)
  400.  
  401. end
  402.  
  403. else
  404.  
  405. h:TakeDamage(Damage * 2)
  406.  
  407. print("Headshot!")
  408.  
  409. --player.Credits.Value = player.Credits.Value + 50
  410.  
  411. --player.PlayerGui.HeadShotGui.Script.Disabled = false
  412.  
  413. local explosion = Instance.new("Explosion")
  414.  
  415. explosion.Position=h.Parent.Torso.Position
  416.  
  417. explosion.BlastRadius=explosion.BlastRadius*2
  418.  
  419. explosion.Parent=workspace
  420.  
  421. char.Head.Transparency=1
  422.  
  423. char.Head.CanCollide=false
  424.  
  425. if char.Head:FindFirstChild("face") then char.Head:FindFirstChild("face").Transparency=1 end
  426.  
  427. for _,v in pairs(char:GetChildren()) do
  428.  
  429. if v.className=="Hat" then
  430.  
  431. v:Destroy()
  432.  
  433. end
  434.  
  435. end
  436.  
  437. for i = 1, 7 do
  438.  
  439. local blood=Instance.new("Part")
  440.  
  441. blood.FormFactor="Custom"
  442.  
  443. blood.Size=Vector3.new(1,.2,1)
  444.  
  445. blood.BrickColor=BrickColor.Red()
  446.  
  447. blood.TopSurface=0
  448.  
  449. blood.BottomSurface=0
  450.  
  451. game:GetService("Debris"):AddItem(blood,5)
  452.  
  453. blood.Parent=workspace
  454.  
  455. blood.Position=char.Head.Position + Vector3.new(math.random(0.2,0.8),0,math.random(0.2,0.8))
  456.  
  457. end
  458.  
  459. local sound = Instance.new("Sound")
  460.  
  461. sound.SoundId = "rbxassetid://142347633"
  462.  
  463. sound.Parent=char.Head
  464.  
  465. sound.Pitch=1.1
  466.  
  467. sound:Play()
  468.  
  469. end
  470.  
  471. PlaySound("Hit1",char.Torso)
  472.  
  473. if h.Health == 0 then
  474.  
  475. PlaySound("Hit2")
  476.  
  477. end
  478.  
  479. elseif hit.Name~="Handle" or hit.Name~="IgnoreThrowingKnives" and hit.Parent.Name~="Arms_Model" and hit.Name~="RayPart" and hit.CanCollide==true then
  480.  
  481. local sound=Instance.new("Sound")
  482.  
  483. sound.Parent=hit
  484.  
  485. sound.SoundId = "rbxassetid://" .. SOUNDS.wallhit[math.random(1,#SOUNDS.wallhit)]
  486.  
  487. sound:Play()
  488.  
  489. sound:Destroy()
  490.  
  491. print("Hit Object: " .. hit.Name)
  492.  
  493. local newknife=tool.Handle:clone()
  494.  
  495. newknife.Name="ThrownKnife"
  496.  
  497. newknife.CFrame = CFrame.new(spawnPos, spawnPos + dPos) * CFrame.Angles(math.pi/-2, 0, 0)
  498.  
  499. newknife.Position = targetpos
  500.  
  501. throwingHandle:Destroy()
  502.  
  503. newknife.Anchored=true
  504.  
  505. newknife.CanCollide=true
  506.  
  507. newknife.Transparency=0
  508.  
  509. newknife.Parent=workspace
  510.  
  511. --newknife.Script.Disabled = false
  512.  
  513. wait(7)
  514.  
  515. for i=1,10 do
  516.  
  517. newknife.Transparency=i*.1
  518.  
  519. wait()
  520.  
  521. end
  522.  
  523. newknife:Destroy()
  524.  
  525. end
  526.  
  527. end
  528.  
  529.     end)
  530.  
  531. end
  532.  
  533. end
  534.  
  535. -- must check if it still exists since we waited
  536.  
  537. if throwingHandle then
  538.  
  539. throwingHandle.CanCollide = true
  540.  
  541. end
  542.  
  543.  
  544.  
  545. FUNCTIONS={
  546.  
  547.  
  548. CHECKFORFIRSTPERSON=function()
  549.  
  550. if (camera.focus.p - camera.CoordinateFrame.p).magnitude > 1 then
  551.  
  552. return false
  553.  
  554. else
  555.  
  556. return true
  557.  
  558. end
  559.  
  560. end,
  561.  
  562.  
  563. ANIMS=function(state)
  564.  
  565. if state then
  566.  
  567. mouse.Icon="http://www.roblox.com/asset/?id=258828417"
  568.  
  569. --Start Animation
  570.  
  571.  
  572.  
  573. if SETTINGS.tool then
  574.  
  575. tool.GripPos = Vector3.new(0, -0.55, 0)
  576.  
  577. elseif SETTINGS.tool then
  578.  
  579. tool.GripPos = Vector3.new(0, -0.6, 0)
  580.  
  581. elseif SETTINGS.tool then
  582.  
  583. tool.GripPos = Vector3.new(0, -0.65, 0)
  584.  
  585. elseif SETTINGS.tool then
  586.  
  587. tool.GripPos = Vector3.new(0, -0.7, 0)
  588.  
  589. elseif SETTINGS.tool then
  590.  
  591. tool.GripPos = Vector3.new(0, -0.75, 0)
  592.  
  593. elseif SETTINGS.tool then
  594.  
  595. tool.GripPos = Vector3.new(0, -0.8, 0)
  596.  
  597. elseif SETTINGS.tool then
  598.  
  599. tool.GripPos = Vector3.new(0, -0.85, 0)
  600.  
  601. elseif SETTINGS.tool then
  602.  
  603. tool.GripPos = Vector3.new(0, -0.9, 0)
  604.  
  605. elseif SETTINGS.tool then
  606.  
  607. tool.GripPos = Vector3.new(0, -0.95, 0)
  608.  
  609. elseif SETTINGS.tool then
  610.  
  611. tool.GripPos = Vector3.new(0, -1, 0)
  612.  
  613. else
  614.  
  615. print("Invalid tool size! Set to default: " .. SETTINGS.tool.default_tool_size )
  616.  
  617.  
  618. if SETTINGS.tool.default_tool_size==.1 then
  619.  
  620. tool.GripPos = Vector3.new(0, -0.55, 0)
  621.  
  622. elseif SETTINGS.tool.default_tool_size==.2 then
  623.  
  624. tool.GripPos = Vector3.new(0, -0.6, 0)
  625.  
  626. elseif SETTINGS.tool.default_tool_size==.3 then
  627.  
  628. tool.GripPos = Vector3.new(0, -0.65, 0)
  629.  
  630. elseif SETTINGS.tool.default_tool_size==.4 then
  631.  
  632. tool.GripPos = Vector3.new(0, -0.7, 0)
  633.  
  634. elseif SETTINGS.tool.default_tool_size==.5 then
  635.  
  636. tool.GripPos = Vector3.new(0, -0.75, 0)
  637.  
  638. elseif SETTINGS.tool.default_tool_size==.6 then
  639.  
  640. tool.GripPos = Vector3.new(0, -0.8, 0)
  641.  
  642. elseif SETTINGS.tool.default_tool_size==.7 then
  643.  
  644. tool.GripPos = Vector3.new(0, -0.85, 0)
  645.  
  646. elseif SETTINGS.tool.default_tool_size==.8 then
  647.  
  648. tool.GripPos = Vector3.new(0, -0.9, 0)
  649.  
  650. elseif SETTINGS.tool.default_tool_size==.9 then
  651.  
  652. tool.GripPos = Vector3.new(0, -0.95, 0)
  653.  
  654. elseif SETTINGS.tool.default_tool_size==1 then
  655.  
  656. tool.GripPos = Vector3.new(0, -1, 0)
  657.  
  658. else
  659.  
  660. print("Invalid default size! Un-equipping and removing Knife...")
  661.  
  662.  
  663. end
  664.  
  665. end
  666.  
  667. torso=char:FindFirstChild("Torso")
  668.  
  669. leftarm=torso:FindFirstChild("Left Shoulder")
  670.  
  671. if leftarm then
  672.  
  673. leftarm.Parent=nil
  674.  
  675. newarmweld=Instance.new("Weld")
  676.  
  677. newarmweld.Name="LeftWeld"
  678.  
  679. newarmweld.Part0=torso
  680.  
  681. newarmweld.C0 = CFrame.new(-1.5, 0.7, 0)
  682.  
  683. newarmweld.C1 = CFrame.new(0, 0.7, 0)
  684.  
  685. newarmweld.Part1=char:FindFirstChild("Left Arm")
  686.  
  687. newarmweld.Parent=torso
  688.  
  689. end
  690.  
  691. humanoid.WalkSpeed=WalkSpeeds[2]
  692.  
  693. for i = 1, 15, 3 do
  694.  
  695. if equipped then
  696.  
  697. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  698.  
  699. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  700.  
  701. end
  702.  
  703. wait()
  704.  
  705. end
  706.  
  707. else
  708.  
  709. humanoid.WalkSpeed=WalkSpeeds[1]
  710.  
  711. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.new(0,-0.2,0)
  712.  
  713. tool.GripForward = Vector3.new(0,0,-1)
  714.  
  715. newarmweld:Destroy()
  716.  
  717. leftarm.Parent=torso
  718.  
  719. mouse.Icon=""
  720.  
  721. torso:FindFirstChild("Neck").C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  722.  
  723. torso:FindFirstChild("Right Shoulder").C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  724.  
  725. end
  726.  
  727. end
  728.  
  729. }
  730.  
  731.  
  732.  
  733. tool.Equipped:connect(function ()
  734.  
  735. equipped=true
  736.  
  737. PlaySound("Equip")
  738.  
  739. FUNCTIONS.ANIMS(true)
  740.  
  741. end)
  742.  
  743. tool.Unequipped:connect(function ()
  744.  
  745. equipped=false
  746.  
  747. FUNCTIONS.ANIMS(false)
  748.  
  749. end)
  750.  
  751. tool.Handle.Touched:connect(function (hit)
  752.  
  753. if Attacking then
  754.  
  755. DamageObject(hit)
  756.  
  757. end
  758.  
  759. end)
  760.  
  761. tool.Activated:connect(function ()
  762.  
  763. if Attacking then return end
  764.  
  765. if not tool.Enabled then return end
  766.  
  767. justthrown=false
  768.  
  769. justattacked=false
  770.  
  771. if not gettingknife and not justthrown and not Attacking then
  772.  
  773. HeldTime=time()
  774.  
  775. end
  776.  
  777. playcharge=true
  778.  
  779. wait(.15)
  780.  
  781. while gettingknife do
  782.  
  783. wait()
  784.  
  785. end
  786.  
  787. local speed=0.2
  788.  
  789. for i = 1, 15, fasterthrow do
  790.  
  791. if playcharge and equipped and not gettingknife and not justthrown and not Attacking then
  792.  
  793. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.195277825, -0.747909963, 0.634426773, 0.482016951, 0.636551082, 0.602048457, -0.854123056, 0.188237742, 0.484809577) * CFrame.Angles((i * (math.pi / 50)), 0, (-i * (math.pi / 25)))
  794.  
  795. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0, 0.858912528, 0.165011853, 0.484809607, -0.464581847, 0.649385393, 0.602048457, -0.215483144, -0.742340684, 0.634426773) * CFrame.Angles((-i * (math.pi / 75)),(i * (math.pi / 180)),0)
  796.  
  797. player.Character["Right Arm"].RightGrip.C1 = CFrame.new(0, -0.800000012, 0.05, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.Angles((-i * (math.pi / 150)),0,0)
  798.  
  799. wait()
  800.  
  801. end
  802.  
  803. end
  804.  
  805. if playcharge then
  806.  
  807. canLaser=true
  808.  
  809. end
  810.  
  811. end)
  812.  
  813. tool.Deactivated:connect(function ()
  814.  
  815. if not tool.Enabled then return end
  816.  
  817. currTime=time()
  818.  
  819. playcharge=false
  820.  
  821. if HeldTime and currTime - HeldTime > .6 and
  822.  
  823. currTime - HeldTime > 0.01 and not justthrown and not gettingknife then
  824.  
  825. if not Attacking and not justattacked then
  826.  
  827. print("Throw")
  828.  
  829. if canLaser then
  830.  
  831. PlaySound("ThrowLaser")
  832.  
  833. else
  834.  
  835. PlaySound("Throw")
  836.  
  837. end
  838.  
  839. tool.Handle.Transparency=1
  840.  
  841. local targetPos = player.Character.Humanoid.TargetPoint
  842.  
  843. local lookAt = (targetPos - player.Character.PrimaryPart.Position).unit
  844.  
  845. local switchEvenOddParity = 1
  846.  
  847. local angle = math.ceil((1-1)/2)*math.pi/12*switchEvenOddParity
  848.  
  849. Throwtool(CFrame.Angles(0, angle, 0) * lookAt)
  850.  
  851. wait()
  852. canLaser=true
  853.  
  854. HeldTime=0
  855.  
  856. gettingknife=true
  857.  
  858. mouse.Icon="http://www.roblox.com/asset/?id=258828417"
  859.  
  860. player.Character["Right Arm"].RightGrip.C1 = CFrame.new(0, -0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  861.  
  862. for i = 1, 15, .8 do
  863.  
  864. if equipped then
  865.  
  866. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.0719629526, 0.22870943, 0.970831275, -0.981789052, 0.187819958, 0.0285283029, -0.175816804, -0.955204487, 0.238060504) * CFrame.Angles(0, 0, (i * (math.pi / 15)))
  867.  
  868. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, 0.7, 0, 0.703028679, -0.151466534, 0.694844246, -0.673604906, 0.171488613, 0.718921423, -0.228050426, -0.973472893, 0.0185328126) * CFrame.Angles((i * (math.pi / 60)),(-i * (math.pi / 180)),(i * (math.pi / 60)))
  869.  
  870. wait()
  871.  
  872. end
  873.  
  874. end
  875.  
  876. justthrown=true
  877.  
  878. tool.Handle.Transparency=0
  879.  
  880. PlaySound("Equip")
  881.  
  882. mouse.Icon="http://www.roblox.com/asset/?id=258828417"
  883.  
  884. tool.GripForward = Vector3.new(0,0,-1)
  885.  
  886. for i = 1, 15, 1 do
  887.  
  888. if equipped then
  889.  
  890. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, -0.071962975, -0.22870943, 0.970831275, 0.981789052, -0.187820047, 0.0285283029, 0.175816894, 0.955204487, 0.238060504) * CFrame.Angles(0, 0, (-i * (math.pi / 30)))
  891.  
  892. wait()
  893.  
  894. end
  895.  
  896. end
  897.  
  898. gettingknife=false
  899.  
  900. for i = 1, 15, 3 do
  901.  
  902. if equipped then
  903.  
  904. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  905.  
  906. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  907.  
  908. end
  909.  
  910. wait()
  911.  
  912. end
  913.  
  914. end
  915.  
  916. else
  917.  
  918. if not justthrown and not gettingknife then
  919.  
  920. if Attacking then return end
  921.  
  922. print("Attack")
  923.  
  924. HeldTime=0
  925.  
  926. Attacking=true
  927.  
  928. justattacked=true
  929.  
  930. if math.random(1,2)==1 then
  931.  
  932. for i = 1, 15, 3 do
  933.  
  934. if equipped and not gettingknife and not justthrown then
  935.  
  936. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.195277825, -0.747909963, 0.634426773, 0.482016951, 0.636551082, 0.602048457, -0.854123056, 0.188237742, 0.484809577) * CFrame.Angles((i * (math.pi / 65)), 0, (-i * (math.pi / 30)))
  937.  
  938. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0, 0.858912528, 0.165011853, 0.484809607, -0.464581847, 0.649385393, 0.602048457, -0.215483144, -0.742340684, 0.634426773) * CFrame.Angles((-i * (math.pi / 75)),(i * (math.pi / 180)),0)
  939.  
  940. wait()
  941.  
  942. end
  943.  
  944. end
  945.  
  946. PlaySound("Swing")
  947.  
  948. for i = 1, 15, 3 do
  949.  
  950. if equipped and not gettingknife and not justthrown then
  951.  
  952. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, 0.0719629526, 0.22870943, 0.970831275, -0.981789052, 0.187819958, 0.0285283029, -0.175816804, -0.955204487, 0.238060504) * CFrame.Angles(0, 0, (i * (math.pi / 15)))
  953.  
  954. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, 0.7, 0, 0.703028679, -0.151466534, 0.694844246, -0.673604906, 0.171488613, 0.718921423, -0.228050426, -0.973472893, 0.0185328126) * CFrame.Angles((i * (math.pi / 60)),(-i * (math.pi / 180)),(i * (math.pi / 60)))
  955.  
  956. wait()
  957.  
  958. end
  959.  
  960. end
  961.  
  962. for i = 1, 15, 3 do
  963.  
  964. if equipped and not justthrown and not gettingknife then
  965.  
  966. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.5, 0.5, 0, -0.071962975, -0.22870943, 0.970831275, 0.981789052, -0.187820047, 0.0285283029, 0.175816894, 0.955204487, 0.238060504) * CFrame.Angles(0, 0, (-i * (math.pi / 30)))
  967.  
  968. wait()
  969.  
  970. end
  971.  
  972. end
  973.  
  974. for i = 1, 15, 3 do
  975.  
  976. equipping=true
  977.  
  978. if equipped and not gettingknife and not justthrown then
  979.  
  980. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  981.  
  982. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  983.  
  984. end
  985.  
  986. wait()
  987.  
  988. end
  989.  
  990. Attacking=false
  991.  
  992. else
  993.  
  994. for i = 1, 15, 3 do
  995.  
  996. if equipped and not gettingknife and not justthrown then
  997.  
  998. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.3, 0.5, 0, 0.195277825, -0.747909963, 0.634426773, 0.482016951, 0.636551082, 0.602048457, -0.854123056, 0.188237742, 0.484809577) * CFrame.Angles((i * (math.pi / 40)),(-i * (math.pi / 45)),(i * (math.pi / 60)))
  999.  
  1000. end
  1001.  
  1002. wait()
  1003.  
  1004. end
  1005.  
  1006. PlaySound("Swing")
  1007.  
  1008. for i = 1, 15, 3 do
  1009.  
  1010. if equipped and not gettingknife and not justthrown then
  1011.  
  1012. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.2, 0.5, -.3, 0.852928281, -0.428775758, 0.29776603, 0.516928136, 0.614185035, -0.596290231, 0.0727913082, 0.662516415, 0.745502114) * CFrame.Angles((-i * (math.pi / 45)),0,0)
  1013.  
  1014. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.200000003, 0.7, 0, 0.849384904, 0.16895318, 0.5, -0.48470962, 0.624545038, 0.612372398, -0.208810255, -0.762494743, 0.612372398) * CFrame.Angles((i * (math.pi / 60)),(-i * (math.pi / 180)),(i * (math.pi / 60)))
  1015.  
  1016. end
  1017.  
  1018. wait()
  1019.  
  1020. end
  1021.  
  1022. for i = 1, 15, 3 do
  1023.  
  1024. if equipped and not gettingknife and not justthrown then
  1025.  
  1026. torso:FindFirstChild("Right Shoulder").C1 = CFrame.new(-0.3, 0.5, -0.300000012, 0.852928281, -0.472260833, -0.222447708, 0.516928136, 0.82349503, 0.233754784, 0.0727913082, -0.314365625, 0.946507096) * CFrame.Angles((i * (math.pi / 45)),0,0)
  1027.  
  1028. end
  1029.  
  1030. wait()
  1031.  
  1032. end
  1033.  
  1034. for i = 1, 15, 3 do
  1035.  
  1036. if equipped and not gettingknife and not justthrown then
  1037.  
  1038. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  1039.  
  1040. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  1041.  
  1042. end
  1043.  
  1044. wait()
  1045.  
  1046. end
  1047.  
  1048. Attacking=false
  1049.  
  1050. end
  1051.  
  1052. end
  1053.  
  1054. end
  1055.  
  1056. end)
  1057.  
  1058.  
  1059.  
  1060. mouse.Move:connect(function ()
  1061.  
  1062. if equipped and mouse then
  1063.  
  1064. if (mouse.Hit.p - mouse.Origin.p).unit.y < 0.25 and (mouse.Hit.p - mouse.Origin.p).unit.y > -0.25 then
  1065.  
  1066. torso:FindFirstChild("Right Shoulder").C0 = CFrame.new(.9,.5,0) * CFrame.Angles(0,math.rad(90),0) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y))
  1067.  
  1068. torso:FindFirstChild("LeftWeld").C0 = CFrame.new(-1.5,0.5,0) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y))
  1069.  
  1070. torso:FindFirstChild("Neck").C0 = CFrame.new(0,1,0) * CFrame.Angles(math.rad(-90),0,math.rad(180)) * CFrame.Angles(math.asin(-(mouse.Hit.p - mouse.Origin.p).unit.y), 0, 0)
  1071.  
  1072. end
  1073.  
  1074. end
  1075.  
  1076. 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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top