Advertisement
Friaza

Untitled

Jul 2nd, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. p = game.Players.Friaza
  2. c = p.Character
  3. Player = p
  4. ToolName = "ZapQuirk"
  5. local charge = false
  6. local on = false
  7. local enabled = true
  8. if p.Backpack:FindFirstChild(ToolName) then p.Backpack[ToolName]:Destroy() end
  9. if p.StarterGear:FindFirstChild(ToolName) == nil then
  10. script:clone().Parent = p.StarterGear
  11. end
  12. if c:FindFirstChild(ToolName) then c[ToolName]:Destroy() end
  13. x = Instance.new("Tool", c)
  14. x.Name = ToolName
  15. x.RequiresHandle = false
  16. x.CanBeDropped = false
  17.  
  18. function Electrify()
  19. if enabled == true then
  20. enabled = false
  21. if on == false then
  22. enabled = false
  23. on = true
  24. s = Instance.new("Sound", c.Torso)
  25. s.Volume = 0.1
  26. s.Volume = 0.5
  27. s.Pitch = 1.25
  28. s.SoundId = "http://www.roblox.com/asset/?id=2974000"
  29. lig = Instance.new("ParticleEmitter")
  30. lig.Texture = "http://www.roblox.com/asset/?id=4058550"
  31. lig.VelocitySpread = 50
  32. lig.Rate = 60
  33. lig.LightEmission = NumberRange.new(999)
  34. lig.Transparency = NumberSequence.new(0.8,0.8)
  35. lig.Speed = NumberRange.new(2,2)
  36. lig.Rotation = NumberRange.new(0,359)
  37. lig.EmissionDirection = "Top"
  38. lig.Lifetime = NumberRange.new(0.1,0.2)
  39. lig.Parent = c.Torso
  40. lig.Enabled = true
  41. lig.Size = NumberSequence.new(2,2)
  42. z5 = lig:clone()
  43. Hold = true
  44. count = 0
  45. tir = 0
  46. enabled = true
  47. on = true
  48. repeat wait()
  49. tir = tir +1
  50. if tir == 10 then tir = 0 if s then print(s.Volume) s.Volume = 0.1 i = math.random(1,2) if i == 1 then s:Play() end end end
  51. count = count +2
  52. until Hold == false or count > 120 or Hold == false or c.Humanoid.Health <= 1 or c.Humanoid.Sit == true or c.Humanoid.PlatformStand == true
  53. wait(0.3)
  54. if s then s.Volume = 0.1+ count/110 s:Play() end
  55. tim = math.floor(6 -count/20)
  56. enabled =false
  57. s.Volume = 0.1 +count/150
  58. s:Play()
  59. repeat wait(0.1)
  60. tim = tim +1
  61. print(tim)
  62. if tim == 7 then
  63. x = game.Workspace:GetChildren()
  64. for i = 1, #x do
  65. if x[i]:FindFirstChild("Humanoid") and x[i].Name ~= c.Name and x[i]:FindFirstChild("Torso") then
  66. mag = (c.Torso.Position - x[i].Torso.Position).magnitude
  67. if mag <= (count /3) then
  68. print("Limit = " ..(count/3))
  69. print("Mag=" ..mag)
  70. CFrame.new(x[i].Torso.Position, c.Torso.Position)
  71. dam = 40-(mag/3.5)
  72. dam = (dam *(1+(count/400)))/2
  73. dam = dam *(1+count/120)
  74. cf = CFrame.new(x[i].Torso.Position, c.Torso.Position)
  75. vel = Instance.new("BodyVelocity", x[i].Torso)
  76. vel.maxForce = Vector3.new(25000,25000,25000)
  77. vel.velocity = cf.lookVector *-(dam *1.5)
  78. game.Debris:AddItem(vel, 0.4)
  79. print("Damage:" ..dam)
  80. x[i].Humanoid.Health = x[i].Humanoid.Health -dam
  81. z = z5:clone()
  82. z.Parent = x[i].Torso
  83. game.Debris:AddItem(z,(0.5 *(mag/10)))
  84. if dam > 43 then
  85. x[i].Humanoid.Sit = true
  86. end
  87. if dam > 50 then
  88. x[i].Humanoid.PlatformStand = true
  89. end
  90. end
  91. end
  92. end
  93. end
  94. lig.Size = NumberSequence.new(tim *(0.8 +count/88))
  95. until tim >= 10 or c.Humanoid.Health <= 1 or c.Humanoid.Sit == true or c.Humanoid.PlatformStand == true
  96. if lig then lig.Enabled = false end
  97. game.Debris:AddItem(lig, 2)
  98. on = false
  99. if s then game.Debris:AddItem(s, 1) end
  100. enabled = true
  101. elseif on == true then
  102. Hold = false
  103. on = false
  104. end
  105. wait(0.3)
  106. end
  107. end
  108.  
  109.  
  110. x.Activated:connect(Electrify)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement