Advertisement
l11lII11I1Il

Untitled

Nov 4th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. local Size = 10
  2.  
  3. function createlineAt(Name,startPos,EndPos,parent)
  4. wait()
  5. spawn(function()
  6. if(EndPos ~= nil) then
  7. local Parent = parent ~= nil and parent or(function() local Model = workspace:FindFirstChild("Pattern Group Default") if(Model == nil) then Model = Instance.new("Model",workspace) Model.Name = "Pattern Group Default" end return Model end)()
  8. local Part = (function()
  9. local Line = Parent:FindFirstChild(Name)
  10. if (Line == nil) then
  11. Line = Instance.new("Part",Parent)
  12. Line.Anchored = true
  13. Line.CanCollide = false
  14. Line.TopSurface = Enum.SurfaceType.Smooth
  15. Line.BottomSurface = Enum.SurfaceType.Smooth
  16. Line.Name = Name
  17. Line.Locked = true
  18. end
  19. return Line
  20. end)()
  21.  
  22. Part.Size = Vector3.new(Size,Size,(startPos - EndPos).magnitude)
  23. Part.Material = Enum.Material.Neon
  24. Part.CFrame = CFrame.new((startPos+EndPos) /2, startPos)
  25. return Part
  26. end
  27. return nil
  28. end)
  29. end
  30. local Bits = {}
  31. local d = 250
  32. local n = 120
  33. local TimesBy_PI = math.acos(-1)/5
  34. local k = n / d;
  35. local t = 0
  36. local oldt = t
  37. local Radius = 500
  38. local oldPos = nil
  39. local Color = 0
  40. for a = 0, TimesBy_PI * d, 0.02 do
  41. local r = Radius * math.cos(k * a)
  42. local x = r * math.cos(a)
  43. local y = r * math.sin(a)
  44. local z = r * (math.sin(k*a)/math.cos(k*a))
  45. local Pos = Vector3.new(x,y,z)
  46. --print(t," <> ",oldt)
  47.  
  48. local line = createlineAt("Line["..t.."] To ["..oldt.."]",Pos,oldPos)
  49. if(line ~= nil) then
  50. line.Color = Color3.fromHSV(Color,1,1)
  51. Bits[#Bits+1] = line
  52. end
  53.  
  54. if(t%30 == 0) then
  55. wait()
  56. end
  57. oldPos = Pos
  58. oldt = t
  59. Color = Color+0.01 <= 1 and Color+0.01 or 0
  60. t=t+1
  61. end
  62.  
  63. print("Done!")
  64.  
  65. while true do
  66. for k,v in next,Bits do
  67. local H,S,V = Color3.toHSV(v.Color)
  68. local r = 1*(math.pi/360)
  69. --local Amp = math.abs(5*math.cos(H*5))
  70. --local Size = {X = v.Size.X, Y = v.Size.Y, Z = v.Size.Z}
  71. --v.Size = Vector3.new(2*Amp,2*Amp,Size.Z)
  72. H = H+0.05 < 1 and H+0.05 or 0.001
  73. --[[if(k == 1) then
  74. print(H)
  75.  
  76. end]]
  77. v.Color = Color3.fromHSV(H,1,1)
  78. --wait()
  79. end
  80. local Part
  81. wait()
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement