JIT
Customizing Roblox Death Screen
--[[ LocalScript - يوضع في StarterPlayer > StarterPlayerScripts الوظيفة: - يراقب موت شخصية اللاعب المحلي. - عند الموت: - يغطي الشاشة فورًا بفريم أسود شبه شفاف (شفافية 0.1). - يعرض صورة تشويش وامضة فوق الفريم الأسود (شفافية 0.4). - يشغل صوت خلفية متكرر (لوب) (ID: 6648328129). - بعد 0.5 ثانية، يشغل صوت الموت (ID: 80915031705558). - يبدأ حلقة تكرارية لإيقاف جميع الأصوات والأنوار والـ ParticleEmitters في Workspace و Lighting كل فترة زمنية (من منظور اللاعب الميت فقط). - بعد ثانيتين (من بداية ظهور الفريم الأسود)، يعرض نص "لقد مت..." بحجم كبير في منتصف الشاشة ويشغل صوتًا مصاحبًا (ID: 9083627113). - تتوقف الحلقة التكرارية ويتم إزالة التأثير والأصوات تلقائيًا عند إعادة إحياء اللاعب (Respawn). تحذير أداء: الحلقة التكرارية لإيقاف التأثيرات (EffectStoppingLoop) قد تكون مكلفة للأداء. ]] -- Services local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") local Lighting = game:GetService("Lighting") local RunService = game:GetService("RunService") local SoundService = game:GetService("SoundService") local TweenService = game:GetService("TweenService") -- Local Player local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") -- State Variables local currentDeathScreenGui = nil local isPlayerDead = false -- لتتبع حالة موت اللاعب والتحكم بالحلقات local effectStoppingCoroutine = nil -- لتخزين مرجع للحلقة التكرارية لإيقاف التأثيرات local imageFlickerCoroutine = nil -- لتخزين مرجع لحلقة وميض الصورة -- Configuration local DeathSoundID = "rbxassetid://80915031705558" -- معرف صوت الموت local LoopingBackgroundSoundID = "rbxassetid://6648328129" -- معرف صوت الخلفية المتكرر local DeathTextSoundID = "rbxassetid://9083627113" -- معرف الصوت عند ظهور النص local BackgroundSoundVolume = 0.5 -- مستوى صوت الخلفية local EffectStopInterval = 0.25 -- الفترة الزمنية لتكرار إيقاف التأثيرات (بالثواني) local BlackoutFrameTransparency = 0 -- <<-- شفافية الفريم الأسود (تم التحديث إلى 0.1) local FlickerImageTransparency = 0.9 -- <<-- شفافية الصورة الوامضة (التشويش) local FlickerInterval = 0.065 -- الفترة الزمنية بين تغييرات الصورة local FlickerImageIDs = { -- قائمة بمعرفات الصور للوميض "http://www.roblox.com/asset/?id=4388380516", "http://www.roblox.com/asset/?id=4388381112", "http://www.roblox.com/asset/?id=4388381606", "http://www.roblox.com/asset/?id=4388382104", "http://www.roblox.com/asset/?id=4388382493", "http://www.roblox.com/asset/?id=4388382958", "http://www.roblox.com/asset/?id=4388383410", "http://www.roblox.com/asset/?id=4388383891" } -- Function to create the death screen effect GUI, play sounds, and start flicker local function ShowDeathScreen() -- Prevent creating multiple GUIs if currentDeathScreenGui and currentDeathScreenGui.Parent then return end -- 1. Create ScreenGui and Blackout Frame IMMEDIATELY local deathScreenGui = Instance.new("ScreenGui") deathScreenGui.Name = "DeathScreenGui" deathScreenGui.IgnoreGuiInset = true deathScreenGui.ResetOnSpawn = true -- Automatic cleanup on respawn deathScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling local blackoutFrame = Instance.new("Frame") blackoutFrame.Name = "BlackoutFrame" blackoutFrame.BackgroundColor3 = Color3.new(0, 0, 0) blackoutFrame.BackgroundTransparency = BlackoutFrameTransparency -- <<-- استخدام المتغير الجديد (0.1) blackoutFrame.BorderSizePixel = 0 blackoutFrame.Size = UDim2.new(1, 0, 1, 0) blackoutFrame.Position = UDim2.new(0, 0, 0, 0) blackoutFrame.ZIndex = 10 -- الفريم الأسود في الخلف blackoutFrame.Parent = deathScreenGui -- 2. Create Flicker ImageLabel ( التشويش ) local flickerImage = Instance.new("ImageLabel") flickerImage.Name = "FlickerImage" flickerImage.BackgroundTransparency = 1 -- شفاف تمامًا flickerImage.ImageTransparency = FlickerImageTransparency -- الشفافية المطلوبة (0.4) flickerImage.Size = UDim2.new(1, 0, 1, 0) flickerImage.Position = UDim2.new(0, 0, 0, 0) flickerImage.ZIndex = 11 -- الصورة فوق الفريم الأسود flickerImage.Image = FlickerImageIDs[1] -- تعيين الصورة الأولى مبدئيًا flickerImage.ScaleType = Enum.ScaleType.Stretch flickerImage.Parent = blackoutFrame -- مهم: يكون ابنًا للفريم الأسود -- Store reference and parent the GUI currentDeathScreenGui = deathScreenGui deathScreenGui.Parent = playerGui -- 3. Start Flicker Loop Coroutine if imageFlickerCoroutine then task.cancel(imageFlickerCoroutine) end imageFlickerCoroutine = task.spawn(function() local currentImageIndex = 1 while isPlayerDead do if not isPlayerDead then break end currentImageIndex = (currentImageIndex % #FlickerImageIDs) + 1 if flickerImage and flickerImage.Parent then flickerImage.Image = FlickerImageIDs[currentImageIndex] else break end task.wait(FlickerInterval) end end) -- 4. Play Looping Background Sound IMMEDIATELY local backgroundSound = Instance.new("Sound") backgroundSound.Name = "BackgroundLoopSound" backgroundSound.SoundId = LoopingBackgroundSoundID backgroundSound.Volume = BackgroundSoundVolume backgroundSound.Looped = true backgroundSound.Parent = blackoutFrame backgroundSound:Play() -- 5. Wait 0.5 seconds then play the death sound task.wait(0.5) -- Play death sound only if the GUI still exists if currentDeathScreenGui and currentDeathScreenGui.Parent then local deathSound = Instance.new("Sound") deathSound.Name = "DeathSound" deathSound.SoundId = DeathSoundID deathSound.Volume = 1 deathSound.Parent = blackoutFrame deathSound:Play() deathSound.Ended:Connect(function() if deathSound then deathSound:Destroy() end end) else backgroundSound:Stop() backgroundSound:Destroy() if imageFlickerCoroutine then task.cancel(imageFlickerCoroutine); imageFlickerCoroutine = nil end return end -- 6. Wait the REMAINING time to reach 2 seconds total before showing text task.wait(1.5) -- 7. Create and show the text (only if the GUI still exists) if currentDeathScreenGui and currentDeathScreenGui.Parent then local deathText = Instance.new("TextLabel") deathText.Name = "DeathText" deathText.Text = "لقد مت..." deathText.TextColor3 = Color3.new(1, 1, 1) deathText.BackgroundTransparency = 1 deathText.Font = Enum.Font.SourceSansBold deathText.TextSize = 90 deathText.Size = UDim2.new(0.9, 0, 0.3, 0) deathText.Position = UDim2.new(0.5, 0, 0.5, 0) deathText.AnchorPoint = Vector2.new(0.5, 0.5) deathText.TextXAlignment = Enum.TextXAlignment.Center deathText.TextYAlignment = Enum.TextYAlignment.Center deathText.ZIndex = 12 -- النص فوق الصورة الوامضة deathText.Parent = blackoutFrame -- 8. Play sound when text appears local textAppearSound = Instance.new("Sound") textAppearSound.Name = "DeathTextSound" textAppearSound.SoundId = DeathTextSoundID textAppearSound.Volume = 1 textAppearSound.Parent = blackoutFrame textAppearSound:Play() textAppearSound.Ended:Connect(function() if textAppearSound then textAppearSound:Destroy() end end) else backgroundSound:Stop() backgroundSound:Destroy() if imageFlickerCoroutine then task.cancel(imageFlickerCoroutine); imageFlickerCoroutine = nil end end end -- Function to stop sounds, lights, and particles in Workspace and Lighting for the local client local function StopGlobalClientEffects() -- WARNING: This function is performance-intensive! local function processDescendant(descendant) -- Skip the death screen sounds if descendant:IsA("Sound") and descendant.Name ~= "DeathSound" and descendant.Name ~= "BackgroundLoopSound" and descendant.Name ~= "DeathTextSound" then pcall(function() descendant:Stop() end) elseif descendant:IsA("Light") then pcall(function() descendant.Enabled = false end) elseif descendant:IsA("ParticleEmitter") then pcall(function() descendant.Enabled = false end) end end -- Iterate through Workspace for _, descendant in ipairs(Workspace:GetDescendants()) do processDescendant(descendant) end -- Iterate through Lighting for _, descendant in ipairs(Lighting:GetDescendants()) do processDescendant(descendant) end end -- The repeating loop function for stopping effects local function EffectStoppingLoop() while isPlayerDead and task.wait(EffectStopInterval) do if not isPlayerDead then break end StopGlobalClientEffects() end end -- Function to handle character death local function HandleDeath() if isPlayerDead then return end isPlayerDead = true StopGlobalClientEffects() ShowDeathScreen() if currentDeathScreenGui and currentDeathScreenGui.Parent then if effectStoppingCoroutine then task.cancel(effectStoppingCoroutine) end effectStoppingCoroutine = task.spawn(EffectStoppingLoop) else isPlayerDead = false if imageFlickerCoroutine then task.cancel(imageFlickerCoroutine); imageFlickerCoroutine = nil end end end -- Function called when character is added (respawn or initial load) local function OnCharacterAdded(character) isPlayerDead = false if effectStoppingCoroutine then task.cancel(effectStoppingCoroutine) effectStoppingCoroutine = nil end if imageFlickerCoroutine then task.cancel(imageFlickerCoroutine) imageFlickerCoroutine = nil end if currentDeathScreenGui and currentDeathScreenGui.Parent then local frame = currentDeathScreenGui:FindFirstChild("BlackoutFrame", true) if frame then local bgSound = frame:FindFirstChild("BackgroundLoopSound") if bgSound then bgSound:Stop() end local dSound = frame:FindFirstChild("DeathSound") if dSound then dSound:Stop() end local txtSound = frame:FindFirstChild("DeathTextSound") if txtSound then txtSound:Stop() end end currentDeathScreenGui:Destroy() end currentDeathScreenGui = nil local humanoid = character:WaitForChild("Humanoid") humanoid.Died:Connect(HandleDeath) end -- Connect to CharacterAdded event player.CharacterAdded:Connect(OnCharacterAdded) -- Handle character if it already exists when the script runs if player.Character then local currentHumanoid = player.Character:FindFirstChildOfClass("Humanoid") if currentHumanoid then OnCharacterAdded(player.Character) if currentHumanoid.Health <= 0 then if not (currentDeathScreenGui and currentDeathScreenGui.Parent) then HandleDeath() end end end شوف يا حبي ابا بس ان بعد نص لقد مت.. يجي نص اخر واريد اني اقدر ازيد كما ابا وفي فترة انتظار واريد بعد كل نص يشتغل صوت الي يشتغل لما يجي نص end
Updated files
v1
والله انك كفو تفهمني صح خاصتا احب حركتك لما سويت local DeathMessages = { { text = "لقد مت...", delay = 0 }, -- النص الأول يظهر فورًا بعد ثانيتين من الموت { text = "تذكر ان شخص ما ينتظر مساعدتك...", delay = 2.5 }, -- يظهر بعد 2.5 ثانية من النص الأول { text = "لا تستسلم!", delay = 3.0 }, -- يظهر بعد 3 ثواني من النص الثاني -- أضف المزيد من النصوص هنا بنفس التنسيق -- { text = "نص إضافي", delay = 2.0 }
Updated files
v2
اسمع فيه مشاكل في هذه سكربت ومدري وش مشكلة ظبظط بس اباك تخلي اذا وصل 0 يحذف بلوكات معينة

تمام، فهمت. تريد إضافة وظيفة لحذف كائنات معينة (بلوكات) من Workspace عندما يموت اللاعب (يصل صحته إلى 0).

سنقوم بتعديل دالة HandleDeath لتنفيذ هذا. سأفترض أن البلوكات التي تريد حذفها موجودة داخل Model معين في Workspace لتنظيمها. يمكنك تغيير اسم الـ Model حسب حاجتك.

التعديلات:

  1. تحديد الـ Model: سنبحث عن Model باسم محدد (مثلاً: "BlocksToDeleteOnDeath") في Workspace.
  2. حذف محتويات الـ Model: عند موت اللاعب، سنقوم بالمرور على جميع الأبناء (البلوكات) داخل هذا الـ Model وحذفها باستخدام :Destroy().

كيفية الاستخدام:

  1. أنشئ Model: في نافذة Explorer داخل Roblox Studio، اذهب إلى Workspace.
  2. انقر بزر الماوس الأيمن على Workspace واختر Insert Object -> Model.
  3. أعد تسمية الـ Model: قم بتسمية هذا الـ Model الجديد بالاسم BlocksToDeleteOnDeath (أو الاسم الذي حددته في متغير BlocksContainerName داخل السكربت إذا غيرته).
  4. ضع البلوكات: انقل أو ضع جميع البلوكات (Parts, MeshParts, etc.) التي تريد حذفها عند موت اللاعب داخل هذا الـ Model.

الآن، عندما يموت اللاعب، سيقوم السكربت بالبحث عن Model بهذا الاسم في Workspace وحذف كل شيء بداخله قبل عرض شاشة الموت.

Updated files
v3
لا اقصد هذه سكربت لي مولد طاقة اذا وصل 0 هذه مولد من نسبة 100% وتقلي 1 لكل 2 ثانية يتم حذف 3 موديلات انا استكب اسمها

حسنًا، فهمت الآن. أنت لا تريد تعديل سكربت شاشة الموت، بل لديك سكربت آخر يتحكم في مولد طاقة، وتريد إضافة وظيفة إليه:

  1. مولد طاقة: يبدأ بنسبة 100%.
  2. استنزاف الطاقة: تقل الطاقة بنسبة 1% كل ثانيتين.
  3. الشرط: عندما تصل الطاقة إلى 0%.
  4. الإجراء: يتم حذف 3 Model محددة من Workspace. أنت ستحدد أسماء هذه الـ Models.

سأقوم بإنشاء سكربت جديد لهذه الوظيفة. يجب وضع هذا السكربت في ServerScriptService ليعمل على مستوى الخادم ويتمكن من حذف الكائنات من Workspace لجميع اللاعبين.

الخطوات:

  1. إنشاء Script جديد في ServerScriptService.
  2. تعريف متغيرات لتتبع مستوى الطاقة وحالة الحذف.
  3. إنشاء حلقة while لتقليل الطاقة كل ثانيتين.
  4. عندما تصل الطاقة إلى 0، يتم البحث عن الـ Models المحددة وحذفها.

كيفية الاستخدام:

  1. إنشاء السكربت: انسخ الكود أعلاه والصقه في Script جديد داخل ServerScriptService في Roblox Studio.
  2. تعديل أسماء الـ Models: في بداية السكربت، ابحث عن الأسطر التي تبدأ بـ local MODEL_NAME_... واستبدل "اسم_الموديل_..." بالأسماء الحقيقية للـ Models الثلاثة الموجودة في Workspace والتي تريد حذفها. تأكد من تطابق الأسماء تمامًا (حالة الأحرف مهمة).
  3. تشغيل اللعبة: عند تشغيل اللعبة، سيبدأ السكربت تلقائيًا في تقليل طاقة المولد. عندما تصل الطاقة إلى 0، سيحاول حذف الـ Models المحددة.

ملاحظات:

  • تأكد من أن الـ Models التي تريد حذفها موجودة مباشرة داخل Workspace وليس داخل Model آخر. إذا كانت داخل Model آخر، ستحتاج لتعديل الكود للبحث عنها في المسار الصحيح (مثل Workspace.SomeContainerModel:FindFirstChild(modelName)).
  • الحذف يتم مرة واحدة فقط بفضل متغير deletionTriggered.
  • يمكنك إلغاء التعليق عن سطر print داخل الحلقة لمراقبة مستوى الطاقة في نافذة Output.
  • يمكنك إلغاء التعليق عن سطر script.Disabled = true في نهاية StartPowerDrain إذا أردت إيقاف السكربت تمامًا بعد نفاذ الطاقة وتنفيذ الحذف.
Updated files
v4
صحيح هذه سكربت ليس شاشة موت بل مولد + اين اضع سكربت؟

أحسنت، هذا هو السكربت الصحيح لمولد الطاقة.

ضع هذا السكربت (PowerGeneratorScript.lua) داخل ServerScriptService في نافذة Explorer في Roblox Studio.

ServerScriptService هو المكان المخصص للسكربتات التي يجب أن تعمل على الخادم وتؤثر على اللعبة بأكملها لجميع اللاعبين، مثل التحكم في كائنات Workspace أو إدارة منطق اللعبة العام.

اين اضع اسم بلوكة تعرض نسبة مئوية

ممتاز. لعرض النسبة المئوية للطاقة على بلوكة (جزء Part) في Workspace، ستحتاج إلى:

  1. بلوكة العرض: جزء (Part) في Workspace ليكون بمثابة شاشة العرض.
  2. واجهة رسومية سطحية (SurfaceGui): يجب إضافة SurfaceGui إلى بلوكة العرض هذه.
  3. ملصق نصي (TextLabel): يجب إضافة TextLabel داخل SurfaceGui. هذا الملصق هو الذي سيعرض النص الفعلي للنسبة المئوية.

التعديل على السكربت:

سنضيف متغيرات جديدة في بداية السكربت لتحديد اسم بلوكة العرض، واسم SurfaceGui، واسم TextLabel. ثم سنقوم بتحديث نص TextLabel داخل حلقة استنزاف الطاقة.

كيفية الاستخدام:

  1. تحديث السكربت: استبدل محتوى السكربت القديم في ServerScriptService بالكود الجديد أعلاه.
  2. تعديل أسماء العرض:
    • ابحث عن local DISPLAY_PART_NAME = "PowerDisplayPart" واستبدل "PowerDisplayPart" بالاسم الحقيقي للـ Part الذي تريد استخدامه كشاشة عرض في Workspace.
    • ابحث عن local SURFACE_GUI_NAME = "StatusGui" واستبدل "StatusGui" بالاسم الحقيقي للـ SurfaceGui الموجود على هذا الـ Part.
    • ابحث عن local TEXT_LABEL_NAME = "PercentageLabel" واستبدل "PercentageLabel" بالاسم الحقيقي للـ TextLabel الموجود داخل هذا الـ SurfaceGui.
  3. إعداد البلوكة في اللعبة:
    • تأكد من وجود Part بالاسم الذي حددته في DISPLAY_PART_NAME داخل Workspace.
    • أضف SurfaceGui إلى هذا الـ Part وقم بتسميته بالاسم الذي حددته في SURFACE_GUI_NAME.
    • أضف TextLabel إلى SurfaceGui وقم بتسميته بالاسم الذي حددته في TEXT_LABEL_NAME.
    • (اختياري) قم بتعديل خصائص SurfaceGui (مثل Face) و TextLabel (مثل TextSize, TextColor3, TextScaled, Size, Position) لتظهر النسبة المئوية بالشكل الذي تريده على البلوكة.
  4. تشغيل اللعبة: سيبدأ السكربت، وسيحاول العثور على عناصر العرض، ثم سيبدأ في تحديث النسبة المئوية على TextLabel كل ثانيتين أثناء استنزاف الطاقة.*
Updated files
v5
هل يمكنا BillboardGui؟

نعم، بالتأكيد يمكن استخدام BillboardGui بدلاً من SurfaceGui. الميزة الرئيسية لـ BillboardGui هي أن الواجهة ستواجه دائمًا كاميرا اللاعب، مما يجعلها مرئية من أي زاوية تقريبًا.

التعديلات على السكربت:

التغييرات بسيطة جدًا. سنقوم فقط بتغيير اسم المتغير ونوع الكائن الذي نبحث عنه في دالة SetupDisplay.

كيفية الاستخدام:

  1. تحديث السكربت: استبدل محتوى السكربت في ServerScriptService بالكود الجديد أعلاه.
  2. تعديل أسماء العرض:
    • عدّل DISPLAY_PART_NAME ليشير إلى اسم الـ Part الذي تريد أن تظهر الواجهة فوقه أو مرتبطة به.
    • عدّل BILLBOARD_GUI_NAME ليشير إلى اسم الـ BillboardGui الذي ستضيفه.
    • عدّل TEXT_LABEL_NAME ليشير إلى اسم الـ TextLabel داخل BillboardGui.
  3. إعداد البلوكة والواجهة في اللعبة:
    • تأكد من وجود Part بالاسم الذي حددته في DISPLAY_PART_NAME داخل Workspace.
    • أضف BillboardGui: انقر بزر الماوس الأيمن على الـ Part في نافذة Explorer واختر Insert Object -> BillboardGui.
    • أعد تسمية BillboardGui: قم بتسميته بالاسم الذي حددته في BILLBOARD_GUI_NAME.
    • أضف TextLabel: انقر بزر الماوس الأيمن على BillboardGui الذي أضفته للتو واختر Insert Object -> TextLabel.
    • أعد تسمية TextLabel: قم بتسميته بالاسم الذي حددته في TEXT_LABEL_NAME.
    • تكوين BillboardGui:
      • عدّل خاصية Adornee في BillboardGui لتكون هي الـ Part الذي أضفتها إليه (عادة يتم هذا تلقائيًا إذا أضفتها مباشرة للـ Part).
      • عدّل Size (عادة باستخدام Scale مثل {1, 0}, {0.5, 0}) و StudsOffset (مثل 0, 3, 0 لرفعها فوق الـ Part) في BillboardGui لتحديد حجم وموضع الواجهة بالنسبة للـ Part.
      • تأكد من أن Enabled في BillboardGui محددة (checked).
    • تكوين TextLabel: عدّل خصائص TextLabel (مثل Size, Position, TextSize, TextColor3, BackgroundTransparency, TextScaled) لتظهر النسبة المئوية بالشكل المطلوب.
  4. تشغيل اللعبة: سيعمل السكربت بنفس الطريقة، لكن النسبة المئوية ستظهر الآن باستخدام BillboardGui وستبقى مواجهة للكاميرا.*
Updated files
v6
اسمع خلك من هذه سكربت عندي سكربت ابا اذا مر 250 ثانية فيه احتمال نسبة 5 مئة ان عدداد يتكب فيه تم فتح ممر سري وايضا تم حذف جزء معين و يظهر موديل ونظام يجرب حظه لمرة واحده

تمام، فهمت المطلوب. تريد سكربتًا جديدًا يقوم بالتالي:

  1. الانتظار: ينتظر لمدة 250 ثانية بعد بدء تشغيل الخادم.
  2. محاولة الحظ: بعد انتهاء الانتظار، يجرب الحظ مرة واحدة فقط.
  3. الاحتمالية: هناك نسبة 5% لنجاح محاولة الحظ.
  4. في حالة النجاح:
    • يتم تحديث TextLabel (في BillboardGui أو SurfaceGui) لعرض رسالة "تم فتح ممر سري".
    • يتم حذف Part معين من Workspace.
    • يتم إظهار Model معين (كان مخفيًا أو في مكان آخر مثل ServerStorage).
  5. الموقع: يجب أن يكون هذا السكربت في ServerScriptService لأنه يتحكم في كائنات Workspace ويجب أن يعمل مرة واحدة للخادم بأكمله.

إليك السكربت الذي يقوم بذلك:

كيفية الاستخدام:

  1. ضع السكربت: انسخ الكود وضعه في Script جديد داخل ServerScriptService.
  2. عدّل الإعدادات (Configuration):
    • PART_TO_DELETE_NAME: غيّر "SecretWall" إلى الاسم الحقيقي للـ Part الذي تريد حذفه من Workspace.
    • MODEL_TO_REVEAL_NAME: غيّر "SecretPassage" إلى الاسم الحقيقي للـ Model الذي تريد إظهاره. هام: يجب أن يكون هذا الـ Model موجودًا داخل ServerStorage قبل تشغيل اللعبة.
    • STATUS_TEXTLABEL_PATH: غيّر "StatusDisplayPart.StatusBillboard.StatusLabel" إلى المسار الصحيح للـ TextLabel الذي تريد تحديثه. ابدأ من Workspace واكتب أسماء الكائنات مفصولة بنقطة (.) حتى تصل إلى الـ TextLabel. مثال: Workspace.MyGenerator.DisplayGui.InfoLabel.
  3. جهز الكائنات في اللعبة:
    • تأكد من وجود Part بالاسم المحدد في PART_TO_DELETE_NAME داخل Workspace.
    • ضع الـ Model في ServerStorage: انقل الـ Model الذي تريد إظهاره (بالاسم المحدد في MODEL_TO_REVEAL_NAME) إلى مجلد ServerStorage في نافذة Explorer.
    • تأكد من وجود TextLabel في المسار المحدد في STATUS_TEXTLABEL_PATH.
  4. شغل اللعبة: سيبدأ السكربت بالعد التنازلي (في الخلفية). بعد 250 ثانية، سيقوم بمحاولة الحظ مرة واحدة، وإذا نجح، سينفذ الإجراءات المحددة (تحديث النص، حذف الجزء، إظهار الموديل). ستظهر رسائل في نافذة Output توضح ما يحدث.*
Updated files
v7
عفوا نسيت ارسلك سكربت تحط فيه تعدلات local timer = script.Parent --The TextLabel local minutes = 4 local seconds = 02 repeat if seconds <= 0 then minutes = minutes - 1 seconds = 59 else seconds = seconds - 1 end if seconds < 9 then timer.Text = tostring(minutes)..":0"..tostring(seconds) else timer.Text = tostring(minutes)..":"..tostring(seconds) end wait(1) until minutes <= 0 and seconds <= 0