Advertisement
astronaut32

katana

Jun 23rd, 2015
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 66.83 KB | None | 0 0
  1. -- New Yeller Katana Script--
  2.  
  3. -- IMPORTANT : AT LINE 48, ADD YOUR NAME were it says rombo51
  4.  
  5. --[[ edited by rombo51 :MEGA RARE SCRIPT
  6.  
  7. ~ How to use ~
  8. This script creates a HopperBin. To change the player it goes to, set the Player value in the script to the Instance of the player you want to give it to.
  9. Or, you could just replace your name inside it, but where's the fun in that?
  10.  
  11. ~ Moves ~
  12. Left Mouse Button: Slash
  13. E: Spin Attack
  14. R: Stab
  15. T: Sideways Slash (hold for Air Slice)
  16. Y: Fast Slash
  17. U: Grab (at close range)
  18. Hold down Left Mouse Button to choke.
  19. Double click to execute.
  20. F: Upwards Jumping Slash
  21. G: Downwards Jumping Slash
  22. H: Guard
  23. J: Dodge Left
  24. K: Dodge Right
  25. Z: Sprint
  26. X: Bow (while not moving)
  27. C: ForceField
  28. V: Remove ForceField
  29. B: GodHealth
  30. N: Health 100 (heal your body on pressed)
  31.  
  32.  
  33. Have fun
  34.  
  35. ]]--
  36.  
  37.  
  38. if script == nil then return end
  39.  
  40. if not script:findFirstChild("Player") then
  41. oPlayer = Instance.new("ObjectValue")
  42. oPlayer.Parent = script
  43. oPlayer.Name = "Player"
  44. end
  45.  
  46. ModelName = "New Yeller Katana"
  47. if script.Name ~= "PlaySound" then
  48. PlayerName = "PabloRV" ------------------------------------------------------ YOUR NAME HERE --------
  49. end
  50. if PlayerName ~= nil then
  51. Player = game.Players:findFirstChild(PlayerName)
  52. end
  53. Selected = false
  54. Connected = false
  55. Button1Down = false
  56. CanUse = true
  57. Damage = 0
  58.  
  59. if script.Parent.className == "HopperBin" then
  60. script.Parent.Name = "New Yeller Katana"
  61. script.Name = "Main"
  62. if not script:findFirstChild("Debugger") then
  63. Debugger = game:GetService("InsertService"):LoadAsset(54430469)
  64. Debugger.Parent = script
  65. end
  66. if Debugger ~= nil then
  67. if Debugger.Name ~= "Debugger" then
  68. if Debugger.className == "Model" then
  69. if Debugger:findFirstChild("Debugger") then
  70. if Debugger.Debugger.className == "Script" then
  71. Debugger.Debugger.Parent = script
  72. Debugger:remove()
  73. if script:findFirstChild("Debugger") then
  74. if script.Debugger.className == "Script" then
  75. script.Debugger.Disabled = true
  76. script.Debugger.Disabled = false
  77. if not script:findFirstChild("InHopperBin") then
  78. local InHopperBin = Instance.new("ObjectValue")
  79. InHopperBin.Parent = script
  80. InHopperBin.Name = "InHopperBin"
  81. end end end end end end end end end
  82. if script.Parent.className ~= "HopperBin" then
  83. if script.Parent.Name ~= "New Yeller Katana" then
  84. if not script:findFirstChild("InHopperBin") then
  85. HB = Instance.new("HopperBin")
  86. HB.Parent = game.Players:findFirstChild(PlayerName).Backpack
  87. HB.Name = "New YellerKatana"
  88. cloneScript = script:clone()
  89. cloneScript.Parent = HB
  90. cloneScript.Name = "Main"
  91. local InHopperBin = Instance.new("ObjectValue")
  92. InHopperBin.Parent = cloneScript
  93. InHopperBin.Name = "InHopperBin"
  94. script:remove()
  95. end end end
  96.  
  97. function SetSwordDamage(DamageNew, Time)
  98. if DamageDefault == nil then
  99. DamageDefault = Damage
  100. end
  101. if DamageNew == "Default" then
  102. Damage = DamageDefault
  103. elseif type(DamageNew) == "number" then
  104. Damage = DamageNew
  105. end
  106. if Time ~= nil then
  107. coroutine.wrap(function()
  108. local DamageResetDefault = time()
  109. DamageReset = DamageResetDefault
  110. wait(Time)
  111. if DamageReset == DamageResetDefault then
  112. Damage = DamageDefault
  113. end
  114. end)()
  115. end
  116. end
  117.  
  118.  
  119. function CheckPlayer()
  120. if Player.Character == nil then return false end
  121. if Player.Character:FindFirstChild("Torso") == nil or Player.Character:FindFirstChild("Right Arm") == nil or Player.Character:FindFirstChild("Humanoid") == nil then return false end
  122. if Player.Character.Humanoid.Health <= 0 then return false end
  123. return true
  124. end
  125.  
  126.  
  127. function PlaySound(Name, SoundId, Pitch, Volume, Looped, Parent)
  128. local NewScript = script:Clone()
  129. NewScript.Name = "PlaySound"
  130. local SoundData = Instance.new("Model", NewScript)
  131. SoundData.Name = "SoundData"
  132. Instance.new("StringValue", SoundData).Name = "_Name"
  133. SoundData._Name.Value = Name
  134. Instance.new("StringValue", SoundData).Name = "_SoundId"
  135. SoundData._SoundId.Value = SoundId
  136. Instance.new("NumberValue", SoundData).Name = "_Pitch"
  137. SoundData._Pitch.Value = Pitch
  138. Instance.new("NumberValue", SoundData).Name = "_Volume"
  139. SoundData._Volume.Value = Volume
  140. Instance.new("BoolValue", SoundData).Name = "_Looped"
  141. SoundData._Looped.Value = Looped
  142. Instance.new("ObjectValue", SoundData).Name = "_Parent"
  143. SoundData._Parent.Value = Parent
  144. NewScript.Disabled = true
  145. NewScript.Parent = game:GetService("Workspace")
  146. coroutine.wrap(function()
  147. wait(0.05)
  148. NewScript.Disabled = false
  149. end)()
  150. end
  151.  
  152.  
  153. function SetPartDamage(Damage, Break, Parent)
  154. pcall(function() Parent.PartDamage:Remove() end)
  155. local NewScript = script:Clone()
  156. NewScript.Name = "PartDamage"
  157. local DamageData = Instance.new("Model", NewScript)
  158. DamageData.Name = "DamageData"
  159. Instance.new("NumberValue", DamageData).Name = "Damage"
  160. DamageData.Damage.Value = Damage
  161. Instance.new("BoolValue", DamageData).Name = "Break"
  162. DamageData.Break.Value = Break
  163. NewScript.Disabled = true
  164. NewScript.Parent = Parent
  165. coroutine.wrap(function()
  166. wait(0.05)
  167. NewScript.Disabled = false
  168. end)()
  169. end
  170.  
  171.  
  172. function CreateParts(Parent, Format)
  173. if Parent == nil then return end
  174. local Parts = Instance.new("Model")
  175. Parts.Name = ModelName
  176. if Format == 1 then
  177. Parts.Name = Parts.Name.. " (Holstered)"
  178. end
  179. Parts.Parent = Parent
  180.  
  181. local MasterPart1 = Instance.new("Part")
  182. MasterPart1.Name = "Sheath"
  183. MasterPart1.BrickColor = BrickColor.new("New Yeller")
  184. MasterPart1.TopSurface = 0
  185. MasterPart1.BottomSurface = 0
  186. MasterPart1.formFactor = "Custom"
  187. MasterPart1.Size = Vector3.new(0.25, 0.5, 3.5)
  188. MasterPart1.Locked = true
  189. MasterPart1.Parent = Parts
  190. local Weld = Instance.new("Weld")
  191. Weld.Part0 = MasterPart1
  192. Weld.Part1 = Player.Character:FindFirstChild("Torso")
  193. Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(150), 0, 0)
  194. Weld.C1 = CFrame.new(-1.1, -1.75, 0.5)
  195. Weld.Parent = Weld.Part0
  196.  
  197. local MasterPart2 = Instance.new("Part")
  198. MasterPart2.Name = "Handle"
  199. MasterPart2.BrickColor = BrickColor.new("New Yeller")
  200. MasterPart2.TopSurface = 0
  201. MasterPart2.BottomSurface = 0
  202. MasterPart2.formFactor = "Custom"
  203. MasterPart2.Size = Vector3.new(0.3, 0.4, 1.25)
  204. MasterPart2.Locked = true
  205. MasterPart2.Parent = Parts
  206. local Weld = Instance.new("Weld")
  207. Weld.Part0 = MasterPart2
  208. if Format == 1 then
  209. Weld.Part1 = MasterPart1
  210. Weld.C1 = CFrame.new(0, 0, 2.625)
  211. elseif Format == 2 then
  212. Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
  213. Weld.C1 = CFrame.new(0, -1, -0.1)
  214. end
  215. Weld.Parent = Weld.Part0
  216. local Part = Instance.new("Part")
  217. Part.Name = "Hand Guard"
  218. Part.BrickColor = BrickColor.new("New Yeller")
  219. Part.TopSurface = 0
  220. Part.BottomSurface = 0
  221. Part.formFactor = "Custom"
  222. Part.Size = Vector3.new(0.5, 0.6, 0.25)
  223. Part.Locked = true
  224. Part.Parent = Parts
  225. local Weld = Instance.new("Weld")
  226. Weld.Part0 = Part
  227. Weld.Part1 = MasterPart2
  228. Weld.C0 = CFrame.new(0, 0, 0.75)
  229. Weld.Parent = Weld.Part0
  230. local Part = Instance.new("Part")
  231. Part.Name = "Blade Holder"
  232. Part.BrickColor = BrickColor.new("New Yeller")
  233. Part.TopSurface = 0
  234. Part.BottomSurface = 0
  235. Part.formFactor = "Custom"
  236. Part.Size = Vector3.new(0.25, 0.375, 0.2)
  237. Part.Locked = true
  238. Part.Parent = Parts
  239. local Weld = Instance.new("Weld")
  240. Weld.Part0 = Part
  241. Weld.Part1 = MasterPart2
  242. Weld.C0 = CFrame.new(0, 0, 0.9)
  243. Weld.Parent = Weld.Part0
  244. local Mesh = Instance.new("SpecialMesh", Part)
  245. Mesh.MeshType = "Brick"
  246. Mesh.Scale = Vector3.new(1, 1, 0.25)
  247. local Part = Instance.new("Part")
  248. Part.Name = "Blade"
  249. Part.BrickColor = BrickColor.new("Light stone grey")
  250. Part.Reflectance = 0.25
  251. Part.TopSurface = 0
  252. Part.BottomSurface = 0
  253. Part.formFactor = "Custom"
  254. Part.Size = Vector3.new(0.2, 0.3, 2.75)
  255. Part.Locked = true
  256. Part.Parent = Parts
  257. Part.Touched:connect(SwordTouched)
  258. local Weld = Instance.new("Weld")
  259. Weld.Part0 = Part
  260. Weld.Part1 = MasterPart2
  261. Weld.C0 = CFrame.new(0, 0, 2.25)
  262. Weld.Parent = Weld.Part0
  263. local Mesh = Instance.new("SpecialMesh", Part)
  264. Mesh.MeshType = "Brick"
  265. Mesh.Scale = Vector3.new(0.1, 1, 1)
  266. local Part = Instance.new("WedgePart")
  267. Part.Name = "Blade Tip"
  268. Part.BrickColor = BrickColor.new("Light stone grey")
  269. Part.Reflectance = 0.25
  270. Part.TopSurface = 0
  271. Part.BottomSurface = 0
  272. Part.formFactor = "Custom"
  273. Part.Size = Vector3.new(0.2, 0.3, 0.75)
  274. Part.Locked = true
  275. Part.Parent = Parts
  276. Part.Touched:connect(SwordTouched)
  277. local Weld = Instance.new("Weld")
  278. Weld.Part0 = Part
  279. Weld.Part1 = MasterPart2
  280. Weld.C0 = CFrame.new(0, 0, 4) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(180))
  281. Weld.Parent = Weld.Part0
  282. local Mesh = Instance.new("SpecialMesh", Part)
  283. Mesh.MeshType = "Wedge"
  284. Mesh.Scale = Vector3.new(0.1, 1, 1)
  285. end
  286.  
  287.  
  288. function RemoveParts(Parent, Format)
  289. if Format == 1 then
  290. pcall(function() Parent[ModelName.. " (Holstered)"]:Remove() end)
  291. elseif Format == 2 then
  292. pcall(function() Parent[ModelName]:Remove() end)
  293. end
  294. end
  295.  
  296.  
  297. function SetAngle(Joint, Angle, Character)
  298. if Character == nil then return false end
  299. local Joints = {
  300. Character.Torso:FindFirstChild("Right Shoulder 2"),
  301. Character.Torso:FindFirstChild("Left Shoulder 2"),
  302. Character.Torso:FindFirstChild("Right Hip 2"),
  303. Character.Torso:FindFirstChild("Left Hip 2")
  304. }
  305. if Joints[Joint] == nil then return false end
  306. if Joint == 1 or Joint == 3 then
  307. Joints[Joint].DesiredAngle = Angle
  308. end
  309. if Joint == 2 or Joint == 4 then
  310. Joints[Joint].DesiredAngle = -Angle
  311. end
  312. end
  313.  
  314.  
  315. function ForceAngle(Joint, Angle, Character)
  316. if Character == nil then return false end
  317. local Joints = {
  318. Character.Torso:FindFirstChild("Right Shoulder 2"),
  319. Character.Torso:FindFirstChild("Left Shoulder 2"),
  320. Character.Torso:FindFirstChild("Right Hip 2"),
  321. Character.Torso:FindFirstChild("Left Hip 2")
  322. }
  323. if Joints[Joint] == nil then return false end
  324. if Joint == 1 or Joint == 3 then
  325. Joints[Joint].DesiredAngle = Angle
  326. Joints[Joint].CurrentAngle = Angle
  327. end
  328. if Joint == 2 or Joint == 4 then
  329. Joints[Joint].DesiredAngle = -Angle
  330. Joints[Joint].CurrentAngle = -Angle
  331. end
  332. end
  333.  
  334.  
  335. function SetSpeed(Joint, Speed, Character)
  336. if Character == nil then return false end
  337. local Joints = {
  338. Character.Torso:FindFirstChild("Right Shoulder 2"),
  339. Character.Torso:FindFirstChild("Left Shoulder 2"),
  340. Character.Torso:FindFirstChild("Right Hip 2"),
  341. Character.Torso:FindFirstChild("Left Hip 2")
  342. }
  343. if Joints[Joint] == nil then return false end
  344. Joints[Joint].MaxVelocity = Speed
  345. end
  346.  
  347.  
  348. function DisableLimb(Limb, Character)
  349. if Character == nil then return false end
  350. if Character:FindFirstChild("Torso") == nil then return false end
  351. local Joints = {
  352. Character.Torso:FindFirstChild("Right Shoulder"),
  353. Character.Torso:FindFirstChild("Left Shoulder"),
  354. Character.Torso:FindFirstChild("Right Hip"),
  355. Character.Torso:FindFirstChild("Left Hip")
  356. }
  357. local Limbs = {
  358. Character:FindFirstChild("Right Arm"),
  359. Character:FindFirstChild("Left Arm"),
  360. Character:FindFirstChild("Right Leg"),
  361. Character:FindFirstChild("Left Leg")
  362. }
  363. if Joints[Limb] == nil then return false end
  364. if Limbs[Limb] == nil then return false end
  365. local Joint = Instance.new("Motor")
  366. Joint.Parent = Character.Torso
  367. Joint.Part0 = Character.Torso
  368. Joint.Part1 = Limbs[Limb]
  369. if Limb == 1 then
  370. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  371. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  372. Joint.Name = "Right Shoulder 2"
  373. elseif Limb == 2 then
  374. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  375. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  376. Joint.Name = "Left Shoulder 2"
  377. elseif Limb == 3 then
  378. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  379. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  380. Joint.Name = "Right Hip 2"
  381. elseif Limb == 4 then
  382. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  383. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  384. Joint.Name = "Left Hip 2"
  385. end
  386. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  387. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  388. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  389. Joints[Limb]:Remove()
  390. end
  391.  
  392.  
  393. function ResetLimbCFrame(Limb, Character)
  394. if Character == nil then return false end
  395. if Character.Parent == nil then return false end
  396. if Character:FindFirstChild("Torso") == nil then return false end
  397. local Joints = {
  398. Character.Torso:FindFirstChild("Right Shoulder 2"),
  399. Character.Torso:FindFirstChild("Left Shoulder 2"),
  400. Character.Torso:FindFirstChild("Right Hip 2"),
  401. Character.Torso:FindFirstChild("Left Hip 2")
  402. }
  403. local Limbs = {
  404. Character:FindFirstChild("Right Arm"),
  405. Character:FindFirstChild("Left Arm"),
  406. Character:FindFirstChild("Right Leg"),
  407. Character:FindFirstChild("Left Leg")
  408. }
  409. if Joints[Limb] == nil then return false end
  410. if Limbs[Limb] == nil then return false end
  411. if Limb == 1 then
  412. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  413. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  414. elseif Limb == 2 then
  415. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  416. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  417. elseif Limb == 3 then
  418. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  419. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  420. elseif Limb == 4 then
  421. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  422. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  423. end
  424. end
  425.  
  426.  
  427. function EnableLimb(Limb, Character)
  428. if Character == nil then return false end
  429. if Character:FindFirstChild("Torso") == nil then return false end
  430. local Joints = {
  431. Character.Torso:FindFirstChild("Right Shoulder 2"),
  432. Character.Torso:FindFirstChild("Left Shoulder 2"),
  433. Character.Torso:FindFirstChild("Right Hip 2"),
  434. Character.Torso:FindFirstChild("Left Hip 2")
  435. }
  436. local Limbs = {
  437. Character:FindFirstChild("Right Arm"),
  438. Character:FindFirstChild("Left Arm"),
  439. Character:FindFirstChild("Right Leg"),
  440. Character:FindFirstChild("Left Leg")
  441. }
  442. if Joints[Limb] == nil then return false end
  443. if Limbs[Limb] == nil then return false end
  444. if Limb == 1 then
  445. Joints[Limb].Name = "Right Shoulder"
  446. elseif Limb == 2 then
  447. Joints[Limb].Name = "Left Shoulder"
  448. elseif Limb == 3 then
  449. Joints[Limb].Name = "Right Hip"
  450. elseif Limb == 4 then
  451. Joints[Limb].Name = "Left Hip"
  452. end
  453. Animate = Character:FindFirstChild("Animate")
  454. if Animate == nil then return false end
  455. Animate = Animate:Clone()
  456. Character.Animate:Remove()
  457. Animate.Parent = Character
  458. end
  459.  
  460.  
  461. function Weld(x, y)
  462. weld = Instance.new("Weld")
  463. weld.Part0 = x
  464. weld.Part1 = y
  465. CJ = CFrame.new(x.Position)
  466. C0 = x.CFrame:inverse() * CJ
  467. C1 = y.CFrame:inverse() * CJ
  468. weld.C0 = C0
  469. weld.C1 = C1
  470. weld.Parent = x
  471. end
  472.  
  473.  
  474. function SwordTouched(Hit)
  475. if Hit:IsDescendantOf(Player.Character) then return end
  476. if Hit.Parent:FindFirstChild("Humanoid") ~= nil then
  477. tagHumanoid(Hit.Parent.Humanoid)
  478. Hit.Parent.Humanoid:TakeDamage(Damage)
  479. wait()
  480. pcall(function() untagHumanoid(hit.Parent.Humanoid) end)
  481. end
  482. end
  483.  
  484.  
  485. function tagHumanoid(humanoid)
  486. local tag = Instance.new("ObjectValue")
  487. tag.Name = "creator"
  488. tag.Value = Player
  489. tag.Parent = humanoid
  490. end
  491.  
  492.  
  493. function untagHumanoid(humanoid)
  494. if humanoid ~= nil then
  495. local tag = humanoid:findFirstChild("creator")
  496. if tag ~= nil then
  497. tag:Remove()
  498. end
  499. end
  500. end
  501.  
  502.  
  503. function onButton1Down(Mouse)
  504. if Button1Down == true then return end
  505. Button1Down = true
  506. if CheckPlayer() == false then return end
  507. if KeyUGrab == true and KeyUGrabCharacter ~= nil and KeyUChoke ~= true and KeyUSlit ~= true then
  508. KeyUChoke = true
  509. for i = 0, 1, 0.1 do
  510. pcall(function()
  511. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10 * i), math.rad(110 + (25 * i)), 0)
  512. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10 * i), math.rad(-110 - (25 * i)), 0)
  513. end)
  514. wait()
  515. end
  516. pcall(function()
  517. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10), math.rad(135), 0)
  518. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10), math.rad(-135), 0)
  519. end)
  520. while Button1Down == true and KeyUGrab == true and Selected == true do
  521. if KeyUGrabCharacter.Humanoid.Health - 0.5 <= 0 and KeyUGrabCharacter:FindFirstChild("Head") ~= nil then
  522. pcall(function() KeyUWeld:Remove() end)
  523. for _, Part in pairs(KeyUGrabCharacter.Head:GetChildren()) do
  524. pcall(function()
  525. Part.SoundId = ""
  526. Part.Volume = 0
  527. Part.Pitch = 0
  528. end)
  529. end
  530. wait(0.1)
  531. KeyUGrabCharacter.Humanoid.Health = 0
  532. else
  533. KeyUGrabCharacter.Humanoid:TakeDamage(0.5)
  534. end
  535. if math.random(1, 20) == 1 then
  536. local BillboardGui = Instance.new("BillboardGui")
  537. BillboardGui.Parent = KeyUGrabCharacter
  538. BillboardGui.Adornee = KeyUGrabCharacter:FindFirstChild("Head")
  539. BillboardGui.Size = UDim2.new(1, 0, 1, 0)
  540. BillboardGui.StudsOffset = Vector3.new(0, 0.5, 0)
  541. local TextLabel = Instance.new("TextLabel")
  542. TextLabel.Parent = BillboardGui
  543. TextLabel.Position = UDim2.new(0, 0, 0, 0)
  544. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  545. TextLabel.Text = (function()
  546. local Choice1 = math.random(1, 5)
  547. if Choice1 == 1 then
  548. Choice1 = "Hrk"
  549. elseif Choice1 == 2 then
  550. Choice1 = "Hk"
  551. elseif Choice1 == 3 then
  552. Choice1 = "Gak"
  553. elseif Choice1 == 4 then
  554. Choice1 = "Mmph"
  555. elseif Choice1 == 5 then
  556. Choice1 = "Mph"
  557. end
  558. local Choice2 = math.random(1, 5)
  559. if Choice2 == 1 then
  560. Choice2 = "!"
  561. elseif Choice2 == 2 then
  562. Choice2 = "?"
  563. elseif Choice2 == 3 then
  564. Choice2 = "..."
  565. elseif Choice2 == 4 then
  566. Choice2 = "-"
  567. elseif Choice2 == 5 then
  568. Choice2 = "!?"
  569. elseif Choice2 == 5 then
  570. Choice2 = "?!"
  571. end
  572. return Choice1 .. Choice2
  573. end)()
  574. TextLabel.FontSize = "Size14"
  575. TextLabel.TextColor3 = Color3.new(math.random(0, 255) / 255, 0, 0)
  576. TextLabel.BackgroundTransparency = 1
  577. coroutine.wrap(function()
  578. local Direction = Vector3.new(math.random(-75, 75) / 1000, math.random(-75, 75) / 1000, math.random(-75, 75) / 1000)
  579. for i = 0, math.random(25, 100) do
  580. BillboardGui.StudsOffset = BillboardGui.StudsOffset + Direction
  581. wait()
  582. end
  583. for i = 0, 1, 0.05 do
  584. BillboardGui.StudsOffset = BillboardGui.StudsOffset + (Direction * (1 - i)) - Vector3.new(0, 0.5 * i, 0)
  585. TextLabel.TextTransparency = i
  586. wait()
  587. end
  588. BillboardGui:Remove()
  589. end)()
  590. end
  591. wait()
  592. end
  593. for i = 0, 1, 0.1 do
  594. pcall(function()
  595. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10 * (1 - i)), math.rad(135 - (25 * i)), 0)
  596. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10 * (1 - i)), math.rad(-135 + (25 * i)), 0)
  597. end)
  598. wait()
  599. end
  600. pcall(function()
  601. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(110), 0)
  602. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-110), 0)
  603. end)
  604. KeyUChoke = false
  605. elseif KeyUChoke == true and KeyUSlit ~= true then
  606. KeyUSlit = true
  607. while KeyUChoke == true do wait() end
  608. for i = 0, 1, 0.25 do
  609. pcall(function()
  610. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1 + (0.5 * i), 0.5, -0.75 + (0.75 * i)) * CFrame.fromEulerAnglesXYZ(0, math.rad(110 - (100 * i)), 0)
  611. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-110 + (50 * i)), 0)
  612. end)
  613. wait()
  614. end
  615. pcall(function() KeyUWeld:Remove() end)
  616. KeyUGrabCharacter.Humanoid.Health = 0
  617. wait(1)
  618. KeyUSlit = false
  619. CanUse = true
  620. elseif CanUse == true then
  621. CanUse = false
  622. PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(150, 175) / 100, 1, false, Player.Character[ModelName].Blade)
  623. SetSwordDamage(2)
  624. SetSpeed(1, 0.75, Player.Character)
  625. SetAngle(1, math.rad(125), Player.Character)
  626. wait(0.15)
  627. SetSwordDamage(10, 0.2)
  628. SetSpeed(1, 1, Player.Character)
  629. SetAngle(1, math.rad(-10), Player.Character)
  630. wait(0.15)
  631. SetSpeed(1, 0.5, Player.Character)
  632. SetAngle(1, math.rad(90), Player.Character)
  633. wait(0.05)
  634. CanUse = true
  635. end
  636. end
  637.  
  638.  
  639. function onButton1Up(Mouse)
  640. Button1Down = false
  641. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  642. end
  643.  
  644.  
  645. function onKeyDown(Key, Mouse)
  646. if Selected == false then return end
  647. Key = Key:lower()
  648. if Key == "u" then
  649. if KeyUGrab == true then
  650. KeyUGrab = false
  651. end
  652. end
  653. if Button1Down == false and CanUse == true and CheckPlayer() == true then
  654. if Key == "q" then
  655. if Mouse.Target == nil then return end
  656. if CheckPlayer() == false then return end
  657. local NewPlayer = game:GetService("Players"):GetPlayerFromCharacter(Mouse.Target.Parent)
  658. if NewPlayer == nil then return end
  659. if NewPlayer.Character == nil then return end
  660. if NewPlayer.Character:FindFirstChild("Torso") == nil then return end
  661. if (NewPlayer.Character.Torso.CFrame.p - Player.Character.Torso.CFrame.p).magnitude > 10 then return end
  662. onDeselected(Mouse)
  663. wait()
  664. RemoveParts(Player.Character, 1)
  665. script.Parent.Parent = NewPlayer.Backpack
  666. Player = NewPlayer
  667. end
  668. if Key == "e" then
  669. CanUse = false
  670. local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
  671. local Direction = Player.Character.Torso.CFrame.lookVector
  672. Player.Character.Humanoid.WalkSpeed = 0
  673. DisableLimb(2, Player.Character)
  674. DisableLimb(3, Player.Character)
  675. DisableLimb(4, Player.Character)
  676. SetSpeed(1, 0.2, Player.Character)
  677. SetSpeed(2, 0.2, Player.Character)
  678. SetSpeed(3, 0.05, Player.Character)
  679. SetSpeed(4, 0.05, Player.Character)
  680. SetAngle(1, math.rad(90), Player.Character)
  681. SetAngle(2, math.rad(90), Player.Character)
  682. SetAngle(3, math.rad(35), Player.Character)
  683. SetAngle(4, math.rad(-35), Player.Character)
  684. for i = 0, 1, 0.075 do
  685. pcall(function()
  686. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), math.rad(180 * i), 0)
  687. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
  688. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
  689. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
  690. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
  691. end)
  692. wait()
  693. end
  694. pcall(function()
  695. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(180 * i), 0)
  696. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0)
  697. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0)
  698. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0)
  699. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0, 0.5, 0)
  700. end)
  701. SetSwordDamage(10, 2.5)
  702. local BodyVelocity = Instance.new("BodyVelocity")
  703. BodyVelocity.maxForce = Vector3.new(math.huge, 0, math.huge)
  704. BodyVelocity.velocity = Direction * (OldWalkSpeed * 1.5)
  705. BodyVelocity.Parent = Player.Character.Torso
  706. local BodyAngularVelocity = Instance.new("BodyAngularVelocity")
  707. BodyAngularVelocity.maxTorque = Vector3.new(0, math.huge, 0)
  708. BodyAngularVelocity.angularvelocity = Vector3.new(0, 37.5, 0)
  709. BodyAngularVelocity.Parent = Player.Character.Torso
  710. for i = 0, 1, 0.01 do
  711. PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(125, 200) / 100, 1, false, Player.Character[ModelName].Blade)
  712. local Wave = Instance.new("Part")
  713. Wave.Name = "Wave"
  714. Wave.BrickColor = BrickColor.new("Light stone grey")
  715. Wave.TopSurface = 0
  716. Wave.BottomSurface = 0
  717. Wave.Transparency = math.cos(i * math.pi * 1.85)
  718. Wave.Transparency = Wave.Transparency < 0.4 and 0.4 or Wave.Transparency
  719. Wave.Anchored = true
  720. Wave.CanCollide = false
  721. Wave.formFactor = "Custom"
  722. Wave.Size = Vector3.new(math.random(12, 15), 1, math.random(13, 16))
  723. Wave.CFrame = Player.Character.Torso.CFrame * CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-5, 5)), 0, math.rad(math.random(-5, 5)))
  724. Wave.Parent = game:GetService("Workspace")
  725. local Mesh = Instance.new("CylinderMesh", Wave)
  726. local Size = math.random(14, 16)
  727. Mesh.Scale = Vector3.new(1, 0.075, 1)
  728. coroutine.wrap(function()
  729. for i = Wave.Transparency, 1, 0.1 do
  730. Wave.Transparency = i
  731. wait()
  732. end
  733. Wave:Remove()
  734. end)()
  735. wait()
  736. end
  737. for i = 1, 25 do
  738. BodyVelocity.velocity = BodyVelocity.velocity / 1.2
  739. BodyAngularVelocity.angularvelocity = BodyAngularVelocity.angularvelocity / 1.075
  740. wait()
  741. end
  742. BodyVelocity:Remove()
  743. BodyAngularVelocity:Remove()
  744. SetAngle(2, 0, Player.Character)
  745. SetAngle(3, 0, Player.Character)
  746. SetAngle(4, 0, Player.Character)
  747. for i = 1, 0, -0.075 do
  748. pcall(function()
  749. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), math.rad(180 * i), 0)
  750. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
  751. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
  752. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
  753. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
  754. end)
  755. wait()
  756. end
  757. pcall(function()
  758. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
  759. end)
  760. ResetLimbCFrame(1, Player.Character)
  761. ResetLimbCFrame(2, Player.Character)
  762. ResetLimbCFrame(3, Player.Character)
  763. ResetLimbCFrame(4, Player.Character)
  764. SetSpeed(1, 0.5, Player.Character)
  765. SetSpeed(2, 0.5, Player.Character)
  766. SetSpeed(3, 0.1, Player.Character)
  767. SetSpeed(4, 0.1, Player.Character)
  768. EnableLimb(1, Player.Character)
  769. EnableLimb(2, Player.Character)
  770. EnableLimb(3, Player.Character)
  771. EnableLimb(4, Player.Character)
  772. DisableLimb(1, Player.Character)
  773. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
  774. CanUse = true
  775. end
  776. if Key == "r" then
  777. CanUse = false
  778. local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
  779. local Direction = Player.Character.Torso.CFrame.lookVector
  780. Player.Character.Humanoid.WalkSpeed = 0
  781. DisableLimb(2, Player.Character)
  782. DisableLimb(3, Player.Character)
  783. DisableLimb(4, Player.Character)
  784. SetSpeed(1, 0.1, Player.Character)
  785. SetSpeed(2, 0.1, Player.Character)
  786. SetSpeed(3, 0.075, Player.Character)
  787. SetSpeed(4, 0.075, Player.Character)
  788. SetAngle(1, math.rad(90), Player.Character)
  789. SetAngle(2, math.rad(-45), Player.Character)
  790. SetAngle(3, math.rad(90), Player.Character)
  791. SetAngle(4, math.rad(-60), Player.Character)
  792. PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(75, 100) / 100, 1, false, Player.Character[ModelName].Blade)
  793. for i = 0, 1, 0.075 do
  794. pcall(function()
  795. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), 0, 0)
  796. end)
  797. wait()
  798. end
  799. pcall(function()
  800. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  801. end)
  802. SetSwordDamage(20, 1)
  803. local BodyVelocity = Instance.new("BodyVelocity")
  804. BodyVelocity.maxForce = Vector3.new(math.huge, 0, math.huge)
  805. BodyVelocity.velocity = Direction * (OldWalkSpeed * 5)
  806. BodyVelocity.Parent = Player.Character.Torso
  807. for i = 1, 20 do
  808. BodyVelocity.velocity = BodyVelocity.velocity / 1.15
  809. wait()
  810. end
  811. BodyVelocity:Remove()
  812. SetAngle(2, 0, Player.Character)
  813. SetAngle(3, 0, Player.Character)
  814. SetAngle(4, 0, Player.Character)
  815. for i = 1, 0, -0.1 do
  816. pcall(function()
  817. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), 0, 0)
  818. end)
  819. wait()
  820. end
  821. pcall(function()
  822. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
  823. end)
  824. SetSpeed(1, 0.5, Player.Character)
  825. SetSpeed(2, 0.5, Player.Character)
  826. SetSpeed(3, 0.1, Player.Character)
  827. SetSpeed(4, 0.1, Player.Character)
  828. EnableLimb(1, Player.Character)
  829. EnableLimb(2, Player.Character)
  830. EnableLimb(3, Player.Character)
  831. EnableLimb(4, Player.Character)
  832. DisableLimb(1, Player.Character)
  833. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
  834. CanUse = true
  835. end
  836. if Key == "t" then
  837. CanUse = false
  838. KeyTDown = true
  839. local KeyTCharge = 0
  840. local KeyTFire = false
  841. local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
  842. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed / 10
  843. for i = 0, 1, 0.1 do
  844. pcall(function()
  845. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 - (100 * i)), 0)
  846. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (90 * i)), 0)
  847. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), 0, 0)
  848. end)
  849. wait()
  850. end
  851. pcall(function()
  852. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-10), 0)
  853. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(180), 0)
  854. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  855. end)
  856. while KeyTDown == true and Mouse ~= nil and Selected == true do
  857. KeyTCharge = KeyTCharge + 1
  858. if KeyTCharge >= 35 then
  859. KeyTFire = true
  860. local Shock = Instance.new("Part", game:GetService("Workspace"))
  861. Shock.Name = "Shock Ring"
  862. Shock.BrickColor = BrickColor.new("Bright red")
  863. Shock.Transparency = 0.5
  864. Shock.Anchored = true
  865. Shock.CanCollide = false
  866. Shock.formFactor = "Custom"
  867. Shock.Size = Vector3.new(1.5, 1, 1.5)
  868. Shock.CFrame = Player.Character["Right Arm"].CFrame * CFrame.new(0, -1.5, 0.125) * CFrame.fromEulerAnglesXYZ(math.rad(180 + math.random(-25, 25)), 0, math.rad(math.random(-25, 25)))
  869. local Mesh = Instance.new("SpecialMesh", Shock)
  870. Mesh.MeshType = "FileMesh"
  871. Mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  872. Mesh.Scale = Shock.Size
  873. coroutine.wrap(function()
  874. wait()
  875. for i = Shock.Transparency, 1, 0.05 do
  876. Shock.Transparency = i
  877. Shock.CFrame = Shock.CFrame * CFrame.new(0, 0.5, 0)
  878. wait()
  879. end
  880. Shock:Remove()
  881. end)()
  882. end
  883. wait()
  884. end
  885. PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(125, 150) / 100, 1, false, Player.Character[ModelName].Blade)
  886. wait(0.05)
  887. SetSwordDamage(0, 0)
  888. local _, Position = pcall(function() return Mouse.Hit.p end)
  889. for i = 0, 1, KeyTFire == true and 0.1 or 0.2 do
  890. pcall(function()
  891. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-10 + (170 * i)), 0)
  892. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 + (10 * i)), 0, 0)
  893. end)
  894. if KeyTFire == true and type(Position) == "userdata" then
  895. local Shock = Instance.new("Part", game:GetService("Workspace"))
  896. Shock.Name = "Shock Ring"
  897. Shock.BrickColor = BrickColor.new("New Yeller")
  898. Shock.TopSurface = 0
  899. Shock.BottomSurface = 0
  900. Shock.Anchored = true
  901. Shock.CanCollide = false
  902. Shock.formFactor = "Custom"
  903. Shock.Size = Vector3.new(0.2, 0.2, 0.2)
  904. Shock.CFrame = CFrame.new(Player.Character[ModelName].Blade.CFrame.p, Position) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(math.sin((i + 1.5) * math.pi) * 25))
  905. coroutine.wrap(function()
  906. wait()
  907. for i = 0, 1, 0.05 do
  908. Shock.Transparency = i
  909. local NewPosition = Shock.CFrame * CFrame.new(0, 3, 0)
  910. Shock.Size = Shock.Size + Vector3.new(0.75, 0.5, 0.05)
  911. Shock.CFrame = NewPosition
  912. wait()
  913. end
  914. Shock:Remove()
  915. end)()
  916. SetPartDamage(0, false, Shock)
  917. end
  918. wait()
  919. end
  920. pcall(function()
  921. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(160), 0)
  922. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(100), 0, 0)
  923. end)
  924. for i = 0, 1, 0.1 do
  925. pcall(function()
  926. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(160 - (70 * i)), 0)
  927. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(180 - (90 * i)), 0)
  928. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(100 * (1 - i)), 0, 0)
  929. end)
  930. wait()
  931. end
  932. pcall(function()
  933. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
  934. end)
  935. ResetLimbCFrame(1, Player.Character)
  936. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
  937. CanUse = true
  938. end
  939. if Key == "y" then
  940. CanUse = false
  941. KeyYDown = true
  942. local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
  943. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed / 5
  944. for i = 0, 1, 0.25 do
  945. pcall(function()
  946. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), 0, 0)
  947. end)
  948. wait()
  949. end
  950. pcall(function()
  951. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  952. end)
  953. for _, Part in pairs(Player.Character[ModelName]:GetChildren()) do
  954. if Part.Name ~= "Sheath" then
  955. pcall(function() Part.Transparency = 1 end)
  956. end
  957. end
  958. SetSwordDamage(10)
  959. while KeyYDown == true and Mouse ~= nil and Selected == true do
  960. PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(150, 175) / 100, 1, false, Player.Character[ModelName].Blade)
  961. pcall(function()
  962. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0)
  963. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + math.random(-30, 30)), math.rad(math.random(-30, 30)), 0)
  964. end)
  965. local Ghost = Instance.new("Part", game:GetService("Workspace"))
  966. Ghost.Name = "Ghost"
  967. Ghost.BrickColor = BrickColor.new("New Yeller")
  968. Ghost.Anchored = true
  969. Ghost.CanCollide = false
  970. Ghost.formFactor = "Custom"
  971. Ghost.Size = Vector3.new(0.2, 0.2, 4)
  972. Ghost.CFrame = Player.Character[ModelName].Handle.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-25, 25)), math.rad(math.random(-25, 25)), 0) * CFrame.new(math.random(-100, 100) / 100, math.random(-100, 100) / 100, math.random(-4, -3))
  973. local Mesh = Instance.new("SpecialMesh", Ghost)
  974. Mesh.MeshType = "Sphere"
  975. coroutine.wrap(function()
  976. wait()
  977. for i = 0, 1, 0.1 do
  978. Ghost.Transparency = i
  979. wait()
  980. end
  981. Ghost:Remove()
  982. end)()
  983. wait()
  984. end
  985. ResetLimbCFrame(1, Player.Character)
  986. SetSwordDamage(0)
  987. for _, Part in pairs(Player.Character[ModelName]:GetChildren()) do
  988. if Part.Name ~= "Sheath" then
  989. pcall(function() Part.Transparency = 0 end)
  990. end
  991. end
  992. for i = 0, 1, 0.1 do
  993. pcall(function()
  994. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(100 * (1 - i)), 0, 0)
  995. end)
  996. wait()
  997. end
  998. pcall(function()
  999. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
  1000. end)
  1001. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
  1002. CanUse = true
  1003. end
  1004. if Key == "u" then
  1005. if KeyUGrab ~= true then
  1006. if Player.Character.Torso:FindFirstChild("IsGrabbed") ~= nil then return end
  1007. if Mouse.Target == nil then return end
  1008. KeyUGrabCharacter = Mouse.Target.Parent
  1009. if KeyUGrabCharacter == nil then return end
  1010. if KeyUGrabCharacter:FindFirstChild("Torso") == nil or KeyUGrabCharacter:FindFirstChild("Head") == nil or KeyUGrabCharacter:FindFirstChild("Humanoid") == nil then return end
  1011. if KeyUGrabCharacter.Torso:FindFirstChild("IsGrabbed") ~= nil then return end
  1012. if (KeyUGrabCharacter.Torso.CFrame.p - Player.Character.Torso.CFrame.p).magnitude > 5 then return end
  1013. CanUse = false
  1014. KeyUGrab = true
  1015. local Marker1 = Instance.new("IntValue", KeyUGrabCharacter.Torso)
  1016. Marker1.Name = "IsGrabbed"
  1017. KeyUWeld = Instance.new("Weld", Player.Character.Torso)
  1018. KeyUWeld.Name = "IsGrabbed"
  1019. KeyUWeld.Part0 = KeyUWeld.Parent
  1020. KeyUWeld.Part1 = KeyUGrabCharacter.Torso
  1021. KeyUWeld.C0 = CFrame.new(0, 0, -1.05)
  1022. DisableLimb(2, Player.Character)
  1023. SetSpeed(1, 0.2, Player.Character)
  1024. SetSpeed(2, 0.2, Player.Character)
  1025. SetAngle(1, math.rad(100), Player.Character)
  1026. SetAngle(2, math.rad(100), Player.Character)
  1027. for i = 0, 1, 0.1 do
  1028. pcall(function()
  1029. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, -0.75 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (20 * i)), 0)
  1030. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, -0.75 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (20 * i)), 0)
  1031. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(160 * i), math.rad(110 * i), 0)
  1032. end)
  1033. wait()
  1034. end
  1035. pcall(function()
  1036. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(110), 0)
  1037. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-110), 0)
  1038. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(160), math.rad(110), 0)
  1039. end)
  1040. while KeyUGrab == true and Selected == true do
  1041. if CheckPlayer() == false then break end
  1042. if KeyUWeld.Parent == nil then break end
  1043. if KeyUGrabCharacter == nil then break end
  1044. if KeyUGrabCharacter:FindFirstChild("Torso") == nil or KeyUGrabCharacter:FindFirstChild("Humanoid") == nil then break end
  1045. if KeyUGrabCharacter.Humanoid.Health <= 0 then break end
  1046. KeyUGrabCharacter.Humanoid.PlatformStand = true
  1047. wait()
  1048. end
  1049. KeyUGrab = false
  1050. while KeyUChoke == true do wait() end
  1051. pcall(function() KeyUWeld:Remove() end)
  1052. pcall(function() Marker1:Remove() end)
  1053. pcall(function() Marker2:Remove() end)
  1054. pcall(function() KeyUGrabCharacter.Humanoid.Sit = true end)
  1055. if KeyUSlit == true then
  1056. while KeyUSlit == true do wait() end
  1057. SetSpeed(1, 0.5, Player.Character)
  1058. SetSpeed(2, 0.5, Player.Character)
  1059. SetAngle(1, math.rad(90), Player.Character)
  1060. SetAngle(2, 0, Player.Character)
  1061. for i = 0, 1, 0.1 do
  1062. pcall(function()
  1063. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(10 + (80 * i)), 0)
  1064. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1 - (0.5 * i), 0.5, -0.75 + 0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-10 - (80 * i)), 0)
  1065. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(160 * (1 - i)), math.rad(110 * (1 - i)), 0)
  1066. end)
  1067. wait()
  1068. end
  1069. else
  1070. SetSpeed(1, 0.5, Player.Character)
  1071. SetSpeed(2, 0.5, Player.Character)
  1072. SetAngle(1, math.rad(90), Player.Character)
  1073. SetAngle(2, 0, Player.Character)
  1074. for i = 1, 0, -0.1 do
  1075. pcall(function()
  1076. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, -0.75 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (20 * i)), 0)
  1077. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, -0.75 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (20 * i)), 0)
  1078. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(160 * i), math.rad(110 * i), 0)
  1079. end)
  1080. wait()
  1081. end
  1082. end
  1083. ResetLimbCFrame(1, Player.Character)
  1084. ResetLimbCFrame(2, Player.Character)
  1085. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
  1086. EnableLimb(1, Player.Character)
  1087. EnableLimb(2, Player.Character)
  1088. DisableLimb(1, Player.Character)
  1089. CanUse = true
  1090. end
  1091. end
  1092. if Key == "f" then
  1093. CanUse = false
  1094. DisableLimb(2, Player.Character)
  1095. SetSpeed(1, 0.3, Player.Character)
  1096. SetSpeed(2, 0.3, Player.Character)
  1097. SetAngle(1, math.rad(45), Player.Character)
  1098. SetAngle(2, math.rad(45), Player.Character)
  1099. PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(65, 80) / 100, 1, false, Player.Character[ModelName].Blade)
  1100. for i = 0, 1, 0.25 do
  1101. pcall(function()
  1102. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
  1103. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
  1104. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), math.rad(213.25 * i), math.rad(-39 * i))
  1105. end)
  1106. wait()
  1107. end
  1108. pcall(function()
  1109. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(100), math.rad(213.25), math.rad(-39))
  1110. end)
  1111. wait(0.35)
  1112. SetSpeed(1, 0.75, Player.Character)
  1113. SetSpeed(2, 0.75, Player.Character)
  1114. SetAngle(1, math.rad(135), Player.Character)
  1115. SetAngle(2, math.rad(135), Player.Character)
  1116. SetSwordDamage(15, 0.5)
  1117. Player.Character.Humanoid.Jump = true
  1118. local Connection = Player.Character[ModelName].Blade.Touched:connect(function(Hit)
  1119. if Hit:IsDescendantOf(Player.Character) then return end
  1120. pcall(function() Hit.Parent.Humanoid.Sit = true end)
  1121. pcall(function() Hit.Parent.Torso.Velocity = (Player.Character.Torso.CFrame.lookVector * math.random(10, 25)) + Vector3.new(math.random(-10, 10), 75, math.random(-10, 10)) end)
  1122. end)
  1123. for i = 0, 1, 0.25 do
  1124. pcall(function()
  1125. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(100 + (45 * i)), math.rad(213.25 - (66.5 * i)), math.rad(-39))
  1126. end)
  1127. wait()
  1128. end
  1129. wait(0.5)
  1130. Connection:disconnect()
  1131. wait(0.25)
  1132. SetSpeed(1, 0.5, Player.Character)
  1133. SetSpeed(2, 0.5, Player.Character)
  1134. SetAngle(1, math.rad(90), Player.Character)
  1135. SetAngle(2, 0, Player.Character)
  1136. for i = 1, 0, -0.1 do
  1137. pcall(function()
  1138. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
  1139. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
  1140. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(145 * i), math.rad(146.75 * i), math.rad(-39 * i))
  1141. end)
  1142. wait()
  1143. end
  1144. pcall(function()
  1145. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
  1146. end)
  1147. ResetLimbCFrame(1, Player.Character)
  1148. ResetLimbCFrame(2, Player.Character)
  1149. EnableLimb(1, Player.Character)
  1150. EnableLimb(2, Player.Character)
  1151. DisableLimb(1, Player.Character)
  1152. CanUse = true
  1153. end
  1154. if Key == "g" then
  1155. CanUse = false
  1156. DisableLimb(2, Player.Character)
  1157. SetSpeed(1, 0.3, Player.Character)
  1158. SetSpeed(2, 0.3, Player.Character)
  1159. SetAngle(1, math.rad(135), Player.Character)
  1160. SetAngle(2, math.rad(135), Player.Character)
  1161. PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(65, 80) / 100, 1, false, Player.Character[ModelName].Blade)
  1162. for i = 0, 1, 0.25 do
  1163. pcall(function()
  1164. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
  1165. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
  1166. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(10 * i), math.rad(-28.125 * i), math.rad(-39 * i))
  1167. end)
  1168. wait()
  1169. end
  1170. pcall(function()
  1171. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(10), math.rad(-28.125), math.rad(-39))
  1172. end)
  1173. Player.Character.Humanoid.Jump = true
  1174. wait(0.4)
  1175. SetSpeed(1, 0.75, Player.Character)
  1176. SetSpeed(2, 0.75, Player.Character)
  1177. SetAngle(1, math.rad(45), Player.Character)
  1178. SetAngle(2, math.rad(45), Player.Character)
  1179. SetSwordDamage(20, 0.5)
  1180. for i = 0, 1, 0.25 do
  1181. pcall(function()
  1182. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(10 + (90 * i)), math.rad(-28.125 + (66.5 * i)), math.rad(-39))
  1183. end)
  1184. wait()
  1185. end
  1186. wait(0.5)
  1187. SetSpeed(1, 0.5, Player.Character)
  1188. SetSpeed(2, 0.5, Player.Character)
  1189. SetAngle(1, math.rad(90), Player.Character)
  1190. SetAngle(2, 0, Player.Character)
  1191. for i = 1, 0, -0.1 do
  1192. pcall(function()
  1193. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
  1194. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
  1195. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(145 * i), math.rad(146.75 * i), math.rad(-39 * i))
  1196. end)
  1197. wait()
  1198. end
  1199. pcall(function()
  1200. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
  1201. end)
  1202. ResetLimbCFrame(1, Player.Character)
  1203. ResetLimbCFrame(2, Player.Character)
  1204. EnableLimb(1, Player.Character)
  1205. EnableLimb(2, Player.Character)
  1206. DisableLimb(1, Player.Character)
  1207. CanUse = true
  1208. end
  1209. if Key == "h" then
  1210. CanUse = false
  1211. local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
  1212. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed / 10
  1213. SetAngle(1, math.rad(90), Player.Character)
  1214. SetSwordDamage(10)
  1215. for i = 0, 1, 0.01 do
  1216. pcall(function()
  1217. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(0, math.rad(360 * 15 * i), 0)
  1218. end)
  1219. PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(125, 200) / 100, 1, false, Player.Character[ModelName].Blade)
  1220. local Size = math.random(8, 12)
  1221. local Wave = Instance.new("Part")
  1222. Wave.Name = "Wave"
  1223. Wave.BrickColor = BrickColor.new("Light stone grey")
  1224. Wave.TopSurface = 0
  1225. Wave.BottomSurface = 0
  1226. Wave.Transparency = math.cos(i * math.pi * 1.85)
  1227. Wave.Transparency = Wave.Transparency < 0.4 and 0.4 or Wave.Transparency
  1228. Wave.Anchored = true
  1229. Wave.CanCollide = math.random(1, 3) == 1 and true or false
  1230. Wave.formFactor = "Custom"
  1231. Wave.Size = Vector3.new(Size, 1, Size)
  1232. Wave.CFrame = Player.Character["Right Arm"].CFrame * CFrame.new(0, math.random(-150, -125) / 100, 0) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-5, 5)), 0, math.rad(math.random(-5, 5)))
  1233. Wave.Parent = game:GetService("Workspace")
  1234. local Mesh = Instance.new("CylinderMesh", Wave)
  1235. Mesh.Scale = Vector3.new(1, 0.075, 1)
  1236. coroutine.wrap(function()
  1237. for i = Wave.Transparency, 1, 0.1 do
  1238. Wave.Transparency = i
  1239. wait()
  1240. end
  1241. Wave:Remove()
  1242. end)()
  1243. wait()
  1244. end
  1245. pcall(function()
  1246. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
  1247. end)
  1248. SetSwordDamage("Default")
  1249. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
  1250. CanUse = true
  1251. end
  1252. if Key == "x" then
  1253. if Player.Character.Torso.Velocity.x > 2 or Player.Character.Torso.Velocity.y > 2 or Player.Character.Torso.Velocity.z > 2 or Player.Character.Torso.Velocity.x < -2 or Player.Character.Torso.Velocity.y < -2 or Player.Character.Torso.Velocity.z < -2 then return end
  1254. CanUse = false
  1255. Player.Character.Torso.Anchored = true
  1256. Player.Character.Humanoid.PlatformStand = true
  1257. local Pos = Player.Character.Torso.CFrame
  1258. DisableLimb(2, Player.Character)
  1259. DisableLimb(3, Player.Character)
  1260. DisableLimb(4, Player.Character)
  1261. SetSpeed(1, 0.3, Player.Character)
  1262. SetSpeed(2, 0.3, Player.Character)
  1263. SetSpeed(3, 0.3, Player.Character)
  1264. SetSpeed(4, 0.3, Player.Character)
  1265. SetAngle(1, math.rad(90), Player.Character)
  1266. SetAngle(2, math.rad(90), Player.Character)
  1267. SetAngle(3, 0, Player.Character)
  1268. SetAngle(4, 0, Player.Character)
  1269. for i = 0, 1, 0.25 do
  1270. pcall(function()
  1271. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
  1272. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
  1273. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(10 * i), math.rad(-28.125 * i), math.rad(-39 * i))
  1274. end)
  1275. wait()
  1276. end
  1277. wait(0.1)
  1278. for i = 0, math.pi, 0.05 do
  1279. Player.Character.Torso.CFrame = Pos * CFrame.new(0, math.sin(-i) + 0.25, math.sin(-i)) * CFrame.fromEulerAnglesXYZ(math.rad(math.sin(-i) * 80), 0, 0)
  1280. ForceAngle(3, math.rad(math.sin(i) * 80), Player.Character)
  1281. ForceAngle(4, math.rad(math.sin(i) * 80), Player.Character)
  1282. wait()
  1283. end
  1284. SetAngle(2, 0, Player.Character)
  1285. for i = 1, 0, -0.25 do
  1286. pcall(function()
  1287. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
  1288. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
  1289. Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(10 * i), math.rad(-28.125 * i), math.rad(-39 * i))
  1290. end)
  1291. wait()
  1292. end
  1293. wait(0.1)
  1294. SetSpeed(1, 0.2, Player.Character)
  1295. SetSpeed(2, 0.2, Player.Character)
  1296. SetSpeed(3, 0.1, Player.Character)
  1297. SetSpeed(4, 0.1, Player.Character)
  1298. EnableLimb(1, Player.Character)
  1299. EnableLimb(2, Player.Character)
  1300. EnableLimb(3, Player.Character)
  1301. EnableLimb(4, Player.Character)
  1302. DisableLimb(1, Player.Character)
  1303. Player.Character.Torso.Velocity = Vector3.new(0, 0, 0)
  1304. Player.Character.Torso.Anchored = false
  1305. Player.Character.Humanoid.PlatformStand = false
  1306. CanUse = true
  1307. end
  1308. if Key == "j" then
  1309. CanUse = false
  1310. local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
  1311. local Direction = (Player.Character.Torso.CFrame.p - (Player.Character.Torso.CFrame * CFrame.new(3, 0, 0)).p).unit
  1312. Player.Character.Humanoid.WalkSpeed = 0
  1313. local BodyVelocity = Instance.new("BodyVelocity")
  1314. BodyVelocity.maxForce = Vector3.new(math.huge, 0, math.huge)
  1315. BodyVelocity.velocity = Direction * (OldWalkSpeed * 10)
  1316. BodyVelocity.Parent = Player.Character.Torso
  1317. for i = 1, 20 do
  1318. BodyVelocity.velocity = BodyVelocity.velocity / 1.2
  1319. wait()
  1320. end
  1321. BodyVelocity:Remove()
  1322. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
  1323. CanUse = true
  1324. end
  1325. if Key == "k" then
  1326. CanUse = false
  1327. local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
  1328. local Direction = (Player.Character.Torso.CFrame.p - (Player.Character.Torso.CFrame * CFrame.new(-3, 0, 0)).p).unit
  1329. Player.Character.Humanoid.WalkSpeed = 0
  1330. local BodyVelocity = Instance.new("BodyVelocity")
  1331. BodyVelocity.maxForce = Vector3.new(math.huge, 0, math.huge)
  1332. BodyVelocity.velocity = Direction * (OldWalkSpeed * 10)
  1333. BodyVelocity.Parent = Player.Character.Torso
  1334. for i = 1, 20 do
  1335. BodyVelocity.velocity = BodyVelocity.velocity / 1.2
  1336. wait()
  1337. end
  1338. BodyVelocity:Remove()
  1339. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
  1340. CanUse = true
  1341. end
  1342. if Key == "c" then
  1343. if not Player.Character:findFirstChild("ForceField") then
  1344. Instance.new("ForceField", Player.Character)
  1345. end
  1346. end
  1347. if Key == "v" then
  1348. if Player.Character:findFirstChild("ForceField") then
  1349. Player.Character:findFirstChild("ForceField"):remove()
  1350. end
  1351. end
  1352. if Key == "b" then
  1353. Player.Character.Humanoid.MaxHealth = math.huge
  1354. Player.Character.Humanoid.Health = math.huge
  1355. end
  1356. if Key == "n" then
  1357. Player.Character.Humanoid.MaxHealth = 100
  1358. Player.Character.Humanoid.Health = 100
  1359. end
  1360. if Key == "z" then
  1361. if KeyZDown == true then return end
  1362. local KeyZMaxTime = 25
  1363. if KeyZTime == nil then KeyZTime = KeyZMaxTime end
  1364. if KeyZTime <= 0 then return end
  1365. CanUse = false
  1366. KeyZDown = true
  1367. DisableLimb(2, Player.Character)
  1368. SetSpeed(1, 0.5, Player.Character)
  1369. SetSpeed(2, 0.5, Player.Character)
  1370. SetAngle(1, math.rad(10), Player.Character)
  1371. SetAngle(2, math.rad(10), Player.Character)
  1372. local KeyZMovement1 = Player.Character.Humanoid.Running:connect(function(Speed)
  1373. if Speed > 0 then
  1374. SetAngle(1, math.rad(-45), Player.Character)
  1375. SetAngle(2, math.rad(-45), Player.Character)
  1376. else
  1377. SetAngle(1, math.rad(10), Player.Character)
  1378. SetAngle(2, math.rad(10), Player.Character)
  1379. end
  1380. end)
  1381. local KeyZMovement2 = Player.Character.Humanoid.Jumping:connect(function()
  1382. --Player.Character.Torso.Velocity = Player.Character.Torso.Velocity + Vector3.new(0, 35, 0)
  1383. wait()
  1384. SetAngle(1, math.rad(-45), Player.Character)
  1385. SetAngle(2, math.rad(-45), Player.Character)
  1386. wait(0.15)
  1387. SetAngle(1, math.rad(180), Player.Character)
  1388. SetAngle(2, math.rad(180), Player.Character)
  1389. wait(0.5)
  1390. end)
  1391. local KeyZMovement3 = Player.Character.Humanoid.FreeFalling:connect(function()
  1392. SetAngle(1, math.rad(180), Player.Character)
  1393. SetAngle(2, math.rad(180), Player.Character)
  1394. end)
  1395. local Gui = Instance.new("ScreenGui", Player.PlayerGui)
  1396. Gui.Name = ModelName.. " Stamina Bar"
  1397. local BarUnderlay = Instance.new("Frame", Gui)
  1398. BarUnderlay.Name = "BarUnderlay"
  1399. BarUnderlay.BackgroundColor3 = Color3.new(1, 0, 0)
  1400. BarUnderlay.BorderColor3 = Color3.new(0, 0, 0)
  1401. BarUnderlay.Size = UDim2.new(0, 250, 0, 15)
  1402. BarUnderlay.Position = UDim2.new(1, -300, 1, -100)
  1403. local BarOverlay = Instance.new("Frame", Gui)
  1404. BarOverlay.Name = "BarOverlay"
  1405. BarOverlay.BackgroundColor3 = Color3.new(0, 1, 0)
  1406. BarOverlay.BorderColor3 = Color3.new(0, 0, 0)
  1407. BarOverlay.Position = UDim2.new(1, -300, 1, -100)
  1408. local TextLabel = Instance.new("TextLabel", Gui)
  1409. TextLabel.Name = "Stamina"
  1410. TextLabel.Text = "Stamina"
  1411. TextLabel.BackgroundTransparency = 1
  1412. TextLabel.BorderSizePixel = 1
  1413. TextLabel.Size = UDim2.new(0, 250, 0, 15)
  1414. TextLabel.Position = UDim2.new(1, -300, 1, -100)
  1415. coroutine.wrap(function()
  1416. for i = 1, 0, -0.1 do
  1417. BarUnderlay.BackgroundTransparency = i
  1418. BarOverlay.BackgroundTransparency = i
  1419. TextLabel.TextTransparency = i
  1420. wait()
  1421. end
  1422. end)()
  1423. local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
  1424. Player.Character.Humanoid.WalkSpeed = 0
  1425. wait(0.1)
  1426. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed * 2.5
  1427. while KeyZDown == true and KeyZTime > 0 and Selected == true do
  1428. KeyZTime = KeyZTime - 0.1
  1429. BarOverlay.Size = UDim2.new(0, 250 - ((1 - (KeyZTime / KeyZMaxTime)) * 250), 0, 15)
  1430. wait()
  1431. end
  1432. KeyZMovement1:disconnect()
  1433. KeyZMovement2:disconnect()
  1434. KeyZMovement3:disconnect()
  1435. Player.Character.Humanoid.WalkSpeed = 0
  1436. wait(0.1)
  1437. Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
  1438. SetSpeed(1, 0.2, Player.Character)
  1439. SetSpeed(2, 0.2, Player.Character)
  1440. SetAngle(1, math.rad(90), Player.Character)
  1441. SetAngle(2, 0, Player.Character)
  1442. EnableLimb(1, Player.Character)
  1443. EnableLimb(2, Player.Character)
  1444. DisableLimb(1, Player.Character)
  1445. while KeyZDown == true and Selected == true do
  1446. wait()
  1447. end
  1448. CanUse = true
  1449. while KeyZDown == false and KeyZTime < KeyZMaxTime and Selected == true do
  1450. KeyZTime = KeyZTime + 0.09
  1451. BarOverlay.Size = UDim2.new(0, 250 - ((1 - (KeyZTime / KeyZMaxTime)) * 250), 0, 15)
  1452. wait()
  1453. end
  1454. coroutine.wrap(function()
  1455. for i = 0, 1, 0.05 do
  1456. BarUnderlay.BackgroundTransparency = i
  1457. BarOverlay.BackgroundTransparency = i
  1458. TextLabel.TextTransparency = i
  1459. wait()
  1460. end
  1461. Gui:Remove()
  1462. end)()
  1463. end
  1464. end
  1465. end
  1466.  
  1467.  
  1468. function onKeyUp(Key, Mouse)
  1469. if Selected == false then return end
  1470. Key = Key:lower()
  1471. if Key == "z" then
  1472. KeyZDown = false
  1473. elseif Key == "t" then
  1474. KeyTDown = false
  1475. elseif Key == "y" then
  1476. KeyYDown = false
  1477. end
  1478. if CheckPlayer() == true then
  1479. if Button1Down == false and CanUse == true then
  1480.  
  1481. end
  1482. end
  1483. end
  1484.  
  1485.  
  1486. function onSelected(Mouse)
  1487. if script.Parent.Active == false then return end
  1488. if Selected == true then return end
  1489. while true do
  1490. if Player.Character:findFirstChild("New Yeller Katana (Holstered)") and Player.Character:findFirstChild("Back Katana") then
  1491. Player.Character:findFirstChild("New Yeller Katana (Holstered)"):remove()
  1492. end
  1493. if CheckPlayer() == true then
  1494. if Player.Character.Torso:FindFirstChild("Right Shoulder") ~= nil then
  1495. break
  1496. end
  1497. end
  1498. wait(0.1)
  1499. end
  1500. Selected = true
  1501. if script.Parent.Active == false then return end
  1502. CanUse = false
  1503. DisableLimb(1, Player.Character)
  1504. SetSpeed(1, 0.5, Player.Character)
  1505. SetAngle(1, 0, Player.Character)
  1506. DisableLimb(2, Player.Character)
  1507. SetSpeed(2, 0.5, Player.Character)
  1508. SetAngle(2, 0, Player.Character)
  1509. wait(0.05)
  1510. for i = 0, 1, 0.1 do
  1511. pcall(function()
  1512. Player.Character.Torso["Right Shoulder 2"].C0 =
  1513. CFrame.new(-0.05 * i, 0.11 * i, -0.8 * i) * CFrame.fromEulerAnglesXYZ(math.rad(50) * i, 0, math.rad(-45) * i) *
  1514. CFrame.new(1.5 * (1 - i), 0.5 * (1 - i), 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * (1 - i), 0)
  1515. Player.Character.Torso["Right Shoulder 2"].C1 =
  1516. CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * (1 - i), 0)
  1517. end)
  1518. wait()
  1519. end
  1520. RemoveParts(Player.Character, 1)
  1521. CreateParts(Player.Character, 2)
  1522. pcall(function()
  1523. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(-0.05, 0.11, -0.8) * CFrame.fromEulerAnglesXYZ(math.rad(50), 0, math.rad(-45))
  1524. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0)
  1525. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0, 0, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(200), 0, math.rad(-45))
  1526. end)
  1527. wait(0.1)
  1528. PlaySound("Unsheath", "rbxasset://sounds\\unsheath.wav", 1.25, 1, false, Player.Character[ModelName].Sheath)
  1529. SetSwordDamage(10, 0.5)
  1530. SetSpeed(2, 0.025, Player.Character)
  1531. SetAngle(2, math.rad(-15), Player.Character)
  1532. for i = 0, 1, 0.1 do
  1533. pcall(function()
  1534. Player.Character.Torso["Right Shoulder 2"].C0 =
  1535. CFrame.new(-0.05 + (0.4 * i), 0.11 + (0.49 * i), -0.8 - (0.1 * i)) * CFrame.fromEulerAnglesXYZ(math.rad(50 + (130 * i)), 0, math.rad(-45 + (10 * i)))
  1536. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2 * i, 0, -0.5 * i) * CFrame.fromEulerAnglesXYZ(math.rad(200 + (87.5 * i)), 0, math.rad(-45 - (3 * i)))
  1537. Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(150 - (40 * i)), math.rad(17.5 * i), 0)
  1538. Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.1 - (0.375 * i), -1.75, 0.5 - (0.2 * i))
  1539. end)
  1540. wait()
  1541. end
  1542. SetAngle(2, 0, Player.Character)
  1543. pcall(function()
  1544. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(0.35, 0.6, -0.9) * CFrame.fromEulerAnglesXYZ(math.rad(180), 0, math.rad(-35))
  1545. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2, 0, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(287.5), 0, math.rad(-48))
  1546. Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(110), math.rad(17.5), 0)
  1547. Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.475, -1.75, 0.3)
  1548. end)
  1549. SetAngle(1, math.rad(90), Player.Character)
  1550. for i = 0, 1, 0.1 do
  1551. pcall(function()
  1552. Player.Character.Torso["Right Shoulder 2"].C0 =
  1553. CFrame.new(1.5 * i, 0.5 * i, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * i, 0) *
  1554. CFrame.new(0.35 * (1 - i), 0.6 * (1 - i), -0.9 * (1 - i)) * CFrame.fromEulerAnglesXYZ(math.rad(180 * (1 - i)), 0, math.rad(-35 * (1 - i)))
  1555. Player.Character.Torso["Right Shoulder 2"].C1 =
  1556. CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * i, 0)
  1557. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2 * (1 - i), 0, -0.5 * (1 - i)) * CFrame.fromEulerAnglesXYZ(math.rad(287.5 * (1 - i)), 0, math.rad(-48 * (1 - i)))
  1558. Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(110 + (40 * i)), math.rad(17.5 * (1 - i)), 0)
  1559. Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.475 + (0.375 * i), -1.75, 0.3 + (0.2 * i))
  1560. end)
  1561. wait()
  1562. end
  1563. ResetLimbCFrame(1, Player.Character)
  1564. EnableLimb(1, Player.Character)
  1565. SetSpeed(2, 0.2, Player.Character)
  1566. SetAngle(2, 0, Player.Character)
  1567. EnableLimb(2, Player.Character)
  1568. DisableLimb(1, Player.Character)
  1569. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  1570. Mouse.Button1Down:connect(function() onButton1Down(Mouse) end)
  1571. Mouse.Button1Up:connect(function() onButton1Up(Mouse) end)
  1572. Mouse.KeyDown:connect(function(Key) onKeyDown(Key, Mouse) end)
  1573. Mouse.KeyUp:connect(function(Key) onKeyUp(Key, Mouse) end)
  1574. CanUse = true
  1575. end
  1576.  
  1577.  
  1578. function onDeselected(Mouse)
  1579. if Selected == false then return end
  1580. Selected = false
  1581. while CanUse == false do wait() end
  1582. RemoveParts(Player.Character, 2)
  1583. CreateParts(Player.Character, 1)
  1584. while Selected == false do
  1585. if CheckPlayer() == true then
  1586. if Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  1587. break
  1588. end
  1589. end
  1590. wait(0.1)
  1591. end
  1592. if Selected == true then return end
  1593. CanUse = false
  1594. RemoveParts(Player.Character, 1)
  1595. CreateParts(Player.Character, 2)
  1596. SetSpeed(1, 0.5, Player.Character)
  1597. SetAngle(1, 0, Player.Character)
  1598. DisableLimb(2, Player.Character)
  1599. SetSpeed(2, 0.5, Player.Character)
  1600. SetAngle(2, 0, Player.Character)
  1601. wait(0.1)
  1602. SetSpeed(2, 0.025, Player.Character)
  1603. SetAngle(2, math.rad(-15), Player.Character)
  1604. for i = 1, 0, -0.1 do
  1605. pcall(function()
  1606. Player.Character.Torso["Right Shoulder 2"].C0 =
  1607. CFrame.new(1.5 * i, 0.5 * i, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * i, 0) *
  1608. CFrame.new(0.35 * (1 - i), 0.6 * (1 - i), -0.9 * (1 - i)) * CFrame.fromEulerAnglesXYZ(math.rad(180 * (1 - i)), 0, math.rad(-35 * (1 - i)))
  1609. Player.Character.Torso["Right Shoulder 2"].C1 =
  1610. CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * i, 0)
  1611. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2 * (1 - i), 0, -0.5 * (1 - i)) * CFrame.fromEulerAnglesXYZ(math.rad(287.5 * (1 - i)), 0, math.rad(-48 * (1 - i)))
  1612. Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(110 + (40 * i)), math.rad(17.5 * (1 - i)), 0)
  1613. Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.475 + (0.375 * i), -1.75, 0.3 + (0.2 * i))
  1614. end)
  1615. wait()
  1616. end
  1617. pcall(function()
  1618. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(0.35, 0.6, -0.9) * CFrame.fromEulerAnglesXYZ(math.rad(180), 0, math.rad(-35))
  1619. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2, 0, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(287.5), 0, math.rad(-48))
  1620. Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(110), math.rad(17.5), 0)
  1621. Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.475, -1.75, 0.3)
  1622. end)
  1623. PlaySound("Sheath", "rbxasset://sounds\\unsheath.wav", -1.1, 1, true, Player.Character[ModelName].Sheath)
  1624. coroutine.wrap(function()
  1625. while Player.Character[ModelName].Sheath:FindFirstChild("Sheath") == nil do
  1626. wait()
  1627. end
  1628. wait(0.05)
  1629. Player.Character[ModelName].Sheath.Sheath.Looped = false
  1630. end)()
  1631. wait(0.15)
  1632. SetAngle(2, 0, Player.Character)
  1633. for i = 1, 0, -0.1 do
  1634. pcall(function()
  1635. Player.Character.Torso["Right Shoulder 2"].C0 =
  1636. CFrame.new(-0.05 + (0.4 * i), 0.11 + (0.49 * i), -0.8 - (0.1 * i)) * CFrame.fromEulerAnglesXYZ(math.rad(50 + (130 * i)), 0, math.rad(-45 + (10 * i)))
  1637. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2 * i, 0, -0.5 * i) * CFrame.fromEulerAnglesXYZ(math.rad(200 + (87.5 * i)), 0, math.rad(-45 - (3 * i)))
  1638. Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(150 - (40 * i)), math.rad(17.5 * i), 0)
  1639. Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.1 - (0.375 * i), -1.75, 0.5 - (0.2 * i))
  1640. end)
  1641. wait()
  1642. end
  1643. pcall(function()
  1644. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(-0.05, 0.11, -0.8) * CFrame.fromEulerAnglesXYZ(math.rad(50), 0, math.rad(-45))
  1645. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0)
  1646. Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0, 0, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(200), 0, math.rad(-45))
  1647. end)
  1648. RemoveParts(Player.Character, 2)
  1649. CreateParts(Player.Character, 1)
  1650. for i = 1, 0, -0.1 do
  1651. pcall(function()
  1652. Player.Character.Torso["Right Shoulder 2"].C0 =
  1653. CFrame.new(-0.05 * i, 0.11 * i, -0.8 * i) * CFrame.fromEulerAnglesXYZ(math.rad(50) * i, 0, math.rad(-45) * i) *
  1654. CFrame.new(1.5 * (1 - i), 0.5 * (1 - i), 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * (1 - i), 0)
  1655. Player.Character.Torso["Right Shoulder 2"].C1 =
  1656. CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * (1 - i), 0)
  1657. end)
  1658. wait()
  1659. end
  1660. SetSpeed(1, 0.25, Player.Character)
  1661. SetAngle(1, 0, Player.Character)
  1662. ResetLimbCFrame(1, Player.Character)
  1663. EnableLimb(1, Player.Character)
  1664. SetSpeed(2, 0.2, Player.Character)
  1665. SetAngle(2, 0, Player.Character)
  1666. EnableLimb(2, Player.Character)
  1667. CanUse = true
  1668. end
  1669.  
  1670.  
  1671. if script:FindFirstChild("SoundData") ~= nil then
  1672. local Sound = Instance.new("Sound")
  1673. Sound.Name = script.SoundData._Name.Value
  1674. Sound.SoundId = script.SoundData._SoundId.Value
  1675. Sound.Pitch = script.SoundData._Pitch.Value
  1676. Sound.Volume = script.SoundData._Volume.Value
  1677. Sound.Looped = script.SoundData._Looped.Value
  1678. Sound.Parent = script.SoundData._Parent.Value
  1679. Sound:Play()
  1680. script:Remove()
  1681. elseif script:FindFirstChild("DamageData") ~= nil then
  1682. script.Parent.Touched:connect(function(Hit)
  1683. if Hit.Parent == nil then return end
  1684. if script.DamageData.Break.Value == true then Hit:BreakJoints() end
  1685. if Hit.Parent:FindFirstChild("Humanoid") == nil then return end
  1686. Hit.Parent.Humanoid:TakeDamage(script.DamageData.Damage.Value)
  1687. end)
  1688. elseif script.Parent.className ~= "HopperBin" then
  1689. if Player == nil then print("Error: Player not found!") return end
  1690. Tool = Instance.new("HopperBin")
  1691. Tool.Name = ModelName
  1692. Tool.Parent = Player.Backpack
  1693. script.Name = "Main"
  1694. script.Parent = Tool
  1695. elseif script.Parent.className == "HopperBin" and Connected == false then
  1696. Connected = true
  1697. Player = script.Parent.Parent.Parent
  1698. script.Parent.Selected:connect(onSelected)
  1699. script.Parent.Deselected:connect(onDeselected)
  1700. CreateParts(Player.Character, 1)
  1701. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement