the error doesnt tell me which script its coming from.
all scripts:
MainModule:
--[[
This used to prevent people from copying this in studio, however now it's open source it's redundant.
~Yeah_Ember
--]]
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
SettingsHandler:
local Blocked = {}
local Products = require(script.Parent:WaitForChild("Products"))
local Custom = false
if Products.AbortCustomPurchases then
if Products.AbortCustomPurchases == true then
Custom = true
warn("Donation Board: Changing the donation board datastore is disabled if AbortCustomPurchases is true!")
end
end
local Retriever = script:WaitForChild("Retriever")
local Datastore = game:GetService("DataStoreService"):GetDataStore("BoardData")
local Data = Datastore:GetAsync("Data")
if Data == nil then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
else
if (not Data.Version) then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
wait()
Datastore:SetAsync("Data",Data)
elseif (Data.Version ~= 2) then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
wait()
Datastore:SetAsync("Data",Data)
end
end
function getOwner()
if game.CreatorType == Enum.CreatorType.User then
return game.CreatorId,game.Players:GetNameFromUserIdAsync(game.CreatorId)
else
local owningGroupInfo = game:GetService("GroupService"):GetGroupInfoAsync(game.CreatorId)
return owningGroupInfo.Owner.Id, owningGroupInfo.Owner.Name
end
end
function Retriever.OnServerInvoke(Player,Action,Data)
if Action == "Authenticate" then
local OwnerId,OwnerName = getOwner()
if Player.userId == OwnerId then
return true
else
return false
end
elseif Action == "GetData" then
wait()
local Data = Datastore:GetAsync("Data")
if Data == nil then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
end
return Data,Custom
elseif Action == "SetData" then
local OwnerId,OwnerName = getOwner()
if Player.userId == OwnerId then
wait()
Datastore:SetAsync("Data",Data)
end
end
end
local Owner = getOwner()
if Owner then
if Blocked[Owner] then
_G.DBLocked = true
else
_G.DBLocked = false
end
else
_G.DBLocked = false
end
Updater:
local Blocked = {}
local Products = require(script.Parent:WaitForChild("Products"))
local Custom = false
if Products.AbortCustomPurchases then
if Products.AbortCustomPurchases == true then
Custom = true
warn("Donation Board: Changing the donation board datastore is disabled if AbortCustomPurchases is true!")
end
end
local Retriever = script:WaitForChild("Retriever")
local Datastore = game:GetService("DataStoreService"):GetDataStore("BoardData")
local Data = Datastore:GetAsync("Data")
if Data == nil then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
else
if (not Data.Version) then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
wait()
Datastore:SetAsync("Data",Data)
elseif (Data.Version ~= 2) then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
wait()
Datastore:SetAsync("Data",Data)
end
end
function getOwner()
if game.CreatorType == Enum.CreatorType.User then
return game.CreatorId,game.Players:GetNameFromUserIdAsync(game.CreatorId)
else
local owningGroupInfo = game:GetService("GroupService"):GetGroupInfoAsync(game.CreatorId)
return owningGroupInfo.Owner.Id, owningGroupInfo.Owner.Name
end
end
function Retriever.OnServerInvoke(Player,Action,Data)
if Action == "Authenticate" then
local OwnerId,OwnerName = getOwner()
if Player.userId == OwnerId then
return true
else
return false
end
elseif Action == "GetData" then
wait()
local Data = Datastore:GetAsync("Data")
if Data == nil then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
end
return Data,Custom
elseif Action == "SetData" then
local OwnerId,OwnerName = getOwner()
if Player.userId == OwnerId then
wait()
Datastore:SetAsync("Data",Data)
end
end
end
local Owner = getOwner()
if Owner then
if Blocked[Owner] then
_G.DBLocked = true
else
_G.DBLocked = false
end
else
_G.DBLocked = false
end
ScoreUpdater:
repeat wait(1) until _G.DBLocked ~= nil
if _G.DBLocked == true then
script.Parent.SurfaceGui.MainFrame.ScrollingFrame.Message.Visible = true
script:Destroy()
return
end
function GetData()
local Datastore = game:GetService("DataStoreService"):GetDataStore("BoardData")
local Data = Datastore:GetAsync("Data")
if Data == nil then
Data = {ListSize = 15, Datastore = 1, Refresh = 1, Version = 2}
end
local TD = game:GetService("DataStoreService"):GetOrderedDataStore("TopDonators")
if Data.Datastore ~= 1 then
TD = game:GetService("DataStoreService"):GetOrderedDataStore("TopDonators"..Data.Datastore)
end
return TD:GetSortedAsync(false, Data.ListSize),Data.ListSize,Data.Refresh
end
function updateBoard(board, data, num)
script.Parent.SurfaceGui.MainFrame.Title.Title.Title.Text = "Top "..num.." Donators"
for _,v in pairs (script.Parent.SurfaceGui.MainFrame.ScrollingFrame:GetChildren()) do
v:TweenPosition(UDim2.new(-1,0,0,v.Position.Y.Offset),'InOut','Quart',.5,true)
wait()
delay(1,function()
v:Destroy()
end)
end
local n = 0
for k, v in pairs(data) do
local name = v.key
local score = v.value
local L = script.Frame:Clone()
L.Parent = script.Parent.SurfaceGui.MainFrame.ScrollingFrame
local ln = n + 1
spawn(function()
pcall(function()
L.Number.Text = ln.."."
L.Title.Text = game.Players:GetNameFromUserIdAsync(name)
end)--ImageColor3
end)
L.Explaination.Text = score
L.Position = UDim2.new(1,0,0,(n* 25) + (n*5))
L:TweenPosition(UDim2.new(0,0,0,(n* 25) + (n*5)),'InOut','Quart',.5,true)
n = n + 1
if n == 1 then
L.Title.TextColor3 = Color3.new(0.960784, 0.854902, 0.0431373)
L.Number.TextColor3 = Color3.new(0.960784, 0.854902, 0.0431373)
game.Workspace.Boards.R15Loader1.Configuration.userId.Value = name
game.Workspace.Boards.R15Loader1.Tags.Container.pName.Text = game.Players:GetNameFromUserIdAsync(name)
L.Title.TextColor3 = Color3.new(0.960784, 0.854902, 0.0431373)
L.Number.TextColor3 = Color3.new(0.960784, 0.854902, 0.0431373)
game.Workspace.Boards.R15Loader0.Configuration.userId.Value = name
game.Workspace.Boards.R15Loader0.Tags.Container.pName.Text = game.Players:GetNameFromUserIdAsync(name)
elseif n == 2 then
L.Title.TextColor3 = Color3.new(0, 0.921569, 0.152941)
L.Number.TextColor3 = Color3.new(0, 0.921569, 0.152941)
game.Workspace.Boards.R15Loader2.Configuration.userId.Value = name
game.Workspace.Boards.R15Loader2.Tags.Container.pName.Text = game.Players:GetNameFromUserIdAsync(name)
elseif n == 3 then
L.Title.TextColor3 = Color3.new(0.0235294, 0.745098, 0.960784)
L.Number.TextColor3 = Color3.new(0.0235294, 0.745098, 0.960784)
game.Workspace.Boards.R15Loader3.Configuration.userId.Value = name
game.Workspace.Boards.R15Loader3.Tags.Container.pName.Text = game.Players:GetNameFromUserIdAsync(name)
end
script.Parent.SurfaceGui.MainFrame.ScrollingFrame.CanvasSize = UDim2.new(0,0,0,(n * 25) + (n*5))
wait()
end
end
while true do
local refreshTime = 1
pcall(function()
local pages,num,refresh = GetData()
local data = pages:GetCurrentPage()
updateBoard(script.Parent, data, num)
if refresh and typeof(refresh) == 'number' then
refreshTime = refresh
end
end)
wait(refreshTime * 100)
end
Thanks you so much dude.