شرح كيف ترسل كتابة فوق الشاشة مثل حدث ماب المزرعة في studio lite 😱

السكربت الاول داخل ServerScriptService 📃 :local ReplicatedStorage = game:GetService("ReplicatedStorage") local ownerName = "YourNameHere" -- حط اسم راعي الماب هنا -- انشئ RemoteEvent اذا غير موجود local event = ReplicatedStorage:FindFirstChild("AnnouncementEvent") if not event then event = Instance.new("RemoteEvent") event.Name = "AnnouncementEvent" event.Parent = ReplicatedStorage end event.OnServerEvent:Connect(function(player, message) if not message or message == "" then return end -- تأكد المرسل هو المالك if player.Name ~= ownerName then warn(player.Name .. " tried to send announcement but is not owner.") return end -- ابعث للكل event:FireAllClients(message, player.Name) end) السكربت الثاني في StarterPlayerScript : 📃 local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local player = Players.LocalPlayer local ownerName = "YourNameHere" -- حط اسم راعي الماب هنا local remote = ReplicatedStorage:WaitForChild("AnnouncementEvent") -- ===== واجهة المالك ===== if player.Name == ownerName then local screenGui = Instance.new("ScreenGui") screenGui.Name = "OwnerAnnouncementGUI" screenGui.Parent = player:WaitForChild("PlayerGui") local textbox = Instance.new("TextBox") textbox.Size = UDim2.new(0, 300, 0, 45) textbox.Position = UDim2.new(0.5, -230, 0.78, 0) textbox.PlaceholderText = "اكتب الإعلان..." textbox.TextScaled = true textbox.Parent = screenGui local sendBtn = Instance.new("TextButton") sendBtn.Size = UDim2.new(0, 120, 0, 45) sendBtn.Position = UDim2.new(0.5, 80, 0.78, 0) sendBtn.Text = "إرسال" sendBtn.TextScaled = true sendBtn.Parent = screenGui sendBtn.MouseButton1Click:Connect(function() local msg = textbox.Text:gsub("^%s+", ""):gsub("%s+$", "") if msg ~= "" then remote:FireServer(msg) textbox.Text = "" end end) end -- ===== استقبال الإعلان لكل اللاعبين ===== remote.OnClientEvent:Connect(function(message, senderName) local gui = Instance.new("ScreenGui") gui.Name = "AnnouncementGUI" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local bg = Instance.new("Frame") bg.Size = UDim2.new(1, 0, 0, 60) bg.Position = UDim2.new(0, 0, 0, 10) bg.BackgroundTransparency = 0 bg.BackgroundColor3 = Color3.fromRGB(20,20,20) bg.Parent = gui local text = Instance.new("TextLabel") text.Size = UDim2.new(1, -20, 1, 0) text.Position = UDim2.new(0, 10, 0, 0) text.BackgroundTransparency = 1 text.TextColor3 = Color3.fromRGB(255,255,255) text.TextScaled = true text.Font = Enum.Font.GothamBold -- ✔ إضافة علامة التوثيق للمالك فقط local displayName = senderName if senderName == ownerName then displayName = senderName .. " ✔" end text.Text = "[" .. displayName .. "] " .. message text.Parent = bg -- انيميشن خروج task.spawn(function() task.wait(4) for i = 1, 10 do bg.BackgroundTransparency = i/10 text.TextTransparency = i/10 task.wait(0.03) end gui:Destroy() end) end) !!!تذكير مهم 🔥 لا تنسى تعدل هذا السطر لاسمك: local ownerName = "YourNameHere" #roblox #explore