Universal Script 📌
4.1k Views
8 Executions

Blocky P3ts

Universal Script 📌
skibidimariodisney
skibidimariodisneyPublished 10
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Pet block Simple Lag warning

View Raw
local Players    = game:GetService("Players")
local RunService = game:GetService("RunService")
local Workspace  = game:GetService("Workspace")

local LocalPlayer = Players.LocalPlayer
local Character   = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local HRP         = Character:WaitForChild("HumanoidRootPart")

local MAX_BLOCKS    = 100
local DETECT_RADIUS = 30
local WANDER_RADIUS = 50
local INTERACT_DIST = 5

local spawnableParts = {}
for _, obj in ipairs(Workspace:GetDescendants()) do
    if obj:IsA("BasePart") and obj.CanCollide and not obj:IsDescendantOf(Character) then
        table.insert(spawnableParts, obj)
    end
end

local function randomPointOnPart(part)
    local s = part.Size * 0.5
    local offset = Vector3.new(
        math.random(-s.X, s.X),
        math.random(-s.Y, s.Y),
        math.random(-s.Z, s.Z)
    )
    return part.Position + offset
end

local wanderers = {}

local function spawnWanderer(atPlayerPosition)
    local spawnPos
    if atPlayerPosition and math.random() < 0.5 then
        spawnPos = HRP.Position + Vector3.new(0,2,0)
    else
        local part = spawnableParts[math.random(1,#spawnableParts)]
        spawnPos = randomPointOnPart(part)
    end


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Script hub
47.4k
173.4k
Bumped 8 minutes ago
Key System

Script hub

#4 this month

Verified script badgeArcane Hub | 125+ Games & 4000+ Features

Script hub
173.1k
1.5M
Bumped 46 minutes ago
Key System
Script hub
3.1M
734.0k
Bumped 49 minutes ago
Key System

Script hub

Hall of Fame #10

Verified script badgeFlow Hub | 50 Games | Updated

Universal Script 📌
5.8k
20.9k
Bumped 2 hours ago
Key System
Script hub
27.1k
1.1k
Bumped 3 hours ago
Key System

Script hub

#1 today

Plak New

Universal Script 📌
47.8k
200.1k
Bumped 3 hours ago
Key System