Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function donut(s)
- local r = s/2
- local l = 100 + s*10
- local center = CFrame.new(0,s*2,-50)
- for i = 1,l do
- local x2 = r*math.cos(i*l/r)
- local y2 = r*math.sin(i*l/r)
- local scale = s/((s-s/4)-math.cos(2*i))
- local z2 = math.sin(x2-y2)+math.cos(x2+y2)+math.cos(x2/y2)
- local xy = CFrame.new(x2,y2,0)
- local part = Instance.new("Part")
- part.Color = Color3.fromHSV(math.abs(x2),255,255)
- part.Size = Vector3.new(1,1,1)
- part.CFrame = xy*center
- part.Anchored = true
- part.Parent = script
- end
- end
- function infinity(s)
- game:GetService("RunService").Stepped:Connect(function(t)
- local center = CFrame.new(0,s*2,-50)
- local scale = s/((s-s/4)-math.cos(2*t))
- local x = scale*math.cos(t)
- local y = scale*math.sin(2*t)/2
- local z = scale*math.sin(2/t)*2
- local x2 = ((x+1)*s)
- local y2 = ((y-1)*s)
- local z2 = (x2+y2)
- local xy = CFrame.new(x2,y2,0)
- local part = Instance.new("Part")
- part.Material = Enum.Material.Neon
- part.Color = Color3.fromHSV(math.abs(x),255,255)
- part.Size = Vector3.new(1,1,1)
- part.CFrame = xy*center
- part.Anchored = true
- part.Parent = script
- end)
- end
- function infinity2(s)
- local part = Instance.new("Part")
- part.Material = Enum.Material.Neon
- part.Size = Vector3.new(1,1,1)
- part.Anchored = true
- part.Parent = script
- local att1,att2 = Instance.new("Attachment"),Instance.new("Attachment")
- att1.Position = Vector3.new(0,-0.5,0)
- att2.Position = Vector3.new(0,0.5,0)
- att1.Parent = part
- att2.Parent = part
- local trail = Instance.new("Trail")
- trail.Parent = part
- trail.Attachment0 = att1
- trail.Attachment1 = att2
- trail.FaceCamera = true
- trail.LightInfluence = 1
- trail.Transparency = NumberSequence.new(0,1)
- trail.MinLength = 0
- trail.Lifetime = 10
- game:GetService("RunService").Stepped:Connect(function(t)
- local center = CFrame.new(0,s*2,-50)
- local scale = s/((s-s/4)-math.cos(2*t))
- local x = scale*math.cos(t)
- local y = scale*math.sin(2*t)/2
- local z = scale*math.sin(2/t)*2
- local x2 = ((x+1)*s)
- local y2 = ((y-1)*s)
- local z2 = (x2+y2)
- local xy = CFrame.new(x2,y2,0)
- game:GetService("TweenService"):Create(part,TweenInfo.new(1),{CFrame = xy*center}):Play()
- trail.Color = ColorSequence.new(Color3.fromHSV(math.abs(x),255,255))
- end)
- end
- function mandelbrot(s)
- local z = 0
- local x = 0.5
- local y = 0.5
- local c = (x+y)
- local i = 0
- game:GetService("RunService").Stepped:Connect(function(t)
- i += 1
- z = z^2+c
- x = z^2+x
- y = z*i^2+y*i
- local center = CFrame.new(0,s*2,-50)
- local part = Instance.new("Part")
- part.Size = Vector3.new(1,1,1)
- part.CFrame = CFrame.new(x,y,0)*center
- part.Anchored = true
- part.Parent = script
- end)
- end
- owner.Chatted:Connect(function(msg)
- if msg:lower():sub(1,5) == 'inf2/' then
- local s = msg:sub(6)
- if tonumber(s) then
- infinity2(tonumber(s))
- end
- elseif msg:lower():sub(1,4) == 'inf/' then
- local s = msg:sub(5)
- if tonumber(s) then
- infinity(tonumber(s))
- end
- elseif msg:lower():sub(1,6) == 'donut/' then
- local s = msg:sub(7)
- if tonumber(s) then
- donut(tonumber(s))
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement