Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local LocalPlayer = game:GetService('Players').LocalPlayer
- local RemoteEvents = game:GetService('ReplicatedStorage').RemoteEvents
- local Shovel = function(Part)
- if LocalPlayer.Character:FindFirstChildWhichIsA('Tool') then
- RemoteEvents.Shovel:FireServer(Part)
- end
- end
- local GetCloseSnow = function()
- local Center = LocalPlayer.Character.HumanoidRootPart.CFrame.p
- local Region = Region3.new(Center-Vector3.new(8,8,8), Center+Vector3.new(15,15,15))
- local Parts = workspace:FindPartsInRegion3(Region, LocalPlayer.Character, 500)
- local Snow = {}
- for i, v in pairs(Parts) do
- if v.Name == 'Snow' then
- table.insert(Snow, v)
- end
- end
- return Snow
- end
- while wait() do
- for i, v in pairs(GetCloseSnow()) do
- Shovel(v)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement