Advertisement
Hebablazin

BLACK(not raciccc) katana

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