Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local folder = Instance.new("Folder",script)
- folder.Name = "Perlin Folder"
- local detail = 15
- local amplitude = 15
- local xiterations = 100
- local ziterations = 100
- local seed = math.random(0, 1000000000)
- local layerednoise = false
- local size = Vector3.new(1,1,1)
- local blockmaterial = "SmoothPlastic"
- local wavy = true
- function CreateNoise(xpos,zpos)
- local rnoise = math.clamp(math.noise(xpos/detail,zpos/detail,seed), -0.5, 0.5)
- local gnoise = math.clamp(math.noise(seed,xpos/detail,zpos/detail), -0.5, 0.5)
- local bnoise = math.clamp(math.noise(zpos/detail,seed,xpos/detail), -0.5, 0.5)
- local block = Instance.new("SpawnLocation",folder)
- block.Enabled = false
- block.Size = size
- block.Position = Vector3.new(xpos*size.X,(size.X*2)+1,zpos*size.Z)
- block.Anchored = true
- block.Material = blockmaterial
- if layerednoise then
- block.Color = Color3.new(((rnoise + gnoise + bnoise)/3)+0.5,((rnoise + gnoise + bnoise)/3)+0.5,((rnoise + gnoise + bnoise)/3)+0.5)
- else
- block.Color = Color3.new(rnoise+0.5,rnoise+0.5,rnoise+0.5)
- end
- local nograv = Instance.new("BodyForce",block)
- nograv.Force = Vector3.new(0,block:GetMass()*workspace.Gravity,0)
- end
- for xpos = 1,xiterations,1 do
- for zpos = 1,ziterations,1 do
- local success, erro = pcall(function()
- CreateNoise(xpos,zpos)
- end)
- if erro then
- wait(0.6)
- CreateNoise(xpos,zpos)
- end
- end
- wait(0.01)
- end
Add Comment
Please, Sign In to add comment