Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Size = 10
- function createlineAt(Name,startPos,EndPos,parent)
- wait()
- spawn(function()
- if(EndPos ~= nil) then
- 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)()
- local Part = (function()
- local Line = Parent:FindFirstChild(Name)
- if (Line == nil) then
- Line = Instance.new("Part",Parent)
- Line.Anchored = true
- Line.CanCollide = false
- Line.TopSurface = Enum.SurfaceType.Smooth
- Line.BottomSurface = Enum.SurfaceType.Smooth
- Line.Name = Name
- Line.Locked = true
- end
- return Line
- end)()
- Part.Size = Vector3.new(Size,Size,(startPos - EndPos).magnitude)
- Part.Material = Enum.Material.Neon
- Part.CFrame = CFrame.new((startPos+EndPos) /2, startPos)
- return Part
- end
- return nil
- end)
- end
- local Bits = {}
- local d = 250
- local n = 120
- local TimesBy_PI = math.acos(-1)/5
- local k = n / d;
- local t = 0
- local oldt = t
- local Radius = 500
- local oldPos = nil
- local Color = 0
- for a = 0, TimesBy_PI * d, 0.02 do
- local r = Radius * math.cos(k * a)
- local x = r * math.cos(a)
- local y = r * math.sin(a)
- local z = r * (math.sin(k*a)/math.cos(k*a))
- local Pos = Vector3.new(x,y,z)
- --print(t," <> ",oldt)
- local line = createlineAt("Line["..t.."] To ["..oldt.."]",Pos,oldPos)
- if(line ~= nil) then
- line.Color = Color3.fromHSV(Color,1,1)
- Bits[#Bits+1] = line
- end
- if(t%30 == 0) then
- wait()
- end
- oldPos = Pos
- oldt = t
- Color = Color+0.01 <= 1 and Color+0.01 or 0
- t=t+1
- end
- print("Done!")
- while true do
- for k,v in next,Bits do
- local H,S,V = Color3.toHSV(v.Color)
- local r = 1*(math.pi/360)
- --local Amp = math.abs(5*math.cos(H*5))
- --local Size = {X = v.Size.X, Y = v.Size.Y, Z = v.Size.Z}
- --v.Size = Vector3.new(2*Amp,2*Amp,Size.Z)
- H = H+0.05 < 1 and H+0.05 or 0.001
- --[[if(k == 1) then
- print(H)
- end]]
- v.Color = Color3.fromHSV(H,1,1)
- --wait()
- end
- local Part
- wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement