Advertisement
UltimateGate

Rainbow Overseer MLG Murderer Knife ((CUSTOM)) By Ultimate

Jun 25th, 2017
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.55 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=156092238"
  14. mesh.TextureId = "http://www.roblox.com/asset/?id=582409353"
  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=220
  58.  
  59. local Attacking=false
  60.  
  61. local handle=nil
  62.  
  63. local WalkSpeeds={16,22}
  64.  
  65. local fasterthrow = .4
  66.  
  67. local knifespeed = 450
  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(330)
  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*3
  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("Lime green")
  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.  
  361. if throwingHandle then
  362.  
  363.  
  364.  
  365. local touchedConn = throwingHandle.Touched:connect(function(hit)
  366.  
  367. local char=hit.Parent
  368.  
  369. camera.CameraSubject=humanoid
  370.  
  371. camera.CameraType=Enum.CameraType.Custom
  372.  
  373. if char and char~=player.Character and char.Name~="Arms_Model" and hit.Name~="Handle" and hit.Name~="RayPart" then
  374.  
  375. local h=char:FindFirstChild("Humanoid")
  376.  
  377. if h and h.Health > 0 then
  378.  
  379. throwingHandle:Destroy()
  380.  
  381. laserCharge=true
  382.  
  383. if hit.Name~="Head" or hit.className=="Hat" then
  384.  
  385. h:TakeDamage(Damage)
  386.  
  387. -- player.Credits.Value = player.Credits.Value + 15
  388.  
  389. --player.PlayerGui.NormalKillGui.Script.Disabled = false
  390.  
  391. local explosion = Instance.new("Explosion")
  392.  
  393. explosion.Position=h.Parent.Torso.Position
  394.  
  395. explosion.BlastRadius=explosion.BlastRadius*2
  396.  
  397. explosion.Parent=workspace
  398.  
  399.  
  400. if h.Health == 0 then
  401.  
  402. PlaySound("Hit2",char.Torso)
  403.  
  404. end
  405.  
  406. else
  407.  
  408. h:TakeDamage(Damage * 2)
  409.  
  410. print("Headshot!")
  411.  
  412. --player.Credits.Value = player.Credits.Value + 50
  413.  
  414. --player.PlayerGui.HeadShotGui.Script.Disabled = false
  415.  
  416. local explosion = Instance.new("Explosion")
  417.  
  418. explosion.Position=h.Parent.Torso.Position
  419.  
  420. explosion.BlastRadius=explosion.BlastRadius*2
  421.  
  422. explosion.Parent=workspace
  423.  
  424. char.Head.Transparency=1
  425.  
  426. char.Head.CanCollide=false
  427.  
  428. if char.Head:FindFirstChild("face") then char.Head:FindFirstChild("face").Transparency=1 end
  429.  
  430. for _,v in pairs(char:GetChildren()) do
  431.  
  432. if v.className=="Hat" then
  433.  
  434. v:Destroy()
  435.  
  436. end
  437.  
  438. end
  439.  
  440. for i = 1, 7 do
  441.  
  442. local blood=Instance.new("Part")
  443.  
  444. blood.FormFactor="Custom"
  445.  
  446. blood.Size=Vector3.new(1,.2,1)
  447.  
  448. blood.BrickColor=BrickColor.Red()
  449.  
  450. blood.TopSurface=0
  451.  
  452. blood.BottomSurface=0
  453.  
  454. game:GetService("Debris"):AddItem(blood,5)
  455.  
  456. blood.Parent=workspace
  457.  
  458. blood.Position=char.Head.Position + Vector3.new(math.random(0.2,0.8),0,math.random(0.2,0.8))
  459.  
  460. end
  461.  
  462. local sound = Instance.new("Sound")
  463.  
  464. sound.SoundId = "rbxassetid://142347633"
  465.  
  466. sound.Parent=char.Head
  467.  
  468. sound.Pitch=1.1
  469.  
  470. sound:Play()
  471.  
  472. end
  473.  
  474. PlaySound("Hit1",char.Torso)
  475.  
  476. if h.Health == 0 then
  477.  
  478. PlaySound("Hit2")
  479.  
  480. end
  481.  
  482. elseif hit.Name~="Handle" or hit.Name~="IgnoreThrowingKnives" and hit.Parent.Name~="Arms_Model" and hit.Name~="RayPart" and hit.CanCollide==true then
  483.  
  484. local sound=Instance.new("Sound")
  485.  
  486. sound.Parent=hit
  487.  
  488. sound.SoundId = "rbxassetid://" .. SOUNDS.wallhit[math.random(1,#SOUNDS.wallhit)]
  489.  
  490. sound:Play()
  491.  
  492. sound:Destroy()
  493.  
  494. print("Hit Object: " .. hit.Name)
  495.  
  496. local newknife=tool.Handle:clone()
  497.  
  498. newknife.Name="ThrownKnife"
  499.  
  500. newknife.CFrame = CFrame.new(spawnPos, spawnPos + dPos) * CFrame.Angles(math.pi/-2, 0, 0)
  501.  
  502. newknife.Position = targetpos
  503.  
  504. throwingHandle:Destroy()
  505.  
  506. newknife.Anchored=true
  507.  
  508. newknife.CanCollide=true
  509.  
  510. newknife.Transparency=0
  511.  
  512. newknife.Parent=workspace
  513.  
  514. --newknife.Script.Disabled = false
  515.  
  516. wait(7)
  517.  
  518. for i=1,10 do
  519.  
  520. newknife.Transparency=i*.1
  521.  
  522. wait()
  523.  
  524. end
  525.  
  526. newknife:Destroy()
  527.  
  528. end
  529.  
  530. end
  531.  
  532. end)
  533.  
  534. end
  535.  
  536. end
  537.  
  538. -- must check if it still exists since we waited
  539.  
  540. if throwingHandle then
  541.  
  542. throwingHandle.CanCollide = true
  543.  
  544. end
  545.  
  546.  
  547.  
  548. FUNCTIONS={
  549.  
  550.  
  551. CHECKFORFIRSTPERSON=function()
  552.  
  553. if (camera.focus.p - camera.CoordinateFrame.p).magnitude > 1 then
  554.  
  555. return false
  556.  
  557. else
  558.  
  559. return true
  560.  
  561. end
  562.  
  563. end,
  564.  
  565.  
  566. ANIMS=function(state)
  567.  
  568. if state then
  569.  
  570. mouse.Icon="http://www.roblox.com/asset/?id=258828417"
  571.  
  572. --Start Animation
  573.  
  574.  
  575.  
  576. if SETTINGS.tool then
  577.  
  578. tool.GripPos = Vector3.new(0, -0.55, 0)
  579.  
  580. elseif SETTINGS.tool then
  581.  
  582. tool.GripPos = Vector3.new(0, -0.6, 0)
  583.  
  584. elseif SETTINGS.tool then
  585.  
  586. tool.GripPos = Vector3.new(0, -0.65, 0)
  587.  
  588. elseif SETTINGS.tool then
  589.  
  590. tool.GripPos = Vector3.new(0, -0.7, 0)
  591.  
  592. elseif SETTINGS.tool then
  593.  
  594. tool.GripPos = Vector3.new(0, -0.75, 0)
  595.  
  596. elseif SETTINGS.tool then
  597.  
  598. tool.GripPos = Vector3.new(0, -0.8, 0)
  599.  
  600. elseif SETTINGS.tool then
  601.  
  602. tool.GripPos = Vector3.new(0, -0.85, 0)
  603.  
  604. elseif SETTINGS.tool then
  605.  
  606. tool.GripPos = Vector3.new(0, -0.9, 0)
  607.  
  608. elseif SETTINGS.tool then
  609.  
  610. tool.GripPos = Vector3.new(0, -0.95, 0)
  611.  
  612. elseif SETTINGS.tool then
  613.  
  614. tool.GripPos = Vector3.new(0, -1, 0)
  615.  
  616. else
  617.  
  618. print("Invalid tool size! Set to default: " .. SETTINGS.tool.default_tool_size )
  619.  
  620.  
  621. if SETTINGS.tool.default_tool_size==.1 then
  622.  
  623. tool.GripPos = Vector3.new(0, -0.55, 0)
  624.  
  625. elseif SETTINGS.tool.default_tool_size==.2 then
  626.  
  627. tool.GripPos = Vector3.new(0, -0.6, 0)
  628.  
  629. elseif SETTINGS.tool.default_tool_size==.3 then
  630.  
  631. tool.GripPos = Vector3.new(0, -0.65, 0)
  632.  
  633. elseif SETTINGS.tool.default_tool_size==.4 then
  634.  
  635. tool.GripPos = Vector3.new(0, -0.7, 0)
  636.  
  637. elseif SETTINGS.tool.default_tool_size==.5 then
  638.  
  639. tool.GripPos = Vector3.new(0, -0.75, 0)
  640.  
  641. elseif SETTINGS.tool.default_tool_size==.6 then
  642.  
  643. tool.GripPos = Vector3.new(0, -0.8, 0)
  644.  
  645. elseif SETTINGS.tool.default_tool_size==.7 then
  646.  
  647. tool.GripPos = Vector3.new(0, -0.85, 0)
  648.  
  649. elseif SETTINGS.tool.default_tool_size==.8 then
  650.  
  651. tool.GripPos = Vector3.new(0, -0.9, 0)
  652.  
  653. elseif SETTINGS.tool.default_tool_size==.9 then
  654.  
  655. tool.GripPos = Vector3.new(0, -0.95, 0)
  656.  
  657. elseif SETTINGS.tool.default_tool_size==1 then
  658.  
  659. tool.GripPos = Vector3.new(0, -1, 0)
  660.  
  661. else
  662.  
  663. print("Invalid default size! Un-equipping and removing Knife...")
  664.  
  665.  
  666. end
  667.  
  668. end
  669.  
  670. torso=char:FindFirstChild("Torso")
  671.  
  672. leftarm=torso:FindFirstChild("Left Shoulder")
  673.  
  674. if leftarm then
  675.  
  676. leftarm.Parent=nil
  677.  
  678. newarmweld=Instance.new("Weld")
  679.  
  680. newarmweld.Name="LeftWeld"
  681.  
  682. newarmweld.Part0=torso
  683.  
  684. newarmweld.C0 = CFrame.new(-1.5, 0.7, 0)
  685.  
  686. newarmweld.C1 = CFrame.new(0, 0.7, 0)
  687.  
  688. newarmweld.Part1=char:FindFirstChild("Left Arm")
  689.  
  690. newarmweld.Parent=torso
  691.  
  692. end
  693.  
  694. humanoid.WalkSpeed=WalkSpeeds[2]
  695.  
  696. for i = 1, 15, 3 do
  697.  
  698. if equipped then
  699.  
  700. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  701.  
  702. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  703.  
  704. end
  705.  
  706. wait()
  707.  
  708. end
  709.  
  710. else
  711.  
  712. humanoid.WalkSpeed=WalkSpeeds[1]
  713.  
  714. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.new(0,-0.2,0)
  715.  
  716. tool.GripForward = Vector3.new(0,0,-1)
  717.  
  718. newarmweld:Destroy()
  719.  
  720. leftarm.Parent=torso
  721.  
  722. mouse.Icon=""
  723.  
  724. torso:FindFirstChild("Neck").C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  725.  
  726. torso:FindFirstChild("Right Shoulder").C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  727.  
  728. end
  729.  
  730. end
  731.  
  732. }
  733.  
  734.  
  735.  
  736. tool.Equipped:connect(function ()
  737.  
  738. equipped=true
  739.  
  740. PlaySound("Equip")
  741.  
  742. FUNCTIONS.ANIMS(true)
  743.  
  744. end)
  745.  
  746. tool.Unequipped:connect(function ()
  747.  
  748. equipped=false
  749.  
  750. FUNCTIONS.ANIMS(false)
  751.  
  752. end)
  753.  
  754. tool.Handle.Touched:connect(function (hit)
  755.  
  756. if Attacking then
  757.  
  758. DamageObject(hit)
  759.  
  760. end
  761.  
  762. end)
  763.  
  764. tool.Activated:connect(function ()
  765.  
  766. if Attacking then return end
  767.  
  768. if not tool.Enabled then return end
  769.  
  770. justthrown=false
  771.  
  772. justattacked=false
  773.  
  774. if not gettingknife and not justthrown and not Attacking then
  775.  
  776. HeldTime=time()
  777.  
  778. end
  779.  
  780. playcharge=true
  781.  
  782. wait(.15)
  783.  
  784. while gettingknife do
  785.  
  786. wait()
  787.  
  788. end
  789.  
  790. local speed=0.2
  791.  
  792. for i = 1, 15, fasterthrow do
  793.  
  794. if playcharge and equipped and not gettingknife and not justthrown and not Attacking then
  795.  
  796. 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)))
  797.  
  798. 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)
  799.  
  800. 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)
  801.  
  802. wait()
  803.  
  804. end
  805.  
  806. end
  807.  
  808. if playcharge then
  809.  
  810. canLaser=true
  811.  
  812. end
  813.  
  814. end)
  815.  
  816. tool.Deactivated:connect(function ()
  817.  
  818. if not tool.Enabled then return end
  819.  
  820. currTime=time()
  821.  
  822. playcharge=false
  823.  
  824. if HeldTime and currTime - HeldTime > .6 and
  825.  
  826. currTime - HeldTime > 0.01 and not justthrown and not gettingknife then
  827.  
  828. if not Attacking and not justattacked then
  829.  
  830. print("Throw")
  831.  
  832. if canLaser then
  833.  
  834. PlaySound("ThrowLaser")
  835.  
  836. else
  837.  
  838. PlaySound("Throw")
  839.  
  840. end
  841.  
  842. tool.Handle.Transparency=1
  843.  
  844. local targetPos = player.Character.Humanoid.TargetPoint
  845.  
  846. local lookAt = (targetPos - player.Character.PrimaryPart.Position).unit
  847.  
  848. local switchEvenOddParity = 1
  849.  
  850. local angle = math.ceil((1-1)/2)*math.pi/12*switchEvenOddParity
  851.  
  852. Throwtool(CFrame.Angles(0, angle, 0) * lookAt)
  853.  
  854. wait()
  855. canLaser=true
  856.  
  857. HeldTime=0
  858.  
  859. gettingknife=true
  860.  
  861. mouse.Icon="http://www.roblox.com/asset/?id=258828417"
  862.  
  863. player.Character["Right Arm"].RightGrip.C1 = CFrame.new(0, -0.800000012, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  864.  
  865. for i = 1, 15, .8 do
  866.  
  867. if equipped then
  868.  
  869. 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)))
  870.  
  871. 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)))
  872.  
  873. wait()
  874.  
  875. end
  876.  
  877. end
  878.  
  879. justthrown=true
  880.  
  881. tool.Handle.Transparency=0
  882.  
  883. PlaySound("Equip")
  884.  
  885. mouse.Icon="http://www.roblox.com/asset/?id=258828417"
  886.  
  887. tool.GripForward = Vector3.new(0,0,-1)
  888.  
  889. for i = 1, 15, 1 do
  890.  
  891. if equipped then
  892.  
  893. 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)))
  894.  
  895. wait()
  896.  
  897. end
  898.  
  899. end
  900.  
  901. gettingknife=false
  902.  
  903. for i = 1, 15, 3 do
  904.  
  905. if equipped then
  906.  
  907. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  908.  
  909. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  910.  
  911. end
  912.  
  913. wait()
  914.  
  915. end
  916.  
  917. end
  918.  
  919. else
  920.  
  921. if not justthrown and not gettingknife then
  922.  
  923. if Attacking then return end
  924.  
  925. print("Attack")
  926.  
  927. HeldTime=0
  928.  
  929. Attacking=true
  930.  
  931. justattacked=true
  932.  
  933. if math.random(1,2)==1 then
  934.  
  935. for i = 1, 15, 3 do
  936.  
  937. if equipped and not gettingknife and not justthrown then
  938.  
  939. 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)))
  940.  
  941. 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)
  942.  
  943. wait()
  944.  
  945. end
  946.  
  947. end
  948.  
  949. PlaySound("Swing")
  950.  
  951. for i = 1, 15, 3 do
  952.  
  953. if equipped and not gettingknife and not justthrown then
  954.  
  955. 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)))
  956.  
  957. 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)))
  958.  
  959. wait()
  960.  
  961. end
  962.  
  963. end
  964.  
  965. for i = 1, 15, 3 do
  966.  
  967. if equipped and not justthrown and not gettingknife then
  968.  
  969. 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)))
  970.  
  971. wait()
  972.  
  973. end
  974.  
  975. end
  976.  
  977. for i = 1, 15, 3 do
  978.  
  979. equipping=true
  980.  
  981. if equipped and not gettingknife and not justthrown then
  982.  
  983. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  984.  
  985. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  986.  
  987. end
  988.  
  989. wait()
  990.  
  991. end
  992.  
  993. Attacking=false
  994.  
  995. else
  996.  
  997. for i = 1, 15, 3 do
  998.  
  999. if equipped and not gettingknife and not justthrown then
  1000.  
  1001. 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)))
  1002.  
  1003. end
  1004.  
  1005. wait()
  1006.  
  1007. end
  1008.  
  1009. PlaySound("Swing")
  1010.  
  1011. for i = 1, 15, 3 do
  1012.  
  1013. if equipped and not gettingknife and not justthrown then
  1014.  
  1015. 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)
  1016.  
  1017. 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)))
  1018.  
  1019. end
  1020.  
  1021. wait()
  1022.  
  1023. end
  1024.  
  1025. for i = 1, 15, 3 do
  1026.  
  1027. if equipped and not gettingknife and not justthrown then
  1028.  
  1029. 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)
  1030.  
  1031. end
  1032.  
  1033. wait()
  1034.  
  1035. end
  1036.  
  1037. for i = 1, 15, 3 do
  1038.  
  1039. if equipped and not gettingknife and not justthrown then
  1040.  
  1041. torso:FindFirstChild("Right Shoulder").C1 = rightC1 * CFrame.Angles((-i * (math.pi / 90)),(-i * (math.pi / 90)),(i * (math.pi / 210)))
  1042.  
  1043. torso:FindFirstChild("LeftWeld").C1 = CFrame.new(-0.2, .7, 0) * CFrame.Angles((-i * (math.pi / 60)),(i * (math.pi / 90)),(-i * (math.pi / 240)))
  1044.  
  1045. end
  1046.  
  1047. wait()
  1048.  
  1049. end
  1050.  
  1051. Attacking=false
  1052.  
  1053. end
  1054.  
  1055. end
  1056.  
  1057. end
  1058.  
  1059. end)
  1060.  
  1061.  
  1062.  
  1063. mouse.Move:connect(function ()
  1064.  
  1065. if equipped and mouse then
  1066.  
  1067. if (mouse.Hit.p - mouse.Origin.p).unit.y < 0.25 and (mouse.Hit.p - mouse.Origin.p).unit.y > -0.25 then
  1068.  
  1069. 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))
  1070.  
  1071. 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))
  1072.  
  1073. 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)
  1074.  
  1075. end
  1076.  
  1077. end
  1078.  
  1079. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement