Advertisement
HenloMyDude

medic

Aug 25th, 2019
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.79 KB | None | 0 0
  1.  
  2. script.Name = "Medic"
  3. wait(0.25)
  4. if owner == nil then script:Destroy() return end
  5. function Hit(hit,p,d,s)
  6. if hit and hit.Parent then
  7. local Humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid")
  8. if Humanoid then
  9. if p then
  10. p:Emit(16)
  11. end
  12. Humanoid.Health = Humanoid.Health + 3
  13. if s then
  14. Humanoid.Health = Humanoid.Health + 24
  15. if d then
  16. d.PlaybackSpeed = 1.2
  17. d:Play()
  18. end
  19. end
  20.  
  21. end
  22. end
  23. end
  24. function Ready()
  25. local Tool = Instance.new("Tool",owner.Backpack)
  26. Tool.Name = "Medic"
  27. Tool.TextureId = "rbxasset://textures/DevConsole/Maximize.png"
  28. Tool.GripPos = Vector3.new(0.4,0,1)
  29. local Torso = Instance.new("Part",Tool)
  30. Torso.Name = "Handle"
  31. Torso.Size = Vector3.new(1,2,3)
  32. Torso.BrickColor = BrickColor.new("Medium stone grey")
  33. Torso.Material = Enum.Material.Wood
  34. Torso.Locked = true
  35. local SoundA = Instance.new("Sound",Torso)
  36. SoundA.SoundId = "rbxasset://sounds/swordslash.wav"
  37. SoundA.Volume = 1.2
  38. local SoundB = Instance.new("Sound",Torso)
  39. SoundB.SoundId = "rbxasset://sounds/swordlunge.wav"
  40. SoundB.Volume = 1.2
  41. local SoundC = Instance.new("Sound",Torso)
  42. SoundC.SoundId = "rbxasset://sounds/flashbulb.wav"
  43. SoundC.Volume = 1.2
  44. local SoundD = Instance.new("Sound",Torso)
  45. SoundD.SoundId = "rbxasset://sounds/hit.wav"
  46. SoundD.Volume = 1.2
  47. local A = Instance.new("Attachment",Torso)
  48. local Particles = Instance.new("ParticleEmitter",A)
  49. Particles.LightEmission = 1
  50. Particles.LightInfluence = 0.2
  51. Particles.Drag = 16
  52. Particles.Enabled = false
  53. Particles.Lifetime = NumberRange.new(0.8,1.4)
  54. Particles.Rate = 100
  55. Particles.EmissionDirection = Enum.NormalId.Top
  56. Particles.SpreadAngle = Vector2.new(-360,360)
  57. Particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.8,0),NumberSequenceKeypoint.new(1,1)})
  58. Particles.Texture = "rbxasset://textures/DevConsole/Maximize.png"
  59. Particles.Acceleration = Vector3.new(0,40,0)
  60. Particles.Speed = NumberRange.new(40,40)
  61. Particles.Size = NumberSequence.new(0.7,0.7)
  62. local BA0 = Instance.new("Attachment",Torso)
  63. BA0.Position = Vector3.new(-0.5,0,0.5)
  64. local BA1 = Instance.new("Attachment",Torso)
  65. BA1.Position = Vector3.new(0.5,0,0.5)
  66. local ShipTrail = Instance.new("Trail",script)
  67. ShipTrail.Color = ColorSequence.new(Torso.Color)
  68. ShipTrail.Transparency = NumberSequence.new(0,1)
  69. ShipTrail.MinLength = 0.02
  70. ShipTrail.Lifetime = 0.3
  71. ShipTrail.FaceCamera = true
  72. ShipTrail.Attachment0 = BA0
  73. ShipTrail.Attachment1 = BA1
  74. local Beam = Instance.new("Beam",script)
  75. Beam.Attachment0 = A
  76. Beam.FaceCamera = true
  77. Fire = 0
  78. local CurrentHumanoid
  79. local LastSuper = false
  80. local function Equipped()
  81. Fire = math.max(-55,math.min(0,Fire))
  82. Tool.Enabled = true
  83. local Humanoid = Tool.Parent:FindFirstChildWhichIsA("Humanoid")
  84. if Humanoid then
  85. CurrentHumanoid = Humanoid
  86. end
  87. end
  88. local function Unequipped()
  89. if CurrentHumanoid then
  90. CurrentHumanoid = nil
  91. end
  92. end
  93. Tool.Equipped:Connect(Equipped)
  94. Tool.Unequipped:Connect(Unequipped)
  95. local function Touched(hit)
  96. local Humanoid = Tool.Parent:FindFirstChildWhichIsA("Humanoid")
  97. if Humanoid and Humanoid:GetState() ~= Enum.HumanoidStateType.Dead and Fire > 0 then
  98. Hit(hit,Particles,SoundD,LastSuper)
  99. if Particles then
  100. Particles.Color = ColorSequence.new(Torso.Color)
  101. end
  102. if SoundC then
  103. SoundC.PlaybackSpeed = 1.6
  104. SoundC:Play()
  105. end
  106. end
  107. end
  108. Torso.Touched:Connect(Touched)
  109. local function ValueChange()
  110. if Tool.Enabled == false then
  111. if Torso and Fire <= -24 then
  112. local Player = game:GetService("Players"):GetPlayerFromCharacter(Tool.Parent)
  113. local Character = Tool.Parent
  114. local Humanoid
  115. if Character then
  116. Humanoid = Tool.Parent:FindFirstChildWhichIsA("Humanoid")
  117. end
  118. if Humanoid and Humanoid:GetState() ~= Enum.HumanoidStateType.Dead then
  119. local Super = (Fire <= -75)
  120. LastSuper = false
  121. if Super == true then
  122. LastSuper = true
  123. end
  124. if Super then
  125. local toolanim = Instance.new("StringValue",Tool)
  126. toolanim.Name = "toolanim"
  127. toolanim.Value = "Lunge"
  128. else
  129. local toolanim = Instance.new("StringValue",Tool)
  130. toolanim.Name = "toolanim"
  131. toolanim.Value = "Slash"
  132. end
  133. if Super == true then
  134. SoundB.PlaybackSpeed = 1.75
  135. SoundB:Play()
  136. end
  137. if SoundA then
  138. SoundA.PlaybackSpeed = 1.4
  139. SoundA:Play()
  140. end
  141. Fire = 12
  142. if Super == true then
  143. Fire = 16
  144. end
  145. end
  146. end
  147. end
  148. end
  149. Tool:GetPropertyChangedSignal("Enabled"):Connect(ValueChange)
  150. local function Activated()
  151. Tool.Enabled = false
  152. end
  153. Tool.Activated:Connect(Activated)
  154. while Tool and Tool:FindFirstAncestorWhichIsA("DataModel") do
  155. Fire = Fire - 1
  156. if Fire == 0 then
  157. if CurrentHumanoid then
  158. if LastSuper then
  159. CurrentHumanoid.Health = CurrentHumanoid.Health + 480
  160. SoundD.PlaybackSpeed = 1.2
  161. SoundD:Play()
  162. else
  163. CurrentHumanoid.Health = CurrentHumanoid.Health + 12
  164. end
  165. end
  166. end
  167. if Fire == -24 then
  168. Tool.Enabled = true
  169. end
  170. if Torso and Fire <= -75 then
  171. Torso.Material = Enum.Material.Neon
  172. elseif Torso then
  173. Torso.Material = Enum.Material.Wood
  174. end
  175. if Torso then
  176. if Fire < 0 and Fire > -24 then
  177. Torso.BrickColor = BrickColor.new("Hot pink")
  178. if ShipTrail then
  179. ShipTrail.Color = ColorSequence.new(Color3.new(1,0,1))
  180. end
  181. else
  182. Torso.BrickColor = BrickColor.new("Lime green")
  183. if ShipTrail then
  184. ShipTrail.Color = ColorSequence.new(Color3.new(0,1,0))
  185. end
  186. end
  187. end
  188. if owner and owner.Parent and owner.Neutral == false then
  189. local TeamColor = owner.TeamColor
  190. Torso.BrickColor = TeamColor
  191. end
  192. wait(0.04)
  193. end
  194. end
  195. Ready()
  196. game:GetService("Debris"):AddItem(script)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement