View difference between Paste ID: naGjZf0C and 4GTyLxN5
SHOW: | | - or go back to the newest paste.
1-
me = game.Players.Pedrodbrgamers
1+
me = game.Players.timetodie23232223
2
3
function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
4
part.Parent = parent
5
part.formFactor = form
6
part.CanCollide = collide
7
part.Transparency = tran
8
part.Reflectance = ref
9
part.Size = Vector3.new(x,y,z)
10
part.BrickColor = BrickColor.new(color)
11
part.TopSurface = 0
12
part.BottomSurface = 0
13
part.Anchored = anchor
14
part.Locked = true
15
part:BreakJoints()
16
end
17
18
function remove(thing)
19
	thing.Parent = nil
20
end
21
22
local mod = Instance.new("Model",workspace)
23
mod.Name = "HouseMake, xS"
24
25
function makeroom(pos)
26
	local floor = Instance.new("Part")
27
	prop(floor,mod,true,0,0,35,1,35,"Black",true,"Custom")
28
	floor.CFrame = pos
29
	local roof = Instance.new("Part")
30
	prop(roof,mod,true,0,0,35,1,35,"Black",true,"Custom")
31
	roof.CFrame = floor.CFrame * CFrame.new(0,13,0)
32
	for i=-90,179,90 do
33
		local wall = Instance.new("Part")
34
		prop(wall,mod,true,0,0,36,13,1,"White",true,"Custom")
35
		wall.CFrame = pos * CFrame.Angles(0,math.rad(i),0) * CFrame.new(0,wall.Size.Y/2,floor.Size.X/2)
36
		local click = Instance.new("ClickDetector",wall)
37
		click.MouseClick:connect(function()
38
			local poz = wall.CFrame * CFrame.new(0,-wall.Size.Y/2,floor.Size.X/2)
39
			makeroom(poz)
40
			for o= -12 ,12, 24 do
41
				local wa = Instance.new("Part")
42
				prop(wa,mod,true,0,0,12,13,1,"White",true,"Custom")
43
				wa.CFrame = wall.CFrame * CFrame.new(o,0,0)
44
			end
45
			wall:remove()
46
		end)
47
	end
48
end
49
50
makeroom(CFrame.new(me.Character.Torso.Position) * CFrame.new(0,-2,40))