Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = game.Players.Friaza
- c = p.Character
- Player = p
- ToolName = "ZapQuirk"
- local charge = false
- local on = false
- local enabled = true
- if p.Backpack:FindFirstChild(ToolName) then p.Backpack[ToolName]:Destroy() end
- if p.StarterGear:FindFirstChild(ToolName) == nil then
- script:clone().Parent = p.StarterGear
- end
- if c:FindFirstChild(ToolName) then c[ToolName]:Destroy() end
- x = Instance.new("Tool", c)
- x.Name = ToolName
- x.RequiresHandle = false
- x.CanBeDropped = false
- function Electrify()
- if enabled == true then
- enabled = false
- if on == false then
- enabled = false
- on = true
- s = Instance.new("Sound", c.Torso)
- s.Volume = 0.1
- s.Volume = 0.5
- s.Pitch = 1.25
- s.SoundId = "http://www.roblox.com/asset/?id=2974000"
- lig = Instance.new("ParticleEmitter")
- lig.Texture = "http://www.roblox.com/asset/?id=4058550"
- lig.VelocitySpread = 50
- lig.Rate = 60
- lig.LightEmission = NumberRange.new(999)
- lig.Transparency = NumberSequence.new(0.8,0.8)
- lig.Speed = NumberRange.new(2,2)
- lig.Rotation = NumberRange.new(0,359)
- lig.EmissionDirection = "Top"
- lig.Lifetime = NumberRange.new(0.1,0.2)
- lig.Parent = c.Torso
- lig.Enabled = true
- lig.Size = NumberSequence.new(2,2)
- z5 = lig:clone()
- Hold = true
- count = 0
- tir = 0
- enabled = true
- on = true
- repeat wait()
- tir = tir +1
- 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
- count = count +2
- until Hold == false or count > 120 or Hold == false or c.Humanoid.Health <= 1 or c.Humanoid.Sit == true or c.Humanoid.PlatformStand == true
- wait(0.3)
- if s then s.Volume = 0.1+ count/110 s:Play() end
- tim = math.floor(6 -count/20)
- enabled =false
- s.Volume = 0.1 +count/150
- s:Play()
- repeat wait(0.1)
- tim = tim +1
- print(tim)
- if tim == 7 then
- x = game.Workspace:GetChildren()
- for i = 1, #x do
- if x[i]:FindFirstChild("Humanoid") and x[i].Name ~= c.Name and x[i]:FindFirstChild("Torso") then
- mag = (c.Torso.Position - x[i].Torso.Position).magnitude
- if mag <= (count /3) then
- print("Limit = " ..(count/3))
- print("Mag=" ..mag)
- CFrame.new(x[i].Torso.Position, c.Torso.Position)
- dam = 40-(mag/3.5)
- dam = (dam *(1+(count/400)))/2
- dam = dam *(1+count/120)
- cf = CFrame.new(x[i].Torso.Position, c.Torso.Position)
- vel = Instance.new("BodyVelocity", x[i].Torso)
- vel.maxForce = Vector3.new(25000,25000,25000)
- vel.velocity = cf.lookVector *-(dam *1.5)
- game.Debris:AddItem(vel, 0.4)
- print("Damage:" ..dam)
- x[i].Humanoid.Health = x[i].Humanoid.Health -dam
- z = z5:clone()
- z.Parent = x[i].Torso
- game.Debris:AddItem(z,(0.5 *(mag/10)))
- if dam > 43 then
- x[i].Humanoid.Sit = true
- end
- if dam > 50 then
- x[i].Humanoid.PlatformStand = true
- end
- end
- end
- end
- end
- lig.Size = NumberSequence.new(tim *(0.8 +count/88))
- until tim >= 10 or c.Humanoid.Health <= 1 or c.Humanoid.Sit == true or c.Humanoid.PlatformStand == true
- if lig then lig.Enabled = false end
- game.Debris:AddItem(lig, 2)
- on = false
- if s then game.Debris:AddItem(s, 1) end
- enabled = true
- elseif on == true then
- Hold = false
- on = false
- end
- wait(0.3)
- end
- end
- x.Activated:connect(Electrify)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement