


Price
UnknownA script by sModsk
Price
Unknown
- Tebex
- Discord Support
Contact me on Discord if you want to collaborate.- (GitHub) you can find scripts that utilize shellBuilder here
This script allows players to create apartment shells or similar structures in-game, which can then be utilized in other scripts like apartment systems using exports.
"9":[[0,1,0],[0,1,0],[1,1,0],[0,1,0],[1,8,25]]
.This script is used by utilizing exports in other scripts. You can call the script’s functionality from your other scripts by using the provided export functions.
shellBuilder_job: Players can create new shells as projects. Once a shell is finished, it can be published to the market for others to use.
ps-housing & ps-realtor: I was able to integrate shellBuilding with ps-housing and ps-realtor in a short time, making the created shells usable in these systems.
Credits: A huge thanks to the original creators of Project Sloth, ps-housing, and ps-realtor for their awesome work.
Spawns a shell at the given position and executes a callback when completed.
exports["smodsk_shellBuilder"]:SpawnShell(
{
id = id,
position = position,
--- Called when the door position changes.
-- @param string door - Can be either `"door"` or `"garage"`.
-- @param vector4 position - The new position of the door or garage.
doorPositionChanged = function(door, position)
-- Handle door position change
end,
-- By default false if not used
canOpenMenu = function()
return true
end,
-- By default false if not used
canTogglePublic = function()
return false
end,
-- By default false if not used
canBuild = function()
return true
end,
-- By default false if not used
canPaint = function()
return true
end,
-- By default true if not used
canAddGarage = function()
return true
end,
-- By default true if not used
canAddFrontDoor = function()
return true
end,
},
--- Callback function when shell spawning is complete.
-- @param boolean success - Whether the shell spawned successfully.
-- @param vector4 doorPos - The position of the door.
-- @param vector4 garagePos - The position of the garage.
function(success, doorPos, garagePos)
if success then
print("Shell spawned successfully!")
else
print("Shell spawn failed!")
end
end
)
Waits for the function to return values instead of using a callback.
--- Spawns a shell and returns its success status along with door and garage positions.
-- @return boolean success - Whether the shell spawned successfully.
-- @return vector4 doorPos - The position of the door.
-- @return vector4 garagePos - The position of the garage door.
local success, doorPos, garagePos = exports["smodsk_shellBuilder"]:SpawnShell(
{
id = id,
position = position,
doorPositionChanged = function(door, position)
--- Called when the door position changes.
-- @param string door - Can be either `"door"` or `"garage"`.
-- @param vector4 position - The new position of the door or garage.
-- Handle door position change
end,
-- By default false if not used
canOpenMenu = function()
return true
end,
-- By default false if not used
canTogglePublic = function()
return false
end,
-- By default false if not used
canBuild = function()
return true
end,
-- By default false if not used
canPaint = function()
return true
end,
-- By default true if not used
canAddGarage = function()
return true
end,
-- By default true if not used
canAddFrontDoor = function()
return true
end,
})
Removes the currently active shell instance from the world and clears relevant data.
exports["smodsk_shellBuilder"]:DespawnShell()
Returns the identifiers of all shells marked as public.
--- Retrieves a list of public shell IDs and their corresponding names.
-- @return table data - A list of public shells, where each entry contains:
-- - `id` (number): The shell's unique identifier.
-- - `name` (string): The shell's display name.
local data = exports["smodsk_shellBuilder"]:GetPublicIds()
-- Opens the build menu if the player is eligible to access it.
exports["smodsk_shellBuilder"]:OpenBuildMenu()
Creates a new shell and returns whether the operation was successful.
--- Creates a new shell.
-- @param string|nil id - The shell's unique ID. If `nil`, it is created automatically.
-- @param table|nil size - The shell's size, defined as `{width, layers}`. If `nil`, a default size is used.
-- @param string name - The name of the shell.
-- @return boolean success - Whether the shell was successfully created.
-- @return string shellId - The unique ID of the created shell.
local success, shellId = exports["smodsk_shellBuilder"]:CreateNewShell(id, size, name)
--- Creates a new shell.
-- @param string|nil id - The shell's unique ID. If `nil`, it is created automatically.
-- @param table|nil size - The shell's size, defined as `{width, layers}`. If `nil`, a default size is used.
-- @param string name - The name of the shell.
-- @param function callback - A function called upon completion.
-- - @param boolean success - Whether the shell was successfully created.
exports["smodsk_shellBuilder"]:CreateNewShell(id, size, name, function(success)
if success then
print("Shell created successfully!")
else
print("Shell creation failed!")
end
end)
Deletes an existing shell.
--- Deletes an existing shell.
-- @param string id - The unique identifier of the shell to be deleted.
exports["smodsk_shellBuilder"]:DeleteShell(id)
Duplicates an existing shell with a new identifier.
--- Duplicates an existing shell with a new identifier.
-- If `newId` is `nil`, it will be automatically created.
-- @param string id - The unique identifier of the shell to duplicate.
-- @param string|nil newId - The unique identifier for the duplicated shell. If `nil`, a new ID is created automatically.
-- @return boolean success - Whether the duplication was successful.
-- @return string id - The unique identifier of the duplicated shell.
local success, id = exports["smodsk_shellBuilder"]:DuplicateShell(id, newId)
--- Duplicates an existing shell with a new identifier asynchronously.
-- If `newId` is `nil`, it will be automatically created.
-- @param string id - The unique identifier of the shell to duplicate.
-- @param string|nil newId - The unique identifier for the duplicated shell. If `nil`, a new ID is created automatically.
-- @param function callback - A function that will be called once the duplication is complete.
-- - @param boolean success - Whether the duplication was successful.
-- - @param string id - The unique identifier of the duplicated shell.
exports["smodsk_shellBuilder"]:DuplicateShell(id, newId, function(success, id)
if success then
print("Shell duplicated successfully!")
else
print("Shell duplication failed!")
end
end)
--- Adds or removes a shell from the public listing.
-- @param string id - The unique identifier of the shell.
-- @param boolean bool - A boolean value where `true` adds the shell to the public listing, and `false` removes it.
exports["smodsk_shellBuilder"]:SetPublic(id, bool)
Screen capture - 68a33c2d5f521c6490e67c6946b4c3da - Gyazo
Screen capture - 22a6a6291fc42f1222ed44547b9279b6 - Gyazo
Screen capture - 3d85476f2e5a64872cdc332fff431552 - Gyazo
Code is accessible | Partly |
Subscription-based | Yes & No |
Lines (approximately) | +12000 |
Requirements | oxmysql |
Support | Yes |
Assets are accessible | Yes/No |
Subscription-based | Yes & No |
Polygons (model and LOD) | 10 - +100 depending on model |
Texture size and amount | 1024x1024 (+40 textures) |
Requirements | smodsk_shellBuilder |
Support | Yes |
No approved reviews found for this script yet.