Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local ChatEvent = ReplicatedStorage:FindFirstChild("ChatEvent") or Instance.new("RemoteEvent", ReplicatedStorage)
- ChatEvent.Name = "ChatEvent"
- local Players = game:GetService("Players")
- local OWNER_NAME = "ALIU0483" -- غيره لاسم حسابك الحقيقي
- local BANNABLE_WORDS = {"كس", "زب", "عير", "شرموط", "قحبة"}
- local WARN_WORDS = {"كلب", "حيوان", "غبي", "اسود", "بقرة", "خرة", "تفو"}
- local rainbow = {
- Color3.fromRGB(255, 0, 0), Color3.fromRGB(0, 255, 0),
- Color3.fromRGB(0, 0, 255), Color3.fromRGB(255, 0, 255),
- Color3.fromRGB(0, 255, 255), Color3.fromRGB(255, 127, 0)
- }
- local playerColors = {}
- Players.PlayerAdded:Connect(function(plr)
- if plr.Name == OWNER_NAME then
- playerColors[plr.UserId] = Color3.fromRGB(255, 215, 0)
- else
- playerColors[plr.UserId] = rainbow[math.random(1, #rainbow)]
- end
- task.wait(1)
- -- إرسال رسالة الدخول كنوع "Join" لتفعيل الرقم في الإشعارات
- ChatEvent:FireAllClients("", "دخل " .. plr.Name .. " إلى الماب!", "", Color3.new(1,1,1), "Join")
- end)
- ChatEvent.OnServerEvent:Connect(function(player, message)
- if message == "" then return end
- local lowerMsg = message:lower()
- for _, word in pairs(BANNABLE_WORDS) do
- if string.find(lowerMsg, word) then player:Kick("ممنوع السب!") return end
- end
- for _, word in pairs(WARN_WORDS) do
- if string.find(lowerMsg, word) then
- ChatEvent:FireAllClients("", "تم حظر رسالة من ["..player.Name.."] بسبب السب!", "", Color3.new(1,0,0), "System")
- return
- end
- end
- local tag = (player.Name == OWNER_NAME) and "OWNER" or ""
- ChatEvent:FireAllClients(player.Name, message, tag, playerColors[player.UserId], "")
- end)
Advertisement
Add Comment
Please, Sign In to add comment