Advertisement
EmeraldIT

my custom flying script

Jul 31st, 2018
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.63 KB | None | 0 0
  1. mouse = game.Players.Crystal5241:GetMouse()
  2. local larm = game.Players.Crystal5241.Character:FindFirstChild("Left Arm")
  3. local rarm = game.Players.Crystal5241.Character:FindFirstChild("Right Arm")
  4. local torso = game.Players.Crystal5241.Character.Torso
  5. local Character = game.Players.Crystal5241.Character
  6. local char = Character
  7.  
  8.  
  9. local trail = Instance.new("ParticleEmitter",torso)
  10. trail.Texture = "rbxassetid://296874871"
  11. trail.LightEmission = 1
  12. trail.Color = ColorSequence.new(Color3.new(255,255,255))
  13. trail.Rate = 9999
  14. trail.Lifetime = NumberRange.new(1.5)
  15. trail.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,10,0),NumberSequenceKeypoint.new(1,0,0)})
  16. trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)})
  17. trail.Speed = NumberRange.new(0,0)
  18. trail.Rotation = NumberRange.new(-500,500)
  19. trail.RotSpeed = NumberRange.new(-500,500)
  20. trail.Enabled = false
  21.  
  22. local A1 = Instance.new("Attachment",larm)
  23. A1.Position = Vector3.new(0, 0, 0)
  24. local A2 = Instance.new("Attachment",torso)
  25. A2.Position = Vector3.new(0, 0, 0)
  26. local Trail = Instance.new("Trail",larm)
  27. Trail.LightEmission = 1
  28. Trail.FaceCamera = true
  29. Trail.Texture = ""
  30. Trail.Attachment0 = A1
  31. Trail.Attachment1 = A2
  32. Trail.Lifetime = 2
  33. Trail.MinLength = 0
  34. Trail.Transparency = NumberSequence.new(0, 1)
  35. Trail.Color = ColorSequence.new(Color3.new(0,1,1), BrickColor.new("Royal purple").Color)
  36. Trail.Enabled = false
  37.  
  38. local A3 = Instance.new("Attachment",rarm)
  39. A3.Position = Vector3.new(0, 0, 0)
  40. local A4 = Instance.new("Attachment",torso)
  41. A4.Position = Vector3.new(0, 0, 0)
  42. local Trail2 = Instance.new("Trail",rarm)
  43. Trail2.LightEmission = 1
  44. Trail2.FaceCamera = true
  45. Trail2.Texture = ""
  46. Trail2.Attachment0 = A3
  47. Trail2.Attachment1 = A4
  48. Trail2.Lifetime = 3
  49. Trail2.MinLength = 0
  50. Trail2.Transparency = NumberSequence.new(0, 1)
  51. Trail2.Color = ColorSequence.new(Color3.new(0,1,1), BrickColor.new("Royal purple").Color)
  52. Trail2.Enabled = false
  53.  
  54. function damageall()
  55. for _,v in pairs(game.Players:GetChildren()) do
  56. if v:FindFirstChild('Character') then
  57. if v.Character:FindFirstChild('udedm8') then
  58. if v.Character:FindFirstChild('Head') then
  59. v.Character.Head:Destroy()
  60. end
  61. end
  62. end
  63. end
  64.  
  65. function boom()
  66. for _,v in pairs(game.Players:GetChildren()) do
  67. uded = Instance.new("BoolValue", v.Character)
  68. uded.Name = 'udedm8'
  69. uded.Value = true
  70. end
  71. char.udedm8:Destroy()
  72. local explosion1 = Instance.new("Part", char)
  73. explosion1.Size = Vector3.new(20, 20, 20)
  74. explosion1.Transparency = 0
  75. explosion1.Material = "Neon"
  76. explosion1.Anchored = true
  77. explosion1.CanCollide = false
  78. explosion1.Shape = "Ball"
  79. explosion1.CFrame = torso.CFrame
  80. explosion1.BrickColor = BrickColor.new("Toothpaste")
  81. local explosion2 = Instance.new("Part", char)
  82. explosion2.Size = Vector3.new(27, 27, 27)
  83. explosion2.Transparency = 0.6
  84. explosion2.Material = "Neon"
  85. explosion2.Anchored = true
  86. explosion2.CanCollide = false
  87. explosion2.Shape = "Ball"
  88. explosion2.CFrame = torso.CFrame
  89. explosion2.BrickColor = BrickColor.new("Alder")
  90. damageall()
  91. for i = 1, 40 do
  92. explosion1.Size = explosion1.Size + Vector3.new(1, 1, 1)
  93. explosion1.Transparency = explosion1.Transparency + 0.025
  94. explosion2.Size = explosion1.Size + Vector3.new(1, 1, 1)
  95. explosion2.Transparency = explosion2.Transparency + 0.025
  96.     wait()
  97. end
  98. explosion2:Remove()
  99. explosion1:Remove()
  100. end
  101.  
  102. function fly()
  103. for i,v in pairs(script.Parent.Parent.Character:GetChildren()) do
  104. if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  105. v.Transparency = 1
  106. end
  107. end
  108. trail.Enabled = true
  109. Trail.Enabled = true
  110. Trail2.Enabled = true
  111. local Bv = Instance.new("BodyVelocity",script.Parent.Parent.Character.HumanoidRootPart)
  112. Bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  113. for i = 1,500 do wait()
  114. script.Parent.Parent.Character.HumanoidRootPart.CFrame = CFrame.new(script.Parent.Parent.Character.HumanoidRootPart.Position,mouse.Hit.p)
  115. Bv.Velocity = script.Parent.Parent.Character.HumanoidRootPart.CFrame.lookVector*120
  116. end
  117. for i,v in pairs(script.Parent.Parent.Character:GetChildren()) do
  118. if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  119. if v.Name ~= "HumanoidRootPart" then
  120. v.Transparency = 0
  121. end
  122. end
  123. end
  124. trail.Enabled = false
  125. Trail.Enabled = false
  126. Trail2.Enabled = false
  127. Bv:Destroy()
  128. end
  129. function OnChatted(msg)
  130. if msg = "!fly" then
  131. fly()
  132. end
  133. if msg = "!killall" then
  134. boom()
  135. end
  136. end
  137.  
  138. char.Parent.Chatted:connect(OnChatted)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement