Advertisement
Idirina

triggered explodo

Jan 3rd, 2018
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. local playa = game:GetService("Players").LocalPlayer
  2. repeat
  3. wait()
  4. until playa.Character
  5. local chara = playa.Character
  6. local humanoi = chara:WaitForChild("Humanoid")
  7. local moues = playa:GetMouse()
  8. local spladowsize = 30
  9.  
  10. local exploding = false
  11.  
  12. moues.KeyDown:connect(function(key)
  13. key = key:lower()
  14. if key == "p" and not exploding then
  15. exploding = true
  16. Explode()
  17. end
  18. if key == "q" then
  19. chara.Torso.CFrame = CFrame.new(moues.Hit.p + Vector3.new(0,3,0))
  20. end
  21. if key == "z" and not (spladowsize <= -5) then
  22. spladowsize = spladowsize - 5
  23. end
  24. if key == "c" and not (spladowsize <= -5) and not ((spladowsize - 15) <= -5) then
  25. spladowsize = spladowsize - 15
  26. end
  27. if key == "x" then
  28. spladowsize = spladowsize + 5
  29. end
  30. if key == "v" then
  31. spladowsize = spladowsize + 15
  32. end
  33. end)
  34.  
  35. coroutine.resume(coroutine.create(function()
  36. while true do
  37. humanoi.WalkSpeed = 16
  38. humanoi.JumpPower = 50
  39. humanoi.PlatformStand = false
  40. humanoi.MaxHealth = math.huge
  41. humanoi.Health = math.huge
  42. wait()
  43. end
  44. end))
  45.  
  46.  
  47.  
  48.  
  49. --EXPLOSION
  50. function Explode()
  51. local Victim = game.Players.LocalPlayer
  52. Victim = Victim.Character
  53. local o1 = Instance.new("Sound")
  54. o1.Parent = Victim.Head
  55. o1.SoundId = "rbxassetid://429400881"
  56. o1:Play()
  57. o1 = Instance.new("Sound")
  58. o1.Name = "SoundofPain"
  59. o1.Parent = Victim.Head
  60. o1.Volume = 1
  61. o1.SoundId = "rbxassetid://606862847"
  62. o1:Play()
  63. Victim.Head.face.Texture = "http://www.roblox.com/asset/?id=412416747"
  64. Victim.Head.BrickColor = BrickColor.New("Maroon")
  65. for i=1, 30 do
  66. wait()
  67. Victim.Head.Size = Victim.Head.Size:lerp(Vector3.new(spladowsize / 5,spladowsize / 5,spladowsize / 5), 0.01 * i)
  68. Victim.Head.CFrame = Victim.Head.CFrame * CFrame.Angles(0,1,0)
  69. end
  70. local g = Instance.new("Part", game.Workspace)
  71. g.BrickColor = BrickColor.new("New Yeller")
  72. g.Material = Enum.Material.Neon
  73. g.Anchored = true
  74. g.Size = Vector3.new(5,5,5)
  75. g.CanCollide = false
  76. g.Transparency = 0.4
  77. g.CFrame = Victim.Head.CFrame
  78. local eg = Instance.new("Part", game.Workspace)
  79. eg.BrickColor = BrickColor.new("New Yeller")
  80. eg.Material = Enum.Material.Neon
  81. eg.Anchored = true
  82. eg.Size = Vector3.new(1,2000,1)
  83. eg.CanCollide = false
  84. eg.Transparency = 0.4
  85. eg.CFrame = g.CFrame
  86. local bg = Instance.new("Part", game.Workspace)
  87. bg.BrickColor = BrickColor.new("Deep orange")
  88. bg.Material = Enum.Material.Neon
  89. bg.Anchored = true
  90. bg.Size = Vector3.new(5,5,5)
  91. bg.CanCollide = false
  92. bg.Transparency = 0
  93. bg.Shape = "Ball"
  94. bg.CFrame = g.CFrame
  95. local PS33 = Instance.new("Sound")
  96. PS33.Name = "Boom"
  97. PS33.Parent = workspace
  98. PS33.SoundId = "rbxassetid://165969964"
  99. PS33.Volume = 10
  100. PS33:Play()
  101. Victim.Head:Destroy()
  102.  
  103. for i=1,100 do
  104. for i,v in pairs(game.Workspace:GetChildren()) do
  105. local targeto = nil
  106. if v ~= Victim and v ~= g and v ~= bg and v ~= eg and v.Name ~= "Base" then
  107. if v:IsA("Model") then
  108. for l,b in pairs(v:GetChildren()) do
  109. if b:IsA("Part") or b:IsA("UnionOperation") then
  110. targeto = b
  111. end
  112. end
  113. end
  114. if v:IsA("Part") or v:IsA("UnionOperation") then
  115. targeto = v
  116. end
  117. if targeto then
  118. if (g.Position - targeto.Position).magnitude < (g.Size.Y * 2) then
  119. targeto.Velocity = targeto.Velocity + ((targeto.Position - g.Position).unit * 1000)
  120. end
  121. if (g.Position - targeto.Position).magnitude < g.Size.Y then
  122. targeto:Destroy()
  123. end
  124. end
  125. end
  126. wait()
  127. end
  128. g.Size = g.Size:lerp(Vector3.new(spladowsize,spladowsize,spladowsize), 0.01 * i)
  129. g.Transparency = g.Transparency + 0.02
  130. eg.Size = eg.Size:lerp(Vector3.new(spladowsize / 1.5,2000,spladowsize / 1.5), 0.02 * i)
  131. eg.Transparency = eg.Transparency + 0.03
  132. bg.Size = bg.Size:lerp(Vector3.new(spladowsize,spladowsize,spladowsize), 0.01 * i)
  133. bg.Transparency = bg.Transparency + 0.03
  134. g.CFrame = g.CFrame * CFrame.Angles(1,1,1)
  135. bg.CFrame = bg.CFrame * CFrame.Angles(1,1,1)
  136. wait()
  137. end
  138. wait()
  139. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement