Advertisement
fidelmena73

Untitled

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