FMER

Untitled

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