It’s pretty good! However I have some things:
Change any function to local if you can. This isn’t too big, but it’s a bit better. change it to
local function check
Another thing I saw was you used the parent parameter of Instance.new()
You can read more about it here:
Also, some of the variable names you use are a bit confusing, such as Sscript.
Im not too sure about this But I read somewhere that generalized iteration was faster than pairs or ipairs
The way you could change it to generalized iteration is like this:
for i, v in workspace:GetPartBoundsInRadius(Vector3.new(script.Parent.Position),100) do
One last thing I saw is that you clone the script and enabled it. If possible, I’d recommend doing whatever is in that script inside the script itself if it’s convenient.
Those are the only things I see that could be changed to be better, so good job!