Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Credits to pyst but you can modify and make this more perfect :)
- -- Configuration
- local hidingPlaceName = "Hiding place"
- local baseplateHeight = 1000 -- Height for the baseplate in the sky
- local baseplateSize = Vector3.new(1500, 1, 1500) -- Expanded size of the baseplate
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local startPosition = character:WaitForChild("HumanoidRootPart").Position
- local lastBaseplatePosition = Vector3.new(0, baseplateHeight + 5, 0) -- Default spawn on baseplate
- -- Function to create the "Hiding place" baseplate
- local function createHidingPlace()
- -- Check if baseplate already exists
- if workspace:FindFirstChild(hidingPlaceName) then
- return workspace:FindFirstChild(hidingPlaceName)
- end
- -- Create the baseplate
- local baseplate = Instance.new("Part")
- baseplate.Name = hidingPlaceName
- baseplate.Size = baseplateSize
- baseplate.Position = Vector3.new(0, baseplateHeight, 0)
- baseplate.Anchored = true
- baseplate.CanCollide = true
- baseplate.Material = Enum.Material.Grass
- baseplate.Parent = workspace
- -- Houses with doors, windows, and furniture
- local houseSpacing = 60
- for i = 1, 5 do
- local house = Instance.new("Part")
- house.Size = Vector3.new(20, 20, 20)
- house.Position = baseplate.Position + Vector3.new(-250 + i * houseSpacing, 10, -250)
- house.Anchored = true
- house.BrickColor = BrickColor.new("Light orange")
- house.Material = Enum.Material.Brick
- house.Parent = baseplate
- -- Add windows to house
- for j = -1, 1, 2 do
- local window = Instance.new("Part")
- window.Size = Vector3.new(4, 6, 0.5)
- window.Position = house.Position + Vector3.new(j * 7, 5, -1)
- window.Anchored = true
- window.BrickColor = BrickColor.new("Institutional white")
- window.Material = Enum.Material.Glass
- window.Transparency = 0.5
- window.Parent = baseplate
- end
- -- Add a door
- local door = Instance.new("Part")
- door.Size = Vector3.new(4, 10, 0.5)
- door.Position = house.Position + Vector3.new(0, 5, -1)
- door.Anchored = true
- door.BrickColor = BrickColor.new("Brown")
- door.Material = Enum.Material.Wood
- door.Parent = baseplate
- -- Add furniture inside the house
- local bed = Instance.new("Part")
- bed.Size = Vector3.new(8, 2, 4)
- bed.Position = house.Position + Vector3.new(0, 1, -1)
- bed.Anchored = true
- bed.BrickColor = BrickColor.new("Really red")
- bed.Parent = baseplate
- local table = Instance.new("Part")
- table.Size = Vector3.new(4, 1, 4)
- table.Position = house.Position + Vector3.new(0, 1, 5)
- table.Anchored = true
- table.BrickColor = BrickColor.new("Brown")
- table.Parent = baseplate
- local chair = Instance.new("Part")
- chair.Size = Vector3.new(2, 2, 2)
- chair.Position = house.Position + Vector3.new(3, 1, 5)
- chair.Anchored = true
- chair.BrickColor = BrickColor.new("Reddish brown")
- chair.Parent = baseplate
- end
- -- Towers with windows
- local towerSpacing = 100
- for i = 1, 3 do
- local tower = Instance.new("Part")
- tower.Size = Vector3.new(20, 100, 20)
- tower.Position = baseplate.Position + Vector3.new(-250 + i * towerSpacing, 50, 200)
- tower.Anchored = true
- tower.BrickColor = BrickColor.new("Institutional white")
- tower.Material = Enum.Material.Concrete
- tower.Parent = baseplate
- -- Add windows to the tower at intervals
- for y = 10, 90, 20 do
- local window = Instance.new("Part")
- window.Size = Vector3.new(8, 8, 0.5)
- window.Position = tower.Position + Vector3.new(0, y, -10)
- window.Anchored = true
- window.BrickColor = BrickColor.new("Institutional white")
- window.Material = Enum.Material.Glass
- window.Transparency = 0.5
- window.Parent = baseplate
- end
- end
- -- Roads connecting houses and towers
- local road = Instance.new("Part")
- road.Size = Vector3.new(10, 1, 300)
- road.Position = baseplate.Position + Vector3.new(0, 0.5, -250)
- road.Anchored = true
- road.BrickColor = BrickColor.new("Really black")
- road.Material = Enum.Material.Asphalt
- road.Parent = baseplate
- -- Trees with green tops
- for i = 1, 15 do
- local trunk = Instance.new("Part")
- trunk.Size = Vector3.new(5, 20, 5)
- trunk.Position = baseplate.Position + Vector3.new(math.random(-400, 400), 10, math.random(-400, 400))
- trunk.Anchored = true
- trunk.BrickColor = BrickColor.new("Reddish brown")
- trunk.Material = Enum.Material.Wood
- trunk.Parent = baseplate
- local leaves = Instance.new("Part")
- leaves.Size = Vector3.new(12, 10, 12)
- leaves.Position = trunk.Position + Vector3.new(0, 15, 0)
- leaves.Anchored = true
- leaves.BrickColor = BrickColor.new("Bright green")
- leaves.Material = Enum.Material.Grass
- leaves.Parent = baseplate
- end
- -- Add grass patches
- for i = 1, 20 do
- local grassPatch = Instance.new("Part")
- grassPatch.Size = Vector3.new(math.random(10, 20), 1, math.random(10, 20))
- grassPatch.Position = baseplate.Position + Vector3.new(math.random(-700, 700), 0.5, math.random(-700, 700))
- grassPatch.Anchored = true
- grassPatch.BrickColor = BrickColor.new("Bright green")
- grassPatch.Material = Enum.Material.Grass
- grassPatch.Parent = baseplate
- end
- -- Rain effect (small falling parts above baseplate)
- for i = 1, 100 do
- local raindrop = Instance.new("Part")
- raindrop.Size = Vector3.new(0.2, 1, 0.2)
- raindrop.Position = baseplate.Position + Vector3.new(math.random(-700, 700), math.random(20, 100), math.random(-700, 700))
- raindrop.Anchored = false
- raindrop.CanCollide = false
- raindrop.BrickColor = BrickColor.new("Really blue")
- raindrop.Material = Enum.Material.SmoothPlastic
- raindrop.Velocity = Vector3.new(0, -50, 0)
- raindrop.Parent = baseplate
- end
- -- Add benches and street lights for ambiance
- for i = 1, 5 do
- local bench = Instance.new("Part")
- bench.Size = Vector3.new(5, 1, 2)
- bench.Position = baseplate.Position + Vector3.new(math.random(-700, 700), 1, math.random(-700, 700))
- bench.Anchored = true
- bench.BrickColor = BrickColor.new("Reddish brown")
- bench.Material = Enum.Material.Wood
- bench.Parent = baseplate
- local lightPole = Instance.new("Part")
- lightPole.Size = Vector3.new(1, 15, 1)
- lightPole.Position = bench.Position + Vector3.new(2, 7.5, 0)
- lightPole.Anchored = true
- lightPole.BrickColor = BrickColor.new("Dark stone grey")
- lightPole.Material = Enum.Material.Metal
- lightPole.Parent = baseplate
- -- Add a light source at the top of the light pole
- local light = Instance.new("PointLight")
- light.Color = Color3.fromRGB(255, 255, 224) -- Warm yellow light
- light.Brightness = 2
- light.Range = 20
- light.Parent = lightPole
- end
- return baseplate
- end
- -- Create sit-enabled outdoor benches for the outside area
- local function createSittingOutdoorBench(position)
- local outdoorBench = Instance.new("Part")
- outdoorBench.Size = Vector3.new(5, 1, 2)
- outdoorBench.Position = position
- outdoorBench.Anchored = true
- outdoorBench.BrickColor = BrickColor.new("Reddish brown")
- outdoorBench.Material = Enum.Material.Wood
- outdoorBench.Name = "OutdoorBench"
- outdoorBench.Parent = baseplate
- -- Add a Seat part for sitting functionality
- local seat = Instance.new("Seat")
- seat.Size = Vector3.new(4, 1, 2)
- seat.Position = position + Vector3.new(0, 0.5, 0) -- Adjust position to sit on top of the bench
- seat.Anchored = true
- seat.BrickColor = BrickColor.new("Reddish brown")
- seat.Transparency = 1 -- Make the seat part invisible for a natural look
- seat.Parent = outdoorBench
- end
- -- Create several outdoor benches in various positions
- createSittingOutdoorBench(Vector3.new(50, baseplateHeight + 1, 50))
- createSittingOutdoorBench(Vector3.new(100, baseplateHeight + 1, 75))
- createSittingOutdoorBench(Vector3.new(-50, baseplateHeight + 1, -100))
- createSittingOutdoorBench(Vector3.new(-100, baseplateHeight + 1, 100))
- -- Create sit-enabled outdoor benches with trash cans and a picnic table
- local function createSittingOutdoorBenchWithExtras(position)
- -- Create the bench part
- local outdoorBench = Instance.new("Part")
- outdoorBench.Size = Vector3.new(5, 1, 2)
- outdoorBench.Position = position
- outdoorBench.Anchored = true
- outdoorBench.BrickColor = BrickColor.new("Reddish brown")
- outdoorBench.Material = Enum.Material.Wood
- outdoorBench.Name = "OutdoorBench"
- outdoorBench.Parent = baseplate
- -- Add a Seat part for sitting functionality
- local seat = Instance.new("Seat")
- seat.Size = Vector3.new(4, 1, 2)
- seat.Position = position + Vector3.new(0, 0.5, 0) -- Adjust position to sit on top of the bench
- seat.Anchored = true
- seat.BrickColor = BrickColor.new("Reddish brown")
- seat.Transparency = 1 -- Make the seat part invisible for a natural look
- seat.Parent = outdoorBench
- -- Create a trash can next to the bench
- local trashCan = Instance.new("Part")
- trashCan.Size = Vector3.new(1, 3, 1) -- Size of the trash can
- trashCan.Position = position + Vector3.new(3, 1.5, 0) -- Position it slightly to the side of the bench
- trashCan.Anchored = true
- trashCan.BrickColor = BrickColor.new("Dark stone grey")
- trashCan.Material = Enum.Material.Metal
- trashCan.Shape = Enum.PartType.Cylinder
- trashCan.Name = "TrashCan"
- trashCan.Parent = baseplate
- -- Create a lid for the trash can
- local trashCanLid = Instance.new("Part")
- trashCanLid.Size = Vector3.new(1, 0.2, 1)
- trashCanLid.Position = trashCan.Position + Vector3.new(0, 1.6, 0)
- trashCanLid.Anchored = true
- trashCanLid.BrickColor = BrickColor.new("Dark stone grey")
- trashCanLid.Material = Enum.Material.Metal
- trashCanLid.Shape = Enum.PartType.Cylinder
- trashCanLid.Name = "TrashCanLid"
- trashCanLid.Parent = trashCan
- -- Create a picnic table next to the bench
- local picnicTable = Instance.new("Part")
- picnicTable.Size = Vector3.new(6, 1, 3) -- Table size
- picnicTable.Position = position + Vector3.new(-5, 1, 0) -- Positioned to the side of the bench
- picnicTable.Anchored = true
- picnicTable.BrickColor = BrickColor.new("Brown")
- picnicTable.Material = Enum.Material.Wood
- picnicTable.Name = "PicnicTable"
- picnicTable.Parent = baseplate
- -- Create two benches as seats for the picnic table
- for i = -1, 1, 2 do -- Adds one bench on each side of the table
- local tableBench = Instance.new("Part")
- tableBench.Size = Vector3.new(5, 0.5, 1)
- tableBench.Position = picnicTable.Position + Vector3.new(0, -0.75, i * 1.75) -- Adjusted for seating on either side
- tableBench.Anchored = true
- tableBench.BrickColor = BrickColor.new("Brown")
- tableBench.Material = Enum.Material.Wood
- tableBench.Name = "TableBench"
- tableBench.Parent = picnicTable
- -- Add Seat part to make each table bench sittable
- local tableSeat = Instance.new("Seat")
- tableSeat.Size = Vector3.new(4, 0.5, 1)
- tableSeat.Position = tableBench.Position
- tableSeat.Anchored = true
- tableSeat.Transparency = 1 -- Make the seat invisible for a natural look
- tableSeat.Parent = tableBench
- end
- end
- -- Create several outdoor setups with benches, trash cans, and picnic tables in various positions
- createSittingOutdoorBenchWithExtras(Vector3.new(50, baseplateHeight + 1, 50))
- createSittingOutdoorBenchWithExtras(Vector3.new(100, baseplateHeight + 1, 75))
- createSittingOutdoorBenchWithExtras(Vector3.new(-50, baseplateHeight + 1, -100))
- createSittingOutdoorBenchWithExtras(Vector3.new(-100, baseplateHeight + 1, 100))
- -- Function to create a fountain at a given position
- local function createFountain(position)
- -- Create the fountain base
- local fountainBase = Instance.new("Part")
- fountainBase.Size = Vector3.new(10, 1, 10)
- fountainBase.Position = position
- fountainBase.Anchored = true
- fountainBase.BrickColor = BrickColor.new("Medium stone grey")
- fountainBase.Material = Enum.Material.SmoothPlastic
- fountainBase.Shape = Enum.PartType.Cylinder
- fountainBase.Name = "FountainBase"
- fountainBase.Parent = baseplate
- -- Create the fountain pool (a slightly smaller cylinder on top of the base)
- local fountainPool = Instance.new("Part")
- fountainPool.Size = Vector3.new(9, 1, 9)
- fountainPool.Position = position + Vector3.new(0, 1, 0)
- fountainPool.Anchored = true
- fountainPool.BrickColor = BrickColor.new("Light blue")
- fountainPool.Material = Enum.Material.Glass
- fountainPool.Transparency = 0.5 -- Slightly transparent to mimic water
- fountainPool.Shape = Enum.PartType.Cylinder
- fountainPool.Name = "FountainPool"
- fountainPool.Parent = fountainBase
- -- Add water effect using a ParticleEmitter
- local waterSpray = Instance.new("ParticleEmitter")
- waterSpray.Texture = "rbxassetid://252907470" -- Water drop texture (adjust as needed)
- waterSpray.Rate = 100 -- Rate of particles
- waterSpray.Lifetime = NumberRange.new(1, 2)
- waterSpray.Speed = NumberRange.new(5, 10)
- waterSpray.VelocitySpread = 180 -- Spread of particles
- waterSpray.Rotation = NumberRange.new(0, 360)
- waterSpray.Size = NumberSequence.new(0.2, 0.4)
- waterSpray.Parent = fountainPool
- -- Create a small decorative statue in the center of the fountain pool
- local fountainStatue = Instance.new("Part")
- fountainStatue.Size = Vector3.new(1, 5, 1)
- fountainStatue.Position = position + Vector3.new(0, 2.5, 0)
- fountainStatue.Anchored = true
- fountainStatue.BrickColor = BrickColor.new("Dark stone grey")
- fountainStatue.Material = Enum.Material.SmoothPlastic
- fountainStatue.Name = "FountainStatue"
- fountainStatue.Parent = fountainBase
- end
- -- Place the fountain in the "Hiding place" baseplate at a specific position
- createFountain(Vector3.new(0, baseplateHeight + 1, -20))
- -- Generate the "Hiding place" with all details
- local hidingPlace = createHidingPlace()
- -- GUI Setup (as previously provided)
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Parent = player:WaitForChild("PlayerGui")
- local Frame = Instance.new("Frame")
- Frame.Size = UDim2.new(0, 200, 0, 100)
- Frame.Position = UDim2.new(0.5, -100, 0.1, 0)
- Frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- Frame.BorderSizePixel = 0
- Frame.Draggable = true
- Frame.Parent = ScreenGui
- local Title = Instance.new("TextLabel")
- Title.Text = "Hideout"
- Title.Font = Enum.Font.SourceSans
- Title.TextSize = 18
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.Position = UDim2.new(0, 18, 0, 5)
- Title.BackgroundTransparency = 1
- Title.Parent = Frame
- local CreatorLabel = Instance.new("TextLabel")
- CreatorLabel.Text = "by pyst"
- CreatorLabel.Font = Enum.Font.SourceSans
- CreatorLabel.TextSize = 10
- CreatorLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
- CreatorLabel.Position = UDim2.new(0, 18, 1, -10)
- CreatorLabel.BackgroundTransparency = 1
- CreatorLabel.Parent = Frame
- local MinimizeButton = Instance.new("TextButton")
- MinimizeButton.Size = UDim2.new(0, 20, 0, 20)
- MinimizeButton.Position = UDim2.new(1, -45, 0, 5)
- MinimizeButton.Text = "-"
- MinimizeButton.TextSize = 16
- MinimizeButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- MinimizeButton.Parent = Frame
- local CloseButton = Instance.new("TextButton")
- CloseButton.Size = UDim2.new(0, 20, 0, 20)
- CloseButton.Position = UDim2.new(1, -25, 0, 5)
- CloseButton.Text = "X"
- CloseButton.TextSize = 16
- CloseButton.BackgroundColor3 = Color3.fromRGB(100, 0, 0)
- CloseButton.Parent = Frame
- local TeleportButton = Instance.new("TextButton")
- TeleportButton.Size = UDim2.new(0, 180, 0, 30)
- TeleportButton.Position = UDim2.new(0, 10, 0, 35)
- TeleportButton.Text = "Go to Hiding place"
- TeleportButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TeleportButton.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
- TeleportButton.Font = Enum.Font.SourceSans
- TeleportButton.TextSize = 16
- TeleportButton.TextScaled = true
- TeleportButton.Parent = Frame
- -- Minimize functionality for the GUI
- local isMinimized = false
- MinimizeButton.MouseButton1Click:Connect(function()
- isMinimized = not isMinimized
- if isMinimized then
- Frame.Size = UDim2.new(0, 200, 0, 30)
- TeleportButton.Visible = false
- CreatorLabel.Visible = false
- else
- Frame.Size = UDim2.new(0, 200, 0, 100)
- TeleportButton.Visible = true
- CreatorLabel.Visible = true
- end
- end)
- -- Close button functionality
- CloseButton.MouseButton1Click:Connect(function()
- ScreenGui:Destroy()
- end)
- -- Teleportation functionality with position saving
- local atHidingPlace = false
- TeleportButton.MouseButton1Click:Connect(function()
- if atHidingPlace then
- -- Teleport back to saved position on baseplate
- character.HumanoidRootPart.CFrame = CFrame.new(lastBaseplatePosition)
- TeleportButton.Text = "Go to Hiding place"
- else
- -- Save current position as lastBaseplatePosition, then teleport to hiding place
- lastBaseplatePosition = character.HumanoidRootPart.Position
- character.HumanoidRootPart.CFrame = hidingPlace.CFrame + Vector3.new(0, 5, 0)
- TeleportButton.Text = "Go back"
- end
- atHidingPlace = not atHidingPlace
- end)
- -- Final confirmation in output
- print("INVITE PLAYERS TO USE THIS SCRIPT FOR MORE PEOPLE TO HIDE IN THE BASEPLATE :), by pyst.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement