okay. I have a function. easy. BUT FOR SOME REASON, I can't call it? help, please? I have been trying to fix for a whole HOUR!
function startgui()
local dockWidget = plugin:CreateDockWidgetPluginGui(
math.random(1,1000000000),
DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Float,
true,
true,
500, 500, 500, 500
)
)
dockWidget.Title = "virus finder beta"
local gui = script.Parent.GUIs.loading:Clone()
gui.Parent = script
gui.Parent = dockWidget
local doneloading = 0
local function loadgui()
local menu = script.Parent.GUIs.menu:Clone()
menu.Parent = script
dockWidget.loading:Destroy()
script.menu.Parent = dockWidget
doneloading = 1
end
loadgui()
repeat
wait(0.1)
until doneloading == 1
function scanscript(childtoscan)
if not workspace:FindFirstChild("threats found") then
threats = Instance.new("Folder")
threats.Parent = workspace
threats.Name = "threats found"
end
if not workspace:FindFirstChild("junk found") then
threats = Instance.new("Folder")
threats.Parent = workspace
threats.Name = "junk found"
end
if childtoscan.ClassName == script.ClassName or childtoscan.ClassName == "LocalScript" or childtoscan.ClassName == "ModuleScript" then
scannedscripts = scannedscripts + 1
for i = 1, #virusnames do
local virusname = virusnames[i]
if childtoscan.Name == virusname then
print("virus found!")
removedviruses = removedviruses + 1
childtoscan.Parent = workspace:FindFirstChild("threats found")
end
end
local function junkscan(childtoscan)
if childtoscan.ClassName == "Decal" then
if childtoscan.Texture == "" then
print("junk found!")
childtoscan.Parent = workspace:FindFirstChild("junk found")
junk = junk + 1
dockWidget.scanning.junkremoved.Text = junk
end
end
if childtoscan.ClassName == "Model" then
local lololscanning = childtoscan:GetChildren()
if not lololscanning[1] then
print("junk found!")
childtoscan.Parent = workspace:FindFirstChild("junk found")
junk = junk + 1
dockWidget.scanning.junkremoved.Text = junk
end
end
end
local function scan(scantype)
local scanmenu = script.Parent.GUIs.scanning:Clone()
scanmenu.Parent = script
dockWidget.menu:Destroy()
script.scanning.Parent = dockWidget
scannedscripts = 0
removedviruses = 0
junk = 0
print("scanning workspace")
local children = workspace:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
end
end
end
end
end
end
end
end
end
if scantype == "F" then
local children = game.StarterGui:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
local children = child:GetChildren()
for i = 1, #children do
local child = children[i]
scanscript(child)
if scantype == "F" then
junkscan(child)
end
end
end
end
end
end
end
end
end
end
end
print("scan is complete! thank you for using virus finder and please like!")
dockWidget:Destroy()
local resultwidget = plugin:CreateDockWidgetPluginGui(
math.random(1,100000000),
DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Float,
true,
true,
500, 500, 500, 500
)
)
resultwidget.Title = "Scan Results"
local results = script.Parent.GUIs.results:Clone()
results.Parent = script
results.virusesremoved.Text = removedviruses
results.scriptsscanned.Text = scannedscripts
results.junkremoved.Text = junk
results.Parent = resultwidget
results.TextButton.MouseButton1Click:Connect(function()
workspace:FindFirstChild("threats found"):ClearAllChildren()
results.TextButton:Destroy()
end)
end
dockWidget.menu.scan.MouseButton1Click:Connect(scan("Q"))
dockWidget.menu.close.MouseButton1Click:Connect(function()
dockWidget:Destroy()
end)
dockWidget.menu.Fscan.MouseButton1Click:Connect(scan("F"))
dockWidget.menu.close.MouseButton1Click:Connect(function()
dockWidget:Destroy()
end)
dockWidget.menu.Support.MouseButton1Click:Connect(function()
local support = script.Parent.GUIs.support:Clone()
support.Parent = script
dockWidget.menu:Destroy()
script.support.Parent = dockWidget
end)
dockWidget.menu.Support.MouseEnter:Connect(function()
dockWidget.menu.Support.Size = UDim2.new(0, 200, 0, 39)
end)
dockWidget.menu.Support.MouseLeave:Connect(function()
dockWidget.menu.Support.Size = UDim2.new(0, 200, 0, 19)
end)
end
end
end
function SS(childtoscan)
if childtoscan.ClassName == script.ClassName or childtoscan.ClassName == "LocalScript" or childtoscan.ClassName == "ModuleScript" then
scannedscripts = scannedscripts + 1
for i = 1, #virusnames do
local virusname = virusnames[i]
if childtoscan.Name == virusname then
print("virus found!")
removedviruses = removedviruses + 1
childtoscan.Parent = workspace:FindFirstChild("threats found")
end
end
end
end
end
end
end
buttonA.Click:Connect(function()
startgui()
end)

8 comments
You, my good sir. Are highly intellectual.
???
http://idownvotedbecau.se/toomuchcode/
if i could downvote ^ would be why
It would be helpful if you could tell which function you are not able to call.
too much code WHAT IS HE TRYING TO MAKE?
Try doing startgui() also, this is wayy to much code, please try shorting down your code before posting.
For us to help you better, please provide the exact error you're receiving and please try to shorten your code to roughly around where the error specifies.