ADVERTISEMENTREMOVE ADS
Game icon

Bring Giftbox's

Script preview thumbnail
Script Preview

Description

I made this script out of boredom. Just go to the FNAF map SOTM and run it. 😐

Tested with

ADVERTISEMENTREMOVE ADS
31 Lines • 1003 Bytes
Raw
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:WaitForChild("HumanoidRootPart")
local playerPosition = hrp.Position
local giftboxes = {}
for _, v in pairs(workspace:GetDescendants()) do
if v:IsA("Model") and v.Name == "GiftBox" then
table.insert(giftboxes, v)
end
end
local radius = 5
for i, giftbox in pairs(giftboxes) do
local angle = (i - 1) * (2 * math.pi / #giftboxes)
local offsetX = math.cos(angle) * radius
local offsetZ = math.sin(angle) * radius
local offsetPosition = playerPosition + Vector3.new(offsetX, 0, offsetZ)
local targetCFrame = CFrame.new(offsetPosition)
if giftbox.PrimaryPart then
giftbox:SetPrimaryPartCFrame(targetCFrame)
else
for _, part in pairs(giftbox:GetChildren()) do
if part:IsA("BasePart") then
part.CFrame = targetCFrame
end
end
end
end
ADVERTISEMENTREMOVE ADS

Comments

3 comments
to add a comment
Mi

nice work fella

1
0
Bi

@Milkyla thx

1
0
Al

thats why his the GOAT the GOAT!!!

2
0
ADVERTISEMENTREMOVE ADS