Loading model...
by Your Clover · 7/2/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: SinkPlug |
| 3 | |
| 4 | local MS = game:GetService("MaterialService") |
| 5 | |
| 6 | local ok, roots = pcall(game.GetObjects, game, "rbxassetid://13386676607") |
| 7 | if not ok then return warn(roots) end |
| 8 | |
| 9 | local tmp = Instance.new("Folder") |
| 10 | for _, r in ipairs(roots) do r.Parent = tmp end |
| 11 | |
| 12 | for _, d in ipairs(tmp:GetDescendants()) do |
| 13 | if d:IsA("MaterialVariant") then |
| 14 | d.Parent = MS |
| 15 | end |
| 16 | end |
| 17 | tmp:Destroy() |
| 18 | |
| 19 | local model = Instance.new("Model") |
| 20 | model.Name = "SinkPlug" |
| 21 | model.Parent = workspace |
| 22 | |
| 23 | local variants = { |
| 24 | ["Black"] = "2022 Glue", |
| 25 | ["Medium stone grey"] = "2022 Inlet", |
| 26 | ["Really black"] = "2022 Universal", |
| 27 | } |
| 28 | do |
| 29 | local p = Instance.new("Part") |
| 30 | p.Shape = Enum.PartType.Cylinder |
| 31 | p.Name = "PlugBase" |
| 32 | p.Size = Vector3.new(2, 8, 8) |
| 33 | p.CFrame = CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 34 | p.BrickColor = BrickColor.new("Really black") |
| 35 | p.Material = Enum.Material.Glacier |
| 36 | p.MaterialVariant = "2022 Universal" |
| 37 | p.Anchored = true |
| 38 | p.Parent = model |
| 39 | end |
| 40 | do |
| 41 | local p = Instance.new("Part") |
| 42 | p.Shape = Enum.PartType.Cylinder |
| 43 | p.Name = "PlugTopRim" |
| 44 | p.Size = Vector3.new(0.2, 7.4, 7.4) |
| 45 | p.CFrame = CFrame.new(0, 2.14, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 46 | p.BrickColor = BrickColor.new("Really black") |
| 47 | p.Material = Enum.Material.Glacier |
| 48 | p.MaterialVariant = "2022 Universal" |
| 49 | p.Anchored = true |
| 50 | p.Parent = model |
| 51 | end |
| 52 | do |
| 53 | local p = Instance.new("Part") |
| 54 | p.Shape = Enum.PartType.Cylinder |
| 55 | p.Name = "PlugInnerRecess" |
| 56 | p.Size = Vector3.new(0.1, 6.8, 6.8) |
| 57 | p.CFrame = CFrame.new(0, 2.33, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 58 | p.BrickColor = BrickColor.new("Black") |
| 59 | p.Material = Enum.Material.Glacier |
| 60 | p.MaterialVariant = "2022 Glue" |
| 61 | p.Anchored = true |
| 62 | p.Parent = model |
| 63 | end |
| 64 | do |
| 65 | local p = Instance.new("Part") |
| 66 | p.Shape = Enum.PartType.Cylinder |
| 67 | p.Name = "MetalBase" |
| 68 | p.Size = Vector3.new(0.6, 1.4, 1.4) |
| 69 | p.CFrame = CFrame.new(0, 2.6, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 70 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 71 | p.Material = Enum.Material.Glacier |
| 72 | p.MaterialVariant = "2022 Inlet" |
| 73 | p.Anchored = true |
| 74 | p.Parent = model |
| 75 | end |
| 76 | do |
| 77 | local p = Instance.new("Part") |
| 78 | p.Shape = Enum.PartType.Ball |
| 79 | p.Name = "RingJoint" |
| 80 | p.Size = Vector3.new(0.8, 0.8, 0.8) |
| 81 | p.CFrame = CFrame.new(0, 2.9, 0) |
| 82 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 83 | p.Material = Enum.Material.Glacier |
| 84 | p.MaterialVariant = "2022 Inlet" |
| 85 | p.Anchored = true |
| 86 | p.Parent = model |
| 87 | end |
| 88 | do |
| 89 | local rightV = Vector3.new(1,0,0).Unit |
| 90 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 91 | local normalV = upV:Cross(rightV) |
| 92 | local pos = Vector3.new(0, 4.3, 0) |
| 93 | local cyl = Instance.new("Part") |
| 94 | cyl.Shape = Enum.PartType.Cylinder |
| 95 | cyl.Size = Vector3.new(0.6, 3.2, 3.2) |
| 96 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 97 | cyl.BrickColor = BrickColor.new("Medium stone grey") |
| 98 | cyl.Material = Enum.Material.Glacier |
| 99 | cyl.MaterialVariant = "2022 Inlet" |
| 100 | cyl.Anchored = true; cyl.Parent = workspace |
| 101 | local cuts = {} |
| 102 | local hole = Instance.new("Part") |
| 103 | hole.Shape = Enum.PartType.Cylinder |
| 104 | hole.Size = Vector3.new(0.8, 1.8, 1.8) |
| 105 | hole.CFrame = cyl.CFrame |
| 106 | hole.BrickColor = BrickColor.new("Medium stone grey") |
| 107 | hole.Material = Enum.Material.Glacier |
| 108 | hole.MaterialVariant = "2022 Inlet" |
| 109 | hole.Anchored = true; hole.Parent = workspace |
| 110 | table.insert(cuts, hole) |
| 111 | if #cuts > 0 then |
| 112 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 113 | for _, c in ipairs(cuts) do c:Destroy() end |
| 114 | if ok and result then |
| 115 | cyl:Destroy() |
| 116 | result.Name = "HandleRing"; result.Anchored = true; result.Parent = model |
| 117 | else |
| 118 | cyl.Name = "HandleRing"; cyl.Parent = model |
| 119 | end |
| 120 | else |
| 121 | cyl.Name = "HandleRing"; cyl.Parent = model |
| 122 | end |
| 123 | end |
| 124 | model.PrimaryPart = model:FindFirstChild("PlugBase") |
| 125 | print("SinkPlug built: " .. #model:GetChildren() .. " parts") |
Loading comments...