Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player = game.Players.LocalPlayer
- mouse = player:GetMouse()
- repeat wait() until player.Character
- chr = player.Character
- chr.Humanoid.WalkSpeed = 50
- template = Instance.new("Part") --We're not going to put it anywhere, it's just a template.
- template.CanCollide = false
- template.BrickColor = BrickColor.White()
- template.Transparency = .9
- template.Size = Vector3.new(7,7,7)
- template.TopSurface = Enum.SurfaceType.Smooth
- template.BottomSurface = Enum.SurfaceType.Smooth
- bv = Instance.new("BodyVelocity", template)
- bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- mesh = Instance.new("SpecialMesh",template)
- mesh.MeshType = "Sphere"
- debounce = false
- mouse.KeyDown:connect(function(key)
- if key == 'q' or key == 'e' then
- local projectile = template:Clone()
- projectile.Parent = chr
- projectile.Name = 'Projectile'
- projectile.CFrame = chr.Torso.CFrame
- projectile.BodyVelocity.velocity = chr.Torso.CFrame.lookVector * 120
- if key == 'e' then
- projectile.BrickColor = BrickColor.Blue()
- end
- projectile.Touched:connect(function(pA)
- local h = pA.Parent:FindFirstChild("Humanoid")
- if h and h.Parent.Name ~= player.Name then
- local health = h.MaxHealth/1.9
- if key == 'q' and debounce == false then
- debounce = true
- h.Health = h.Health - health
- wait(.25)
- debounce = false
- elseif key == 'e' then
- local clone = projectile:Clone()
- projectile:Destroy()
- clone.Parent = h.Parent
- clone.BrickColor = BrickColor.Blue()
- clone.Anchored = true
- clone.CFrame = h.Parent.Torso.CFrame
- h.Parent.Torso.Anchored = true
- wait(3)
- clone:Destroy()
- h.Parent.Torso.Anchored = false
- end
- end
- end)
- wait(4)
- projectile:Destroy()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement