Advertisement
Guest User

Untitled

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