Run it
Copy the script and paste it into your executor.
patricknpcpanel
patricknpcpanel =
github =
load = (:(github .. ))()
saved = (:(github .. ))()
save = saved {}
g2l = load.G2L
new = load.()
tweenservice = :()
rs = :()
ws = :()
plrs = :()
lp = plrs.LocalPlayer
mouse = lp:()
medium = TweenInfo.()
rad =
currentnpc
highlight = .()
highlight.Parent = lp
highlight.FillTransparency =
highlight.OutlineTransparency =
light = (adornee, color)
.(()
highlight.Adornee = adornee
highlight.OutlineColor = color
tweenservice:(highlight, medium, {OutlineTransparency = }):()
.()
tweenservice:(highlight, medium, {OutlineTransparency = }):()
)
isnpc = (ins)
humanoid = ins:()
player = plrs:(ins)
humanoid player
ins
selectedNPCs = {}
maxSelected =
multiSelectMode =
isFollowingAll =
followAllConnection =
currentFollowShape =
followDistance =
autoSelectNetworkOwner =
followShapes = {
,
,
,
,
,
,
}
shapeDisplayButton = new:(, , ()
)
(part)
part
part:()
model = part:()
model
player = plrs:(model)
player
(model)
model model:()
hrp = model:()
hrp
(hrp)
()
selectedNPCs = {}
currentnpc =
()
count =
_ (selectedNPCs)
count = count +
count
(callback)
count =
npc, _ (selectedNPCs)
npc npc.Parent npc:()
hrp = npc:()
hrp (hrp)
success, err = (callback, npc)
success
count = count +
selectedNPCs[npc] =
count
new:(, , (state)
multiSelectMode = state
state
()
()
() >
npc, _ (selectedNPCs)
npc ~= currentnpc
selectedNPCs[npc] =
)
new:(, , (state)
autoSelectNetworkOwner = state
state
()
()
)
new:(, , ()
()
count =
_, model (ws:())
model:() (model)
(model)
count >= maxSelected
selectedNPCs[model] =
currentnpc = model
count +=
count >
(lp.Character, .(,,))
(..count..)
(lp.Character, .(,,))
()
)
mouse.Button1Down:(()
mouse.Target
targetParent = mouse.Target.Parent
targetParent
hrp = targetParent:()
hrp
hrp.Anchored ==
(targetParent, .(, , ))
plrs:(targetParent)
humanoid = targetParent:()
humanoid
(hrp)
currentnpc = targetParent
multiSelectMode
selectedNPCs[targetParent]
selectedNPCs[targetParent] =
(targetParent, .(, , ))
() < maxSelected
selectedNPCs[targetParent] =
(targetParent, .(, , ))
(targetParent, .(, , ))
()
selectedNPCs[targetParent] =
(targetParent, .(, , ))
(targetParent, .(, , ))
)
(playerPos, playerLookVector, index, total, shape, distance)
offset = .(, , )
spacing =
shape ==
angle = (index / total) * .pi *
offset = .(
.(angle) * distance,
,
.(angle) * distance
)
shape ==
sideLength = .(total / )
sideIndex = .(index / sideLength)
posInSide = index % sideLength
halfLength = (sideLength - ) * spacing /
sideIndex ==
offset = .(-halfLength + posInSide * spacing, , distance)
sideIndex ==
offset = .(distance, , halfLength - posInSide * spacing)
sideIndex ==
offset = .(halfLength - posInSide * spacing, , -distance)
offset = .(-distance, , -halfLength + posInSide * spacing)
shape ==
startOffset = -playerLookVector * distance
sideOffset = .(, , )
total >
sideOffset = .((index - (total-)/) * spacing, , )
offset = startOffset + sideOffset
shape ==
rows =
rowCount =
rowCount < total
rows = rows +
rowCount = rowCount + rows
currentRow =
countInRow =
cumulative =
r = , rows
index < cumulative + r
currentRow = r
countInRow = index - cumulative
cumulative = cumulative + r
rowSpacing = spacing *
colOffset = (countInRow - (currentRow-)/) * spacing
rowOffset = -(currentRow-) * rowSpacing
offset = .(colOffset, , rowOffset + distance)
shape ==
innerCount = .(total / )
outerCount = total - innerCount
index < innerCount
angle = (index / innerCount) * .pi *
offset = .(
.(angle) * (distance * ),
,
.(angle) * (distance * )
)
outerIndex = index - innerCount
angle = (outerIndex / outerCount) * .pi *
offset = .(
.(angle) * distance,
,
.(angle) * distance
)
shape ==
forwardOffset = playerLookVector * distance
sideOffset = .(, , )
total >
sideOffset = .((index - (total-)/) * spacing, , )
offset = forwardOffset + sideOffset
shape ==
backwardOffset = -playerLookVector * distance
sideOffset = .(, , )
total >
sideOffset = .((index - (total-)/) * spacing, , )
offset = backwardOffset + sideOffset
playerPos + offset
()
followAllConnection
followAllConnection:()
followAllConnection = rs.RenderStepped:(()
playerChar = lp.Character
playerChar
playerHrp = playerChar:()
playerHrp
selectedCount = ()
selectedCount ==
playerPos = playerHrp.Position
playerLookVector = playerHrp.CFrame.LookVector
rightVector = playerHrp.CFrame.RightVector
upVector = playerHrp.CFrame.UpVector
index =
npc, _ (selectedNPCs)
npc npc.Parent npc:()
hrp = npc:()
hrp (hrp)
hum = npc:()
hum
basePos = (
.(, , ),
.(, , -),
index,
selectedCount,
currentFollowShape,
followDistance
)
rotatedPos = playerPos +
(rightVector * basePos.X) +
(upVector * basePos.Y) +
(playerLookVector * basePos.Z)
hum:(rotatedPos)
index = index +
)
isFollowingAll =
()
followAllConnection
followAllConnection:()
followAllConnection =
isFollowingAll =
shapeIndex =
new:(, , ()
shapeIndex = shapeIndex +
shapeIndex > #followShapes
shapeIndex =
currentFollowShape = followShapes[shapeIndex]
( .. currentFollowShape)
shapeDisplayButton
(()
shapeDisplayButton:( .. currentFollowShape)
)
isFollowingAll
()
()
)
distanceDisplayButton = new:( .. followDistance, , () )
new:(, , ()
followDistance = followDistance +
followDistance > followDistance =
( .. followDistance)
(()
distanceDisplayButton:( .. followDistance)
)
isFollowingAll
()
()
)
new:(, , ()
followDistance = followDistance -
followDistance < followDistance =
( .. followDistance)
(()
distanceDisplayButton:( .. followDistance)
)
isFollowingAll
()
()
)
new:(save[].title, save[].des, ()
selectedCount = ()
selectedCount >
count = ((npc)
hum = npc:()
hum
hum:(save[].val)
)
count >
(lp.Character, .(, , ))
currentnpc
part = currentnpc:()
part (part)
hum = currentnpc:()
hum
hum:(save[].val)
(currentnpc, .(, , ))
)
new:(save[].title, save[].des, ()
selectedCount = ()
selectedCount >
lp lp.Character
char = lp.Character
charPos = char:()
count =
radius =
((npc)
angle = (count / selectedCount) * .pi *
offset = .(
.(angle) * radius,
,
.(angle) * radius
)
newCFrame = charPos + offset
npc:(.(newCFrame))
count = count +
)
(lp.Character, .(, , ))
currentnpc
part = currentnpc:()
part (part)
lp lp.Character
char = lp.Character
currentnpc:(char:())
(currentnpc, .(, , ))
)
new:(save[].title, save[].des, ()
currentnpc
part = currentnpc:()
part
lp lp.Character
char = lp.Character
char:(currentnpc:())
(currentnpc, .(, , ))
)
chr, cons
new:(save[].title, save[].des, (a)
a
currentnpc
part = currentnpc:()
part (part)
lp lp.Character
chr = lp.Character
lp.Character = currentnpc
ws.CurrentCamera.CameraSubject = currentnpc:()
move =
cons = rs.PreSimulation:(()
hum = lp.Character:()
lp.Character hum
hum.RootPart.CFrame += .(,move,)
move = -move
cons
cons:()
cons =
)
(currentnpc, .(, , ))
chr
lp.Character = chr
ws.CurrentCamera.CameraSubject = chr.Humanoid
chr =
cons
cons:()
cons =
)
new:(save[].title, save[].des, ()
selectedCount = ()
selectedCount >
count = ((npc)
npc:(.(, , ))
)
count >
(lp.Character, .(, , ))
currentnpc
part = currentnpc:()
part (part)
lp lp.Character
currentnpc:(.(, , ))
(currentnpc, .(, , ))
)
new:(save[].title, save[].des, ()
selectedCount = ()
selectedCount >
count = ((npc)
hum = npc:()
hum
hum.Sit = hum.Sit
)
count >
(lp.Character, .(, , ))
currentnpc
part = currentnpc:()
part (part)
hum = currentnpc:()
hum
hum.Sit = hum.Sit
(currentnpc, .(, , ))
)
new:(save[].title, save[].des, ()
selectedCount = ()
selectedCount >
count = ((npc)
hum = npc:()
hum
hum:(save[].val)
)
count >
(lp.Character, .(, , ))
currentnpc
part = currentnpc:()
part (part)
hum = currentnpc:()
hum
hum:(save[].val)
(currentnpc, .(, , ))
)
new:(, , (state)
state
() >
()
(lp.Character, .(, , ))
(lp.Character, .(, , ))
()
)
new:(, , ()
character = lp.Character
character
hrp = character:()
hrp
()
foundNPCs = {}
radius =
success, parts = (()
ws:(hrp.Position, radius)
)
success
_, part (parts)
model = part:()
model (model)
npcHrp = model:()
npcHrp npcHrp.Anchored (npcHrp)
.(foundNPCs, model)
selectedCount =
i = , .(#foundNPCs, maxSelected)
selectedNPCs[foundNPCs[i]] =
currentnpc = foundNPCs[i]
selectedCount = selectedCount +
selectedCount >
(hrp, .(, , ))
)
new:(, , ()
()
selectedCount =
_, model (:())
model:() (model)
npcHrp = model:()
npcHrp npcHrp.Anchored (npcHrp)
selectedCount < maxSelected
selectedNPCs[model] =
currentnpc = model
selectedCount = selectedCount +
selectedCount >
(lp.Character, .(, , ))
)
new:(, , ()
()
()
(lp.Character, .(, , ))
)
rs.RenderStepped:(()
npc, _ (selectedNPCs)
npc npc.Parent npc:()
selectedNPCs[npc] =
autoSelectNetworkOwner
_, model (ws:())
model:() (model)
() >= maxSelected
(model) selectedNPCs[model]
selectedNPCs[model] =
currentnpc = model
sethiddenproperty
(lp,,rad)
lp.SimulationRadius=rad
)
lp.CharacterAdded:(()
.()
highlight.Parent = lp
()
()
)
lp.CharacterRemoving:(()
()
()
)
g2l,
Loads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: raw.githubusercontent.com.
This is an open source, because someone doesn't know how to make this. You can control NPCs to do anything with you. If you can write your own code, you might be able to get them to attack. But that's all I can do. I can't understand why other people would change this script just a little bit to control more NPCs just by adding a few ports. Of course, I can only optimize here, because. It's too much trouble to write code.