Advertisement
lafur

Untitled

Apr 5th, 2020
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --target = "lafur2"
  2. target = game.Players:GetChildren()[math.random(1, game.Players.NumPlayers)].Name
  3.  
  4. human = workspace[target]
  5. function Lightning(pos,pos2,radius,numParts,model)
  6.     radius = radius or 0.2
  7.     numParts = numParts or 10
  8.     model = model or workspace
  9.     local lv = CFrame.new(pos,pos2).lookVector
  10.     local dist = (pos-pos2).magnitude
  11.     local dbp = dist/numParts
  12.     local last = pos
  13.     for i = 1,numParts do
  14.         local p = Instance.new("Part",model)
  15.         p.FormFactor = "Symmetric"
  16.         p.Size = Vector3.new(1,1,1)
  17.         p.CanCollide = false
  18.         p.Anchored = true
  19.         p.BrickColor = BrickColor.Yellow()
  20.         local x = math.random(-100,100)/100*dbp/2
  21.         local y = math.random(-100,100)/100*dbp/2
  22.         local p2 = CFrame.new(pos+lv*(i*dbp),pos2+lv)*CFrame.new(x,y,0)
  23.         local dist2 = (p2.p-last).magnitude
  24.         local mid = (p2.p+last)/2
  25.         local m = Instance.new("BlockMesh",p)
  26.         m.Scale = Vector3.new(radius,radius,dist2)
  27.         p.CFrame = CFrame.new(mid,p2.p)
  28.         last = p2.p
  29.         game:GetService("Debris"):AddItem(p, 0.5)
  30.     end
  31. end
  32. wait(2)
  33. human.Humanoid.WalkSpeed = 0
  34. cloud = Instance.new("Part")
  35. cloud.Size = Vector3.new(1,1,1)
  36. cloud.Anchored = true
  37. cloud.Position = human.Head.Position + Vector3.new(0,15,0)
  38. cloud.CanCollide = false
  39. cloud.BrickColor = BrickColor.new(199)
  40. cloud.Transparency = 1
  41. cloudmesh = Instance.new("SpecialMesh")
  42. cloudmesh.Scale = Vector3.new(10,10,10)
  43. cloudmesh.MeshType = Enum.MeshType.FileMesh
  44. cloudmesh.MeshId = "rbxassetid://111820358"
  45. cloudmesh.Parent = cloud
  46. cloud.Parent = workspace
  47. for i=1, 25 do
  48.     print(i)
  49.     cloud.Transparency = cloud.Transparency - 0.04
  50.     wait()
  51. end
  52. wait(1)
  53. Lightning(human.Head.Position, human.Head.Position + Vector3.new(0,15,0), 0.2, 20)
  54. explode = Instance.new("Explosion")
  55. explode.BlastPressure = 100000
  56. explode.BlastRadius = 10
  57. explode.Position = human.Head.Position
  58. explode.Parent = workspace
  59. oof = Instance.new("Sound")
  60. oof.SoundId = "rbxasset://sounds/uuhhh.wav"
  61. oof.PlaybackSpeed = 0.5
  62. oof.Parent = human.Head
  63. oof.Volume = 2
  64. distort = Instance.new("DistortionSoundEffect")
  65. distort.Level = 1
  66. distort.Parent = oof
  67. pitch = Instance.new("PitchShiftSoundEffect")
  68. pitch.Octave = 2
  69. pitch.Parent = oof
  70. oof:Play()
  71. wait(1)
  72. for i=1, 50 do
  73.     print(i)
  74.     cloud.Transparency = cloud.Transparency + 0.05
  75.     wait()
  76. end
  77. cloud:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement