SHOW:
|
|
- or go back to the newest paste.
1 | local Item = "ItemName" | |
2 | local Quantity = 10 | |
3 | ||
4 | local Land = nil | |
5 | for i,v in pairs(game.Workspace.Properties:GetChildren()) do | |
6 | if v.Owner.Value == game.Players.LocalPlayer then | |
7 | Land = v | |
8 | break | |
9 | end | |
10 | end | |
11 | if not Land then | |
12 | for i,v in pairs(game.Workspace.Properties:GetChildren()) do | |
13 | if v.Owner.Value == game.Players.LocalPlayer or v.Owner.Value == nil then | |
14 | Land = v | |
15 | game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(v) | |
16 | break | |
17 | end | |
18 | end | |
19 | end | |
20 | ||
21 | function Spawn(Item) | |
22 | local Info = {} | |
23 | Info.Name = Item.Name | |
24 | Info.Type = game.ReplicatedStorage.Purchasables.Structures.HardStructures.Sawmill2.Type | |
25 | Info.OtherInfo = game.ReplicatedStorage.Purchasables.WireObjects.Wire.OtherInfo | |
26 | local Points = {Land.OriginSquare.Position + Vector3.new(0,5,0), Land.OriginSquare.Position + Vector3.new(0,5,0)} | |
27 | game.ReplicatedStorage.PlaceStructure.ClientPlacedWire:FireServer(Info, Points) | |
28 | end | |
29 | ||
30 | for i=1, Quantity do | |
31 | Spawn(game.ReplicatedStorage.Purchasables:FindFirstChild(Item, true)) | |
32 | end |