Advertisement
BINO2002

Untitled

Apr 3rd, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.22 KB | None | 0 0
  1. if script == nil then return end
  2.  
  3.  
  4. Player = game.Players.LocalPlayer
  5. Char = Player.Character
  6. animate = Char:findFirstChild("Animate")
  7. if animate then
  8. animate:Destroy()
  9. end
  10. controlActivated = false
  11. Button1Down = false
  12. swordUp = false
  13. swordSlash = false
  14. swordSlash2 = false
  15. swordLunge = false
  16. swordStab = false
  17. swordType = "normal"
  18.  
  19.  
  20. function makeParts()
  21. local suit = Instance.new("Model")
  22. suit.Name = "Suit"
  23. suit.Parent = Player.Character
  24. local p = Instance.new("Part")
  25. p.Name = "Torso Cover"
  26. p.FormFactor = "Custom"
  27. p.size = Vector3.new(2, 2, 1)
  28. p.BrickColor = BrickColor.new("Institutional white")
  29. p.Locked = true
  30. p.TopSurface = 0
  31. p.BottomSurface = 0
  32. p.Parent = suit
  33. local m = Instance.new("SpecialMesh")
  34. m.MeshType = "Torso"
  35. m.Scale = Vector3.new(0.75, 0.5, 1.1)
  36. m.Parent = p
  37. local w = Instance.new("Weld")
  38. w.Part0 = p
  39. w.Part1 = Player.Character:FindFirstChild("Torso")
  40. w.C0 = CFrame.new(0, 0.5, 0)
  41. w.C1 = CFrame.new()
  42. w.Parent = p
  43. local p = Instance.new("Part")
  44. p.Name = "Torso Cover"
  45. p.FormFactor = "Custom"
  46. p.size = Vector3.new(2, 2, 1)
  47. p.BrickColor = BrickColor.new("Really black")
  48. p.Locked = true
  49. p.TopSurface = 0
  50. p.BottomSurface = 0
  51. p.Parent = suit
  52. local m = Instance.new("SpecialMesh")
  53. m.MeshType = "Brick"
  54. m.Scale = Vector3.new(1.01, 1.01, 1.01)
  55. m.Parent = p
  56. local w = Instance.new("Weld")
  57. w.Part0 = p
  58. w.Part1 = Player.Character:FindFirstChild("Torso")
  59. w.C0 = CFrame.new(0, 0, 0)
  60. w.C1 = CFrame.new()
  61. w.Parent = p
  62. local p = Instance.new("Part")
  63. p.Name = "Left Arm Cover"
  64. p.FormFactor = "Custom"
  65. p.size = Vector3.new(1, 2, 1)
  66. p.BrickColor = BrickColor.new("Really black")
  67. p.Locked = true
  68. p.TopSurface = 0
  69. p.BottomSurface = 0
  70. p.Parent = suit
  71. local m = Instance.new("SpecialMesh")
  72. m.MeshType = "Brick"
  73. m.Scale = Vector3.new(1.01, 1.01, 1.01)
  74. m.Parent = p
  75. local w = Instance.new("Weld")
  76. w.Part0 = p
  77. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  78. w.C0 = CFrame.new(0, 0, 0)
  79. w.C1 = CFrame.new()
  80. w.Parent = p
  81. local p = Instance.new("Part")
  82. p.Name = "Left Arm Cover"
  83. p.FormFactor = "Custom"
  84. p.size = Vector3.new(1, 2, 1)
  85. p.BrickColor = BrickColor.new("Institutional white")
  86. p.Locked = true
  87. p.TopSurface = 0
  88. p.BottomSurface = 0
  89. p.Parent = suit
  90. local m = Instance.new("SpecialMesh")
  91. m.MeshType = "Brick"
  92. m.Scale = Vector3.new(0.76, 1.02, 1.1)
  93. m.Parent = p
  94. local w = Instance.new("Weld")
  95. w.Part0 = p
  96. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  97. w.C0 = CFrame.new(0.13, 0, 0)
  98. w.C1 = CFrame.new()
  99. w.Parent = p
  100. local p = Instance.new("Part")
  101. p.Name = "Right Arm Cover"
  102. p.FormFactor = "Custom"
  103. p.size = Vector3.new(1, 2, 1)
  104. p.BrickColor = BrickColor.new("Really black")
  105. p.Locked = true
  106. p.TopSurface = 0
  107. p.BottomSurface = 0
  108. p.Parent = suit
  109. local m = Instance.new("SpecialMesh")
  110. m.MeshType = "Brick"
  111. m.Scale = Vector3.new(1.01, 1.01, 1.01)
  112. m.Parent = p
  113. local w = Instance.new("Weld")
  114. w.Part0 = p
  115. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  116. w.C0 = CFrame.new(0, 0, 0)
  117. w.C1 = CFrame.new()
  118. w.Parent = p
  119. local p = Instance.new("Part")
  120. p.Name = "Right Arm Cover"
  121. p.FormFactor = "Custom"
  122. p.size = Vector3.new(1, 2, 1)
  123. p.BrickColor = BrickColor.new("Institutional white")
  124. p.Locked = true
  125. p.TopSurface = 0
  126. p.BottomSurface = 0
  127. p.Parent = suit
  128. local m = Instance.new("SpecialMesh")
  129. m.MeshType = "Brick"
  130. m.Scale = Vector3.new(0.76, 1.02, 1.1)
  131. m.Parent = p
  132. local w = Instance.new("Weld")
  133. w.Part0 = p
  134. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  135. w.C0 = CFrame.new(-0.13, 0, 0)
  136. w.C1 = CFrame.new()
  137. w.Parent = p
  138. local p = Instance.new("Part")
  139. p.Name = "Left Leg Cover"
  140. p.FormFactor = "Custom"
  141. p.size = Vector3.new(1, 2, 1)
  142. p.BrickColor = BrickColor.new("Really black")
  143. p.CanCollide = false
  144. p.Locked = true
  145. p.TopSurface = 0
  146. p.BottomSurface = 0
  147. p.Parent = suit
  148. local m = Instance.new("SpecialMesh")
  149. m.MeshType = "Brick"
  150. m.Scale = Vector3.new(1.01, 1.01, 1.01)
  151. m.Parent = p
  152. local w = Instance.new("Weld")
  153. w.Part0 = p
  154. w.Part1 = Player.Character:FindFirstChild("Left Leg")
  155. w.C0 = CFrame.new(0, 0, 0)
  156. w.C1 = CFrame.new()
  157. w.Parent = p
  158. local p = Instance.new("Part")
  159. p.Name = "Left Leg Cover"
  160. p.FormFactor = "Custom"
  161. p.size = Vector3.new(1, 2, 1)
  162. p.BrickColor = BrickColor.new("Institutional white")
  163. p.CanCollide = false
  164. p.Locked = true
  165. p.TopSurface = 0
  166. p.BottomSurface = 0
  167. p.Parent = suit
  168. local m = Instance.new("SpecialMesh")
  169. m.MeshType = "Brick"
  170. m.Scale = Vector3.new(0.76, 1.02, 1.1)
  171. m.Parent = p
  172. local w = Instance.new("Weld")
  173. w.Part0 = p
  174. w.Part1 = Player.Character:FindFirstChild("Left Leg")
  175. w.C0 = CFrame.new(-0.13, 0, 0)
  176. w.C1 = CFrame.new()
  177. w.Parent = p
  178. local p = Instance.new("Part")
  179. p.Name = "Right Leg Cover"
  180. p.FormFactor = "Custom"
  181. p.size = Vector3.new(1, 2, 1)
  182. p.BrickColor = BrickColor.new("Really black")
  183. p.CanCollide = false
  184. p.Locked = true
  185. p.TopSurface = 0
  186. p.BottomSurface = 0
  187. p.Parent = suit
  188. local m = Instance.new("SpecialMesh")
  189. m.MeshType = "Brick"
  190. m.Scale = Vector3.new(1.01, 1.01, 1.01)
  191. m.Parent = p
  192. local w = Instance.new("Weld")
  193. w.Part0 = p
  194. w.Part1 = Player.Character:FindFirstChild("Right Leg")
  195. w.C0 = CFrame.new(0, 0, 0)
  196. w.C1 = CFrame.new()
  197. w.Parent = p
  198. local p = Instance.new("Part")
  199. p.Name = "Right Leg Cover"
  200. p.FormFactor = "Custom"
  201. p.size = Vector3.new(1, 2, 1)
  202. p.BrickColor = BrickColor.new("Institutional white")
  203. p.Locked = true
  204. p.TopSurface = 0
  205. p.BottomSurface = 0
  206. p.Parent = suit
  207. local m = Instance.new("SpecialMesh")
  208. m.MeshType = "Brick"
  209. m.Scale = Vector3.new(0.76, 1.02, 1.1)
  210. m.Parent = p
  211. local w = Instance.new("Weld")
  212. w.Part0 = p
  213. w.Part1 = Player.Character:FindFirstChild("Right Leg")
  214. p.CanCollide = false
  215. w.C0 = CFrame.new(0.13, 0, 0)
  216. w.C1 = CFrame.new()
  217. w.Parent = p
  218. local sword1 = Instance.new("Model")
  219. sword1.Name = "LeftArmParts"
  220. sword1.Parent = suit
  221. local pm = Instance.new("Part")
  222. pm.Name = "Handle"
  223. pm.Size = Vector3.new(1, 1, 2)
  224. pm.BrickColor = BrickColor.new("Really black")
  225. pm.Locked = true
  226. pm.TopSurface = 0
  227. pm.BottomSurface = 0
  228. pm.Parent = sword1
  229. local m = Instance.new("SpecialMesh")
  230. m.MeshType = "Brick"
  231. m.Scale = Vector3.new(0.3, 0.4, 0.75)
  232. m.Parent = pm
  233. local w = Instance.new("Weld")
  234. w.Part0 = pm
  235. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  236. w.C0 = CFrame.new(0, 1, 0.5)
  237. w.C1 = CFrame.new()
  238. w.Parent = pm
  239. local p = Instance.new("Part")
  240. p.Name = "Sword Guard"
  241. p.size = Vector3.new(1, 1, 1)
  242. p.BrickColor = BrickColor.new("Really black")
  243. p.Locked = true
  244. p.TopSurface = 0
  245. p.BottomSurface = 0
  246. p.Parent = sword1
  247. local m = Instance.new("SpecialMesh")
  248. m.MeshType = "Brick"
  249. m.Scale = Vector3.new(0.5, 0.6, 0.2)
  250. m.Parent = p
  251. local w = Instance.new("Weld")
  252. w.Part0 = p
  253. w.Part1 = pm
  254. w.C0 = CFrame.new(0, 0, 0.85)
  255. w.C1 = CFrame.new()
  256. w.Parent = p
  257. local p = Instance.new("Part")
  258. p.Name = "Sword Metal"
  259. p.size = Vector3.new(1, 1, 3)
  260. p.BrickColor = BrickColor.new("Institutional white")
  261. p.Locked = true
  262. p.Reflectance = 0.25
  263. p.CanCollide = false
  264. p.TopSurface = 0
  265. p.BottomSurface = 0
  266. p.Parent = sword1
  267. p.Touched:connect(function(hit) onTouched(hit, p, "sword") end)
  268. local m = Instance.new("SpecialMesh")
  269. m.MeshType = "Brick"
  270. m.Scale = Vector3.new(0.1, 0.4, 1)
  271. m.Parent = p
  272. local w = Instance.new("Weld")
  273. w.Part0 = p
  274. w.Part1 = pm
  275. w.C0 = CFrame.new(0, 0, 2.35)
  276. w.C1 = CFrame.new()
  277. w.Parent = p
  278. local p = Instance.new("Part")
  279. p.Name = "Sword Tip"
  280. p.size = Vector3.new(1, 1, 1)
  281. p.BrickColor = BrickColor.new("Institutional white")
  282. p.Locked = true
  283. p.Reflectance = 0.25
  284. p.CanCollide = false
  285. p.TopSurface = 0
  286. p.BottomSurface = 0
  287. p.Parent = sword1
  288. p.Touched:connect(function(hit) onTouched(hit, p, "sword") end)
  289. local m = Instance.new("SpecialMesh")
  290. m.MeshType = "Wedge"
  291. m.Scale = Vector3.new(0.1, 0.4, 0.5)
  292. m.Parent = p
  293. local w = Instance.new("Weld")
  294. w.Part0 = p
  295. w.Part1 = pm
  296. w.C0 = CFrame.new(0, 0, 4.1) * CFrame.fromEulerAnglesXYZ(0, 0, 3.14)
  297. w.C1 = CFrame.new()
  298. w.Parent = p
  299. local sword2 = Instance.new("Model")
  300. sword2.Name = "RightArmParts"
  301. sword2.Parent = suit
  302. local pm = Instance.new("Part")
  303. pm.Name = "Handle"
  304. pm.Size = Vector3.new(1, 1, 2)
  305. pm.BrickColor = BrickColor.new("Really black")
  306. pm.Locked = true
  307. pm.TopSurface = 0
  308. pm.BottomSurface = 0
  309. pm.Parent = sword2
  310. local m = Instance.new("SpecialMesh")
  311. m.MeshType = "Brick"
  312. m.Scale = Vector3.new(0.3, 0.4, 0.75)
  313. m.Parent = pm
  314. local w = Instance.new("Weld")
  315. w.Part0 = pm
  316. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  317. w.C0 = CFrame.new(0, 1, 0.5)
  318. w.C1 = CFrame.new()
  319. w.Parent = pm
  320. local p = Instance.new("Part")
  321. p.Name = "Sword Guard"
  322. p.size = Vector3.new(1, 1, 1)
  323. p.BrickColor = BrickColor.new("Really black")
  324. p.Locked = true
  325. p.TopSurface = 0
  326. p.BottomSurface = 0
  327. p.Parent = sword2
  328. local m = Instance.new("SpecialMesh")
  329. m.MeshType = "Brick"
  330. m.Scale = Vector3.new(0.5, 0.6, 0.2)
  331. m.Parent = p
  332. local w = Instance.new("Weld")
  333. w.Part0 = p
  334. w.Part1 = pm
  335. w.C0 = CFrame.new(0, 0, 0.85)
  336. w.C1 = CFrame.new()
  337. w.Parent = p
  338. local p = Instance.new("Part")
  339. p.Name = "Sword Metal"
  340. p.size = Vector3.new(1, 1, 3)
  341. p.BrickColor = BrickColor.new("Institutional white")
  342. p.Locked = true
  343. p.Reflectance = 0.25
  344. p.CanCollide = false
  345. p.TopSurface = 0
  346. p.BottomSurface = 0
  347. p.Parent = sword2
  348. p.Touched:connect(function(hit) onTouched(hit, p, "sword") end)
  349. local m = Instance.new("SpecialMesh")
  350. m.MeshType = "Brick"
  351. m.Scale = Vector3.new(0.1, 0.4, 1)
  352. m.Parent = p
  353. local w = Instance.new("Weld")
  354. w.Part0 = p
  355. w.Part1 = pm
  356. w.C0 = CFrame.new(0, 0, 2.35)
  357. w.C1 = CFrame.new()
  358. w.Parent = p
  359. local p = Instance.new("Part")
  360. p.Name = "Sword Tip"
  361. p.size = Vector3.new(1, 1, 1)
  362. p.BrickColor = BrickColor.new("Institutional white")
  363. p.Locked = true
  364. p.Reflectance = 0.25
  365. p.CanCollide = false
  366. p.TopSurface = 0
  367. p.BottomSurface = 0
  368. p.Parent = sword2
  369. p.Touched:connect(function(hit) onTouched(hit, p, "sword") end)
  370. local m = Instance.new("SpecialMesh")
  371. m.MeshType = "Wedge"
  372. m.Scale = Vector3.new(0.1, 0.4, 0.5)
  373. m.Parent = p
  374. local w = Instance.new("Weld")
  375. w.Part0 = p
  376. w.Part1 = pm
  377. w.C0 = CFrame.new(0, 0, 4.1) * CFrame.fromEulerAnglesXYZ(0, 0, 3.14)
  378. w.C1 = CFrame.new()
  379. w.Parent = p
  380. Player.Character.Humanoid.WalkSpeed = 25
  381. end
  382.  
  383.  
  384. function removeParts()
  385. if Player.Character:FindFirstChild("Suit") ~= nil then
  386. Player.Character.Suit:Remove()
  387. end
  388. Player.Character.Humanoid.WalkSpeed = 16
  389. end
  390.  
  391.  
  392. function onDied()
  393. wait(4.9)
  394. if script.Parent.Parent == nil then return end
  395. script.Parent.Parent = nil
  396. wait(0.1)
  397. script.Parent = Player.Backpack
  398. Player.Character.Humanoid.Died:connect(onDied)
  399. end
  400.  
  401.  
  402. function SetAngle(Joint, Angle, Character)
  403. if Character == nil then return false end
  404. local Joints = {
  405. Character.Torso:FindFirstChild("Right Shoulder 2"),
  406. Character.Torso:FindFirstChild("Left Shoulder 2"),
  407. Character.Torso:FindFirstChild("Right Hip 2"),
  408. Character.Torso:FindFirstChild("Left Hip 2")
  409. }
  410. if Joints[Joint] == nil then return false end
  411. if Joint == 1 or Joint == 3 then
  412. Joints[Joint].DesiredAngle = Angle
  413. end
  414. if Joint == 2 or Joint == 4 then
  415. Joints[Joint].DesiredAngle = -Angle
  416. end
  417. end
  418.  
  419.  
  420. function ForceAngle(Joint, Angle, Character)
  421. if Character == nil then return false end
  422. local Joints = {
  423. Character.Torso:FindFirstChild("Right Shoulder 2"),
  424. Character.Torso:FindFirstChild("Left Shoulder 2"),
  425. Character.Torso:FindFirstChild("Right Hip 2"),
  426. Character.Torso:FindFirstChild("Left Hip 2")
  427. }
  428. if Joints[Joint] == nil then return false end
  429. if Joint == 1 or Joint == 3 then
  430. Joints[Joint].DesiredAngle = Angle
  431. Joints[Joint].CurrentAngle = Angle
  432. end
  433. if Joint == 2 or Joint == 4 then
  434. Joints[Joint].DesiredAngle = -Angle
  435. Joints[Joint].CurrentAngle = -Angle
  436. end
  437. end
  438.  
  439.  
  440. function SetSpeed(Joint, Speed, Character)
  441. if Character == nil then return false end
  442. local Joints = {
  443. Character.Torso:FindFirstChild("Right Shoulder 2"),
  444. Character.Torso:FindFirstChild("Left Shoulder 2"),
  445. Character.Torso:FindFirstChild("Right Hip 2"),
  446. Character.Torso:FindFirstChild("Left Hip 2")
  447. }
  448. if Joints[Joint] == nil then return false end
  449. Joints[Joint].MaxVelocity = Speed
  450. end
  451.  
  452.  
  453. function DisableLimb(Limb, Character)
  454. if Character == nil then return false end
  455. if Character:FindFirstChild("Torso") == nil then return false end
  456. local Joints = {
  457. Character.Torso:FindFirstChild("Right Shoulder"),
  458. Character.Torso:FindFirstChild("Left Shoulder"),
  459. Character.Torso:FindFirstChild("Right Hip"),
  460. Character.Torso:FindFirstChild("Left Hip")
  461. }
  462. local Limbs = {
  463. Character:FindFirstChild("Right Arm"),
  464. Character:FindFirstChild("Left Arm"),
  465. Character:FindFirstChild("Right Leg"),
  466. Character:FindFirstChild("Left Leg")
  467. }
  468. if Joints[Limb] == nil then return false end
  469. if Limbs[Limb] == nil then return false end
  470. local Joint = Instance.new("Motor")
  471. Joint.Parent = Character.Torso
  472. Joint.Part0 = Character.Torso
  473. Joint.Part1 = Limbs[Limb]
  474. if Limb == 1 then
  475. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  476. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  477. Joint.Name = "Right Shoulder 2"
  478. elseif Limb == 2 then
  479. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  480. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  481. Joint.Name = "Left Shoulder 2"
  482. elseif Limb == 3 then
  483. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  484. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  485. Joint.Name = "Right Hip 2"
  486. elseif Limb == 4 then
  487. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  488. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  489. Joint.Name = "Left Hip 2"
  490. end
  491. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  492. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  493. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  494. Joints[Limb]:Remove()
  495. end
  496.  
  497.  
  498. function ResetLimbCFrame(Limb, Character)
  499. if Character == nil then return false end
  500. if Character.Parent == nil then return false end
  501. if Character:FindFirstChild("Torso") == nil then return false end
  502. local Joints = {
  503. Character.Torso:FindFirstChild("Right Shoulder 2"),
  504. Character.Torso:FindFirstChild("Left Shoulder 2"),
  505. Character.Torso:FindFirstChild("Right Hip 2"),
  506. Character.Torso:FindFirstChild("Left Hip 2")
  507. }
  508. local Limbs = {
  509. Character:FindFirstChild("Right Arm"),
  510. Character:FindFirstChild("Left Arm"),
  511. Character:FindFirstChild("Right Leg"),
  512. Character:FindFirstChild("Left Leg")
  513. }
  514. if Joints[Limb] == nil then return false end
  515. if Limbs[Limb] == nil then return false end
  516. if Limb == 1 then
  517. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  518. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  519. elseif Limb == 2 then
  520. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  521. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  522. elseif Limb == 3 then
  523. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  524. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  525. elseif Limb == 4 then
  526. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  527. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  528. end
  529. end
  530.  
  531.  
  532. function EnableLimb(Limb, Character)
  533. if Character == nil then return false end
  534. if Character:FindFirstChild("Torso") == nil then return false end
  535. local Joints = {
  536. Character.Torso:FindFirstChild("Right Shoulder 2"),
  537. Character.Torso:FindFirstChild("Left Shoulder 2"),
  538. Character.Torso:FindFirstChild("Right Hip 2"),
  539. Character.Torso:FindFirstChild("Left Hip 2")
  540. }
  541. local Limbs = {
  542. Character:FindFirstChild("Right Arm"),
  543. Character:FindFirstChild("Left Arm"),
  544. Character:FindFirstChild("Right Leg"),
  545. Character:FindFirstChild("Left Leg")
  546. }
  547. if Joints[Limb] == nil then return false end
  548. if Limbs[Limb] == nil then return false end
  549. if Limb == 1 then
  550. Joints[Limb].Name = "Right Shoulder"
  551. elseif Limb == 2 then
  552. Joints[Limb].Name = "Left Shoulder"
  553. elseif Limb == 3 then
  554. Joints[Limb].Name = "Right Hip"
  555. elseif Limb == 4 then
  556. Joints[Limb].Name = "Left Hip"
  557. end
  558. Animate = Character:FindFirstChild("Animate")
  559. if Animate == nil then return false end
  560. Animate = Animate:Clone()
  561. Character.Animate:Remove()
  562. Animate.Parent = Character
  563. end
  564.  
  565.  
  566. function Weld(x, y)
  567. weld = Instance.new("Weld")
  568. weld.Part0 = x
  569. weld.Part1 = y
  570. CJ = CFrame.new(x.Position)
  571. C0 = x.CFrame:inverse() * CJ
  572. C1 = y.CFrame:inverse() * CJ
  573. weld.C0 = C0
  574. weld.C1 = C1
  575. weld.Parent = x
  576. end
  577.  
  578.  
  579. function onTouched(hit, source, format)
  580. if hit.Parent == Player.Character or hit.Parent == Player.Character.Suit or hit.Parent == Player.Character.Suit.LeftArmParts or hit.Parent == Player.Character.Suit.RightArmParts then return end
  581. if format == "sword" then
  582. if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent ~= Player.Character then
  583. tagHumanoid(hit.Parent.Humanoid)
  584. if swordType == "normal" then
  585. hit.Parent.Humanoid:TakeDamage(1)
  586. elseif swordType == "slash" then
  587. hit.Parent.Humanoid:TakeDamage(10)
  588. elseif swordType == "lunge" then
  589. hit.Parent.Humanoid:TakeDamage(10)
  590. hit.Parent.Humanoid.Sit = true
  591. elseif swordType == "stab" then
  592. if Player.Character == nil then return false end
  593. if Player.Character:FindFirstChild("Suit") == nil then return false end
  594. if Player.Character.Suit:FindFirstChild("LeftArmParts") == nil then return false end
  595. if Player.Character.Suit.LeftArmParts:FindFirstChild("Sword Metal") == nil then return false end
  596. hit.Parent.Humanoid.PlatformStand = true
  597. Weld(hit, source)
  598. while hit.Parent.Humanoid ~= nil do
  599. hit.Parent.Humanoid:TakeDamage(1)
  600. wait(0.1)
  601. end
  602. end
  603. delay(3, function() untagHumanoid(hit.Parent.Humanoid) end)
  604. end
  605. end
  606. end
  607.  
  608.  
  609. function tagHumanoid(humanoid)
  610. local tag = Instance.new("ObjectValue")
  611. tag.Name = "creator" tag.Value = Player
  612. tag.Parent = humanoid end
  613. function untagHumanoid(humanoid)
  614. if humanoid ~= nil then
  615. local tag = humanoid:FindFirstChild("creator")
  616. if tag ~= nil then tag:Remove() end end end
  617.  
  618.  
  619. function onButton1Down(mouse)
  620. if controlActivated == false then return end
  621. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  622. Button1Down = true
  623. if swordUp == true and swordSlash == false and swordLunge == false and swordStab == false then
  624. local s = Instance.new("Sound")
  625. s.SoundId = "rbxasset://sounds\\swordslash.wav"
  626. s.PlayOnRemove = true
  627. s.Parent = Player.Character.Torso
  628. s:Remove()
  629. swordSlash = true
  630. swordType = "slash"
  631. SetSpeed(2, 0.5, Player.Character)
  632. SetAngle(2, 0, Player.Character)
  633. delay(0.2, function() if swordLunge ~= true then SetAngle(2, 3.14 / 2, Player.Character) swordType = "normal" end end)
  634. delay(0.3, function() if swordLunge ~= true then SetSpeed(2, 0.1, Player.Character) swordSlash = false end end)
  635. elseif swordUp == true and swordSlash == true and swordLunge == false and swordStab == false then
  636. local s = Instance.new("Sound")
  637. s.SoundId = "rbxasset://sounds\\swordlunge.wav"
  638. s.PlayOnRemove = true
  639. s.Parent = Player.Character.Torso
  640. s:Remove()
  641. swordSlash = false
  642. swordSlash2 = false
  643. swordLunge = true
  644. swordType = "lunge"
  645. SetSpeed(1, 0.5, Player.Character)
  646. SetAngle(1, 3.14 / 2, Player.Character)
  647. SetSpeed(2, 0.5, Player.Character)
  648. SetAngle(2, 3.14 / 2, Player.Character)
  649. if Player.Character.Suit.LeftArmParts:FindFirstChild("Handle") ~= nil then
  650. if Player.Character.Suit.LeftArmParts.Handle:FindFirstChild("Weld") ~= nil then
  651. OldWeldLeft = Player.Character.Suit.LeftArmParts.Handle.Weld.C0
  652. Player.Character.Suit.LeftArmParts.Handle.Weld.C0 = CFrame.new(0, 0, 1) * CFrame.fromEulerAnglesXYZ(3.14 / 2, 0, 0)
  653. end
  654. end
  655. if Player.Character.Suit.RightArmParts:FindFirstChild("Handle") ~= nil then
  656. if Player.Character.Suit.RightArmParts.Handle:FindFirstChild("Weld") ~= nil then
  657. OldWeldRight = Player.Character.Suit.RightArmParts.Handle.Weld.C0
  658. Player.Character.Suit.RightArmParts.Handle.Weld.C0 = CFrame.new(0, 0, 1) * CFrame.fromEulerAnglesXYZ(3.14 / 2, 0, 0)
  659. end
  660. end
  661. Player.Character.Torso.Velocity = Player.Character.Torso.Velocity + ((Player.Character.Torso.CFrame.lookVector * 100) + Vector3.new(0, 10, 0))
  662. wait(1)
  663. SetAngle(1, 3.14 / 2, Player.Character)
  664. SetSpeed(1, 0.3, Player.Character)
  665. SetAngle(2, 3.14 / 2, Player.Character)
  666. SetSpeed(2, 0.3, Player.Character)
  667. SetAngle(3, 3.14 / 2, Player.Character)
  668. SetSpeed(3, 0.3, Player.Character)
  669. SetAngle(4, 3.14 / 2, Player.Character)
  670. SetSpeed(4, 0.3, Player.Character)
  671. swordType = "normal"
  672. if Player.Character.Suit.LeftArmParts:FindFirstChild("Handle") ~= nil then
  673. if Player.Character.Suit.LeftArmParts.Handle:FindFirstChild("Weld") ~= nil then
  674. Player.Character.Suit.LeftArmParts.Handle.Weld.C0 = OldWeldLeft
  675. end
  676. end
  677. if Player.Character.Suit.RightArmParts:FindFirstChild("Handle") ~= nil then
  678. if Player.Character.Suit.RightArmParts.Handle:FindFirstChild("Weld") ~= nil then
  679. Player.Character.Suit.RightArmParts.Handle.Weld.C0 = OldWeldRight
  680. end
  681. end
  682. wait(0.25)
  683. SetSpeed(1, 0.1, Player.Character)
  684. SetSpeed(2, 0.1, Player.Character)
  685. swordLunge = false
  686. end
  687. end
  688.  
  689.  
  690. function onButton1Up(mouse)
  691. Button1Down = false
  692. if swordUp == true and swordSlash2 == false and swordLunge == false and swordStab == false then
  693. local s = Instance.new("Sound")
  694. s.SoundId = "rbxasset://sounds\\swordslash.wav"
  695. s.PlayOnRemove = true
  696. s.Parent = Player.Character.Torso
  697. s:Remove()
  698. swordSlash2 = true
  699. swordType = "slash"
  700. SetSpeed(1, 0.5, Player.Character)
  701. SetAngle(1, 0, Player.Character)
  702. delay(0.2, function() if swordLunge ~= true then SetAngle(1, 3.14 / 2, Player.Character) swordType = "normal" end end)
  703. delay(0.3, function() if swordLunge ~= true then SetSpeed(1, 0.1, Player.Character) swordSlash2 = false end end)
  704. end
  705. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  706. end
  707.  
  708.  
  709. function onKeyDown(key, mouse)
  710. key = key:lower()
  711. if key == "q" then
  712. if controlActivated == false then
  713. if Player.Character ~= nil then
  714. if Player.Character:FindFirstChild("Suit") == nil then
  715. makeParts()
  716. controlActivated = true
  717. local s = Instance.new("Sound")
  718. s.SoundId = "rbxasset://sounds\\unsheath.wav"
  719. s.Pitch = 1.1
  720. s.PlayOnRemove = true
  721. s.Parent = Player.Character.Torso
  722. s:Remove()
  723. end
  724. end
  725. elseif controlActivated == true then
  726. if Player.Character ~= nil then
  727. if swordSlash == false and swordLunge == false and swordStab == false then
  728. removeParts()
  729. ResetLimbCFrame(1, Player.Character)
  730. ResetLimbCFrame(2, Player.Character)
  731. controlActivated = false
  732. local s = Instance.new("Sound")
  733. s.SoundId = "rbxasset://sounds\\unsheath.wav"
  734. s.Pitch = 0.9
  735. s.PlayOnRemove = true
  736. s.Parent = Player.Character.Torso
  737. s:Remove()
  738. EnableLimb(1, Player.Character)
  739. EnableLimb(2, Player.Character)
  740. EnableLimb(3, Player.Character)
  741. EnableLimb(4, Player.Character)
  742. swordUp = false
  743. end
  744. end
  745. end
  746. end
  747. if key == "z" then
  748. onDeselected(mouse)
  749. removeParts()
  750. mouse.Icon = ""
  751. script.Parent:Remove()
  752. end
  753. if controlActivated ~= true then return end
  754. if key == "f" then
  755. if swordSlash == false and swordSlash2 == false and swordLunge == false and swordStab == false and swordUp == false then
  756. DisableLimb(1, Player.Character)
  757. DisableLimb(2, Player.Character)
  758. SetAngle(1, 3.14 / 2, Player.Character)
  759. SetAngle(2, 3.14 / 2, Player.Character)
  760. swordUp = true
  761. elseif swordSlash == false and swordSlash2 == false and swordLunge == false and swordStab == false and swordUp == true then
  762. SetAngle(1, 0, Player.Character)
  763. SetAngle(2, 0, Player.Character)
  764. EnableLimb(1, Player.Character)
  765. EnableLimb(2, Player.Character)
  766. swordUp = false
  767. end
  768. end
  769. if key == "g" then
  770. if swordSlash == false and swordLunge == false and swordStab == false then
  771. swordStab = true
  772. if swordUp == false then
  773. DisableLimb(1, Player.Character)
  774. DisableLimb(2, Player.Character)
  775. end
  776. local s = Instance.new("Sound")
  777. s.SoundId = "rbxasset://sounds\\swordslash.wav"
  778. s.Pitch = 0.75
  779. s.PlayOnRemove = true
  780. s.Parent = Player.Character.Torso
  781. s:Remove()
  782. SetSpeed(1, 0.5, Player.Character)
  783. SetAngle(1, 0, Player.Character)
  784. SetSpeed(2, 0.5, Player.Character)
  785. SetAngle(2, 0, Player.Character)
  786. wait(0.25)
  787. swordType = "stab"
  788. SetSpeed(1, 0.5, Player.Character)
  789. SetAngle(1, 3.14, Player.Character)
  790. SetSpeed(2, 0.5, Player.Character)
  791. SetAngle(2, 3.14, Player.Character)
  792. wait(0.5)
  793. SetSpeed(1, 0.1, Player.Character)
  794. SetAngle(1, 3.14 / 1.5, Player.Character)
  795. SetSpeed(2, 0.1, Player.Character)
  796. SetAngle(2, 3.14 / 1.5, Player.Character)
  797. swordType = "normal"
  798. swordStab = false
  799. end
  800. end
  801. if key == "x" then
  802. if Player.Character ~= nil then
  803. if Player.Character:FindFirstChild("Torso") ~= nil then
  804. Player.Character.Torso.CFrame = CFrame.new(mouse.Hit.p + Vector3.new(0, 2.75, 0))
  805. end
  806. end
  807. end
  808. end
  809.  
  810.  
  811. function onSelected(mouse)
  812. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  813. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  814. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  815. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  816. end
  817.  
  818.  
  819. function onDeselected(mouse)
  820. --To do
  821. end
  822.  
  823.  
  824. if script.Parent.ClassName ~= "HopperBin" then
  825. if Player == nil then print("Error: Player not found!") return end
  826. Tool = Instance.new("HopperBin")
  827. Tool.Name = "Suit Control"
  828. Tool.Parent = Player.Backpack
  829. script.Name = "Main"
  830. script.Parent = Tool
  831. Player.Character.Humanoid.Died:connect(onDied)
  832. elseif script.Parent.ClassName == "HopperBin" then
  833. end wait() if script.Parent.ClassName == "HopperBin" then
  834. while script.Parent.Parent.ClassName ~= "Backpack" do
  835. wait()
  836. end
  837. Player = script.Parent.Parent.Parent
  838. script.Parent.Selected:connect(onSelected)
  839. script.Parent.Deselected:connect(onDeselected)
  840. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement