local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Characters = ReplicatedStorage:WaitForChild("Characters")

local Freddy = Characters:WaitForChild("Freddy")
local Bonnie = Characters:WaitForChild("Bonnie")
local Chica = Characters:WaitForChild("Chica")
local Foxy = Characters:WaitForChild("Foxy")
local GoldenBear = Characters:WaitForChild("GoldenBear")

local function FreddyAI(AILevel, Locked)
    local Settings = require(Freddy:FindFirstChild("Settings"))
    
    Settings.AI.AILevel = AILevel
    Settings.AI.Locked = Locked
    
    repeat
        task.wait(math.random(Settings.AI.MinMovementTime, Settings.AI.MaxMovementTime)
        
        local MovementOpportunity = math.random(1, Settings.AI.MaxAILevel)
        local Success
        
        local NewPos = workspace.CharacterPositions:FindFirstChild("Freddy")["Position" .. Settings.AI.CurrentPosition]
        
        if Settings.AI.AILevel >= MovementOpportunity then
            if Settings.AI.Locked then
                Success = false
                print("Movement was granted but " .. Freddy.Name .. " is currently locked (debug)")
            else
                Success = true
                print("Movement granted")
            end
        end
        
        if Success then
            Settings.AI.CurrentPosition += 1
            Freddy:SetPrimaryPartCFrame(NewPos)
        end
    until Settings.AI.CurrentPosition == Settings.AI.MaxPosition
end

local function BonnieAI(AILevel, Locked)
    local Settings = require(Bonnie:FindFirstChild("Settings"))
    
    Settings.AI.AILevel = AILevel
    Settings.AI.Locked = Locked
    
    repeat
        task.wait(math.random(Settings.AI.MinMovementTime, Settings.AI.MaxMovementTime)
        
        local MovementOpportunity = math.random(1, Settings.AI.MaxAILevel)
        local Success
        
        local NewPos = workspace.CharacterPositions:FindFirstChild("Bonnie")["Position" .. Settings.AI.CurrentPosition]
        
        if Settings.AI.AILevel >= MovementOpportunity then
            if Settings.AI.Locked then
                Success = false
                print("Movement was granted but " .. Bonnie.Name .. " is currently locked (debug)")
            else
                Success = true
                print("Movement granted")
            end
        end
        
        if Success then
            Settings.AI.CurrentPosition += 1
            Bonnie:SetPrimaryPartCFrame(NewPos)
        end
    until Settings.AI.CurrentPosition == Settings.AI.MaxPosition
end

local function ChicaAI(AILevel, Locked)
    local Settings = require(Chica:FindFirstChild("Settings"))
    
    Settings.AI.AILevel = AILevel
    Settings.AI.Locked = Locked
    
    repeat
        task.wait(math.random(Settings.AI.MinMovementTime, Settings.AI.MaxMovementTime)
        
        local MovementOpportunity = math.random(1, Settings.AI.MaxAILevel)
        local Success
        
        local NewPos = workspace.CharacterPositions:FindFirstChild("Chica")["Position" .. Settings.AI.CurrentPosition]
        
        if Settings.AI.AILevel >= MovementOpportunity then
            if Settings.AI.Locked then
                Success = false
                print("Movement was granted but " .. Chica.Name .. " is currently locked (debug)")
            else
                Success = true
                print("Movement granted")
            end
        end
        
        if Success then
            Settings.AI.CurrentPosition += 1
            Chica:SetPrimaryPartCFrame(NewPos)
        end
    until Settings.AI.CurrentPosition == Settings.AI.MaxPosition
end

local function FoxyAI(AILevel, Locked)
    local Settings = require(Foxy:FindFirstChild("Settings"))
    
    Settings.AI.AILevel = AILevel
    Settings.AI.Locked = Locked
    
    repeat
        task.wait(math.random(Settings.AI.MinMovementTime, Settings.AI.MaxMovementTime)
        
        local MovementOpportunity = math.random(1, Settings.AI.MaxAILevel)
        local Success
        
        local NewPos = workspace.CharacterPositions:FindFirstChild("Foxy")["Position" .. Settings.AI.CurrentPosition]
        
        if Settings.AI.AILevel >= MovementOpportunity then
            if Settings.AI.Locked then
                Success = false
                print("Movement was granted but " .. Foxy.Name .. " is currently locked (debug)")
            else
                Success = true
                print("Movement granted")
            end
        end
        
        if Success then
            Settings.AI.CurrentPosition += 1
            Foxy:SetPrimaryPartCFrame(NewPos)
        end
    until Settings.AI.CurrentPosition == Settings.AI.MaxPosition
end

local function GoldenBearAI(AILevel, Locked)
    local Settings = require(GoldenBear:WaitForChild("Settings"))
    
    -- this boi is gonna be random, very VERY random :troll:
    repeat
        local EasterEgg = math.random(1, Settings.AI.AppearanceChance)
        
        if EasterEgg >= Settings.AI.AppearanceChance then
            print("IT'S ME")
    until 
    
end

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: