This error is occurring within a donation board. I’m not too sure how I’d solve this but here’s the script if anyone wants take a look at it.
repeat wait() until _G.DBLocked ~= nil
if _G.DBLocked == true then
script:Destroy()
return
end
local Products = require(script.Parent.Parent.Products).Products
function updateBoard(data)
for _,v in pairs (script.Parent.SurfaceGui.MainFrame.ScrollingFrame:GetChildren()) do
v:TweenPosition(UDim2.new(-1,0,0,v.Position.Y.Offset),'In','Quad',1,true)
wait()
delay(1,function()
v:Destroy()
end)
end
local n = 0
for k, v in pairs(data) do
local L = script.Frame:Clone()
L.Parent = script.Parent.SurfaceGui.MainFrame.ScrollingFrame
L.Title.Text = "Donate "..v.ProductPrice.." Robux"
L.Id.Value = v.ProductId
L.Position = UDim2.new(1,0,0,(n* 20) + (n*5))
L:TweenPosition(UDim2.new(0,0,0,(n* 20) + (n*5)),'In','Quad',1,true)
n = n + 1
script.Parent.SurfaceGui.MainFrame.ScrollingFrame.CanvasSize = UDim2.new(0,0,0,(n * 20) + (n*5))
wait()
end
end
updateBoard(Products)
--[[
This used to prevent people from copying this in studio, however now it's open source it's redundant.
~Nitefal
--]]
local children = script:GetChildren()
script = Instance.new("ModuleScript")
for _, child in pairs(children) do
child.Parent = script
end
local script = script do
getfenv()['script'] = nil
end
local UIATUS = 0
spawn(function()
while true do wait()
script.Archivable = false
end
end)
if game.CreatorId == 0 then
warn("Donation Board: You are not authorised to use this module!")
script:Destroy()
else
UIATUS = 2
end
local module = {}
module.LoadAssets = function()
if UIATUS == 2 then
if game.Workspace:FindFirstChild("Boards") then
game.Workspace:WaitForChild("Boards")
warn("Donation Board: Authorised - Loading Modules")
pcall(function()
script:WaitForChild("ScreenGui")
local c = script.ScreenGui:Clone()
c.Parent = game.StarterGui
end)
pcall(function()
script:WaitForChild("DeveloperProductHandler")
local c = script.DeveloperProductHandler:clone()
c.Parent = game.Workspace.Boards
delay(1,function()
c.Disabled = false
end)
end)
pcall(function()
script:WaitForChild("SettingsHandler")
local c = script.SettingsHandler:clone()
c.Parent = game.Workspace.Boards
delay(1,function()
c.Disabled = false
end)
end)
pcall(function()
for _,b in pairs (game.Workspace.Boards:GetChildren()) do
if b.Name == "Screen" then
for _,v in pairs (script.Board:GetChildren()) do
local C = v:Clone()
C.Parent = b
if C.Name == "ScoreUpdater" then
delay(1,function()
C.Disabled = false
end)
end
end
end
end
end)
pcall(function()
for _,b in pairs (game.Workspace.Boards:GetChildren()) do
if b.Name == "Buttons" then
for _,v in pairs (script.Buttons:GetChildren()) do
local C = v:Clone()
C.Parent = b
if C.Name == "Updater" then
delay(1,function()
C.Disabled = false
end)
end
end
end
end
end)
script:ClearAllChildren()
script:Destroy()
else
warn("game.Workspace.Boards - Not Found!")
script:ClearAllChildren()
script:Destroy()
end
end
end
module.LoadAssets()
return module
local module = {}
module.Products = {
{
ProductPrice = 5, --The price from the Developer Product.
ProductId = 1087885946 -- The ID from the Developer Product.
},
{
ProductPrice = 10, --The price from the Developer Product.
ProductId = 1087886052 -- The ID from the Developer Product.
},
{
ProductPrice = 50, --The price from the Developer Product.
ProductId = 1087886595 -- The ID from the Developer Product.
},
{
ProductPrice = 100, --The price from the Developer Product.
ProductId = 1087886637 -- The ID from the Developer Product.
},
{
ProductPrice = 1000, --The price from the Developer Product.
ProductId = 1087887739 -- The ID from the Developer Product.
},
}
--module.AbortCustomPurchases = true --READ Below for what this does.
return module