Advertisement
iiFlamez

Untitled

Aug 14th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1.  
  2. wait()
  3. local Owner = game:GetService("Players").iiBlueBerrizz
  4. local Character = nil
  5. local Orb = nil
  6.  
  7. local Settings = {
  8. ["Trail"] = true,
  9. ["TrailColor"] = BrickColor.White(),
  10.  
  11. ["Radius"] = 7,
  12. ["Height"] = 1.2,
  13. ["Bounce"] = 2.7,
  14.  
  15. ["AudioID"] = 0, --- no need for annoyingness
  16.  
  17. ["Speed"] = .099,
  18. }
  19.  
  20. if script.ClassName == "LocalScript" then
  21. if game.PlaceId == 178350907 then
  22. script.Parent = nil
  23. else
  24. local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call)
  25. local oxbox = getfenv()
  26. setfenv(1, setmetatable({}, {__index = Environment}))
  27. Environment.coroutine.yield()
  28. oxbox.script:Destroy()
  29. end
  30. else
  31. script:Destroy()
  32. end
  33.  
  34. local TrailParts = {}
  35.  
  36. Spawnorb = function()
  37. if Orb ~= nil then
  38. pcall(function()
  39. Orb:ClearAllChildren()
  40. end)
  41. pcall(function()
  42. Orb:Destroy()
  43. end)
  44. end
  45. Orb = Instance.new('Part', workspace)
  46. Orb.BrickColor = BrickColor.Black()
  47. Orb.Transparency = 0
  48. Orb.Anchored = true
  49. Orb.CanCollide = false
  50. Orb.Locked = true
  51. Orb.FormFactor = "Symmetric"
  52. Orb.Shape = "Ball"
  53. Orb.Size = Vector3.new(1,1,1)
  54. Orb.TopSurface = 10
  55. Orb.BottomSurface = 10
  56. local Sound = Instance.new("Sound", Orb)
  57. Sound.SoundId = "rbxassetid://"..Settings.AudioID
  58. Sound.Volume = 1
  59. Sound.Pitch = 1
  60. Sound.Looped = true
  61. wait()
  62. Sound:Play()
  63. Orb.Changed:connect(function()
  64. if not workspace:FindFirstChild(Orb.Name) then
  65. Spawnorb()
  66. end
  67. end)
  68. end Spawnorb()
  69.  
  70. Spawntrail = function()
  71. if Orb ~= nil then
  72. local Tail = Instance.new('Part', Orb)
  73. Tail.BrickColor = Settings.TrailColor
  74. Tail.Transparency = .1
  75. Tail.Anchored = true
  76. Tail.CanCollide = false
  77. Tail.Locked = true
  78. Tail.FormFactor = "Custom"
  79. Tail.Size = Vector3.new(.2,.2,.2)
  80. Tail.CFrame = Orb.CFrame
  81. Tail.TopSurface = 10
  82. Tail.BottomSurface = 10
  83. table.insert(TrailParts, Tail)
  84. end
  85. end
  86.  
  87. function clerp(p1,p2,percent)
  88. local p1x,p1y,p1z,p1R00,p1R01,p1R02,p1R10,p1R11,p1R12,p1R20,p1R21,p1R22=p1:components()
  89. local p2x,p2y,p2z,p2R00,p2R01,p2R02,p2R10,p2R11,p2R12,p2R20,p2R21,p2R22=p2:components()
  90. return CFrame.new(p1x+percent*(p2x-p1x),p1y+percent*(p2y-p1y),p1z+percent*(p2z-p1z),p1R00+percent*(p2R00-p1R00),p1R01+percent*(p2R01-p1R01),p1R02+percent*(p2R02-p1R02),p1R10+percent*(p2R10-p1R10),p1R11+percent*(p2R11-p1R11),p1R12+percent*(p2R12-p1R12),p1R20+percent*(p2R20-p1R20),p1R21+percent*(p2R21-p1R21),p1R22+percent*(p2R22-p1R22))
  91. end
  92.  
  93. local Rot = 1
  94. spawn(function()
  95. game:GetService("RunService").Stepped:connect(function()
  96. if Owner and Owner.Character and Owner.Character:FindFirstChild("Torso") then
  97. Character = Owner.Character.Torso.CFrame
  98. else
  99. Character = CFrame.new(0,3,0)
  100. end
  101. if Orb ~= nil then
  102. Rot = Rot + Settings.Speed
  103. Orb.Name = "MilesOrb_"..math.random(1,99999)
  104. Orb.CFrame = clerp(Orb.CFrame,
  105. Character
  106. *CFrame.new(0,3.7,0)
  107. *CFrame.Angles(0,Rot,(math.sin((tick())*1.2)*2.3)+12)
  108. *CFrame.new(Settings.Radius, math.sin((tick())*Settings.Bounce)*Settings.Height, 0)
  109. *CFrame.Angles(math.sin(tick()),math.sin(tick()),math.sin(tick()))
  110. ,.1)
  111. -- Trail
  112. Spawntrail()
  113. for i,_ in next,TrailParts do
  114. if TrailParts[i] ~= nil and TrailParts[i+1] ~= nil then
  115. local Part1 = TrailParts[i]
  116. local Part2 = TrailParts[i+1]
  117. local Mag = ((Part1.CFrame.p-Part2.CFrame.p).magnitude)
  118. Part1.Size = Vector3.new(Part1.Size.X+.014, Mag, Part1.Size.Z+.014)
  119. Part1.Transparency = Part1.Transparency + .028
  120. Part1.CFrame = CFrame.new(Part1.CFrame.p, Part2.CFrame.p)
  121. * CFrame.Angles(math.pi/2,0,0)
  122. if Part1.Size.X >= .53 then
  123. Part1:Destroy()
  124. table.remove(TrailParts, i)
  125. end
  126. end
  127. end
  128. end
  129. end)
  130. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement