Advertisement
gumbyneck

Untitled

Aug 12th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. script.Parent.Position.OnServerEvent:connect(function(plr,Pos)
  2. local Laser = Instance.new("Part", workspace)
  3. local Noise = workspace.Sun.Sound
  4. Laser.Name = "Laser"
  5. Laser.Anchored = true
  6. Laser.CanCollide = false
  7. Laser.BrickColor = BrickColor.new("New Yeller")
  8. Laser.Material = "SmoothPlastic"
  9. Noise.Playing = true
  10. Noise.TimePosition = 0
  11. Laser.Touched:connect(function(bruh)
  12.     local Humanoid = bruh.Parent:FindFirstChild("Humanoid")
  13.     if Humanoid then
  14.         Humanoid.Health = 0
  15.     end
  16. end)
  17. local X = Pos.X
  18. local Y = Pos.Y
  19. local Z = Pos.Z
  20. Laser.CFrame = CFrame.new((workspace.Sun.Position + Vector3.new(X,Y,Z))/2,Vector3.new(X,Y,Z))
  21. Laser.Size = Vector3.new(3,3,(Pos - workspace.Sun.Position).Magnitude)
  22. for i=1,10 do
  23.     wait(0.02)
  24.     Laser.Size = Vector3.new(Laser.Size.X+0.2,Laser.Size.Y+0.2,(Pos - workspace.Sun.Position).Magnitude)
  25.     Laser.Transparency = Laser.Transparency+0.2
  26. end
  27. wait(0.02)
  28. Laser:Destroy()
  29. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement