Advertisement
Dark_EccentricYT

Untitled

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