Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Reciter
- local Host = game:service'Players'.ilovemen536
- local Max, Up = 50,.2
- local Y = .025
- local Plots = {};
- local Offset = Vector3.new(-Max/2,-1,100)
- local Delay = .025
- local background = Instance.new('Part')
- background.Size = Vector3.new(Max, Max, Y)
- background.Name = 'background'
- background.Anchored = true
- background.Transparency=0
- background.Material = 'Grass'
- background.CFrame = CFrame.new(Offset) * CFrame.new((Max/2)+1,(Max/2)+1,1.5+Y)
- background.Color = Color3.new(.156863,.498039,.278431)
- background.Parent = script
- _G.Ignore = _G.Ignore or {};
- table.insert(_G.Ignore, background)
- function Affect(Function)
- for Index, Plot in next, Plots do
- Function(Plot)
- end
- end
- function Render()
- local yi,xi = 0, 0
- for y = 0, (Max + Up), Up do
- yi = yi + 1
- for x = 0, (Max + Up), Up do
- xi = xi + 1
- local Plot = Instance.new('Part')
- Plot.Size = Vector3.new(1,1,1)
- Plot.Name = 'Base'
- Plot.Anchored = true
- --Plot.Material = 'Neon'
- Plot.CFrame = CFrame.new(Up * xi, Up * yi, 1) * CFrame.new(Offset.X/2,Offset.Y,Offset.Z)
- Plot.Transparency = 0
- local Mesh = Instance.new('SpecialMesh')
- Mesh.MeshId='rbxassetid://9856898'
- Mesh.TextureId='rbxassetid://215418209'
- Mesh.Scale = Vector3.new(Up,Up,Y)
- Mesh.Parent = Plot
- Plots[#Plots + 1] = {Plot, Mesh, Plot:Clone()}
- end
- xi = 0
- wait(Delay)
- end
- print(#Plots)
- end
- function SendRay(Part)
- local Ting
- if type(Part) == 'Instance' and Part:IsA'BasePart' then
- Ting = Part.Position
- else
- Ting = Part
- end
- local Ray = Ray.new(Ting,Vector3.new(0,0,-1)*9e9)
- --table.insert(Ignore, Part)
- local Hit,Pos,SurfaceNorm = workspace:FindPartOnRayWithIgnoreList(Ray,_G.Ignore)
- if Hit == nil then return false,nil end
- return true, Hit
- end;
- local mn = 0
- Host.Chatted:connect(function(msg)
- if msg:sub(1,8) == '!render ' then
- local num = msg:sub(9)
- if typeof(tonumber(num)):lower() ~= 'number' then
- return
- elseif tonumber(num) < .1 then
- --num = .5
- warn'too high of resolution'
- return
- end
- if Up ~= num then
- Up = num
- print('Rendering '..num)
- Render()
- print'Capturing'
- else
- print('Recapturing')
- end
- mn = 0
- local used = 0
- Affect(function(Plot)
- local Block, Mesh, OG = Plot[1], Plot[2], Plot[3]
- local hit, obj = SendRay(OG.Position)
- if hit ~= false and obj ~= nil then
- if obj.Parent:IsA'Accessory' or obj.Parent:IsA'Hat' or obj.Name == 'Wall' then
- table.insert(_G.Ignore, obj)
- else
- used = used + 1
- local cr,cg,cb = obj.Color.r,obj.Color.g,obj.Color.b
- local origin = Block.CFrame
- local refer = obj.CFrame
- local a,b = refer.p, origin.p
- local dist = (a-b).magnitude
- num = math.rad(dist)
- if num > mn then
- mn = num
- end
- local r,g,b = num,num,num
- Mesh.VertexColor = Vector3.new(cr-r,cg-g,cb-b)
- Block.Material = obj.Material
- Block.Transparency = 0
- Block.CanCollide = true
- Mesh.Scale = Mesh.Scale+Vector3.new(Mesh.Scale.X,Mesh.Scale.Y,0)
- delay((math.random()/(math.random()+.5)) , function()
- Block.Parent = script
- end)
- game:service'RunService'.Stepped:wait()
- end
- else
- Block.Parent = nil
- end
- end)
- print(used..' pixels out of '..#Plots..' used in rendering')
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement