So I am creating an Anti-Exploit and I have this configuration folder to add configs features like whitelisted Group and Rank and to enable or disable features like Anti-Fly or Anti-Godding in it, and there is a separate folder with BoolValues which is a folder called Settings in my Server Storage, but whenever I am running the script am seeing an error in the output, that is telling me.
Settings is not a valid member of ServerStorage
And am not understanding how that is even possible, here is my script which doesn’t allow the real anti exploit to be disabled.
local Players = game:GetService("Players")
local LocalPlayer = game.Players.LocalPlayer
local Player = game.Players:GetPlayers()
local RealAnti = script.Parent:WaitForChild("RealAnti")
local GroupID = game.ServerStorage.Settings.Config.GroupID
while wait() do
if script.Parent:FindFirstChild("RealAnti") == nil then
LocalPlayer:Kick("Nope") -- Change this nope to the kick message
elseif Player:GetRankInGroup(GroupID) >= GroupID.GroupRank then
RealAnti.Disabled = true
elseif RealAnti.Disabled then
RealAnti.Disabled = false
end
end
And here is the real big Anti Exploit Script
local Players = game:GetService("Players")
local LocalPlayer = game.Players.LocalPlayer
local Character = LocalPlayer.Character
local HRP = Character:WaitForChild("HumanoidRootPart")
local Backpack = LocalPlayer:WaitForChild("Backpack")
local Max_Speed = game.ServerStorage.Settings.Config.Max_Speed.Value
local Max_Health = game.ServerStorage.Settings.Config.Max_Health.Value
local NoDisabling = script.Parent:WaitForChild("NoDisabling")
repeat wait() until LocalPlayer
repeat wait() until LocalPlayer.Character
local Body = {
["BodyVelocity"] = true;
["BodyGyro"] = true;
["BodyPosition"] = true
}
local Parts = {
["Part"] = true;
["Model"] = true;
["MeshPart"] = true
}
local Objects = game.ServerStorage.Settings.Config.Not_Allowed_Items:GetChildren()
--No Speed
if game.ServerStorage.Settings.Features.Anti_Speed.Value == true then
if Character.Humanoid.Walkspeed >= Max_Speed then
LocalPlayer:Kick("No Exploit")
end
end
-- Anti part inserton
if game.ServerStorage.Settings.Features.Anti_PartInsertor.Value == true then
game.Workspace.ChildAdded:Connect(function(Obj)
if Parts[Obj.ClassName] then
Obj:Destroy()
end
end)
end
-- Anti Lightning
if game.ServerStorage.Settings.Features.Anti_Lightning.Value == true then
game.Lighting.ChildAdded:Connect(function(Obj)
if Obj:IsA("Sky") then
Obj:Destroy()
end
end)
end
-- Backpack Control
if game.ServerStorage.Settings.Features.Backpack_Control.Value == true then
Backpack.ChildAdded:Connect(function(Obj)
if Obj:IsA(Objects.Name) or Obj:IsA("HopperBin") then
LocalPlayer:Kick("No Exploiting")
end
end)
end
-- Anti Fly
if game.ServerStorage.Settings.Features.Anti_Fly.Value == true then
HRP.ChildAdded:Connect(function(Obj)
if Body[Obj.ClassName] then
LocalPlayer:Kick("No Exploiting")
end
end)
end
-- Anti Humanoid Destroyer
if game.ServerStorage.Settings.Features.Anti_Humanoid_Destroyer.Value == true then
Character.ChildRemoved:Connect(function(Obj)
if Obj:IsA("Humanoid") then
LocalPlayer:Kick("No Exploits")
end
end)
end
-- Anti Health
if game.ServerStorage.Settings.Features.Anti_Health.Value == true then
if Character.Humanoid.Health >= Max_Health then
LocalPlayer:Kick("No Exploits")
end
end
--Anti Teleportation
local PreviousPosition
if game.ServerStorage.Settings.Features.Anti_Teleportation.Value == true then
function NoTeleport()
if HRP == nil then
LocalPlayer:Kick("No Exploits")
end
local PositionFirst = HRP.Position
delay(1, function()
local PositionSecond = HRP.Position
if(PositionSecond - PositionFirst).magnitude >= 140 then
LocalPlayer:Kick("No Exploits")
end
end)
end
end
local Player = game.Players:GetPlayers()
while wait() do
if Player:GetRankInGroup(game.ServerStorage.Settings.Config.GroupID) >= game.ServerStorage.Settings.Config.GroupID.GroupRank then
NoDisabling.Disabled = true
elseif NoDisabling.Disabled then
NoDisabling.Disabled = false
elseif script.Parent:FindFirstChild("RealAnti") == nil then
LocalPlayer:Kick("Nope")
end
NoTeleport()
end
Is this a possible bug? Or something wrong in my scripts? Because I have, for those who would say that I may have misspelt Settings, I haven’t.