Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. function Check_Amount(Arg,Parent)
  2. local Arg2 = {}
  3. for __,v in pairs(Parent:GetChildren())do
  4. if(v.Name == Arg)then
  5. table.insert(Arg2,v)
  6. end
  7. end
  8. return Arg2
  9. end
  10.  
  11. while true do
  12.     if(#Check_Amount("Stone",script.Parent) < 8)then
  13.         wait()
  14.         local Rock = Instance.new("Part", script.Parent)
  15.         Rock.Name="Stone"
  16.         Rock.Size = Vector3.new(2, 1.2, 2)
  17.         Rock.Position = Vector3.new(math.random(script.Parent.Position.X-12,script.Parent.Position.X+12),1.7,math.random(script.Parent.Position.Z-12,script.Parent.Position.Z+12))
  18.         wait(5)
  19.     else
  20.         break
  21.     end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement