Advertisement
SlyHades66

Cancer[Not Finished]

Jul 16th, 2016
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.69 KB | None | 0 0
  1. --Settings--
  2. local lp = game.Players.LocalPlayer
  3. local lpc = lp.Character
  4. local mouse = lp:GetMouse()
  5. local firing = false
  6. local equipped = false
  7. local speed = 12
  8. local max = 15
  9. local min = 5
  10. local orb = "e"
  11. local blast = "q"
  12. local attack = "nope"
  13. local debris = Instance.new("Folder", game.Workspace)
  14. debris.Name = lp.Name.."_Debris"
  15. --End Settings--
  16.  
  17. --Orbs
  18. function Orbs()
  19.     lpc.Humanoid.WalkSpeed = 0
  20.     if debris:FindFirstChild("Holdster") then
  21.         debris.Holdster:Destroy()
  22.     end
  23.     cyl = Instance.new("Part", debris)
  24.     cyl.Name = "Holdster"
  25.     cyl.Size = Vector3.new(5,0.2,7)
  26.     cyl.CanCollide = false
  27.     cyl.Position = lpc.Torso.Position
  28.     mesh = Instance.new("CylinderMesh", cyl)
  29.     mesh.Offset = Vector3.new(0,0,0)
  30.     mesh.Scale = Vector3.new(0.1,0.1,0.1)
  31.     local weld = Instance.new("ManualWeld", cyl)
  32.     weld.Part0 = cyl
  33.     weld.Part1 = lpc.Torso
  34.     weld.C0 = CFrame.new(0,-2,0)*CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
  35.     for i = 1, 20 do
  36.         wait(0.03)
  37.         mesh.Scale = mesh.Scale+Vector3.new(0.05,0.05,0.05)
  38.     end
  39.     CreateParts()
  40. end
  41.  
  42. function CreateParts()
  43.     for i = 1, 100 do
  44.         wait(0.08)
  45.         local part = Instance.new("Part", debris)
  46.         part.Name = "Fired"
  47.         part.BottomSurface = "Smooth"
  48.         part.TopSurface = "Smooth"
  49.         part.Size = Vector3.new(0.5,0.5,0.5)
  50.         part.CanCollide = false
  51.         part.Position = Vector3.new(cyl.Position.X+math.random(-1.5,1.5),cyl.Position.Y+math.random(-1.5,1.5),cyl.Position.Z+math.random(-1.5,1.5))
  52.         local push = Instance.new("BodyVelocity", part)
  53.         push.Velocity = lpc.Torso.CFrame.lookVector*speed
  54.         push.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  55.         part.Touched:connect(function(hit)
  56.             part:Destroy()
  57.             if hit.Parent:FindFirstChild("Humanoid") then
  58.                 if hit.Parent.Name ~= game.Players.LocalPlayer.Name then
  59.                     hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health-math.random(min,max)
  60.                 end
  61.             end
  62.         end)
  63.     end
  64.     wait(5)
  65.     for i = 1, 20 do
  66.         wait(0.03)
  67.         mesh.Scale = mesh.Scale-Vector3.new(0.05,0.05,0.05)
  68.     end
  69.     cyl:Destroy()
  70.     for _,v in pairs(debris:GetChildren()) do
  71.         v:Destroy()
  72.     end
  73.     lpc.Humanoid.WalkSpeed = 16
  74.     firing = false
  75. end
  76. --End Orbs
  77.  
  78. --Start Blasts
  79. function Blasts()
  80.     local main = Instance.new("Part", debris)
  81.     main.Shape = "Ball"
  82.     main.CanCollide = false
  83.     main.Position = lpc.Head.Position
  84.     main.Size = Vector3.new(32,32,32)
  85.     local weld = Instance.new("ManualWeld", debris)
  86.     weld.Part0 = main
  87.     weld.Part1 = lpc.Head
  88.     weld.C0 = CFrame.new(0,-20,0)
  89. end
  90. --End Blasts
  91.  
  92. --Start Ups--
  93. mouse.KeyDown:connect(function(key)
  94.     if key == orb and not firing then
  95.         firing = true
  96.         attack = "orb"
  97.         Orbs()
  98.     elseif key == blast and not firing then
  99.         firing = true
  100.         attack = "blast"
  101.         Blasts()
  102.     end
  103. end)
  104. --End Start Ups--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement