Userisjsnwi949

Untitled

Apr 4th, 2026
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  2. local ChatEvent = ReplicatedStorage:FindFirstChild("ChatEvent") or Instance.new("RemoteEvent", ReplicatedStorage)
  3. ChatEvent.Name = "ChatEvent"
  4.  
  5. local Players = game:GetService("Players")
  6. local OWNER_NAME = "ALIU0483" -- غيره لاسم حسابك الحقيقي
  7.  
  8. local BANNABLE_WORDS = {"كس", "زب", "عير", "شرموط", "قحبة"}
  9. local WARN_WORDS = {"كلب", "حيوان", "غبي", "اسود", "بقرة", "خرة", "تفو"}
  10.  
  11. local rainbow = {
  12. Color3.fromRGB(255, 0, 0), Color3.fromRGB(0, 255, 0),
  13. Color3.fromRGB(0, 0, 255), Color3.fromRGB(255, 0, 255),
  14. Color3.fromRGB(0, 255, 255), Color3.fromRGB(255, 127, 0)
  15. }
  16. local playerColors = {}
  17.  
  18. Players.PlayerAdded:Connect(function(plr)
  19. if plr.Name == OWNER_NAME then
  20. playerColors[plr.UserId] = Color3.fromRGB(255, 215, 0)
  21. else
  22. playerColors[plr.UserId] = rainbow[math.random(1, #rainbow)]
  23. end
  24.  
  25. task.wait(1)
  26. -- إرسال رسالة الدخول كنوع "Join" لتفعيل الرقم في الإشعارات
  27. ChatEvent:FireAllClients("", "دخل " .. plr.Name .. " إلى الماب!", "", Color3.new(1,1,1), "Join")
  28. end)
  29.  
  30. ChatEvent.OnServerEvent:Connect(function(player, message)
  31. if message == "" then return end
  32. local lowerMsg = message:lower()
  33.  
  34. for _, word in pairs(BANNABLE_WORDS) do
  35. if string.find(lowerMsg, word) then player:Kick("ممنوع السب!") return end
  36. end
  37.  
  38. for _, word in pairs(WARN_WORDS) do
  39. if string.find(lowerMsg, word) then
  40. ChatEvent:FireAllClients("", "تم حظر رسالة من ["..player.Name.."] بسبب السب!", "", Color3.new(1,0,0), "System")
  41. return
  42. end
  43. end
  44.  
  45. local tag = (player.Name == OWNER_NAME) and "OWNER" or ""
  46. ChatEvent:FireAllClients(player.Name, message, tag, playerColors[player.UserId], "")
  47. end)
Advertisement
Add Comment
Please, Sign In to add comment