Advertisement
memberhero

Untitled

Jul 22nd, 2016
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.98 KB | None | 0 0
  1. --NSword Gifted by Rosemarijohn2, Local Script!
  2.  
  3. local _CODE = "NSword"
  4.  
  5.  
  6. local player = game:GetService("Players").LocalPlayer
  7. local char = player.Character
  8. local huma = char:FindFirstChild("Humanoid")
  9. local initialized, disconnectRequest = false, false
  10. local model,suited,use,processing,animate,gtarget,gs = false,false,false,false,false,false,true
  11. local w,a,s,d = false,false,false,false
  12. local bindKeyDown,bindKeyUp = false,false
  13. local hit,trail,lighting,shirt,bin = false, false, false, false, false
  14. local bPos, bGyro = Instance.new("BodyPosition"), Instance.new("BodyGyro")
  15. local delete = true
  16. local prt,_jnt,_mdl,_prt,_kup,_kdn,_mse,ms = {}
  17. local combo = 0
  18. local tol = 4
  19. local mode = 0
  20. local cfs = false
  21. local jumping = false
  22. local buttonDown = false
  23. local shirtColor = "White"
  24. local pantsColor = "White"
  25. local attachColor = "White"
  26. local sheathColor = "White"
  27. local swordHandleColor = "White"
  28. local gunColor = "White"
  29. local gunTakePos = nil
  30. local defaultWalkspeed = huma.WalkSpeed
  31.  
  32. --==================================================-MAIN-CODE-==================================================--
  33.  
  34. bPos.maxForce = Vector3.new(0,math.huge,0)
  35. bGyro.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  36.  
  37. if player == nil or char == nil then return end
  38.  
  39. if not player.Backpack:FindFirstChild(_CODE) then
  40. bin = Instance.new("HopperBin")
  41. bin.Name = _CODE
  42. bin.Parent = player:FindFirstChild("Backpack")
  43. else bin = player.Backpack[_CODE] end
  44.  
  45. if bin ~= nil then
  46. script.Name = "_NScript"
  47. script.Parent = nil
  48. end
  49.  
  50. local part = {
  51. head = char:FindFirstChild("Head"),
  52. tors = char:FindFirstChild("Torso"),ftor,
  53. larm = char:FindFirstChild("Left Arm"),
  54. rarm = char:FindFirstChild("Right Arm"),
  55. lleg = char:FindFirstChild("Left Leg"),
  56. rleg = char:FindFirstChild("Right Leg")}
  57.  
  58. local motor = {
  59. neck = part.tors:FindFirstChild("Neck"),
  60. lsho = part.tors:FindFirstChild("Left Shoulder"),
  61. rsho = part.tors:FindFirstChild("Right Shoulder"),
  62. lhip = part.tors:FindFirstChild("Left Hip"),
  63. rhip = part.tors:FindFirstChild("Right Hip")}
  64.  
  65. for i,obj in pairs(char:GetChildren()) do
  66. if obj:IsA("CharacterMesh") then
  67. obj:Destroy()
  68. end
  69. end
  70.  
  71. function JoinInit()
  72. while processing do wait() end
  73. processing = true
  74. if char:FindFirstChild("Shirt") then
  75. shirt = char.Shirt
  76. shirt.Parent = nil
  77. end
  78. part.ftor = part.tors:Clone()
  79. part.ftor.Name = "_Torso2"
  80. part.ftor.BrickColor = BrickColor.new("White")
  81. local joint = {neck,tors,lsho,rsho,lhip,rhip}
  82. joint.tors = Instance.new("Weld", part.tors)
  83. joint.tors.Name = "Torso_WELD"
  84. joint.tors.Part0 = part.tors
  85. joint.tors.Part1 = part.ftor
  86. part.ftor.Parent = char
  87. part.tors.Transparency = 1
  88. for i,join in pairs (motor) do
  89. local weld
  90. if not join.Parent:FindFirstChild(join.Name.."_WELD") then
  91. weld = Instance.new("Weld", join.Parent)
  92. weld.Name = join.Name.."_WELD"
  93. else weld = join.Parent[join.Name.."_WELD"] end
  94. if tostring(i) == "lsho" then
  95. weld.C0 = CFrame.new(-1.5,0.5,0)
  96. weld.C1 = CFrame.new(0,0.5,0)
  97. elseif tostring(i) == "rsho" then
  98. weld.C0 = CFrame.new(1.5,0.5,0)
  99. weld.C1 = CFrame.new(0,0.5,0)
  100. elseif tostring(i) == "neck" then
  101. weld.C0 = CFrame.new(0,1,0)
  102. weld.C1 = CFrame.new(0,-0.5,0)
  103. else
  104. weld.C0 = join.C0
  105. weld.C1 = join.C1
  106. end
  107. weld.Part1 = join.Part1
  108. if tostring(i) ~= "neck" then
  109. join.Part0 = part.ftor
  110. else
  111. weld.Part0 = part.ftor
  112. end
  113. joint[i] = weld
  114. end
  115. initialized = true
  116. processing = false
  117. return joint
  118. end
  119.  
  120. function Bind(join)
  121. if join == nil then return end
  122. if _jnt == nil then return end
  123. if part.ftor == nil then return end
  124. if not _jnt[join]:IsA("Weld") then return end
  125. if not motor[join]:IsA("Motor6D") then return end
  126. motor[join].Part0 = nil
  127. _jnt[join].Part0 = part.ftor
  128. end
  129.  
  130. function Release(join)
  131. if join == nil then return end
  132. if _jnt == nil then return end
  133. if part.ftor == nil then return end
  134. if not _jnt[join]:IsA("Weld") then return end
  135. if not motor[join]:IsA("Motor6D") then return end
  136. _jnt[join].Part0 = nil
  137. motor[join].Part0 = part.ftor
  138. end
  139.  
  140. function SuitInit()
  141. while processing do wait() end
  142. processing = true
  143. if initialized then
  144. local suitModel
  145. if not char:FindFirstChild(_CODE.." Suit") then
  146. suitModel = Instance.new("Model", char)
  147. suitModel.Name = _CODE.." Suit"
  148. model = true
  149. else suitModel = char[_CODE.." Suit"] model = true end
  150. processing = false
  151. return suitModel
  152. else processing = false end
  153. end
  154.  
  155. function CF(join,cf,rot,speed,ctin,s)
  156. if s and cfs then ctin = true animate = false return end
  157. if join == nil then return end
  158. local def,done = join.C0,false
  159. local cf = cf or def
  160. local rot = rot or (def - def.p)
  161. local speed = speed or 1
  162. local x1,y1,z1 = def:toEulerAnglesXYZ()
  163. local x2,y2,z2 = rot:toEulerAnglesXYZ()
  164. coroutine.wrap(function()
  165. if speed ~= 1 then
  166. for i = 0,1,speed do
  167. if s and cfs then ctin = true animate = false return end
  168. join.C0 = CFrame.new(
  169. (def.p.X * (1 - i) + cf.p.X * i),
  170. (def.p.Y * (1 - i) + cf.p.Y * i),
  171. (def.p.Z * (1 - i) + cf.p.Z * i)) *
  172. CFrame.fromEulerAnglesXYZ(
  173. (x1 * (1 - i) + x2 * i),
  174. (y1 * (1 - i) + y2 * i),
  175. (z1 * (1 - i) + z2 * i))
  176. wait(0.015)
  177. end
  178. 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
  179. end)()
  180. if not ctin and speed ~= 1 then while not done do wait(0.015) end end
  181. end
  182.  
  183. function CreatePart(tab, name, color, transparency, reflectance, size, cframe, rotation, cancollide, anchored, meshType, scaleSize, weldPart, parent)
  184. if model and _mdl ~= nil and part.ftor ~= nil then
  185. local returnTable = {part,weld}
  186. if scaleSize == nil then scaleSize = false end
  187. local suitPart = Instance.new("Part")
  188. suitPart.Name = name
  189. suitPart.BrickColor = BrickColor.new(color)
  190. suitPart.Anchored = anchored
  191. suitPart.Locked = true
  192. suitPart.CanCollide = cancollide
  193. suitPart.Transparency = transparency
  194. suitPart.Reflectance = reflectance
  195. suitPart.FormFactor = Enum.FormFactor.Custom
  196. suitPart.BottomSurface = "Smooth"
  197. suitPart.TopSurface = "Smooth"
  198. suitPart.Size = size
  199. if meshType ~= nil then
  200. if meshType == "Cone" then
  201. CreateMesh("http://www.roblox.com/asset/?id=1033714", suitPart, scaleSize)
  202. elseif meshType == "Corner" then
  203. CreateMesh("http://www.roblox.com/asset/?id=11294911", suitPart, scaleSize)
  204. elseif meshType == "Devo" then
  205. CreateMesh("http://www.roblox.com/asset/?id=15720044", suitPart, scaleSize)
  206. elseif meshType == "Diamond" then
  207. CreateMesh("http://www.roblox.com/asset/?id=9756362", suitPart, scaleSize)
  208. elseif meshType == "Ring" then
  209. CreateMesh("http://www.roblox.com/asset/?id=3270017", suitPart, scaleSize)
  210. elseif meshType == "Tetrahedron" then
  211. CreateMesh("http://www.roblox.com/asset/?id=11294922", suitPart, scaleSize)
  212. elseif meshType == "Crown" then
  213. CreateMesh("http://www.roblox.com/asset/?id=20329976", suitPart, scaleSize)
  214. elseif meshType == "Claws" then
  215. CreateMesh("http://www.roblox.com/asset/?id=10681506", suitPart, scaleSize)
  216. elseif meshType == "Cylinder" then
  217. local mesh = Instance.new("CylinderMesh", suitPart)
  218. if scaleSize then mesh.Scale = suitPart.Size end
  219. elseif meshType == "Brick" then
  220. local mesh = Instance.new("BlockMesh", suitPart)
  221. if scaleSize then mesh.Scale = suitPart.Size end
  222. else
  223. local mesh = Instance.new("SpecialMesh", suitPart)
  224. if scaleSize then mesh.Scale = suitPart.Size end
  225. mesh.MeshType = meshType
  226. end
  227. end
  228. if weldPart == nil then suitPart.CFrame = cframe * rotation else
  229. local weld = Instance.new("Weld", _mdl)
  230. weld.Part1 = suitPart
  231. weld.Part0 = weldPart
  232. weld.Name = tostring(weld.Part0).."_TO_"..tostring(weld.Part1)
  233. weld.C0 = cframe * rotation
  234. returnTable.weld = weld
  235. end
  236. returnTable.part = suitPart
  237. suitPart.Parent = parent or _mdl
  238. if tab ~= nil then tab[name] = returnTable else return returnTable end
  239. end
  240. end
  241.  
  242. function CreateMesh(id, part, scaleSize)
  243. local mesh = Instance.new("SpecialMesh", part)
  244. if scaleSize then mesh.Scale = part.Size end
  245. mesh.MeshType = Enum.MeshType.FileMesh
  246. mesh.MeshId = id
  247. return mesh
  248. end
  249.  
  250. function LoadSuit()
  251. while processing do wait() end
  252. processing = true
  253. if not suited then
  254. 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)
  255. 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)
  256. 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)
  257. 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)
  258. 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)
  259. 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)
  260. 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)
  261. 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)
  262. 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)
  263. CreatePart(prt, "sheath_4", "White", 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)
  264. 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)
  265. CreatePart(prt, "sheath_6", "White", 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)
  266. 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)
  267. 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)
  268. 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)
  269. 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)
  270. 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)
  271. 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)
  272. 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)
  273. 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)
  274. 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)
  275. 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)
  276. 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)
  277. 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)
  278. 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)
  279. 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)
  280. 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)
  281. 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)
  282. 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)
  283. 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)
  284. 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)
  285. 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)
  286. 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)
  287. 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)
  288. CreatePart(prt, "gunbullet", "White", 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)
  289. 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)
  290. 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)
  291. CreatePart(prt, "sword_2", "White", 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)
  292. CreatePart(prt, "sword_3", "White", 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)
  293. CreatePart(prt, "sword_4", "White", 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)
  294. CreatePart(prt, "sword_5", "White", 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)
  295. 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)
  296. elseif prt.torso_1 ~= nil then prt.torso_1.weld.Part0 = part.ftor end
  297. suited = true
  298. processing = false
  299. return prt
  300. end -- +7
  301.  
  302. function Trail(val)
  303. if not _prt.sword_1.part then return end
  304. trail = val
  305. if trail then
  306. coroutine.wrap(function()
  307. local last = _prt.sword_3.part.CFrame.p
  308. while use and trail and _prt.sword_3.part ~= nil do wait(.02)
  309. local new = _prt.sword_3.part.CFrame.p
  310. local mag = (last - new).magnitude
  311. local pos = CFrame.new(last, new) * CFrame.Angles(math.rad(-90), 0, 0)
  312. local trl = Instance.new("Part")
  313. local msh = Instance.new("CylinderMesh", trl)
  314. trl.Name = "NSword_TRAIL"
  315. trl.Anchored = true
  316. trl.Locked = true
  317. trl.CanCollide = false
  318. trl.FormFactor = Enum.FormFactor.Custom
  319. trl.BrickColor = BrickColor.new("White")
  320. trl.Transparency = 0.3
  321. trl.Size = Vector3.new(0.2, mag, 0.2)
  322. msh.Scale = Vector3.new(1.8, 1, 1.8)
  323. trl.CFrame = pos * CFrame.new(0,mag/2,0)
  324. trl.Parent = game.Workspace
  325. 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)()
  326. last = _prt.sword_3.part.CFrame.p
  327. end
  328. end)()
  329. end
  330. end
  331.  
  332. function LightingGen(init,target,ran,delay,size,damage)
  333. local CL = function()
  334. local lght = Instance.new("Part")
  335. local msh = Instance.new("CylinderMesh", lght)
  336. local size = size or .3
  337. msh.Scale = Vector3.new(size,1,size)
  338. lght.Name = "NSword_LIGHT"
  339. lght.Anchored = true
  340. lght.Locked = true
  341. lght.CanCollide = false
  342. lght.Reflectance = 0
  343. lght.FormFactor = Enum.FormFactor.Custom
  344. lght.BrickColor = BrickColor.new("White")
  345. lght.Transparency = 0.5
  346. lght.Parent = char
  347. return lght
  348. end
  349. local delay, cPos = delay or .03
  350. local rand = Vector3.new(math.random(-ran,ran)/10, math.random(-ran,ran)/10, math.random(-ran,ran)/10)
  351. local mPos = (init - target).magnitude
  352. local dLgt = math.random(1,5)
  353. local dLgt = dLgt/10
  354. local rVec = init + (target - init) * dLgt
  355. local dVec = rVec - init
  356. local gPos = CFrame.new(init, rVec + rand) * CFrame.Angles(math.rad(-90), 0, 0)
  357. local rMag = (init - rVec + rand).magnitude
  358. for i = dLgt, 1 - dLgt, dLgt do
  359. local cPrt = CL()
  360. cPrt.Size = Vector3.new(.2,rMag,.2)
  361. cPrt.CFrame = gPos * CFrame.new(0,rMag/2,0)
  362. cPos = gPos * CFrame.new(0,rMag,0)
  363. print("TEST")
  364. cPrt.Touched:connect(function(targ) print(targ:GetFullName())
  365. if targ.Parent:FindFirstChild("Humanoid") or targ.Parent:FindFirstChild("Zombie") then
  366. if game.Players:GetPlayerFromCharacter(targ.Parent) ~= player then
  367. print(targ:GetFullName())
  368. local humanoid = targ.Parent.Humanoid or targ.Parent.Zombie
  369. local dmg = damage or 10
  370. humanoid.Health = humanoid.Health - dmg
  371. end
  372. end
  373. end)
  374. coroutine.wrap(function() wait(delay) pcall(function() cPrt:Destroy() end) end)()
  375. if i <= 1 - dLgt * 2 then
  376. rVec = init + (target - init) * (i + dLgt)
  377. rand = Vector3.new(math.random(-ran,ran)/10, math.random(-ran,ran)/10, math.random(-ran,ran)/10)
  378. gPos = CFrame.new(cPos.p, rVec + rand) * CFrame.Angles(math.rad(-90), 0, 0)
  379. rMag = (cPos.p - rVec + rand).magnitude
  380. end
  381. end
  382. gPos = CFrame.new(cPos.p, target) * CFrame.Angles(math.rad(-90), 0, 0)
  383. rMag = (cPos.p - target).magnitude
  384. local cPrt = CL()
  385. cPrt.Size = Vector3.new(.2,rMag,.2)
  386. cPrt.CFrame = gPos * CFrame.new(0,rMag/2,0)
  387. cPrt.Touched:connect(function(targ) print(targ:GetFullName())
  388. if targ.Parent:FindFirstChild("Humanoid") or targ.Parent:FindFirstChild("Zombie") then
  389. if game.Players:GetPlayerFromCharacter(targ.Parent) ~= player then
  390. print(targ:GetFullName())
  391. local humanoid = targ.Parent.Humanoid or targ.Parent.Zombie
  392. local dmg = damage or 10
  393. humanoid.Health = humanoid.Health - dmg
  394. end
  395. end
  396. end)
  397. coroutine.wrap(function() wait(delay) pcall(function() cPrt:Destroy() end) end)()
  398. end
  399.  
  400. function SwordEquip(force)
  401. if processing and not force then return end
  402. processing,cfs = true,true
  403. if suited then
  404. Bind("rsho")
  405. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(90)), .05, true)
  406. CF(_prt.sword_1.weld, CFrame.new(0,4.5,0), nil, .05, true)
  407. for i = 0, 1, .05 do
  408. _prt.sword_1.part.Transparency = i
  409. _prt.sword_2.part.Transparency = i
  410. _prt.sword_3.part.Transparency = i
  411. _prt.sword_4.part.Transparency = i
  412. _prt.sword_6.part.Transparency = i
  413. wait(.015)
  414. end
  415. _prt.sword_1.part.Transparency = 1
  416. _prt.sword_2.part.Transparency = 1
  417. _prt.sword_3.part.Transparency = 1
  418. _prt.sword_4.part.Transparency = 1
  419. _prt.sword_6.part.Transparency = 1
  420. _prt.sword_1.weld.Part0 = part.rarm
  421. CF(_prt.sword_1.weld, CFrame.new(0, -1, -0.25), CFrame.Angles(0, math.rad(90), 0))
  422. for i = 0, 1, .05 do
  423. _prt.sword_1.part.Transparency = 1 - i
  424. _prt.sword_2.part.Transparency = 1 - i
  425. _prt.sword_3.part.Transparency = 1 - i
  426. _prt.sword_4.part.Transparency = 1 - i
  427. _prt.sword_6.part.Transparency = 1 - i
  428. wait(.015)
  429. end
  430. _prt.sword_1.part.Transparency = 0
  431. _prt.sword_2.part.Transparency = 0
  432. _prt.sword_3.part.Transparency = 0
  433. _prt.sword_4.part.Transparency = 0
  434. Bind("lsho")
  435. huma.WalkSpeed = 65
  436. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, math.rad(-5)), .07, true)
  437. CF(_prt.sword_1.weld, nil, CFrame.Angles(math.rad(90), math.rad(90), 0), .07, true)
  438. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(5)), .07)
  439. end
  440. mode,processing,cfs = 1, false, false
  441. Walk()
  442. end
  443.  
  444. function SwordUnequip(force)
  445. if processing and not force then return end
  446. processing,cfs = true,true
  447. if suited then
  448. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .2, true)
  449. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .2, true)
  450. CF(_jnt.lsho, CFrame.new(-1.5,0.5,0), CFrame.Angles(0, 0, math.rad(-5)), .2, true)
  451. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(100), math.rad(90), 0), .07)
  452. Trail(true)
  453. CF(_prt.sword_1.weld, nil, CFrame.Angles(0, math.rad(90), 0), .15, true)
  454. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(90)), .15)
  455. Trail(false)
  456. for i = 0, 1, .05 do
  457. _prt.sword_1.part.Transparency = i
  458. _prt.sword_2.part.Transparency = i
  459. _prt.sword_3.part.Transparency = i
  460. _prt.sword_4.part.Transparency = i
  461. _prt.sword_6.part.Transparency = i
  462. wait(.015)
  463. end
  464. _prt.sword_1.part.Transparency = 1
  465. _prt.sword_2.part.Transparency = 1
  466. _prt.sword_3.part.Transparency = 1
  467. _prt.sword_4.part.Transparency = 1
  468. _prt.sword_6.part.Transparency = 1
  469. _prt.sword_1.weld.Part0 = _prt.sheath_1.part
  470. CF(_prt.sword_1.weld, CFrame.new(0, 4.5, 0), CFrame.Angles(0, 0, 0))
  471. CF(_prt.sword_1.weld, CFrame.new(0,2.715,0), CFrame.Angles(0, 0, 0), .05, true)
  472. for i = 0, 1, .05 do
  473. _prt.sword_1.part.Transparency = 1 - i
  474. _prt.sword_2.part.Transparency = 1 - i
  475. _prt.sword_3.part.Transparency = 1 - i
  476. _prt.sword_4.part.Transparency = 1 - i
  477. _prt.sword_6.part.Transparency = 1 - i
  478. wait(.015)
  479. end
  480. _prt.sword_1.part.Transparency = 0
  481. _prt.sword_2.part.Transparency = 0
  482. _prt.sword_3.part.Transparency = 0
  483. _prt.sword_4.part.Transparency = 0
  484. huma.WalkSpeed = defaultWalkspeed
  485. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, 0), .07, true)
  486. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, 0), .07)
  487. Release("rsho")
  488. Release("lsho")
  489. end
  490. mode,processing,cfs = 0, false, false
  491. end
  492.  
  493. function GunEquip(force)
  494. if processing and not force then return end
  495. processing,cfs = true,true
  496. if suited then
  497. Bind("rsho")
  498. CF(_jnt.rsho, CFrame.new(1.5,0.9,0), CFrame.Angles(math.rad(-20), 0, 0), 0.15)
  499. gunTakePos = _prt.gun_1.part.CFrame:inverse() * part.rarm.CFrame
  500. _prt.gun_1.weld.Part0 = part.rarm
  501. _prt.gun_1.weld.C0 = gunTakePos:inverse()
  502. CF(_jnt.rsho, CFrame.new(1.5,1.7,0), CFrame.Angles(math.rad(-20), 0, math.rad(2)), 0.15)
  503. Bind("lsho")
  504. CF(_jnt.lsho, nil, CFrame.Angles(math.rad(-5), 0, math.rad(-5)), 0.08, true)
  505. CF(_jnt.rsho, CFrame.new(1.5,0.5,0), CFrame.Angles(math.rad(-10), 0, math.rad(10)), 0.08, true)
  506. CF(_prt.gun_1.weld, _prt.gun_1.weld.C0 * CFrame.new(0.25,-0.1,0.1), nil, 0.08)
  507. end
  508. mode,processing,cfs = 2, false, false
  509. Walk()
  510. end
  511.  
  512. function GunUnequip(force)
  513. if processing and not force then return end
  514. processing = true
  515. if suited then
  516. if not gs and gtarget then gtarget = false repeat wait(.015) until gs end
  517. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .2, true)
  518. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .2, true)
  519. CF(_jnt.lsho, CFrame.new(-1.5,0.5,0), CFrame.Angles(0, 0, math.rad(-5)), .2, true)
  520. CF(_prt.gun_1.weld, gunTakePos:inverse(), (gunTakePos - gunTakePos.p):inverse(), 0.15, true)
  521. CF(_jnt.rsho, CFrame.new(1.5,1.7,0), CFrame.Angles(math.rad(-20), 0, math.rad(2)), 0.15)
  522. CF(_jnt.rsho, CFrame.new(1.5,0.9,0), CFrame.Angles(math.rad(-20), 0, 0), 0.15)
  523. _prt.gun_1.weld.Part0 = _prt.gunsheath_1.part
  524. CF(_prt.gun_1.weld, CFrame.new(0,0.6,0.15), CFrame.Angles(math.rad(-105),0,0))
  525. CF(_jnt.rsho, CFrame.new(1.5,0.5,0), CFrame.Angles(0, 0, 0), 0.08)
  526. Release("rsho")
  527. Release("lsho")
  528. end
  529. mode,processing,cfs = 0, false, false
  530. end
  531.  
  532. function LightEquip(force)
  533. if processing and not force then return end
  534. processing,cfs = true,true
  535. if suited then
  536. Bind("rsho")
  537. Bind("lsho")
  538. huma.WalkSpeed = 65
  539. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, math.rad(-5)), .07, true)
  540. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(5)), .07)
  541. end
  542. mode,processing,cfs = 3, false, false
  543. Walk()
  544. end
  545.  
  546. function LightUnequip(force)
  547. if processing and not force then return end
  548. processing,cfs = true,true
  549. if suited then
  550. huma.WalkSpeed = defaultWalkspeed
  551. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .2, true)
  552. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .2, true)
  553. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, 0), .07, true)
  554. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, 0), .07)
  555. Release("rsho")
  556. Release("lsho")
  557. end
  558. mode,processing,cfs = 0, false, false
  559. Walk()
  560. end
  561.  
  562. function Walk()
  563. if use then
  564. while processing or animate do wait(.015) end
  565. if w or a or s or d then
  566. animate = true
  567. if mode == 1 then
  568. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(65), 0), .15, true, true)
  569. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(-65), 0), .15, true, true)
  570. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(-20), 0, math.rad(70)), .15, true, true)
  571. CF(_jnt.lsho, nil, CFrame.Angles(math.rad(30), math.rad(20), math.rad(5)), .15, false, true)
  572. elseif mode == 2 then
  573. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(65), 0), .15, true, true)
  574. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(-65), 0), .15, true, true)
  575. CF(_jnt.rsho, CFrame.new(1,0.4,-0.2), CFrame.Angles(math.rad(35), math.rad(20), math.rad(-40)), .15, true, true)
  576. CF(_jnt.lsho, CFrame.new(-1,0.5,0), CFrame.Angles(math.rad(60), math.rad(-20), math.rad(35)), .15, false, true)
  577. elseif mode == 3 then
  578. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(-35), 0, math.rad(10)), .15, true, true)
  579. CF(_jnt.lsho, nil, CFrame.Angles(math.rad(-35), 0, math.rad(-10)), .15, false, true)
  580. end
  581. animate = false
  582. end
  583. end
  584. end
  585.  
  586. function Stand()
  587. if use then
  588. while processing or animate do wait(.015) end
  589. if not w and not a and not s and not d and not jumping then
  590. animate = true
  591. if mode ~= 0 then
  592. CF(_jnt.neck, CFrame.new(0,1,0), CFrame.Angles(0, 0, 0), .2, true, true)
  593. CF(_jnt.tors, CFrame.new(0,0,0), CFrame.Angles(0, 0, 0), .2, true, true)
  594. CF(_jnt.rsho, CFrame.new(1.5,0.5,0), CFrame.Angles(0, 0, math.rad(5)), .2, true, true)
  595. CF(_jnt.lsho, CFrame.new(-1.5,0.5,0), CFrame.Angles(0, 0, math.rad(-5)), .2, false, true)
  596. end
  597. animate = false
  598. end
  599. end
  600. end
  601.  
  602. function FAC(num,res)
  603. 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
  604. else return false end
  605. end
  606.  
  607. function SliceAndKill(p)
  608. coroutine.wrap(function()
  609. if p.Name ~= "__NSCUTPART" and p.Name ~= "Base" and p.Name ~= "NSword_TRAIL" and p.Name ~= "NSword_LIGHT" then
  610. if p.Parent ~= char and p.Parent ~= _mdl and not p.Parent:IsA("Hat") then
  611. local pX,pY,pZ = p.CFrame:toEulerAnglesXYZ()
  612. 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
  613. pX = math.deg(pX) if pX < 0 then pX = pX * (-1) else pX = math.floor(pX) end
  614. pZ = math.deg(pZ) if pZ < 0 then pZ = pZ * (-1) else pZ = math.floor(pZ) end
  615. if not FAC(pX,0) and not FAC(pX,90) and not FAC(pX,180) then return end
  616. if not FAC(pZ,0) and not FAC(pZ,90) and not FAC(pZ,180) then return end
  617. if (not FAC(pX,0) and not FAC(pZ,0)) or (not FAC(pX,180) and not FAC(pZ,180)) then
  618. if FAC(pX,0) and FAC(pZ,180) then
  619. p.CFrame = p.CFrame * CFrame.Angles(0, 0, math.pi)
  620. elseif FAC(pX,180) and FAC(pZ,0) then
  621. p.CFrame = p.CFrame * CFrame.Angles(math.pi, 0, 0)
  622. elseif FAC(pX,90) and (FAC(pZ,0) or FAC(pZ,180)) then
  623. local rPart = p:Clone()
  624. rPart.Anchored = true
  625. rPart.Size = Vector3.new(p.Size.z,p.Size.x,p.Size.y)
  626. rPart.CFrame = CFrame.new(p.CFrame.x, p.CFrame.y, p.CFrame.z) * CFrame.Angles(0, pY, 0)
  627. if not p.Anchored then rPart.Anchored = false end
  628. rPart.Parent = p.Parent
  629. p:Remove()
  630. p = rPart
  631. elseif FAC(pX,90) and FAC(pZ,90) then
  632. local rPart = p:Clone()
  633. rPart.Anchored = true
  634. rPart.Size = Vector3.new(p.Size.y,p.Size.z,p.Size.x)
  635. rPart.CFrame = CFrame.new(p.CFrame.x, p.CFrame.y, p.CFrame.z) * CFrame.Angles(0, pY, 0)
  636. if not p.Anchored then rPart.Anchored = false end
  637. rPart.Parent = p.Parent
  638. p:Remove()
  639. p = rPart
  640. elseif (FAC(pX,0) or FAC(pX,180)) and FAC(pZ,90) then
  641. local rPart = p:Clone()
  642. rPart.Anchored = true
  643. rPart.Size = Vector3.new(p.Size.y,p.Size.x,p.Size.z)
  644. rPart.CFrame = CFrame.new(p.CFrame.x, p.CFrame.y, p.CFrame.z) * CFrame.Angles(0, pY, 0)
  645. if not p.Anchored then rPart.Anchored = false end
  646. rPart.Parent = p.Parent
  647. p:Remove()
  648. p = rPart
  649. end
  650. end
  651. local s = _prt.sword_3.part
  652. local pYPos = p.CFrame.p.y - (p.Size.y/2)
  653. local sYPos = s.CFrame.p.y
  654. if sYPos <= pYPos or sYPos >= (pYPos + p.Size.y) then return end
  655. local x, y, z = p.CFrame:toEulerAnglesXYZ()
  656. local c1 = p:Clone()
  657. local c2 = p:Clone()
  658. local CC,TR = p.CanCollide, p.Transparency
  659. local mat = p.Material
  660. c1:BreakJoints()
  661. c2:BreakJoints()
  662. if CC then
  663. c1.CanCollide = true
  664. c2.CanCollide = true
  665. c1.Anchored = false
  666. c2.Anchored = false
  667. else
  668. c1.CanCollide = false
  669. c2.CanCollide = false
  670. c1.Anchored = true
  671. c2.Anchored = true
  672. end
  673. c1.FormFactor = Enum.FormFactor.Custom
  674. c2.FormFactor = Enum.FormFactor.Custom
  675. c1.Material = Enum.Material.Plastic
  676. c2.Material = Enum.Material.Plastic
  677. c1.Size = Vector3.new(p.Size.x,sYPos-pYPos,p.Size.z)
  678. c2.Size = Vector3.new(p.Size.x,c2.Size.y-(sYPos-pYPos),p.Size.z)
  679. c1.CFrame = p.CFrame * CFrame.new(0, -c2.Size.y/2,0)
  680. c2.CFrame = p.CFrame * CFrame.new(0, c1.Size.y/2,0)
  681. c1.Name = "__NSCUTPART"
  682. c2.Name = "__NSCUTPART"
  683. c1.Reflectance = 0.5
  684. c2.Reflectance = 0.5
  685. c1.Parent = game.Workspace
  686. c2.Parent = game.Workspace
  687. p:Remove()
  688. for i = 1, 10, 1 do wait(0.02)
  689. c1.Reflectance = c1.Reflectance - 1/10
  690. c2.Reflectance = c2.Reflectance - 1/10
  691. end
  692. if not CC then
  693. coroutine.wrap(function()
  694. for i = TR, 1, 0.05 do wait(0.02)
  695. c1.Transparency = i
  696. c2.Transparency = i
  697. end pcall(function() c1:Remove() c2:Remove() end)
  698. end)()
  699. end
  700. c1.Reflectance = 0
  701. c2.Reflectance = 0
  702. c1.Material = mat
  703. c2.Material = mat
  704. if CC then
  705. c1.Name = "_NSCUTPART"
  706. c2.Name = "_NSCUTPART"
  707. end
  708. end
  709. end
  710. end)()
  711. end
  712.  
  713. function Hit(val)
  714. hit = val
  715. if hit then
  716. coroutine.wrap(function()
  717. local event = _prt.sword_5.part.Touched:connect(SliceAndKill)
  718. while use and hit and _prt.sword_2 ~= nil and _prt.sword_3 ~= nil and _prt.sword_5 ~= nil do wait() end
  719. event:disconnect()
  720. end)()
  721. end
  722. end
  723.  
  724. function GunTarget()
  725. if not ms then return end
  726. if processing and not gtarget then return end
  727. processing,cfs,gs = true, true, false
  728. if not gtarget then gtarget = true
  729. huma.WalkSpeed = 5
  730. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(-90), 0), .1, true)
  731. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(90), 0), .1, true)
  732. CF(_jnt.lsho, CFrame.new(-1.5,0.5,0), CFrame.Angles(math.rad(-5), 0, math.rad(-5)), .1, true)
  733. CF(_jnt.rsho, CFrame.new(1.5,0.5,0), CFrame.Angles(0, 0, math.rad(90)), .1, true)
  734. pcall(function() bGyro.Parent = part.tors end)
  735. repeat wait(.015)
  736. if ms and not disconnectRequest then
  737. bGyro.cframe = CFrame.new(part.tors.CFrame.p, Vector3.new(ms.Hit.p.X, part.tors.CFrame.p.Y, ms.Hit.p.Z))
  738. _jnt.rsho.C0 = CFrame.new(Vector3.new(1.5,0.5,0), ms.Hit.p) * CFrame.Angles(0, 0, math.rad(90))
  739. end
  740. until not gtarget or not ms gtarget = false
  741. huma.WalkSpeed = defaultWalkspeed
  742. pcall(function() bGyro.Parent = nil end)
  743. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .1, true)
  744. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .1, true)
  745. CF(_jnt.lsho, CFrame.new(-1.5,0.5,0), CFrame.Angles(0, 0, math.rad(-5)), .1, true)
  746. CF(_jnt.rsho, CFrame.new(1.5,0.5,0), CFrame.Angles(0, 0, math.rad(5)), .1)
  747. end
  748. processing,cfs,gs = false, false, true
  749. if not gtarget and not disconnectRequest then Walk() end
  750. end
  751.  
  752. function OnKeyDown(key) key = key:lower()
  753. if bindKeyDown then
  754. if key == "w" then w = true Walk() end
  755. if key == "a" then a = true Walk() end
  756. if key == "s" then s = true Walk() end
  757. if key == "d" then d = true Walk() end
  758. 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
  759. 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
  760. 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
  761. if key == "e" then if mode == 2 and not gtarget then GunTarget() else gtarget = false end end
  762. end
  763. end
  764.  
  765. function OnKeyUp(key) key = key:lower()
  766. if bindKeyUp then
  767. if key == "w" then w = false if not a and not s and not d then Stand() end end
  768. if key == "a" then a = false if not w and not s and not d then Stand() end end
  769. if key == "s" then s = false if not w and not a and not d then Stand() end end
  770. if key == "d" then d = false if not w and not a and not s then Stand() end end
  771. end
  772. end
  773.  
  774. function OnButton1Down() buttonDown = true combo = combo + 1
  775. if not ms then end
  776. if processing and not gtarget then return end
  777. processing,cfs = true, true
  778. if mode == 1 then
  779. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(40), 0), .2, true)
  780. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(-40), 0), .2, true)
  781. CF(_prt.sword_1.weld, nil, CFrame.Angles(0, math.rad(-90), 0), .2, true)
  782. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, math.rad(-10)), .2, true)
  783. CF(_jnt.rsho, nil, CFrame.Angles(0, math.rad(-20), math.rad(90)), .2)
  784. pcall(function() bPos.position = Vector3.new(0,part.tors.CFrame.p.Y,0) bPos.Parent = part.tors end)
  785. Trail(true)
  786. Hit(true)
  787. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(-50), 0), .15, true)
  788. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(50), 0), .15, true)
  789. CF(_prt.sword_1.weld, nil, CFrame.Angles(math.rad(55), math.rad(-90), 0), .15, true)
  790. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(90), math.rad(90), 0), .15)
  791. Trail(false)
  792. Hit(false)
  793. if combo > 1 then combo = 2
  794. 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
  795. CF(_prt.sword_1.weld, nil, CFrame.Angles(math.rad(55), math.rad(90),0), .3)
  796. Trail(true)
  797. Hit(true)
  798. CF(_prt.sword_1.weld, nil, CFrame.Angles(0, math.rad(90), 0), .15, true)
  799. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(40), 0), .12, true)
  800. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(-40), 0), .15, true)
  801. CF(_jnt.rsho, nil, CFrame.Angles(0, math.rad(-20), math.rad(90)), .15)
  802. pcall(function() bPos.Parent = nil end)
  803. Trail(false)
  804. Hit(false)
  805. CF(_prt.sword_1.weld, nil, CFrame.Angles(math.rad(90), math.rad(90), 0), .15, true)
  806. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .15, true)
  807. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .15, true)
  808. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(-10), 0, 0), .15)
  809. else
  810. pcall(function() bPos.Parent = nil end)
  811. CF(_prt.sword_1.weld, nil, CFrame.Angles(math.rad(90), math.rad(90), 0), .15, true)
  812. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .15, true)
  813. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .15, true)
  814. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(5)), .15)
  815. end
  816. elseif mode == 2 then
  817.  
  818. --> GUN <--
  819.  
  820. elseif mode == 3 then
  821. CF(_jnt.neck, nil, CFrame.Angles(0, math.rad(90), 0), .1, true)
  822. CF(_jnt.tors, nil, CFrame.Angles(0, math.rad(-90), 0), .1, true)
  823. CF(_jnt.rsho, nil, CFrame.Angles(math.rad(-20), 0, math.rad(20)), .1, true)
  824. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, math.rad(-90)), .1)
  825. while ms and buttonDown and not disconnectRequest do wait(.015)
  826. pcall(function() bGyro.Parent = part.tors end)
  827. if ms and not disconnectRequest and huma.Health ~= 0 then
  828. bGyro.cframe = CFrame.new(part.tors.CFrame.p, Vector3.new(ms.Hit.p.X, part.tors.CFrame.p.Y, ms.Hit.p.Z))
  829. if ms.Target then
  830. LightingGen((part.larm.CFrame * CFrame.new(0,-1,0)).p, ms.Hit.p, 10, .05, .5)
  831. end
  832. end
  833. end
  834. pcall(function() bGyro.Parent = nil end)
  835. CF(_jnt.neck, nil, CFrame.Angles(0, 0, 0), .1, true)
  836. CF(_jnt.tors, nil, CFrame.Angles(0, 0, 0), .1, true)
  837. CF(_jnt.lsho, nil, CFrame.Angles(0, 0, math.rad(-5)), .1, true)
  838. CF(_jnt.rsho, nil, CFrame.Angles(0, 0, math.rad(5)), .1)
  839. end
  840. combo = 0
  841. if not gtarget then processing, cfs = false, false end
  842. Walk()
  843. end
  844.  
  845. function Disconnection() disconnectRequest = true ms = nil
  846. while processing do wait(.015) end
  847. w,a,s,d = false,false,false,false
  848. processing = true
  849. if use then
  850. Hit(false)
  851. bindKeyUp, bindKeyDown = false, false
  852. if mode == 1 then SwordUnequip(true) end
  853. if mode == 2 then GunUnequip(true) end
  854. if mode == 3 then LightUnequip(true) end
  855. use = false
  856. huma.WalkSpeed = defaultWalkspeed
  857. gunTakePos = nil
  858. w,a,s,d = false,false,false,false
  859. w2,a2,s2,d2 = false,false,false,false
  860. _prt.torso_1.weld.Part0 = part.tors
  861. if delete then part.tors.Transparency = 0 end
  862. for i,mtor in pairs (motor) do
  863. pcall(function() mtor.Part0 = part.tors end)
  864. end
  865. if _jnt ~= nil then
  866. for i,weld in pairs(_jnt) do
  867. pcall(function() weld:Remove() end)
  868. end
  869. end
  870. if part.ftor ~= nil then part.ftor:Remove() end
  871. if delete then
  872. if shirt ~= nil then shirt.Parent = char end
  873. if _mdl ~= nil then _mdl:Remove() end
  874. suited = false
  875. model = false
  876. prt = {}
  877. end
  878. _jnt,_mdl,_prt = nil, nil, nil
  879. _kup:disconnect()
  880. _kdn:disconnect()
  881. _mse:disconnect()
  882. _ms2:disconnect()
  883. combo = 0
  884. _kup,_kdn,_mse,_ms2 = nil,nil,nil,nil
  885. initialized = false
  886. end
  887. disconnectRequest = false
  888. processing = false
  889. end
  890.  
  891. function _Main(mouse)
  892. while processing do wait(0.015) end
  893. ms = mouse
  894. _jnt = JoinInit()
  895. _mdl = SuitInit()
  896. _prt = LoadSuit()
  897. mode = 0
  898. _kup = mouse.KeyUp:connect(OnKeyUp)
  899. _kdn = mouse.KeyDown:connect(OnKeyDown)
  900. _mse = mouse.Button1Down:connect(OnButton1Down)
  901. _ms2 = mouse.Button1Up:connect(function() buttonDown = false end)
  902. use, bindKeyUp, bindKeyDown = true, true, true
  903. end
  904.  
  905. bin.Selected:connect(_Main)
  906. bin.Deselected:connect(Disconnection)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement