Advertisement
Guest User

following nifes

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