Here's the code. It's a anti exploit for a non fe cafe
D = workspace:FindFirstChild('DONOTREMOVE') script.Parent = nil workspace.DONOTREMOVE.Changed:Connect(function() if D then if workspace.DONOTREMOVE.Locked == false then p = game.Players:GetChildren() for i = 1,#p do p[i]:Kick('Kicked because a exploiter has Un-Locked the workspace. For your safety, you have a been kicked. ~ Trol anti exploit') end end end end) game.Lighting.Changed:connect(function() game.Lighting.FogColor = Color3.new(191,191,191) game.Lighting.FogEnd = "100000" game.Lighting.FogStart = "0" game.Lighting.OutdoorAmbient = Color3.new(127,127,127) game.Lighting.Ambient = Color3.new(0,0,0) game.Lighting.TimeOfDay = "10:00:00" game.Lighting.Outlines = false game.Lighting.GlobalShadows = true game.Lighting.Brightness = 1 end) workspace.Changed:connect(function() if D then print('Luckz') else m = Instance.new('Message') m.Text = "Restoring map..." m.Parent = workspace MapBackUp = game.ServerStorage.MapBackup:Clone() MapBackUp.Parent = workspace game.ServerScriptService["DON'T TOUCH"].Disabled = true wait(0.1) game.ServerScriptService["DON'T TOUCH"].Disabled = false wait(3) m:Remove() end if workspace.Gravity >= 196.2 then workspace.Gravity = 196.2 end end) --// Made by Trolna
Instead of :FindFirstChild(), use :WaitForChild('DONOTREMOVE'). What is happening is that the script is loading before everything else is. So, therefore, DONOTREMOVE has not loaded and is not in workspace yet. Using :WaitForChild() will make it so it will wait until DONOTREMOVE is in workspace and then continue on with the rest of the script.