Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game:GetService("Players").LocalPlayer
- repeat
- wait()
- until Player.Character
- local Torso = Player.Character:WaitForChild("Torso")
- local Pos = Torso.CFrame
- local Scale = 2
- local DefaultColor = BrickColor.new("Grey")
- local Group = Instance.new("Folder")
- Group.Parent = workspace
- local Cache = {}
- for y = 1, 50 do
- for x = 1, 50 do
- local Part = Instance.new("Part")
- Part.Anchored = true
- Part.Locked = true
- Part.CFrame = Pos *CFrame.new((x - 1)*Scale, -2, (y - 1)*Scale)
- Part.FormFactor = Enum.FormFactor.Custom
- Part.Size = Vector3.new(Scale, Scale, Scale)
- Part.TopSurface = Enum.SurfaceType.Smooth
- Part.BottomSurface = Enum.SurfaceType.Smooth
- Part.Parent = Group
- Cache[#Cache + 1] = Part
- end
- end
- game:GetService("RunService").RenderStepped:connect(function()
- for i = 1, #Cache do
- local v = Cache[i]
- local mag = (v.Position - Torso.Position).magnitude
- local Pos = v.CFrame
- if mag < Scale*2 then
- v.Size = Vector3.new(Scale, Scale - 0.8, Scale)
- v.BrickColor = BrickColor.new("Black")
- else
- v.Size = Vector3.new(Scale, Scale, Scale)
- v.BrickColor = DefaultColor
- end
- v.CFrame = Pos
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement