Advertisement
ericdesouza

Life Sucker Edit script

Feb 12th, 2018
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.15 KB | None | 0 0
  1. ----- Script made by Pedrorb03 -----
  2. ----- Edit by ericdesouza ----
  3. laser = nil
  4. laserRot = 0
  5. pos2 = Vector3.new(0,0,0)
  6. counter = 0
  7. function chargeLaser()
  8. local part = Instance.new("Part")
  9. part.Name = "ChargingLaser"
  10. game:GetService("Debris"):AddItem(part,1)
  11. part.Parent = game.Players.LocalPlayer.Character
  12. part.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  13. part.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  14. part.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  15. part.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  16. part.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  17. part.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  18. part.Material = Enum.Material.Granite
  19. part.Anchored = false
  20. part.CanCollide = false
  21. part.Size = Vector3.new(0.5,0.5,0.5)
  22. local light = math.random(50,150)
  23. local rotx = math.random(-360,360)
  24. local roty = math.random(-360,360)
  25. local rotz = math.random(-360,360)
  26. part.Color = Color3.fromRGB(Black,Black,Black)
  27. part.Transparency = 0.4
  28. part.CFrame = game.Players.LocalPlayer.Character["Right Arm"].CFrame:toWorldSpace(CFrame.new(Vector3.new(0,-1.1,0))) *CFrame.Angles(math.rad(rotx),math.rad(roty),math.rad(rotz))
  29. for i=0.4,1,0.1 do
  30. wait()
  31. part.Size = Vector3.new(0.5+i,0.5+i,0.5+i)
  32. part.Transparency = i
  33. part.CFrame = game.Players.LocalPlayer.Character["Right Arm"].CFrame:toWorldSpace(CFrame.new(Vector3.new(0,-1.1,0))) *CFrame.Angles(math.rad(rotx),math.rad(roty),math.rad(rotz))
  34. end
  35. part:remove()
  36. end
  37. function chargeLaser2()
  38. local part = Instance.new("Part")
  39. game:GetService("Debris"):AddItem(part,1)
  40. part.Name = "ChargingLaser2"
  41. part.Parent = game.Players.LocalPlayer.Character
  42. part.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  43. part.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  44. part.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  45. part.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  46. part.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  47. part.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  48. part.Material = Enum.Material.Granite
  49. part.Anchored = false
  50. part.CanCollide = false
  51. part.Size = Vector3.new(2,2,2)
  52. local light = math.random(50,150)
  53. local rotx = math.random(-360,360)
  54. local roty = math.random(-360,360)
  55. local rotz = math.random(-360,360)
  56. part.Color = Color3.fromRGB(Black,Black,Black)
  57. part.Transparency = 0.4
  58. part.CFrame = CFrame.new(pos2) *CFrame.Angles(math.rad(rotx),math.rad(roty),math.rad(rotz))
  59. for i=0.4,1,0.1 do
  60. wait()
  61. part.Size = Vector3.new(2+i,2+i,2+i)
  62. part.Transparency = i
  63. part.CFrame = CFrame.new(pos2) *CFrame.Angles(math.rad(rotx),math.rad(roty),math.rad(rotz))
  64. end
  65. part:remove()
  66. end
  67.  
  68.  
  69.  
  70.  
  71. game:GetService("RunService").RenderStepped:connect(function()
  72. counter = counter +1
  73. if counter >= 3 then
  74. counter = 0
  75. chargeLaser()
  76. if laser ~= nil then
  77. chargeLaser2(pos2)
  78. end
  79. end
  80.  
  81. laserRot = laserRot+1
  82. if laser ~= nil then
  83. local pos1 = game.Players.LocalPlayer.Character.ChargingLaser.Position
  84. pos2 = game.Players.LocalPlayer:GetMouse().Hit.p
  85.  
  86. laser.Size = Vector3.new(1,1,(pos1-pos2).magnitude)
  87. laser.CFrame = CFrame.new((pos1+pos2)/2,pos1)*CFrame.Angles(0,0,math.rad(laserRot))
  88.  
  89. local ray = Ray.new(pos1,(pos2-pos1).unit*600)
  90. local hit,position,normal = game.Workspace:FindPartOnRay(ray,game.Players.LocalPlayer.Character)
  91. if hit then
  92.  
  93.  
  94. hit.Name = "nil"
  95. hit.Material = Enum.Material.Granite
  96.  
  97. local c= hit.Color.r+hit.Color.g+hit.Color.b
  98.  
  99. c = c*255
  100. c = c/3
  101. hit.Color = Color3.fromRGB(c,c,c)
  102.  
  103.  
  104. for _,child in pairs(hit:GetChildren()) do
  105. if child:IsA("BasePart") then
  106.  
  107.  
  108. child.Name = "nil"
  109. child.Material = Enum.Material.Granite
  110. local c= child.Color.r+child.Color.g+child.Color.b
  111.  
  112. c = c*255
  113. c = c/3
  114. child.Color = Color3.fromRGB(c,c,c)
  115.  
  116. end
  117. if not child:IsA("BasePart") then
  118. child:remove()
  119. end
  120. end
  121. end
  122. end
  123. end)
  124. game:GetService("UserInputService").InputBegan:connect(function(key)
  125. if key.KeyCode == Enum.KeyCode.F then
  126. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0*CFrame.Angles(0,0,math.rad(90))
  127. laser = Instance.new("Part")
  128. laser.Name = "Laser"
  129. laser.Transparency = 0.25
  130. laser.Parent = game.Players.LocalPlayer.Character
  131. laser.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  132. laser.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  133. laser.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  134. laser.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  135. laser.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  136. laser.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  137. laser.Material = Enum.Material.Granite
  138. laser.Anchored = true
  139. laser.CanCollide = false
  140. laser.Size = Vector3.new(0.75,0.75,0.75)
  141. laser.Color = Color3.fromRGB(100,100,100)
  142.  
  143. end
  144. end)
  145. game:GetService("UserInputService").InputEnded:connect(function(key)
  146. if key.KeyCode == Enum.KeyCode.F then
  147. game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0*CFrame.Angles(0,0,math.rad(-90))
  148. laser:remove()
  149. laser = nil
  150. end
  151. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement