Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
player = Players.LocalPlayer
folder = :()
folder
folder = .()
folder.Name =
folder.Parent =
cuboids = {}
selected =
size =
currentColor =
.(,,)
FACE_DISTANCE =
phrases = {
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
}
gui = .()
gui.Name =
gui.ResetOnSpawn =
gui.Parent = player.PlayerGui
(text,x,y,func)
b = .()
b.Size =
.(
,
,
,
)
b.Position =
.(
,
x,
,
y
)
b.Text = text
b.TextScaled =
b.Parent = gui
b.MouseButton1Click:(func)
b
(part,text)
old =
part:()
old
old:()
face =
.()
face.Name =
face.Size =
.(
,
,
,
)
face.AlwaysOnTop =
face.Parent = part
label =
.()
label.Size =
.(
,
)
label.BackgroundTransparency =
label.Text =
text
label.TextScaled =
label.Parent = face
(part)
old =
part:()
old
old:()
bubble =
.()
bubble.Name =
bubble.Size =
.(
,
,
,
)
bubble.StudsOffset =
.(
,
,
)
bubble.AlwaysOnTop =
bubble.Parent = part
text =
.()
text.Size =
.(
,
)
text.BackgroundTransparency =
text.TextScaled =
text.Text =
phrases[
.(
,
#phrases
)
]
text.Parent = bubble
.(
,
()
bubble
bubble:()
)
()
player.Character
root =
player.Character:(
)
root
_,c (cuboids)
face =
c.Object:(
)
speech =
c.Object:(
)
distance =
(
root.Position -
c.Object.Position
).Magnitude
face
face.Enabled =
distance <= FACE_DISTANCE
speech
speech.Enabled =
distance <= FACE_DISTANCE
colors = {
{,.(,,)},
{,.(,,)},
{,.(,,)},
{,.(,,)},
{,.(,,)},
{,.(,,)},
{,.(,,)},
{,.(,,)},
{,.(,,)},
{,.(,,)},
{,.(,,)},
{,.(,,)}
}
i,c (colors)
(
c[],
(i-)%*,
+
.((i-)/)*,
()
currentColor =
c[]
)
(shape)
part =
.()
part.Name =
shape..
part.Size =
.(
size,
size,
size
)
shape ==
part.Shape =
.PartType.Ball
shape ==
part.Shape =
.PartType.Cylinder
shape ==
part.Shape =
.PartType.Wedge
part.Color =
currentColor
part.Position =
player.Character.HumanoidRootPart.Position
+
.(
.(-,),
,
.(-,)
)
part.Parent =
folder
data = {
Object = part,
Type = shape,
Mode = ,
IdleTime = ,
Sleeping = ,
NormalFace = ,
MoveTimer = ,
Direction = .zero,
SpeechTimer =
.(,),
Bonk = ,
SocialTimer = ,
LastBlock = ,
LastSpawn = ,
SpawnPoints = {},
HomePosition = part.Position
}
.(
cuboids,
data
)
(
part,
)
click =
.()
click.MaxActivationDistance =
click.Parent =
part
click.MouseClick:(()
selected =
data
(
shape..
)
)
part.Touched:((hit)
data.Bonk
hit:(folder)
data.Bonk =
(
part,
)
.(
,
()
data.Bonk =
data.Mode==
(part,)
data.Mode==
(part,)
data.Mode==
(part,)
data.Mode==
(part,)
data.Mode==
(part,)
)
)
(c)
() - (c.LastPlank ) <
c.LastPlank = ()
block = .()
block.Name =
block.Anchored =
block.Size = .(,,)
block.Material = .Material.Plastic
block.Color = c.Object.Color
block.Position =
.(
.(c.Object.Position.X/ + ) * ,
.((c.Object.Position.Y-)/ + ) * ,
.(c.Object.Position.Z/ + ) *
)
block.Parent = folder
(c)
c.SpawnPoints=c.SpawnPoints {}
()-(c.LastSpawn )<
c.LastSpawn=()
=.()
.Anchored=
.Size=.(,,)
.Position=
c.Object.Position-
.(,,)
.Neutral=
.Color=c.Object.Color
.Parent=folder
.(
c.SpawnPoints,
)
(c)
c.Object.Position.Y>-
closest
dist=.huge
_, (c.SpawnPoints {})
.Parent
d=
(c.Object.Position-
.Position).Magnitude
d<dist
dist=d
closest=
closest
c.Object.Position=
closest.Position+
.(,,)
(c)
params=RaycastParams.()
params.FilterType=
.RaycastFilterType.Exclude
params.FilterDescendantsInstances={
folder,
c.Object
}
ray=
:(
c.Object.Position,
.(,-,),
params
)
ray
(c)
(c)
.(,)==
(c)
(pos)
closest
distance = .huge
_,p (Players:())
p.Character
p.Character:()
d =
(
p.Character.HumanoidRootPart.Position
-pos
).Magnitude
d < distance
distance = d
closest = p
closest
(c)
closest
distance =
_,other (cuboids)
other ~= c
d =
(
other.Object.Position
-c.Object.Position
).Magnitude
d < distance
distance = d
closest = other
closest
RunService.Heartbeat:((dt)
()
_,c (cuboids)
part =
c.Object
target =
(
part.Position
)
c.SpeechTimer -= dt
c.SpeechTimer <=
c.Mode==
other =
(c)
other
(part)
part.CFrame =
.(
part.Position,
other.Object.Position
)
c.SpeechTimer =
.(,)
c.Mode==
part.AssemblyLinearVelocity =
.zero
c.IdleTime += dt
c.IdleTime >=
c.Sleeping =
(
part,
)
(
part,
)
other =
(c)
other
other.Mode==
d =
(
other.Object.Position
-part.Position
).Magnitude
d <
part.CFrame =
.(
part.Position,
other.Object.Position
)
.(,)==
(part)
c.Mode==
c.IdleTime=
c.Sleeping=
(
part,
)
c.MoveTimer -= dt
c.MoveTimer <=
c.MoveTimer =
.(,)
c.Direction =
.(
.(-,),
,
.(-,)
).Unit
part.AssemblyLinearVelocity =
c.Direction*
c.Type==
c.Type==
part.CFrame =
.(
part.Position,
part.Position+c.Direction
)
(c)
(c)
(c)
c.Mode==
c.IdleTime =
c.Sleeping =
(
part,
)
target
direction =
(
target.Character.HumanoidRootPart.Position
-part.Position
).Unit
part.AssemblyLinearVelocity =
direction*
c.Type==
c.Type==
part.CFrame =
.(
part.Position,
part.Position+direction
)
(part.Position -
target.Character.HumanoidRootPart.Position)
.Magnitude <
target.Character.Humanoid:()
c.Mode==
c.IdleTime=
c.Sleeping=
(
part,
)
target
direction =
(
target.Character.HumanoidRootPart.Position
-part.Position
).Unit
part.AssemblyLinearVelocity =
direction*
c.Type==
c.Type==
part.CFrame =
.(
part.Position,
part.Position+direction
)
c.Mode==
c.IdleTime=
c.Sleeping=
other =
(c)
other
distance =
(
other.Object.Position
-part.Position
).Magnitude
distance >
direction =
(
other.Object.Position
-part.Position
).Unit
part.AssemblyLinearVelocity =
direction*
(
part,
)
part.AssemblyLinearVelocity =
.zero
part.CFrame =
.(
part.Position,
other.Object.Position
)
(
part,
)
c.SpeechTimer -= dt
c.SpeechTimer <=
(part)
c.SpeechTimer =
.(,)
)
(
,
,
,
()
()
)
(
,
,
,
()
()
)
(
,
,
,
()
()
)
(
,
,
,
()
()
)
(
,
,
,
()
size +=
)
(
,
,
,
()
size =
.(
,
size-
)
)
(
,
,
,
()
selected
selected.Mode=
selected.IdleTime=
(selected.Object,)
)
(
,
,
,
()
selected
selected.Mode=
selected.IdleTime=
(selected.Object,)
)
(
,
,
,
()
selected
selected.Mode=
selected.IdleTime=
(selected.Object,)
)
(
,
,
,
()
selected
selected.Mode=
selected.IdleTime=
(selected.Object,)
)
(
,
,
,
()
selected
selected.Mode=
selected.IdleTime=
(selected.Object,)
)This is my first script! It isn't supposed to be something great as all it is just a funny little test. This is Stud Friend! Spawn little shape dudes and play around with them! How to use: Choose your Stud Friend's color, and size, (using the + and -) then choose a shape and he spawns! To make him do stuff, click on one of the command buttons (wander, attack, stare, follow) and click on the Stud Friend to activate it! You can spawn as much Stud Friends as this script says you can (idrk the max) Have fun with your new friend!

Universal