godxcool

Bilkul 👍 Ye Skript normal chat allow karega, lekin spam, repeated messages, links aur Minecraft server IP/domain advertising block karega.

==========================================

TITAN MC - SIMPLE ANTI SPAM & ANTI ADVERTISING

==========================================

options: prefix: &c&lCHAT &8» &c cooldown: 2 seconds

------------------------------------------

CHAT SPAM COOLDOWN

------------------------------------------

on chat: if {chat.cooldown.%player's uuid%} is set: if difference between now and {chat.cooldown.%player's uuid%} < {@cooldown}: cancel event send "{@prefix}&cPlease don't spam the chat!" to player stop

set {chat.cooldown.%player's uuid%} to now

------------------------------------------

SAME MESSAGE SPAM

------------------------------------------

on chat: if message is {lastmessage.%player's uuid%}: cancel event send "{@prefix}&cDon't repeat the same message!" to player stop

set {lastmessage.%player's uuid%} to message

------------------------------------------

BLOCK LINKS

------------------------------------------

on chat: set {_msg} to lowercase message

if {_msg} contains "http://": cancel event send "{@prefix}&cLinks are not allowed in chat!" to player stop

if {_msg} contains "https://": cancel event send "{@prefix}&cLinks are not allowed in chat!" to player stop

if {_msg} contains "www.": cancel event send "{@prefix}&cLinks are not allowed in chat!" to player stop

if {_msg} contains ".com": cancel event send "{@prefix}&cLinks are not allowed in chat!" to player stop

if {_msg} contains ".net": cancel event send "{@prefix}&cLinks are not allowed in chat!" to player stop

if {_msg} contains ".org": cancel event send "{@prefix}&cLinks are not allowed in chat!" to player stop

------------------------------------------

BLOCK DISCORD INVITES

------------------------------------------

on chat: set {_msg} to lowercase message

if {_msg} contains "discord.gg": cancel event send "{@prefix}&cDiscord links are not allowed!" to player stop

if {_msg} contains "discord.com/invite": cancel event send "{@prefix}&cDiscord links are not allowed!" to player stop

------------------------------------------

BLOCK MINECRAFT SERVER ADVERTISING

------------------------------------------

on chat: set {_msg} to lowercase message

if {_msg} contains "play.": cancel event send "{@prefix}&cServer IP advertising is not allowed!" to player stop

if {_msg} contains "mc.": cancel event send "{@prefix}&cServer IP advertising is not allowed!" to player stop

------------------------------------------

REPEATED CHARACTER SPAM

Example: HELLOOOOOOOOOOOOOOOOO

------------------------------------------

on chat: if message contains "!!!!!!!!": cancel event send "{@prefix}&cPlease don't spam characters!" to player stop

if message contains "????????": cancel event send "{@prefix}&cPlease don't spam characters!" to player stop

Is Skript mein player normal chat kar sakta hai, bas spam aur kisi bhi type ki link/IP advertising block hogi.

Agar chaho to main iska advanced version bhi de sakta hoon jisme 3 warnings ke baad automatic mute, staff bypass permission, aur allowed whitelist (jaise titanmc.fun) bhi ho.

Kodari AI
KodariAug 30 at 6:19 am 1
ChatGuard
A Minecraft Skript that filters chat messages to prevent spam and advertising. Implements a cooldown system to limit message frequency, blocks repeated identical messages, and detects and cancels messages containing URLs, Discord invites, and Minecraft server IPs. Also filters excessive character repetition. Players can still chat normally while protected from spam and link promotion.

anti-spam.sk ko plugins/Skript/scripts/ folder mein rakhein, phir:

Plain Text
/sk reload anti-spam
Kodari can make mistakes. Review important code before using.
Files
anti-spam.sk
Code
1 115
anti-spam.sk
# ==========================================
# TITAN MC - ANTI SPAM & ANTI ADVERTISING
# ==========================================

options:
    prefix: &c&lCHAT &8» &c
    cooldown: 2 seconds

# ------------------------------------------
# CHAT SPAM, REPEATED MESSAGES & FILTERS
# ------------------------------------------

on chat:
    set {_uuid} to player's uuid
    set {_msg} to lowercase message

    # Chat cooldown
    if {chat.cooldown.%{_uuid}%} is set:
        if difference between now and {chat.cooldown.%{_uuid}%} < {@cooldown}:
            cancel event
            send "{@prefix}Please don't spam the chat!" to player
            stop

    # Repeated message check
    if {chat.last-message.%{_uuid}%} is {_msg}:
        cancel event
        send "{@prefix}Don't repeat the same message!" to player
        stop

    # Block web links
    if {_msg} contains "http://":
        cancel event
        send "{@prefix}Links are not allowed in chat!" to player
        stop

    if {_msg} contains "https://":
        cancel event
        send "{@prefix}Links are not allowed in chat!" to player
        stop

    if {_msg} contains "www.":
        cancel event
        send "{@prefix}Links are not allowed in chat!" to player
        stop

    if {_msg} contains ".com":
        cancel event
        send "{@prefix}Links are not allowed in chat!" to player
        stop

    if {_msg} contains ".net":
        cancel event
        send "{@prefix}Links are not allowed in chat!" to player
        stop

    if {_msg} contains ".org":
        cancel event
        send "{@prefix}Links are not allowed in chat!" to player
        stop

    if {_msg} contains ".gg":
        cancel event
        send "{@prefix}Links are not allowed in chat!" to player
        stop

    # Block Discord invites
    if {_msg} contains "discord.gg":
        cancel event
        send "{@prefix}Discord links are not allowed!" to player
        stop

    if {_msg} contains "discord.com/invite":
        cancel event
        send "{@prefix}Discord links are not allowed!" to player
        stop

    # Block Minecraft server advertising
    if {_msg} contains "play.":
        cancel event
        send "{@prefix}Server IP advertising is not allowed!" to player
        stop

    if {_msg} contains "mc.":
        cancel event
        send "{@prefix}Server IP advertising is not allowed!" to player
        stop

    if {_msg} contains "server.":
        cancel event
        send "{@prefix}Server IP advertising is not allowed!" to player
        stop

    if {_msg} contains ":25565":
        cancel event
        send "{@prefix}Server IP advertising is not allowed!" to player
        stop

    # Block repeated character spam
    if {_msg} contains "!!!!!!!!":
        cancel event
        send "{@prefix}Please don't spam characters!" to player
        stop

    if {_msg} contains "????????":
        cancel event
        send "{@prefix}Please don't spam characters!" to player
        stop

    if {_msg} contains "........":
        cancel event
        send "{@prefix}Please don't spam characters!" to player
        stop

    set {chat.cooldown.%{_uuid}%} to now
    set {chat.last-message.%{_uuid}%} to {_msg}