This script is literally like when you touch a brick, you get kicked and a server warning will be issued.
script.Parent.Touched:Connect(function(hit)
script.Parent.Alert.Disabled=false
wait(5)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
plr:Kick(“BRUH MOMENT. You kicked yourself out from the server and you activated the Anti Exploiting System, GG”)
script.exploiter:Play()
local h = Instance.new(“Hint”,workspace)
h.Text = “The ENU Intelligence Team has detected attempted access to the secret sector. Initiating countermeasures. Playing MusicThatSoundsTerrible.mp3. Shutdown in T-1 minute.”
wait(5)
script.music:Play()
wait(55)
script.Parent.Shutdown.Disabled = false
end)
This is the main script.
local function callback(Text)
if Text == “Access denied.” then
print (“Disable”)
elseif Text == (“Failure: Anti Exploit is active.”) then
print (“Stop Music”)
end
end
local NotificationBindable = Instance.new(“BindableFunction”)
NotificationBindable.OnInvoke = callback
–
game.StarterGui:SetCore(“SendNotification”, {
Title = “Warning”;
Text = “Anti-Exploit Activation In Progress”;
Icon = “”;
Duration = 5;
Button1 = “Access denied.”;
Button2 = “Failure: Anti Exploit is active.”;
Callback = NotificationBindable;
})
That is the Alert script and comes the shutdown script.
while wait() do --Continually loops
for _,v in pairs(game.Players:GetChildren()) do – Gets a table of all players and goes through it.
v:Kick(“This server has been shutdown by the P:ENU Anti Exploiting System. - Mining diamonds since 2015”) – Kicks the player. You can change “This Server has been shutdown.” to anything you want.
end
end