how do i end this script?
this is one of those times that i have a end breakdown and cant figure out how to end a script.
local delay = 1.5
local enemy = script.Parent.Parent.foipboss
local humanoid = enemy.Humanoid
local entryPOINT = script.Parent.Parent.position1
local entryPOINT2 = script.Parent.Parent.position2
local entryPOINT3 = script.Parent.Parent.position3
local entryPOINT4 = script.Parent.Parent.position4
local entryPOINT5 = script.Parent.Parent.position5
local entryPOINT6 = script.Parent.Parent.position6
local entryPOINT7 = script.Parent.Parent.position7
local entryPOINT8 = script.Parent.Parent.position8
local entryPOINT9 = script.Parent.Parent.position9
valuefunny = script.FunValue
valuefunny.Value = math.random(1, 9)
nextmovement = script.FunValue.Value
if nextmovement == 1 then
nextDestinationObject = entryPOINT
elseif nextmovement == 2 then
nextDestinationObject = entryPOINT2
elseif nextmovement == 3 then
nextDestinationObject = entryPOINT3
elseif nextmovement == 4 then
nextDestinationObject = entryPOINT4
elseif nextmovement == 5 then
nextDestinationObject = entryPOINT5
elseif nextmovement == 6 then
nextDestinationObject = entryPOINT6
elseif nextmovement == 7 then
nextDestinationObject = entryPOINT7
elseif nextmovement == 8 then
nextDestinationObject = entryPOINT8
elseif nextmovement == 9 then
nextDestinationObject = entryPOINT9
end
local nextDestinationObject = entryPOINT
while task.wait(delay) do
humanoid:MoveTo(nextDestinationObject.PrimaryPart.Position)
humanoid.MoveToFinished:Wait()
if nextDestinationObject == entryPOINT then
valuefunny.Value = math.random(1, 9)
elseif
if nextDestinationObject == entryPOINT2 then
valuefunny.Value == math.random(1, 9)
else
if nextDestinationObject == entryPOINT3 then
valuefunny.Value == math.random(1, 9)
else
if nextDestinationObject == entryPOINT4 then
valuefunny.Value == math.random(1, 9)
else
if nextDestinationObject == entryPOINT5 then
valuefunny.Value == math.random(1, 9)
else
if nextDestinationObject == entryPOINT6 then
valuefunny.Value == math.random(1, 9)
else
if nextDestinationObject == entryPOINT7 then
valuefunny.Value == math.random(1, 9)
else
if nextDestinationObject == entryPOINT8 then
valuefunny.Value == math.random(1, 9)
else
if nextDestinationObject == entryPOINT9 then
valuefunny.Value == math.random(1, 9)
