EmeraldIT

Untitled

Mar 9th, 2020
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. pressedt = false
  2.  
  3. function heatexpansion()
  4. local countdown = 0
  5. local trailp = Instance.new("Part", attac)
  6. trailp.Anchored = true
  7. trailp.Transparency = 1
  8. trailp.CanCollide = false
  9. local trail = Instance.new("Trail", trailp)
  10. trail.Lifetime = 1
  11. trail.LightEmission = 1
  12. trail.LightInfluence = 0
  13. local att = Instance.new("Attachment")
  14. att.Position = Vector3.new(0,1,0)
  15. local att2 = att:Clone()
  16. att2.Position = Vector3.new(0,-1,0)
  17. att.Parent = trailp
  18. att2.Parent = trailp
  19. trail.Attachment0 = att
  20. trail.Attachment1 = att2
  21. trail.Color = ColorSequence.new(Color3.new(255,100,0),Color3.new(85,0,255))
  22. trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,1)})
  23. trail.FaceCamera = true
  24. trailp.Position = crown.Position
  25. trail.Enabled = false
  26.  
  27. trailp.Touched:Connect(function(t)
  28. if t then
  29. if t.Parent ~= ch then
  30. if t.Parent:FindFirstChildOfClass("Humanoid") then
  31. t.Parent:BreakJoints()
  32. for _,v in pairs(t.Parent:GetChildren()) do
  33. if v:IsA("Part") or v:IsA("MeshPart") then
  34. local trail = Instance.new("Trail", v)
  35. trail.Lifetime = 1
  36. trail.LightEmission = 1
  37. trail.LightInfluence = 0
  38. local att = Instance.new("Attachment")
  39. att.Position = Vector3.new(0,v.Size.Y/2,0)
  40. local att2 = att:Clone()
  41. att2.Position = Vector3.new(0,-(v.Size.Y/2),0)
  42. att.Parent = v
  43. att2.Parent = v
  44. trail.Attachment0 = att
  45. trail.Attachment1 = att2
  46. trail.Color = ColorSequence.new(Color3.new(255,100,0),Color3.new(85,0,255))
  47. trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,1)})
  48. trail.Enabled = true
  49. v.Velocity = Vector3.new(v.Velocity.X * math.random(-10,10),v.Velocity.Y * math.random(-10,10),v.Velocity.Z * math.random(-10,10))
  50. game.Debris:AddItem(v, math.random(3,5))
  51. end
  52. end
  53. end
  54. end
  55. end
  56. end)
  57.  
  58. --time slowing
  59.  
  60. local ended = false
  61. lastg = workspace.Gravity
  62. spawn(function()
  63. repeat swait() game.Workspace.Gravity = 10 until ended = true
  64. game.Workspace.Gravity = lastg
  65. end)
  66.  
  67. for _,v in pairs(game:GetDescendants()) do
  68. if v:IsA("Humanoid") and v.Parent ~= ch then
  69. spawn(function()
  70. local prevw = v.WalkSpeed
  71. local prevj = v.JumpPower
  72. v.Velocity = Vector3.new(v.Velocity.X,v.Velocity.Y + math.random(20,100),v.Velocity.Z)
  73. repeat swait() v.WalkSpeed = 4 v.JumpPower = 10 until ended = true
  74. v.JumpPower = prevj
  75. v.WalkSpeed = prevw
  76. end)
  77. end
  78. end
  79.  
  80. repeat swait() trailp.Positon = crown.Position countdown = countdown + 1 until pressedt = true or countdown > 100
  81. if pressedt == true then
  82. trail.Enabled = true
  83. for _,v in pairs(game:GetDescendants()) do
  84. if v.Name == "HumanoidRootPart" then
  85. trailp.Position = v.Position
  86. end
  87. end
  88. game.Debris:AddItem(trailp, 1.1)
  89. trailp.Position = crown.Position
  90. else
  91. game.Debris:AddItem(trailp, 0)
  92. ended = true
  93. end
  94. end
Add Comment
Please, Sign In to add comment