Advertisement
astronaut32

nsword

Sep 7th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.64 KB | None | 0 0
  1.  
  2. local _CODE = "_NSword"
  3.  
  4.  
  5.  
  6.  
  7.  
  8. --==================================================-VARIABLES-==================================================--
  9.  
  10.  
  11.  
  12. local player = game:GetService("Players").LocalPlayer
  13.  
  14.  
  15. local char = player.Character
  16.  
  17.  
  18. local huma = char:FindFirstChild("Humanoid")
  19.  
  20.  
  21. local initialized, disconnectRequest = false, false
  22.  
  23.  
  24. local model,suited,use,processing,animate,gtarget,gs = false,false,false,false,false,false,true
  25.  
  26.  
  27. local w,a,s,d = false,false,false,false
  28.  
  29.  
  30. local bindKeyDown,bindKeyUp = false,false
  31.  
  32.  
  33. local hit,trail,lighting,shirt,bin = false, false, false, false, false
  34.  
  35.  
  36. local bPos, bGyro = Instance.new("BodyPosition"), Instance.new("BodyGyro")
  37.  
  38.  
  39. local delete = true
  40.  
  41.  
  42. local prt,_jnt,_mdl,_prt,_kup,_kdn,_mse,ms = {}
  43.  
  44.  
  45. local combo = 0
  46.  
  47.  
  48. local tol = 4
  49.  
  50.  
  51. local mode = 0
  52.  
  53.  
  54. local cfs = false
  55.  
  56.  
  57. local jumping = false
  58.  
  59.  
  60. local buttonDown = false
  61.  
  62.  
  63. local shirtColor = "Cyan"
  64.  
  65.  
  66. local pantsColor = "Cyan"
  67.  
  68.  
  69. local attachColor = "Cyan"
  70.  
  71.  
  72. local sheathColor = "Cyan"
  73.  
  74.  
  75. local swordHandleColor = "Cyan"
  76.  
  77.  
  78. local gunColor = "Cyan"
  79.  
  80.  
  81. local gunTakePos = nil
  82.  
  83.  
  84. local defaultWalkspeed = huma.WalkSpeed
  85.  
  86.  
  87.  
  88.  
  89.  
  90. --==================================================-MAIN-CODE-==================================================--
  91.  
  92.  
  93.  
  94.  
  95.  
  96. bPos.maxForce = Vector3.new(0,math.huge,0)
  97.  
  98.  
  99. bGyro.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  100.  
  101.  
  102.  
  103.  
  104.  
  105. if player == nil or char == nil then return end
  106.  
  107.  
  108.  
  109.  
  110.  
  111. if not player.Backpack:FindFirstChild(_CODE) then
  112.  
  113.  
  114. bin = Instance.new("HopperBin")
  115.  
  116.  
  117. bin.Name = _CODE
  118.  
  119.  
  120. bin.Parent = player:FindFirstChild("Backpack")
  121.  
  122.  
  123. else bin = player.Backpack[_CODE] end
  124.  
  125.  
  126.  
  127.  
  128.  
  129. if bin ~= nil then
  130.  
  131.  
  132. script.Name = "_NScript"
  133.  
  134.  
  135. script.Parent = nil
  136.  
  137.  
  138. end
  139.  
  140.  
  141.  
  142.  
  143.  
  144. local part = {
  145.  
  146.  
  147. head = char:FindFirstChild("Head"),
  148.  
  149.  
  150. tors = char:FindFirstChild("Torso"),ftor,
  151.  
  152.  
  153. larm = char:FindFirstChild("Left Arm"),
  154.  
  155.  
  156. rarm = char:FindFirstChild("Right Arm"),
  157.  
  158.  
  159. lleg = char:FindFirstChild("Left Leg"),
  160.  
  161.  
  162. rleg = char:FindFirstChild("Right Leg")}
  163.  
  164.  
  165.  
  166.  
  167.  
  168. local motor = {
  169.  
  170.  
  171. neck = part.tors:FindFirstChild("Neck"),
  172.  
  173.  
  174. lsho = part.tors:FindFirstChild("Left Shoulder"),
  175.  
  176.  
  177. rsho = part.tors:FindFirstChild("Right Shoulder"),
  178.  
  179.  
  180. lhip = part.tors:FindFirstChild("Left Hip"),
  181.  
  182.  
  183. rhip = part.tors:FindFirstChild("Right Hip")}
  184.  
  185.  
  186.  
  187.  
  188.  
  189. for i,obj in pairs(char:GetChildren()) do
  190.  
  191.  
  192. if obj:IsA("CharacterMesh") then
  193.  
  194.  
  195. obj:Destroy()
  196.  
  197.  
  198. end
  199.  
  200.  
  201. end
  202.  
  203.  
  204.  
  205.  
  206.  
  207. function JoinInit()
  208.  
  209.  
  210. while processing do wait() end
  211.  
  212.  
  213. processing = true
  214.  
  215.  
  216. if char:FindFirstChild("Shirt") then
  217.  
  218.  
  219. shirt = char.Shirt
  220.  
  221.  
  222. shirt.Parent = nil
  223.  
  224.  
  225. end
  226.  
  227.  
  228. part.ftor = part.tors:Clone()
  229.  
  230.  
  231. part.ftor.Name = "_Torso2"
  232.  
  233.  
  234. part.ftor.BrickColor = BrickColor.new("Really black")
  235.  
  236.  
  237. local joint = {neck,tors,lsho,rsho,lhip,rhip}
  238.  
  239.  
  240. joint.tors = Instance.new("Weld", part.tors)
  241.  
  242.  
  243. joint.tors.Name = "Torso_WELD"
  244.  
  245.  
  246. joint.tors.Part0 = part.tors
  247.  
  248.  
  249. joint.tors.Part1 = part.ftor
  250.  
  251.  
  252. part.ftor.Parent = char
  253.  
  254.  
  255. part.tors.Transparency = 1
  256.  
  257.  
  258. for i,join in pairs (motor) do
  259.  
  260.  
  261. local weld
  262.  
  263.  
  264. if not join.Parent:FindFirstChild(join.Name.."_WELD") then
  265.  
  266.  
  267. weld = Instance.new("Weld", join.Parent)
  268.  
  269.  
  270. weld.Name = join.Name.."_WELD"
  271.  
  272.  
  273. else weld = join.Parent[join.Name.."_WELD"] end
  274.  
  275.  
  276. if tostring(i) == "lsho" then
  277.  
  278.  
  279. weld.C0 = CFrame.new(-1.5,0.5,0)
  280.  
  281.  
  282. weld.C1 = CFrame.new(0,0.5,0)
  283.  
  284.  
  285. elseif tostring(i) == "rsho" then
  286.  
  287.  
  288. weld.C0 = CFrame.new(1.5,0.5,0)
  289.  
  290.  
  291. weld.C1 = CFrame.new(0,0.5,0)
  292.  
  293.  
  294. elseif tostring(i) == "neck" then
  295.  
  296.  
  297. weld.C0 = CFrame.new(0,1,0)
  298.  
  299.  
  300. weld.C1 = CFrame.new(0,-0.5,0)
  301.  
  302.  
  303. else
  304.  
  305.  
  306. weld.C0 = join.C0
  307.  
  308.  
  309. weld.C1 = join.C1
  310.  
  311.  
  312. end
  313.  
  314.  
  315. weld.Part1 = join.Part1
  316.  
  317.  
  318. if tostring(i) ~= "neck" then
  319.  
  320.  
  321. join.Part0 = part.ftor
  322.  
  323.  
  324. else
  325.  
  326.  
  327. weld.Part0 = part.ftor
  328.  
  329.  
  330. end
  331.  
  332.  
  333. joint[i] = weld
  334.  
  335.  
  336. end
  337.  
  338.  
  339. initialized = true
  340.  
  341.  
  342. processing = false
  343.  
  344.  
  345. return joint
  346.  
  347.  
  348. end
  349.  
  350.  
  351.  
  352.  
  353.  
  354. function Bind(join)
  355.  
  356.  
  357. if join == nil then return end
  358.  
  359.  
  360. if _jnt == nil then return end
  361.  
  362.  
  363. if part.ftor == nil then return end
  364.  
  365.  
  366. if not _jnt[join]:IsA("Weld") then return end
  367.  
  368.  
  369. if not motor[join]:IsA("Motor6D") then return end
  370.  
  371.  
  372. motor[join].Part0 = nil
  373.  
  374.  
  375. _jnt[join].Part0 = part.ftor
  376.  
  377.  
  378. end
  379.  
  380.  
  381.  
  382.  
  383.  
  384. function Release(join)
  385.  
  386.  
  387. if join == nil then return end
  388.  
  389.  
  390. if _jnt == nil then return end
  391.  
  392.  
  393. if part.ftor == nil then return end
  394.  
  395.  
  396. if not _jnt[join]:IsA("Weld") then return end
  397.  
  398.  
  399. if not motor[join]:IsA("Motor6D") then return end
  400.  
  401.  
  402. _jnt[join].Part0 = nil
  403.  
  404.  
  405. motor[join].Part0 = part.ftor
  406.  
  407.  
  408. end
  409.  
  410.  
  411.  
  412.  
  413.  
  414. function SuitInit()
  415.  
  416.  
  417. while processing do wait() end
  418.  
  419.  
  420. processing = true
  421.  
  422.  
  423. if initialized then
  424.  
  425.  
  426. local suitModel
  427.  
  428.  
  429. if not char:FindFirstChild(_CODE.." Suit") then
  430.  
  431.  
  432. suitModel = Instance.new("Model", char)
  433.  
  434.  
  435. suitModel.Name = _CODE.." Suit"
  436.  
  437.  
  438. model = true
  439.  
  440.  
  441. else suitModel = char[_CODE.." Suit"] model = true end
  442.  
  443.  
  444. processing = false
  445.  
  446.  
  447. return suitModel
  448.  
  449.  
  450. else processing = false end
  451.  
  452.  
  453. end
  454.  
  455.  
  456.  
  457.  
  458.  
  459. function CF(join,cf,rot,speed,ctin,s)
  460.  
  461.  
  462. if s and cfs then ctin = true animate = false return end
  463.  
  464.  
  465. if join == nil then return end
  466.  
  467.  
  468. local def,done = join.C0,false
  469.  
  470.  
  471. local cf = cf or def
  472.  
  473.  
  474. local rot = rot or (def - def.p)
  475.  
  476.  
  477. local speed = speed or 1
  478.  
  479.  
  480. local x1,y1,z1 = def:toEulerAnglesXYZ()
  481.  
  482.  
  483. local x2,y2,z2 = rot:toEulerAnglesXYZ()
  484.  
  485.  
  486. coroutine.wrap(function()
  487.  
  488.  
  489. if speed ~= 1 then
  490.  
  491.  
  492. for i = 0,1,speed do
  493.  
  494.  
  495. if s and cfs then ctin = true animate = false return end
  496.  
  497.  
  498. join.C0 = CFrame.new(
  499.  
  500.  
  501. (def.p.X * (1 - i) + cf.p.X * i),
  502.  
  503.  
  504. (def.p.Y * (1 - i) + cf.p.Y * i),
  505.  
  506.  
  507. (def.p.Z * (1 - i) + cf.p.Z * i)) *
  508.  
  509.  
  510. CFrame.fromEulerAnglesXYZ(
  511.  
  512.  
  513. (x1 * (1 - i) + x2 * i),
  514.  
  515.  
  516. (y1 * (1 - i) + y2 * i),
  517.  
  518.  
  519. (z1 * (1 - i) + z2 * i))
  520.  
  521.  
  522. wait(0.015)
  523.  
  524.  
  525. end
  526.  
  527.  
  528. end if s and cfs then ctin = true animate = false else join.C0 = CFrame.new(cf.p) * CFrame.fromEulerAnglesXYZ(x2,y2,z2) end done = true
  529.  
  530.  
  531. end)()
  532.  
  533.  
  534. if not ctin and speed ~= 1 then while not done do wait(0.015) end end
  535.  
  536.  
  537. end
  538.  
  539.  
  540.  
  541.  
  542.  
  543. function CreatePart(tab, name, color, transparency, reflectance, size, cframe, rotation, cancollide, anchored, meshType, scaleSize, weldPart, parent)
  544.  
  545.  
  546. if model and _mdl ~= nil and part.ftor ~= nil then
  547.  
  548.  
  549. local returnTable = {part,weld}
  550.  
  551.  
  552. if scaleSize == nil then scaleSize = false end
  553.  
  554.  
  555. local suitPart = Instance.new("Part")
  556.  
  557.  
  558. suitPart.Name = name
  559.  
  560.  
  561. suitPart.BrickColor = BrickColor.new(color)
  562.  
  563.  
  564. suitPart.Anchored = anchored
  565.  
  566.  
  567. suitPart.Locked = true
  568.  
  569.  
  570. suitPart.CanCollide = cancollide
  571.  
  572.  
  573. suitPart.Transparency = transparency
  574.  
  575.  
  576. suitPart.Reflectance = reflectance
  577.  
  578.  
  579. suitPart.FormFactor = Enum.FormFactor.Custom
  580.  
  581.  
  582. suitPart.BottomSurface = "Smooth"
  583.  
  584.  
  585. suitPart.TopSurface = "Smooth"
  586.  
  587.  
  588. suitPart.Size = size
  589.  
  590.  
  591. if meshType ~= nil then
  592.  
  593.  
  594. if meshType == "Cone" then
  595.  
  596.  
  597. CreateMesh("http://www.roblox.com/asset/?id=1033714", suitPart, scaleSize)
  598.  
  599.  
  600. elseif meshType == "Corner" then
  601.  
  602.  
  603. CreateMesh("http://www.roblox.com/asset/?id=11294911", suitPart, scaleSize)
  604.  
  605.  
  606. elseif meshType == "Devo" then
  607.  
  608.  
  609. CreateMesh("http://www.roblox.com/asset/?id=15720044", suitPart, scaleSize)
  610.  
  611.  
  612. elseif meshType == "Diamond" then
  613.  
  614.  
  615. CreateMesh("http://www.roblox.com/asset/?id=9756362", suitPart, scaleSize)
  616.  
  617.  
  618. elseif meshType == "Ring" then
  619.  
  620.  
  621. CreateMesh("http://www.roblox.com/asset/?id=3270017", suitPart, scaleSize)
  622.  
  623.  
  624. elseif meshType == "Tetrahedron" then
  625.  
  626.  
  627. CreateMesh("http://www.roblox.com/asset/?id=11294922", suitPart, scaleSize)
  628.  
  629.  
  630. elseif meshType == "Crown" then
  631.  
  632.  
  633. CreateMesh("http://www.roblox.com/asset/?id=20329976", suitPart, scaleSize)
  634.  
  635.  
  636. elseif meshType == "Claws" then
  637.  
  638.  
  639. CreateMesh("http://www.roblox.com/asset/?id=10681506", suitPart, scaleSize)
  640.  
  641.  
  642. elseif meshType == "Cylinder" then
  643.  
  644.  
  645. local mesh = Instance.new("CylinderMesh", suitPart)
  646.  
  647.  
  648. if scaleSize then mesh.Scale = suitPart.Size end
  649.  
  650.  
  651. elseif meshType == "Brick" then
  652.  
  653.  
  654. local mesh = Instance.new("BlockMesh", suitPart)
  655.  
  656.  
  657. if scaleSize then mesh.Scale = suitPart.Size end
  658.  
  659.  
  660. else
  661.  
  662.  
  663. local mesh = Instance.new("SpecialMesh", suitPart)
  664.  
  665.  
  666. if scaleSize then mesh.Scale = suitPart.Size end
  667.  
  668.  
  669. mesh.MeshType = meshType
  670.  
  671.  
  672. end
  673.  
  674.  
  675. end
  676.  
  677.  
  678. if weldPart == nil then suitPart.CFrame = cframe * rotation else
  679.  
  680.  
  681. local weld = Instance.new("Weld", _mdl)
  682.  
  683.  
  684. weld.Part1 = suitPart
  685.  
  686.  
  687. weld.Part0 = weldPart
  688.  
  689.  
  690. weld.Name = tostring(weld.Part0).."_TO_"..tostring(weld.Part1)
  691.  
  692.  
  693. weld.C0 = cframe * rotation
  694.  
  695.  
  696. returnTable.weld = weld
  697.  
  698.  
  699. end
  700.  
  701.  
  702. returnTable.part = suitPart
  703.  
  704.  
  705. suitPart.Parent = parent or _mdl
  706.  
  707.  
  708. if tab ~= nil then tab[name] = returnTable else return returnTable end
  709.  
  710.  
  711. end
  712.  
  713.  
  714. end
  715.  
  716.  
  717.  
  718.  
  719.  
  720. function CreateMesh(id, part, scaleSize)
  721.  
  722.  
  723. local mesh = Instance.new("SpecialMesh", part)
  724.  
  725.  
  726. if scaleSize then mesh.Scale = part.Size end
  727.  
  728.  
  729. mesh.MeshType = Enum.MeshType.FileMesh
  730.  
  731.  
  732. mesh.MeshId = id
  733.  
  734.  
  735. return mesh
  736.  
  737.  
  738. end
  739.  
  740.  
  741.  
  742.  
  743.  
  744. function LoadSuit()
  745.  
  746.  
  747. while processing do wait() end
  748.  
  749.  
  750. processing = true
  751.  
  752.  
  753. if not suited then
  754.  
  755.  
  756. CreatePart(prt, "torso_1", shirtColor, 0, 0, Vector3.new(2.015,2.11,1.015), CFrame.new(0,-0.04,0), CFrame.Angles(0,0,0),false,false, "Brick",false,part.ftor)
  757.  
  758.  
  759. CreatePart(prt, "torso_2", attachColor, 0, 0, Vector3.new(2.70,0.2,1.06), CFrame.new(-0.05,0.125,0), CFrame.Angles(0,0,math.rad(45)),false,false, "Brick",false,prt.torso_1.part)
  760.  
  761.  
  762. CreatePart(prt, "torso_3", attachColor, 0, 0, Vector3.new(2.15,0.2,1.06), CFrame.new(-0.025,-0.9,0), CFrame.Angles(0,0,math.rad(-2)),false,false, "Brick",false,prt.torso_1.part)
  763.  
  764.  
  765. CreatePart(prt, "torso_4", "Pastel Blue", 0, 1, Vector3.new(0.3,0.2,0.3), CFrame.new(0.6,0,-0.45), CFrame.Angles(math.rad(90),0,0),false,false, "Cylinder",false,prt.torso_3.part)
  766.  
  767.  
  768. CreatePart(prt, "arm_1", shirtColor, 0, 0, Vector3.new(1.015,0.8,1.015), CFrame.new(0,0.615,0), CFrame.Angles(0,0,0),false,false, "Brick",false,part.rarm)
  769.  
  770.  
  771. CreatePart(prt, "arm_2", shirtColor, 0, 0, Vector3.new(1.015,1.6,1.015), CFrame.new(0,0.215,0), CFrame.Angles(0,0,0),false,false, "Brick",false,part.larm)
  772.  
  773.  
  774. CreatePart(prt, "sheath_1", sheathColor, 0, 0, Vector3.new(0.425,4.5,0.2), CFrame.new(-0.25,0,0.63), CFrame.Angles(0,0,math.rad(-90)),false, false,"Brick", false, prt.torso_2.part)
  775.  
  776.  
  777. CreatePart(prt, "sheath_2", sheathColor, 0, 0,Vector3.new(0.21,0.6,0.415),CFrame.new(0,-2.55,0),CFrame.Angles(0,math.rad(90),math.rad(180)),false,false,"Wedge",false,prt.sheath_1.part)
  778.  
  779.  
  780. CreatePart(prt, "sheath_3", "Bright red", 0, 0,Vector3.new(0.25,0.6,0.2),CFrame.new(0,1.8,0.05),CFrame.Angles(0,0,0),false,false,"Diamond",true,prt.sheath_1.part)
  781.  
  782.  
  783. CreatePart(prt, "sheath_4", "Really black", 0, 0.3,Vector3.new(0.2,0.6,0.2),CFrame.new(0,1.3,0.1),CFrame.Angles(0,0,math.rad(27)),false,false,"Brick",true,prt.sheath_1.part)
  784.  
  785.  
  786. CreatePart(prt, "sheath_5", "Pastel Blue", 0, 0.3,Vector3.new(0.2,0.6,0.2),CFrame.new(0,1.1,0.1),CFrame.Angles(0,0,math.rad(27)),false,false,"Brick",true,prt.sheath_1.part)
  787.  
  788.  
  789. CreatePart(prt, "sheath_6", "Really black", 0, 0.3,Vector3.new(0.2,0.6,0.2),CFrame.new(0,0.9,0.1),CFrame.Angles(0,0,math.rad(27)),false,false,"Brick",true,prt.sheath_1.part)
  790.  
  791.  
  792. CreatePart(prt, "sheath_7", "Pastel Blue", 0, 0,Vector3.new(0.2,2,0.2),CFrame.new(0.2,0,0),CFrame.Angles(0,0,0),false,false,"Brick",true,prt.sheath_1.part)
  793.  
  794.  
  795. CreatePart(prt, "sheath_8", "Pastel Blue", 0, 0,Vector3.new(0.2,2,0.2),CFrame.new(-0.2,0,0),CFrame.Angles(0,0,0),false,false,"Brick",true,prt.sheath_1.part)
  796.  
  797.  
  798. CreatePart(prt, "sheath_9", "Pastel Blue", 0, 0,Vector3.new(0.2,0.72,0.2),CFrame.new(0.09,2.0125,0.13),CFrame.Angles(math.rad(35),0,-math.rad(20)),false,false,"Brick",true,prt.sheath_7.part)
  799.  
  800.  
  801. CreatePart(prt, "sheath_10", "Pastel Blue", 0, 0,Vector3.new(0.2,0.72,0.2),CFrame.new(-0.09,2.0125,0.13),CFrame.Angles(math.rad(35),0,math.rad(20)),false,false,"Brick",true,prt.sheath_8.part)
  802.  
  803.  
  804. CreatePart(prt, "sheath_11", "Pastel Blue", 0, 1,Vector3.new(0.25,0.425,0.25),CFrame.new(0,0.085,0),CFrame.Angles(0,0,0),false,false,"Brick",true,prt.sheath_9.part)
  805.  
  806.  
  807. CreatePart(prt, "sheath_12", "Pastel Blue", 0, 1,Vector3.new(0.25,0.425,0.25),CFrame.new(0,0.085,0),CFrame.Angles(0,0,0),false,false,"Brick",true,prt.sheath_10.part)
  808.  
  809.  
  810. CreatePart(prt, "sheath_13", "Pastel Blue", 0, 1,Vector3.new(0.2,0.7,0.2),CFrame.new(0,0,0),CFrame.Angles(math.rad(-145),0,0),false,false,"Brick",true,prt.sheath_2.part)
  811.  
  812.  
  813. CreatePart(prt, "sheath_14", "Pastel Blue", 0, 1,Vector3.new(0.2,1.11,0.2),CFrame.new(0.072,-0.025,0.1),CFrame.Angles(0,0,0),false,false,"Brick",true,prt.sheath_1.part)
  814.  
  815.  
  816. CreatePart(prt, "gunsheath_1", sheathColor, 0, 0, Vector3.new(0.5,0.9,0.7), CFrame.new(1.2,-0.2,0), CFrame.Angles(math.rad(-20),0,0),false, false,"Brick",true,prt.torso_3.part)
  817.  
  818.  
  819. CreatePart(prt, "gunsheath_2", "Pastel Blue", 0, 1, Vector3.new(0.3,0.2,0.3), CFrame.new(0.1,0.2,-0.225), CFrame.Angles(0,0,0),false,false, "Brick",true,prt.gunsheath_1.part)
  820.  
  821.  
  822. CreatePart(prt, "gunsheath_3", "Pastel Blue", 0, 1, Vector3.new(0.3,0.2,0.3), CFrame.new(0,-0.1,0), CFrame.Angles(0,0,0),false,false, "Brick",true,prt.gunsheath_2.part)
  823.  
  824.  
  825. CreatePart(prt, "gunsheath_4", "Pastel Blue", 0, 1, Vector3.new(0.3,0.2,0.3), CFrame.new(0,-0.1,0), CFrame.Angles(0,0,0),false, false,"Brick",true,prt.gunsheath_3.part)
  826.  
  827.  
  828. CreatePart(prt, "gun_1", gunColor, 0, 0, Vector3.new(0.4,0.775,0.5), CFrame.new(0,0.6,0.15), CFrame.Angles(math.rad(-105),0,0),false, false,"Brick",true,prt.gunsheath_1.part)
  829.  
  830.  
  831. CreatePart(prt, "gun_2", gunColor, 0, 0, Vector3.new(0.4,0.5,0.9), CFrame.new(0,0.2,-0.275), CFrame.Angles(math.rad(15),0,0),false, false,"Brick",true,prt.gun_1.part)
  832.  
  833.  
  834. CreatePart(prt, "gun_3", gunColor, 0, 0, Vector3.new(0.4,0.45,0.55), CFrame.new(0,0.1,0.26), CFrame.Angles(0,0,0),false, false,"Brick",true,prt.gun_2.part)
  835.  
  836.  
  837. CreatePart(prt, "gun_4", "Pastel Blue", 0, 1, Vector3.new(0.3,0.4,0.55), CFrame.new(0,0,-0.3), CFrame.Angles(0,0,0),false, false,"Brick",true,prt.gun_3.part)
  838.  
  839.  
  840. CreatePart(prt, "gun_5", gunColor, 0, 0, Vector3.new(0.4,0.45,0.6), CFrame.new(0,0,-0.55), CFrame.Angles(0,0,0),false,false, "Brick",true,prt.gun_3.part)
  841.  
  842.  
  843. CreatePart(prt, "gun_6", gunColor, 0, 0, Vector3.new(0.4,0.45,0.2), CFrame.new(0,0,-0.22), CFrame.Angles(0,0,0),false, false,"Brick",true,prt.gun_3.part)
  844.  
  845.  
  846. CreatePart(prt, "gun_7", gunColor, 0, 0, Vector3.new(0.4,0.45,0.2), CFrame.new(0,0,-0.3), CFrame.Angles(0,0,0),false, false,"Brick",true,prt.gun_3.part)
  847.  
  848.  
  849. CreatePart(prt, "gun_8", gunColor, 0, 0, Vector3.new(0.2,0.2,0.5), CFrame.new(0,-0.25,0.18), CFrame.Angles(0,0,0),false,false, "Brick",true,prt.gun_2.part)
  850.  
  851.  
  852. CreatePart(prt, "gun_9", gunColor, 0, 0, Vector3.new(0.2,0.2,0.5), CFrame.new(0,0.105,-0.105), CFrame.Angles(math.rad(90),0,0),false,false, "Brick",true,prt.gun_8.part)
  853.  
  854.  
  855. CreatePart(prt, "gun_10", gunColor, 0, 0, Vector3.new(0.2,0.2,0.5), CFrame.new(0,0.1725,-0.03), CFrame.Angles(math.rad(90),0,0),false,false, "Brick",true,prt.gun_8.part)
  856.  
  857.  
  858. CreatePart(prt, "gunbullet", "Really black", 0, 0, Vector3.new(0.325,0.2,0.325), CFrame.new(0,0,-0.42), CFrame.Angles(math.rad(90),0,0),false,false, "Cylinder",true,prt.gun_7.part)
  859.  
  860.  
  861. CreatePart(prt, "gunpointer", "Pastel Blue", 0, 0, Vector3.new(0.275,0.2,0.275), CFrame.new(0,-0.065,-0.39), CFrame.Angles(math.rad(90),0,0),false,false, "Cylinder",true,prt.gun_2.part)
  862.  
  863.  
  864. CreatePart(prt, "sword_1", swordHandleColor, 0, 0, Vector3.new(0.4,0.9,0.35), CFrame.new(0,2.715,0), CFrame.Angles(0,0,0),false,false, "Brick",true,prt.sheath_1.part)
  865.  
  866.  
  867. CreatePart(prt, "sword_2", "Really black", 0, 0, Vector3.new(0.5,2.135,0.25), CFrame.new(0,-2.68,0), CFrame.Angles(0,0,0),false,false, "Brick",true,prt.sword_1.part)
  868.  
  869.  
  870. CreatePart(prt, "sword_3", "Really black", 0, 0, Vector3.new(0.25,0.55,0.5), CFrame.new(0,-5.1,0), CFrame.Angles(0,math.rad(90),math.rad(180)),false,false,"Wedge",true,prt.sword_1.part)
  871.  
  872.  
  873. CreatePart(prt, "sword_4", "Really black", 0, 0, Vector3.new(0.9,0.3,0.55), CFrame.new(0,-0.4,0), CFrame.Angles(0,0,0),false, false,"Brick",true,prt.sword_1.part)
  874.  
  875.  
  876. CreatePart(prt, "sword_5", "Really black", 1, 0, Vector3.new(1.8,4.4,0.2), CFrame.new(0.7,0,0), CFrame.Angles(0,0,0),false, false,"Brick",false,prt.sword_2.part)
  877.  
  878.  
  879. CreatePart(prt, "sword_6", "Pastel Blue", 0, 0, Vector3.new(0.2,1.7,0.3), CFrame.new(0,-1.5,0), CFrame.Angles(0,0,0),false,false, "Brick",true,prt.sword_1.part)
  880.  
  881.  
  882. elseif prt.torso_1 ~= nil then prt.torso_1.weld.Part0 = part.ftor end
  883.  
  884.  
  885. suited = true
  886.  
  887.  
  888. processing = false
  889.  
  890.  
  891. return prt
  892.  
  893.  
  894. end -- +7
  895.  
  896.  
  897.  
  898.  
  899.  
  900. function Trail(val)
  901.  
  902.  
  903. if not _prt.sword_1.part then return end
  904.  
  905.  
  906. trail = val
  907.  
  908.  
  909. if trail then
  910.  
  911.  
  912. coroutine.wrap(function()
  913.  
  914.  
  915. local last = _prt.sword_3.part.CFrame.p
  916.  
  917.  
  918. while use and trail and _prt.sword_3.part ~= nil do wait(.02)
  919.  
  920.  
  921. local new = _prt.sword_3.part.CFrame.p
  922.  
  923.  
  924. local mag = (last - new).magnitude
  925.  
  926.  
  927. local pos = CFrame.new(last, new) * CFrame.Angles(math.rad(-90), 0, 0)
  928.  
  929.  
  930. local trl = Instance.new("Part")
  931.  
  932.  
  933. local msh = Instance.new("CylinderMesh", trl)
  934.  
  935.  
  936. trl.Name = "NSword_TRAIL"
  937.  
  938.  
  939. trl.Anchored = true
  940.  
  941.  
  942. trl.Locked = true
  943.  
  944.  
  945. trl.CanCollide = false
  946.  
  947.  
  948. trl.FormFactor = Enum.FormFactor.Custom
  949.  
  950.  
  951. trl.BrickColor = BrickColor.new("Really black")
  952.  
  953.  
  954. trl.Transparency = 0.3
  955.  
  956.  
  957. trl.Size = Vector3.new(0.2, mag, 0.2)
  958.  
  959.  
  960. msh.Scale = Vector3.new(1.8, 1, 1.8)
  961.  
  962.  
  963. trl.CFrame = pos * CFrame.new(0,mag/2,0)
  964.  
  965.  
  966. trl.Parent = game.Workspace
  967.  
  968.  
  969. coroutine.wrap(function() for i = trl.Transparency, 1, .05 do trl.Transparency = i msh.Scale = msh.Scale - Vector3.new(.15, 0, .15) wait(.02) end pcall(function() trl:Destroy() end) end)()
  970.  
  971.  
  972. last = _prt.sword_3.part.CFrame.p
  973.  
  974.  
  975. end
  976.  
  977.  
  978. end)()
  979.  
  980.  
  981. end
  982.  
  983.  
  984. end
  985.  
  986.  
  987.  
  988.  
  989.  
  990. function LightingGen(init,target,ran,delay,size,damage)
  991.  
  992.  
  993. local CL = function()
  994.  
  995.  
  996. local lght = Instance.new("Part")
  997.  
  998.  
  999. local msh = Instance.new("CylinderMesh", lght)
  1000.  
  1001.  
  1002. local size = size or .3
  1003.  
  1004.  
  1005. msh.Scale = Vector3.new(size,1,size)
  1006.  
  1007.  
  1008. lght.Name = "NSword_LIGHT"
  1009.  
  1010.  
  1011. lght.Anchored = true
  1012.  
  1013.  
  1014. lght.Locked = true
  1015.  
  1016.  
  1017. lght.CanCollide = false
  1018.  
  1019.  
  1020. lght.Reflectance = 0
  1021.  
  1022.  
  1023. lght.FormFactor = Enum.FormFactor.Custom
  1024.  
  1025.  
  1026. lght.BrickColor = BrickColor.new("Really black")
  1027.  
  1028.  
  1029. lght.Transparency = 0.5
  1030.  
  1031.  
  1032. lght.Parent = char
  1033.  
  1034.  
  1035. return lght
  1036.  
  1037.  
  1038. end
  1039.  
  1040.  
  1041. local delay, cPos = delay or .03
  1042.  
  1043.  
  1044. local rand = Vector3.new(math.random(-ran,ran)/10, math.random(-ran,ran)/10, math.random(-ran,ran)/10)
  1045.  
  1046.  
  1047. local mPos = (init - target).magnitude
  1048.  
  1049.  
  1050. local dLgt = math.random(1,5)
  1051.  
  1052.  
  1053. local dLgt = dLgt/10
  1054.  
  1055.  
  1056. local rVec = init + (target - init) * dLgt
  1057.  
  1058.  
  1059. local dVec = rVec - init
  1060.  
  1061.  
  1062. local gPos = CFrame.new(init, rVec + rand) * CFrame.Angles(math.rad(-90), 0, 0)
  1063.  
  1064.  
  1065. local rMag = (init - rVec + rand).magnitude
  1066.  
  1067.  
  1068. for i = dLgt, 1 - dLgt, dLgt do
  1069.  
  1070.  
  1071. local cPrt = CL()
  1072.  
  1073.  
  1074. cPrt.Size = Vector3.new(.2,rMag,.2)
  1075.  
  1076.  
  1077. cPrt.CFrame = gPos * CFrame.new(0,rMag/2,0)
  1078.  
  1079.  
  1080. cPos = gPos * CFrame.new(0,rMag,0)
  1081.  
  1082.  
  1083. print("TEST")
  1084.  
  1085.  
  1086. cPrt.Touched:connect(function(targ) print(targ:GetFullName())
  1087.  
  1088.  
  1089. if targ.Parent:FindFirstChild("Humanoid") or targ.Parent:FindFirstChild("Zombie") then
  1090.  
  1091.  
  1092. if game.Players:GetPlayerFromCharacter(targ.Parent) ~= player then
  1093.  
  1094.  
  1095. print(targ:GetFullName())
  1096.  
  1097.  
  1098. local humanoid = targ.Parent.Humanoid or targ.Parent.Zombie
  1099.  
  1100.  
  1101. local dmg = damage or 10
  1102.  
  1103.  
  1104. humanoid.Health = humanoid.Health - dmg
  1105.  
  1106.  
  1107. end
  1108.  
  1109.  
  1110. end
  1111.  
  1112.  
  1113. end)
  1114.  
  1115.  
  1116. coroutine.wrap(function() wait(delay) pcall(function() cPrt:Destroy() end) end)()
  1117.  
  1118.  
  1119. if i <= 1 - dLgt * 2 then
  1120.  
  1121.  
  1122. rVec = init + (target - init) * (i + dLgt)
  1123.  
  1124.  
  1125. rand = Vector3.new(math.random(-ran,ran)/10, math.random(-ran,ran)/10, math.random(-ran,ran)/10)
  1126.  
  1127.  
  1128. gPos = CFrame.new(cPos.p, rVec + rand) * CFrame.Angles(math.rad(-90), 0, 0)
  1129.  
  1130.  
  1131. rMag = (cPos.p - rVec + rand).magnitude
  1132.  
  1133.  
  1134. end
  1135.  
  1136.  
  1137. end
  1138.  
  1139.  
  1140. gPos = CFrame.new(cPos.p, target) * CFrame.Angles(math.rad(-90), 0, 0)
  1141.  
  1142.  
  1143. rMag = (cPos.p - target).magnitude
  1144.  
  1145.  
  1146. local cPrt = CL()
  1147.  
  1148.  
  1149. cPrt.Size = Vector3.new(.2,rMag,.2)
  1150.  
  1151.  
  1152. cPrt.CFrame = gPos * CFrame.new(0,rMag/2,0)
  1153.  
  1154.  
  1155. cPrt.Touched:connect(function(targ) print(targ:GetFullName())
  1156.  
  1157.  
  1158. if targ.Parent:FindFirstChild("Humanoid") or targ.Parent:FindFirstChild("Zombie") then
  1159.  
  1160.  
  1161. if game.Players:GetPlayerFromCharacter(targ.Parent) ~= player then
  1162.  
  1163.  
  1164. print(targ:GetFullName())
  1165.  
  1166.  
  1167. local humanoid = targ.Parent.Humanoid or targ.Parent.Zombie
  1168.  
  1169.  
  1170. local dmg = damage or 10
  1171.  
  1172.  
  1173. humanoid.Health = humanoid.Health - dmg
  1174.  
  1175.  
  1176. end
  1177.  
  1178.  
  1179. end
  1180.  
  1181.  
  1182. end)
  1183.  
  1184.  
  1185. coroutine.wrap(function() wait(delay) pcall(function() cPrt:Destroy() end) end)()
  1186.  
  1187.  
  1188. end
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194. function SwordEquip(force)
  1195.  
  1196.  
  1197. if processing and not force then return end
  1198.  
  1199.  
  1200. processing,cfs = true,true
  1201.  
  1202.  
  1203. if suited then
  1204.  
  1205.  
  1206. Bind("rsho")
  1207.  
  1208.  
  1209. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(90)), .05, true)
  1210.  
  1211.  
  1212. CF(_prt.sword_1.weld, CFrame.new(0,4.5,0), nil, .05, true)
  1213.  
  1214.  
  1215. for i = 0, 1, .05 do
  1216.  
  1217.  
  1218. _prt.sword_1.part.Transparency = i
  1219.  
  1220.  
  1221. _prt.sword_2.part.Transparency = i
  1222.  
  1223.  
  1224. _prt.sword_3.part.Transparency = i
  1225.  
  1226.  
  1227. _prt.sword_4.part.Transparency = i
  1228.  
  1229.  
  1230. _prt.sword_6.part.Transparency = i
  1231.  
  1232.  
  1233. wait(.015)
  1234.  
  1235.  
  1236. end
  1237.  
  1238.  
  1239. _prt.sword_1.part.Transparency = 1
  1240.  
  1241.  
  1242. _prt.sword_2.part.Transparency = 1
  1243.  
  1244.  
  1245. _prt.sword_3.part.Transparency = 1
  1246.  
  1247.  
  1248. _prt.sword_4.part.Transparency = 1
  1249.  
  1250.  
  1251. _prt.sword_6.part.Transparency = 1
  1252.  
  1253.  
  1254. _prt.sword_1.weld.Part0 = part.rarm
  1255.  
  1256.  
  1257. CF(_prt.sword_1.weld, CFrame.new(0, -1, -0.25), CFrame.Angles(0, math.rad(90), 0))
  1258.  
  1259.  
  1260. for i = 0, 1, .05 do
  1261.  
  1262.  
  1263. _prt.sword_1.part.Transparency = 1 - i
  1264.  
  1265.  
  1266. _prt.sword_2.part.Transparency = 1 - i
  1267.  
  1268.  
  1269. _prt.sword_3.part.Transparency = 1 - i
  1270.  
  1271.  
  1272. _prt.sword_4.part.Transparency = 1 - i
  1273.  
  1274.  
  1275. _prt.sword_6.part.Transparency = 1 - i
  1276.  
  1277.  
  1278. wait(.015)
  1279.  
  1280.  
  1281. end
  1282.  
  1283.  
  1284. _prt.sword_1.part.Transparency = 0
  1285.  
  1286.  
  1287. _prt.sword_2.part.Transparency = 0
  1288.  
  1289.  
  1290. _prt.sword_3.part.Transparency = 0
  1291.  
  1292.  
  1293. _prt.sword_4.part.Transparency = 0
  1294.  
  1295.  
  1296. Bind("lsho")
  1297.  
  1298.  
  1299. huma.WalkSpeed = 30
  1300.  
  1301.  
  1302. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, math.rad(-5)), .07, true)
  1303.  
  1304.  
  1305. CF(_prt.sword_1.weld, nil, CFrame.Angles(math.rad(90), math.rad(90), 0), .07, true)
  1306.  
  1307.  
  1308. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(5)), .07)
  1309.  
  1310.  
  1311. end
  1312.  
  1313.  
  1314. mode,processing,cfs = 1, false, false
  1315.  
  1316.  
  1317. Walk()
  1318.  
  1319.  
  1320. end
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326. function SwordUnequip(force)
  1327.  
  1328.  
  1329. if processing and not force then return end
  1330.  
  1331.  
  1332. processing,cfs = true,true
  1333.  
  1334.  
  1335. if suited then
  1336.  
  1337.  
  1338. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .2, true)
  1339.  
  1340.  
  1341. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .2, true)
  1342.  
  1343.  
  1344. CF(_jnt.lsho, CFrame.new(-1.5,0.5,0), CFrame.Angles(0, 0, math.rad(-5)), .2, true)
  1345.  
  1346.  
  1347. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(100), math.rad(90), 0), .07)
  1348.  
  1349.  
  1350. Trail(true)
  1351.  
  1352.  
  1353. CF(_prt.sword_1.weld, nil, CFrame.Angles(0, math.rad(90), 0), .15, true)
  1354.  
  1355.  
  1356. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(90)), .15)
  1357.  
  1358.  
  1359. Trail(false)
  1360.  
  1361.  
  1362. for i = 0, 1, .05 do
  1363.  
  1364.  
  1365. _prt.sword_1.part.Transparency = i
  1366.  
  1367.  
  1368. _prt.sword_2.part.Transparency = i
  1369.  
  1370.  
  1371. _prt.sword_3.part.Transparency = i
  1372.  
  1373.  
  1374. _prt.sword_4.part.Transparency = i
  1375.  
  1376.  
  1377. _prt.sword_6.part.Transparency = i
  1378.  
  1379.  
  1380. wait(.015)
  1381.  
  1382.  
  1383. end
  1384.  
  1385.  
  1386. _prt.sword_1.part.Transparency = 1
  1387.  
  1388.  
  1389. _prt.sword_2.part.Transparency = 1
  1390.  
  1391.  
  1392. _prt.sword_3.part.Transparency = 1
  1393.  
  1394.  
  1395. _prt.sword_4.part.Transparency = 1
  1396.  
  1397.  
  1398. _prt.sword_6.part.Transparency = 1
  1399.  
  1400.  
  1401. _prt.sword_1.weld.Part0 = _prt.sheath_1.part
  1402.  
  1403.  
  1404. CF(_prt.sword_1.weld, CFrame.new(0, 4.5, 0), CFrame.Angles(0, 0, 0))
  1405.  
  1406.  
  1407. CF(_prt.sword_1.weld, CFrame.new(0,2.715,0), CFrame.Angles(0, 0, 0), .05, true)
  1408.  
  1409.  
  1410. for i = 0, 1, .05 do
  1411.  
  1412.  
  1413. _prt.sword_1.part.Transparency = 1 - i
  1414.  
  1415.  
  1416. _prt.sword_2.part.Transparency = 1 - i
  1417.  
  1418.  
  1419. _prt.sword_3.part.Transparency = 1 - i
  1420.  
  1421.  
  1422. _prt.sword_4.part.Transparency = 1 - i
  1423.  
  1424.  
  1425. _prt.sword_6.part.Transparency = 1 - i
  1426.  
  1427.  
  1428. wait(.015)
  1429.  
  1430.  
  1431. end
  1432.  
  1433.  
  1434. _prt.sword_1.part.Transparency = 0
  1435.  
  1436.  
  1437. _prt.sword_2.part.Transparency = 0
  1438.  
  1439.  
  1440. _prt.sword_3.part.Transparency = 0
  1441.  
  1442.  
  1443. _prt.sword_4.part.Transparency = 0
  1444.  
  1445.  
  1446. huma.WalkSpeed = defaultWalkspeed
  1447.  
  1448.  
  1449. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, 0), .07, true)
  1450.  
  1451.  
  1452. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, 0), .07)
  1453.  
  1454.  
  1455. Release("rsho")
  1456.  
  1457.  
  1458. Release("lsho")
  1459.  
  1460.  
  1461. end
  1462.  
  1463.  
  1464. mode,processing,cfs = 0, false, false
  1465.  
  1466.  
  1467. end
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473. function GunEquip(force)
  1474.  
  1475.  
  1476. if processing and not force then return end
  1477.  
  1478.  
  1479. processing,cfs = true,true
  1480.  
  1481.  
  1482. if suited then
  1483.  
  1484.  
  1485. Bind("rsho")
  1486.  
  1487.  
  1488. CF(_jnt.rsho, CFrame.new(1.5,0.9,0), CFrame.Angles(math.rad(-20), 0, 0), 0.15)
  1489.  
  1490.  
  1491. gunTakePos = _prt.gun_1.part.CFrame:inverse() * part.rarm.CFrame
  1492.  
  1493.  
  1494. _prt.gun_1.weld.Part0 = part.rarm
  1495.  
  1496.  
  1497. _prt.gun_1.weld.C0 = gunTakePos:inverse()
  1498.  
  1499.  
  1500. CF(_jnt.rsho, CFrame.new(1.5,1.7,0), CFrame.Angles(math.rad(-20), 0, math.rad(2)), 0.15)
  1501.  
  1502.  
  1503. Bind("lsho")
  1504.  
  1505.  
  1506. CF(_jnt.lsho, nil, CFrame.Angles(math.rad(-5), 0, math.rad(-5)), 0.08, true)
  1507.  
  1508.  
  1509. CF(_jnt.rsho, CFrame.new(1.5,0.5,0), CFrame.Angles(math.rad(-10), 0, math.rad(10)), 0.08, true)
  1510.  
  1511.  
  1512. CF(_prt.gun_1.weld, _prt.gun_1.weld.C0 * CFrame.new(0.25,-0.1,0.1), nil, 0.08)
  1513.  
  1514.  
  1515. end
  1516.  
  1517.  
  1518. mode,processing,cfs = 2, false, false
  1519.  
  1520.  
  1521. Walk()
  1522.  
  1523.  
  1524. end
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530. function GunUnequip(force)
  1531.  
  1532.  
  1533. if processing and not force then return end
  1534.  
  1535.  
  1536. processing = true
  1537.  
  1538.  
  1539. if suited then
  1540.  
  1541.  
  1542. if not gs and gtarget then gtarget = false repeat wait(.015) until gs end
  1543.  
  1544.  
  1545. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .2, true)
  1546.  
  1547.  
  1548. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .2, true)
  1549.  
  1550.  
  1551. CF(_jnt.lsho, CFrame.new(-1.5,0.5,0), CFrame.Angles(0, 0, math.rad(-5)), .2, true)
  1552.  
  1553.  
  1554. CF(_prt.gun_1.weld, gunTakePos:inverse(), (gunTakePos - gunTakePos.p):inverse(), 0.15, true)
  1555.  
  1556.  
  1557. CF(_jnt.rsho, CFrame.new(1.5,1.7,0), CFrame.Angles(math.rad(-20), 0, math.rad(2)), 0.15)
  1558.  
  1559.  
  1560. CF(_jnt.rsho, CFrame.new(1.5,0.9,0), CFrame.Angles(math.rad(-20), 0, 0), 0.15)
  1561.  
  1562.  
  1563. _prt.gun_1.weld.Part0 = _prt.gunsheath_1.part
  1564.  
  1565.  
  1566. CF(_prt.gun_1.weld, CFrame.new(0,0.6,0.15), CFrame.Angles(math.rad(-105),0,0))
  1567.  
  1568.  
  1569. CF(_jnt.rsho, CFrame.new(1.5,0.5,0), CFrame.Angles(0, 0, 0), 0.08)
  1570.  
  1571.  
  1572. Release("rsho")
  1573.  
  1574.  
  1575. Release("lsho")
  1576.  
  1577.  
  1578. end
  1579.  
  1580.  
  1581. mode,processing,cfs = 0, false, false
  1582.  
  1583.  
  1584. end
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590. function LightEquip(force)
  1591.  
  1592.  
  1593. if processing and not force then return end
  1594.  
  1595.  
  1596. processing,cfs = true,true
  1597.  
  1598.  
  1599. if suited then
  1600.  
  1601.  
  1602. Bind("rsho")
  1603.  
  1604.  
  1605. Bind("lsho")
  1606.  
  1607.  
  1608. huma.WalkSpeed = 30
  1609.  
  1610.  
  1611. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, math.rad(-5)), .07, true)
  1612.  
  1613.  
  1614. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(5)), .07)
  1615.  
  1616.  
  1617. end
  1618.  
  1619.  
  1620. mode,processing,cfs = 3, false, false
  1621.  
  1622.  
  1623. Walk()
  1624.  
  1625.  
  1626. end
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632. function LightUnequip(force)
  1633.  
  1634.  
  1635. if processing and not force then return end
  1636.  
  1637.  
  1638. processing,cfs = true,true
  1639.  
  1640.  
  1641. if suited then
  1642.  
  1643.  
  1644. huma.WalkSpeed = defaultWalkspeed
  1645.  
  1646.  
  1647. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .2, true)
  1648.  
  1649.  
  1650. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .2, true)
  1651.  
  1652.  
  1653. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, 0), .07, true)
  1654.  
  1655.  
  1656. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, 0), .07)
  1657.  
  1658.  
  1659. Release("rsho")
  1660.  
  1661.  
  1662. Release("lsho")
  1663.  
  1664.  
  1665. end
  1666.  
  1667.  
  1668. mode,processing,cfs = 0, false, false
  1669.  
  1670.  
  1671. Walk()
  1672.  
  1673.  
  1674. end
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680. function Walk()
  1681.  
  1682.  
  1683. if use then
  1684.  
  1685.  
  1686. while processing or animate do wait(.015) end
  1687.  
  1688.  
  1689. if w or a or s or d then
  1690.  
  1691.  
  1692. animate = true
  1693.  
  1694.  
  1695. if mode == 1 then
  1696.  
  1697.  
  1698. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(65), 0), .15, true, true)
  1699.  
  1700.  
  1701. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(-65), 0), .15, true, true)
  1702.  
  1703.  
  1704. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(-20), 0, math.rad(70)), .15, true, true)
  1705.  
  1706.  
  1707. CF(_jnt.lsho, nil, CFrame.Angles(math.rad(30), math.rad(20), math.rad(5)), .15, false, true)
  1708.  
  1709.  
  1710. elseif mode == 2 then
  1711.  
  1712.  
  1713. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(65), 0), .15, true, true)
  1714.  
  1715.  
  1716. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(-65), 0), .15, true, true)
  1717.  
  1718.  
  1719. CF(_jnt.rsho, CFrame.new(1,0.4,-0.2), CFrame.Angles(math.rad(35), math.rad(20), math.rad(-40)), .15, true, true)
  1720.  
  1721.  
  1722. CF(_jnt.lsho, CFrame.new(-1,0.5,0), CFrame.Angles(math.rad(60), math.rad(-20), math.rad(35)), .15, false, true)
  1723.  
  1724.  
  1725. elseif mode == 3 then
  1726.  
  1727.  
  1728. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(-35), 0, math.rad(10)), .15, true, true)
  1729.  
  1730.  
  1731. CF(_jnt.lsho, nil, CFrame.Angles(math.rad(-35), 0, math.rad(-10)), .15, false, true)
  1732.  
  1733.  
  1734. end
  1735.  
  1736.  
  1737. animate = false
  1738.  
  1739.  
  1740. end
  1741.  
  1742.  
  1743. end
  1744.  
  1745.  
  1746. end
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752. function Stand()
  1753.  
  1754.  
  1755. if use then
  1756.  
  1757.  
  1758. while processing or animate do wait(.015) end
  1759.  
  1760.  
  1761. if not w and not a and not s and not d and not jumping then
  1762.  
  1763.  
  1764. animate = true
  1765.  
  1766.  
  1767. if mode ~= 0 then
  1768.  
  1769.  
  1770. CF(_jnt.neck, CFrame.new(0,1,0), CFrame.Angles(0, 0, 0), .2, true, true)
  1771.  
  1772.  
  1773. CF(_jnt.tors, CFrame.new(0,0,0), CFrame.Angles(0, 0, 0), .2, true, true)
  1774.  
  1775.  
  1776. CF(_jnt.rsho, CFrame.new(1.5,0.5,0), CFrame.Angles(0, 0, math.rad(5)), .2, true, true)
  1777.  
  1778.  
  1779. CF(_jnt.lsho, CFrame.new(-1.5,0.5,0), CFrame.Angles(0, 0, math.rad(-5)), .2, false, true)
  1780.  
  1781.  
  1782. end
  1783.  
  1784.  
  1785. animate = false
  1786.  
  1787.  
  1788. end
  1789.  
  1790.  
  1791. end
  1792.  
  1793.  
  1794. end
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800. function FAC(num,res)
  1801.  
  1802.  
  1803. if (math.floor(num) <= res + tol and math.floor(num) >= res - tol) or (math.ceil(num) <= res + tol and math.ceil(num) >= res - tol) then return true
  1804.  
  1805.  
  1806. else return false end
  1807.  
  1808.  
  1809. end
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815. function SliceAndKill(p)
  1816.  
  1817.  
  1818. coroutine.wrap(function()
  1819.  
  1820.  
  1821. if p.Name ~= "__NSCUTPART" and p.Name ~= "Base" and p.Name ~= "NSword_TRAIL" and p.Name ~= "NSword_LIGHT" then
  1822.  
  1823.  
  1824. if p.Parent ~= char and p.Parent ~= _mdl and not p.Parent:IsA("Hat") then
  1825.  
  1826.  
  1827. local pX,pY,pZ = p.CFrame:toEulerAnglesXYZ()
  1828.  
  1829.  
  1830. if (FAC(pX,0) or FAC(pX,180)) and (FAC(pZ,0) or FAC(pZ,180)) and p.Size.y < 0.4 then return end
  1831.  
  1832.  
  1833. pX = math.deg(pX) if pX < 0 then pX = pX * (-1) else pX = math.floor(pX) end
  1834.  
  1835.  
  1836. pZ = math.deg(pZ) if pZ < 0 then pZ = pZ * (-1) else pZ = math.floor(pZ) end
  1837.  
  1838.  
  1839. if not FAC(pX,0) and not FAC(pX,90) and not FAC(pX,180) then return end
  1840.  
  1841.  
  1842. if not FAC(pZ,0) and not FAC(pZ,90) and not FAC(pZ,180) then return end
  1843.  
  1844.  
  1845. if (not FAC(pX,0) and not FAC(pZ,0)) or (not FAC(pX,180) and not FAC(pZ,180)) then
  1846.  
  1847.  
  1848. if FAC(pX,0) and FAC(pZ,180) then
  1849.  
  1850.  
  1851. p.CFrame = p.CFrame * CFrame.Angles(0, 0, math.pi)
  1852.  
  1853.  
  1854. elseif FAC(pX,180) and FAC(pZ,0) then
  1855.  
  1856.  
  1857. p.CFrame = p.CFrame * CFrame.Angles(math.pi, 0, 0)
  1858.  
  1859.  
  1860. elseif FAC(pX,90) and (FAC(pZ,0) or FAC(pZ,180)) then
  1861.  
  1862.  
  1863. local rPart = p:Clone()
  1864.  
  1865.  
  1866. rPart.Anchored = true
  1867.  
  1868.  
  1869. rPart.Size = Vector3.new(p.Size.z,p.Size.x,p.Size.y)
  1870.  
  1871.  
  1872. rPart.CFrame = CFrame.new(p.CFrame.x, p.CFrame.y, p.CFrame.z) * CFrame.Angles(0, pY, 0)
  1873.  
  1874.  
  1875. if not p.Anchored then rPart.Anchored = false end
  1876.  
  1877.  
  1878. rPart.Parent = p.Parent
  1879.  
  1880.  
  1881. p:Remove()
  1882.  
  1883.  
  1884. p = rPart
  1885.  
  1886.  
  1887. elseif FAC(pX,90) and FAC(pZ,90) then
  1888.  
  1889.  
  1890. local rPart = p:Clone()
  1891.  
  1892.  
  1893. rPart.Anchored = true
  1894.  
  1895.  
  1896. rPart.Size = Vector3.new(p.Size.y,p.Size.z,p.Size.x)
  1897.  
  1898.  
  1899. rPart.CFrame = CFrame.new(p.CFrame.x, p.CFrame.y, p.CFrame.z) * CFrame.Angles(0, pY, 0)
  1900.  
  1901.  
  1902. if not p.Anchored then rPart.Anchored = false end
  1903.  
  1904.  
  1905. rPart.Parent = p.Parent
  1906.  
  1907.  
  1908. p:Remove()
  1909.  
  1910.  
  1911. p = rPart
  1912.  
  1913.  
  1914. elseif (FAC(pX,0) or FAC(pX,180)) and FAC(pZ,90) then
  1915.  
  1916.  
  1917. local rPart = p:Clone()
  1918.  
  1919.  
  1920. rPart.Anchored = true
  1921.  
  1922.  
  1923. rPart.Size = Vector3.new(p.Size.y,p.Size.x,p.Size.z)
  1924.  
  1925.  
  1926. rPart.CFrame = CFrame.new(p.CFrame.x, p.CFrame.y, p.CFrame.z) * CFrame.Angles(0, pY, 0)
  1927.  
  1928.  
  1929. if not p.Anchored then rPart.Anchored = false end
  1930.  
  1931.  
  1932. rPart.Parent = p.Parent
  1933.  
  1934.  
  1935. p:Remove()
  1936.  
  1937.  
  1938. p = rPart
  1939.  
  1940.  
  1941. end
  1942.  
  1943.  
  1944. end
  1945.  
  1946.  
  1947. local s = _prt.sword_3.part
  1948.  
  1949.  
  1950. local pYPos = p.CFrame.p.y - (p.Size.y/2)
  1951.  
  1952.  
  1953. local sYPos = s.CFrame.p.y
  1954.  
  1955.  
  1956. if sYPos <= pYPos or sYPos >= (pYPos + p.Size.y) then return end
  1957.  
  1958.  
  1959. local x, y, z = p.CFrame:toEulerAnglesXYZ()
  1960.  
  1961.  
  1962. local c1 = p:Clone()
  1963.  
  1964.  
  1965. local c2 = p:Clone()
  1966.  
  1967.  
  1968. local CC,TR = p.CanCollide, p.Transparency
  1969.  
  1970.  
  1971. local mat = p.Material
  1972.  
  1973.  
  1974. c1:BreakJoints()
  1975.  
  1976.  
  1977. c2:BreakJoints()
  1978.  
  1979.  
  1980. if CC then
  1981.  
  1982.  
  1983. c1.CanCollide = true
  1984.  
  1985.  
  1986. c2.CanCollide = true
  1987.  
  1988.  
  1989. c1.Anchored = false
  1990.  
  1991.  
  1992. c2.Anchored = false
  1993.  
  1994.  
  1995. else
  1996.  
  1997.  
  1998. c1.CanCollide = false
  1999.  
  2000.  
  2001. c2.CanCollide = false
  2002.  
  2003.  
  2004. c1.Anchored = true
  2005.  
  2006.  
  2007. c2.Anchored = true
  2008.  
  2009.  
  2010. end
  2011.  
  2012.  
  2013. c1.FormFactor = Enum.FormFactor.Custom
  2014.  
  2015.  
  2016. c2.FormFactor = Enum.FormFactor.Custom
  2017.  
  2018.  
  2019. c1.Material = Enum.Material.Plastic
  2020.  
  2021.  
  2022. c2.Material = Enum.Material.Plastic
  2023.  
  2024.  
  2025. c1.Size = Vector3.new(p.Size.x,sYPos-pYPos,p.Size.z)
  2026.  
  2027.  
  2028. c2.Size = Vector3.new(p.Size.x,c2.Size.y-(sYPos-pYPos),p.Size.z)
  2029.  
  2030.  
  2031. c1.CFrame = p.CFrame * CFrame.new(0, -c2.Size.y/2,0)
  2032.  
  2033.  
  2034. c2.CFrame = p.CFrame * CFrame.new(0, c1.Size.y/2,0)
  2035.  
  2036.  
  2037. c1.Name = "__NSCUTPART"
  2038.  
  2039.  
  2040. c2.Name = "__NSCUTPART"
  2041.  
  2042.  
  2043. c1.Reflectance = 0.5
  2044.  
  2045.  
  2046. c2.Reflectance = 0.5
  2047.  
  2048.  
  2049. c1.Parent = game.Workspace
  2050.  
  2051.  
  2052. c2.Parent = game.Workspace
  2053.  
  2054.  
  2055. p:Remove()
  2056.  
  2057.  
  2058. for i = 1, 10, 1 do wait(0.02)
  2059.  
  2060.  
  2061. c1.Reflectance = c1.Reflectance - 1/10
  2062.  
  2063.  
  2064. c2.Reflectance = c2.Reflectance - 1/10
  2065.  
  2066.  
  2067. end
  2068.  
  2069.  
  2070. if not CC then
  2071.  
  2072.  
  2073. coroutine.wrap(function()
  2074.  
  2075.  
  2076. for i = TR, 1, 0.05 do wait(0.02)
  2077.  
  2078.  
  2079. c1.Transparency = i
  2080.  
  2081.  
  2082. c2.Transparency = i
  2083.  
  2084.  
  2085. end pcall(function() c1:Remove() c2:Remove() end)
  2086.  
  2087.  
  2088. end)()
  2089.  
  2090.  
  2091. end
  2092.  
  2093.  
  2094. c1.Reflectance = 0
  2095.  
  2096.  
  2097. c2.Reflectance = 0
  2098.  
  2099.  
  2100. c1.Material = mat
  2101.  
  2102.  
  2103. c2.Material = mat
  2104.  
  2105.  
  2106. if CC then
  2107.  
  2108.  
  2109. c1.Name = "_NSCUTPART"
  2110.  
  2111.  
  2112. c2.Name = "_NSCUTPART"
  2113.  
  2114.  
  2115. end
  2116.  
  2117.  
  2118. end
  2119.  
  2120.  
  2121. end
  2122.  
  2123.  
  2124. end)()
  2125.  
  2126.  
  2127. end
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133. function Hit(val)
  2134.  
  2135.  
  2136. hit = val
  2137.  
  2138.  
  2139. if hit then
  2140.  
  2141.  
  2142. coroutine.wrap(function()
  2143.  
  2144.  
  2145. local event = _prt.sword_5.part.Touched:connect(SliceAndKill)
  2146.  
  2147.  
  2148. while use and hit and _prt.sword_2 ~= nil and _prt.sword_3 ~= nil and _prt.sword_5 ~= nil do wait() end
  2149.  
  2150.  
  2151. event:disconnect()
  2152.  
  2153.  
  2154. end)()
  2155.  
  2156.  
  2157. end
  2158.  
  2159.  
  2160. end
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166. function GunTarget()
  2167.  
  2168.  
  2169. if not ms then return end
  2170.  
  2171.  
  2172. if processing and not gtarget then return end
  2173.  
  2174.  
  2175. processing,cfs,gs = true, true, false
  2176.  
  2177.  
  2178. if not gtarget then gtarget = true
  2179.  
  2180.  
  2181. huma.WalkSpeed = 5
  2182.  
  2183.  
  2184. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(-90), 0), .1, true)
  2185.  
  2186.  
  2187. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(90), 0), .1, true)
  2188.  
  2189.  
  2190. CF(_jnt.lsho, CFrame.new(-1.5,0.5,0), CFrame.Angles(math.rad(-5), 0, math.rad(-5)), .1, true)
  2191.  
  2192.  
  2193. CF(_jnt.rsho, CFrame.new(1.5,0.5,0), CFrame.Angles(0, 0, math.rad(90)), .1, true)
  2194.  
  2195.  
  2196. pcall(function() bGyro.Parent = part.tors end)
  2197.  
  2198.  
  2199. repeat wait(.015)
  2200.  
  2201.  
  2202. if ms and not disconnectRequest then
  2203.  
  2204.  
  2205. bGyro.cframe = CFrame.new(part.tors.CFrame.p, Vector3.new(ms.Hit.p.X, part.tors.CFrame.p.Y, ms.Hit.p.Z))
  2206.  
  2207.  
  2208. _jnt.rsho.C0 = CFrame.new(Vector3.new(1.5,0.5,0), ms.Hit.p) * CFrame.Angles(0, 0, math.rad(90))
  2209.  
  2210.  
  2211. end
  2212.  
  2213.  
  2214. until not gtarget or not ms gtarget = false
  2215.  
  2216.  
  2217. huma.WalkSpeed = defaultWalkspeed
  2218.  
  2219.  
  2220. pcall(function() bGyro.Parent = nil end)
  2221.  
  2222.  
  2223. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .1, true)
  2224.  
  2225.  
  2226. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .1, true)
  2227.  
  2228.  
  2229. CF(_jnt.lsho, CFrame.new(-1.5,0.5,0), CFrame.Angles(0, 0, math.rad(-5)), .1, true)
  2230.  
  2231.  
  2232. CF(_jnt.rsho, CFrame.new(1.5,0.5,0), CFrame.Angles(0, 0, math.rad(5)), .1)
  2233.  
  2234.  
  2235. end
  2236.  
  2237.  
  2238. processing,cfs,gs = false, false, true
  2239.  
  2240.  
  2241. if not gtarget and not disconnectRequest then Walk() end
  2242.  
  2243.  
  2244. end
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250. function OnKeyDown(key) key = key:lower()
  2251.  
  2252.  
  2253. if bindKeyDown then
  2254.  
  2255.  
  2256. if key == "w" then w = true Walk() end
  2257.  
  2258.  
  2259. if key == "a" then a = true Walk() end
  2260.  
  2261.  
  2262. if key == "s" then s = true Walk() end
  2263.  
  2264.  
  2265. if key == "d" then d = true Walk() end
  2266.  
  2267.  
  2268. if key == "c" then if mode == 0 then SwordEquip() elseif mode == 1 then SwordUnequip() elseif mode == 2 then GunUnequip() SwordEquip() elseif mode == 3 then LightUnequip() SwordEquip() end end
  2269.  
  2270.  
  2271. if key == "v" then if mode == 0 then GunEquip() elseif mode == 2 then GunUnequip() elseif mode == 1 then SwordUnequip() GunEquip() elseif mode == 3 then LightUnequip() GunEquip() end end
  2272.  
  2273.  
  2274. if key == "x" then if mode == 0 then LightEquip() elseif mode == 3 then LightUnequip() elseif mode == 1 then SwordUnequip() LightEquip() elseif mode == 2 then GunUnequip() LightEquip() end end
  2275.  
  2276.  
  2277. if key == "e" then if mode == 2 and not gtarget then GunTarget() else gtarget = false end end
  2278.  
  2279.  
  2280. end
  2281.  
  2282.  
  2283. end
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289. function OnKeyUp(key) key = key:lower()
  2290.  
  2291.  
  2292. if bindKeyUp then
  2293.  
  2294.  
  2295. if key == "w" then w = false if not a and not s and not d then Stand() end end
  2296.  
  2297.  
  2298. if key == "a" then a = false if not w and not s and not d then Stand() end end
  2299.  
  2300.  
  2301. if key == "s" then s = false if not w and not a and not d then Stand() end end
  2302.  
  2303.  
  2304. if key == "d" then d = false if not w and not a and not s then Stand() end end
  2305.  
  2306.  
  2307. end
  2308.  
  2309.  
  2310. end
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316. function OnButton1Down() buttonDown = true combo = combo + 1
  2317.  
  2318.  
  2319. if not ms then end
  2320.  
  2321.  
  2322. if processing and not gtarget then return end
  2323.  
  2324.  
  2325. processing,cfs = true, true
  2326.  
  2327.  
  2328. if mode == 1 then
  2329.  
  2330.  
  2331. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(40), 0), .2, true)
  2332.  
  2333.  
  2334. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(-40), 0), .2, true)
  2335.  
  2336.  
  2337. CF(_prt.sword_1.weld, nil, CFrame.Angles(0, math.rad(-90), 0), .2, true)
  2338.  
  2339.  
  2340. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, math.rad(-10)), .2, true)
  2341.  
  2342.  
  2343. CF(_jnt.rsho, nil, CFrame.Angles(0, math.rad(-20), math.rad(90)), .2)
  2344.  
  2345.  
  2346. pcall(function() bPos.position = Vector3.new(0,part.tors.CFrame.p.Y,0) bPos.Parent = part.tors end)
  2347.  
  2348.  
  2349. Trail(true)
  2350.  
  2351.  
  2352. Hit(true)
  2353.  
  2354.  
  2355. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(-50), 0), .15, true)
  2356.  
  2357.  
  2358. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(50), 0), .15, true)
  2359.  
  2360.  
  2361. CF(_prt.sword_1.weld, nil, CFrame.Angles(math.rad(55), math.rad(-90), 0), .15, true)
  2362.  
  2363.  
  2364. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(90), math.rad(90), 0), .15)
  2365.  
  2366.  
  2367. Trail(false)
  2368.  
  2369.  
  2370. Hit(false)
  2371.  
  2372.  
  2373. if combo > 1 then combo = 2
  2374.  
  2375.  
  2376. if buttonDown then pcall(function() bPos.Parent = nil end) repeat wait(0.015) LightingGen(_prt.sword_4.part.CFrame.p,_prt.sword_3.part.CFrame.p,3,.05) until not buttonDown end
  2377.  
  2378.  
  2379. CF(_prt.sword_1.weld, nil, CFrame.Angles(math.rad(55), math.rad(90),0), .3)
  2380.  
  2381.  
  2382. Trail(true)
  2383.  
  2384.  
  2385. Hit(true)
  2386.  
  2387.  
  2388. CF(_prt.sword_1.weld, nil, CFrame.Angles(0, math.rad(90), 0), .15, true)
  2389.  
  2390.  
  2391. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(40), 0), .12, true)
  2392.  
  2393.  
  2394. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(-40), 0), .15, true)
  2395.  
  2396.  
  2397. CF(_jnt.rsho, nil, CFrame.Angles(0, math.rad(-20), math.rad(90)), .15)
  2398.  
  2399.  
  2400. pcall(function() bPos.Parent = nil end)
  2401.  
  2402.  
  2403. Trail(false)
  2404.  
  2405.  
  2406. Hit(false)
  2407.  
  2408.  
  2409. CF(_prt.sword_1.weld, nil, CFrame.Angles(math.rad(90), math.rad(90), 0), .15, true)
  2410.  
  2411.  
  2412. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .15, true)
  2413.  
  2414.  
  2415. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .15, true)
  2416.  
  2417.  
  2418. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(-10), 0, 0), .15)
  2419.  
  2420.  
  2421. else
  2422.  
  2423.  
  2424. pcall(function() bPos.Parent = nil end)
  2425.  
  2426.  
  2427. CF(_prt.sword_1.weld, nil, CFrame.Angles(math.rad(90), math.rad(90), 0), .15, true)
  2428.  
  2429.  
  2430. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .15, true)
  2431.  
  2432.  
  2433. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .15, true)
  2434.  
  2435.  
  2436. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(5)), .15)
  2437.  
  2438.  
  2439. end
  2440.  
  2441.  
  2442. elseif mode == 2 then
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448. --> GUN <--
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454. elseif mode == 3 then
  2455.  
  2456.  
  2457. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(90), 0), .1, true)
  2458.  
  2459.  
  2460. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(-90), 0), .1, true)
  2461.  
  2462.  
  2463. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(-20), 0, math.rad(20)), .1, true)
  2464.  
  2465.  
  2466. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, math.rad(-90)), .1)
  2467.  
  2468.  
  2469. while ms and buttonDown and not disconnectRequest do wait(.015)
  2470.  
  2471.  
  2472. pcall(function() bGyro.Parent = part.tors end)
  2473.  
  2474.  
  2475. if ms and not disconnectRequest and huma.Health ~= 0 then
  2476.  
  2477.  
  2478. bGyro.cframe = CFrame.new(part.tors.CFrame.p, Vector3.new(ms.Hit.p.X, part.tors.CFrame.p.Y, ms.Hit.p.Z))
  2479.  
  2480.  
  2481. if ms.Target then
  2482.  
  2483.  
  2484. LightingGen((part.larm.CFrame * CFrame.new(0,-1,0)).p, ms.Hit.p, 10, .05, .5)
  2485.  
  2486.  
  2487. end
  2488.  
  2489.  
  2490. end
  2491.  
  2492.  
  2493. end
  2494.  
  2495.  
  2496. pcall(function() bGyro.Parent = nil end)
  2497.  
  2498.  
  2499. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .1, true)
  2500.  
  2501.  
  2502. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .1, true)
  2503.  
  2504.  
  2505. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, math.rad(-5)), .1, true)
  2506.  
  2507.  
  2508. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(5)), .1)
  2509.  
  2510.  
  2511. end
  2512.  
  2513.  
  2514. combo = 0
  2515.  
  2516.  
  2517. if not gtarget then processing, cfs = false, false end
  2518.  
  2519.  
  2520. Walk()
  2521.  
  2522.  
  2523. end
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529. function Disconnection() disconnectRequest = true ms = nil
  2530.  
  2531.  
  2532. while processing do wait(.015) end
  2533.  
  2534.  
  2535. w,a,s,d = false,false,false,false
  2536.  
  2537.  
  2538. processing = true
  2539.  
  2540.  
  2541. if use then
  2542.  
  2543.  
  2544. Hit(false)
  2545.  
  2546.  
  2547. bindKeyUp, bindKeyDown = false, false
  2548.  
  2549.  
  2550. if mode == 1 then SwordUnequip(true) end
  2551.  
  2552.  
  2553. if mode == 2 then GunUnequip(true) end
  2554.  
  2555.  
  2556. if mode == 3 then LightUnequip(true) end
  2557.  
  2558.  
  2559. use = false
  2560.  
  2561.  
  2562. huma.WalkSpeed = defaultWalkspeed
  2563.  
  2564.  
  2565. gunTakePos = nil
  2566.  
  2567.  
  2568. w,a,s,d = false,false,false,false
  2569.  
  2570.  
  2571. w2,a2,s2,d2 = false,false,false,false
  2572.  
  2573.  
  2574. _prt.torso_1.weld.Part0 = part.tors
  2575.  
  2576.  
  2577. if delete then part.tors.Transparency = 0 end
  2578.  
  2579.  
  2580. for i,mtor in pairs (motor) do
  2581.  
  2582.  
  2583. pcall(function() mtor.Part0 = part.tors end)
  2584.  
  2585.  
  2586. end
  2587.  
  2588.  
  2589. if _jnt ~= nil then
  2590.  
  2591.  
  2592. for i,weld in pairs(_jnt) do
  2593.  
  2594.  
  2595. pcall(function() weld:Remove() end)
  2596.  
  2597.  
  2598. end
  2599.  
  2600.  
  2601. end
  2602.  
  2603.  
  2604. if part.ftor ~= nil then part.ftor:Remove() end
  2605.  
  2606.  
  2607. if delete then
  2608.  
  2609.  
  2610. if shirt ~= nil then shirt.Parent = char end
  2611.  
  2612.  
  2613. if _mdl ~= nil then _mdl:Remove() end
  2614.  
  2615.  
  2616. suited = false
  2617.  
  2618.  
  2619. model = false
  2620.  
  2621.  
  2622. prt = {}
  2623.  
  2624.  
  2625. end
  2626.  
  2627.  
  2628. _jnt,_mdl,_prt = nil, nil, nil
  2629.  
  2630.  
  2631. _kup:disconnect()
  2632.  
  2633.  
  2634. _kdn:disconnect()
  2635.  
  2636.  
  2637. _mse:disconnect()
  2638.  
  2639.  
  2640. _ms2:disconnect()
  2641.  
  2642.  
  2643. combo = 0
  2644.  
  2645.  
  2646. _kup,_kdn,_mse,_ms2 = nil,nil,nil,nil
  2647.  
  2648.  
  2649. initialized = false
  2650.  
  2651.  
  2652. end
  2653.  
  2654.  
  2655. disconnectRequest = false
  2656.  
  2657.  
  2658. processing = false
  2659.  
  2660.  
  2661. end
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667. function _Main(mouse)
  2668.  
  2669.  
  2670. while processing do wait(0.015) end
  2671.  
  2672.  
  2673. ms = mouse
  2674.  
  2675.  
  2676. _jnt = JoinInit()
  2677.  
  2678.  
  2679. _mdl = SuitInit()
  2680.  
  2681.  
  2682. _prt = LoadSuit()
  2683.  
  2684.  
  2685. mode = 0
  2686.  
  2687.  
  2688. _kup = mouse.KeyUp:connect(OnKeyUp)
  2689.  
  2690.  
  2691. _kdn = mouse.KeyDown:connect(OnKeyDown)
  2692.  
  2693.  
  2694. _mse = mouse.Button1Down:connect(OnButton1Down)
  2695.  
  2696.  
  2697. _ms2 = mouse.Button1Up:connect(function() buttonDown = false end)
  2698.  
  2699.  
  2700. use, bindKeyUp, bindKeyDown = true, true, true
  2701.  
  2702.  
  2703. end
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709. bin.Selected:connect(_Main)
  2710.  
  2711.  
  2712. bin.Deselected:connect(Disconnection)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement