cepmoc

Untitled

Feb 28th, 2026
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.10 KB | None | 0 0
  1. type announceType = "Basic" | "Warn" | "Alert" | "Epsilon" -- epsilon is basically third trumpet, use it for shutdowns or bans idk
  2. local module = {}
  3. local Fusion = require(game:GetService("ReplicatedStorage").Packages.Fusion)
  4. local peek = Fusion.peek
  5. local glitch = require(script.GlitchMod)
  6. local Players = game:GetService("Players")
  7. local Ranks = {
  8.     [857491600] = "Creator", -- Creare
  9.     [1421532407] = "SuperrCustom", -- Superr_Z
  10.     [510543591] = "Moderator", -- Compec
  11.     [3372922014] = "GabrielCustom", -- Gabriel
  12.     [7073391575] = "Moderator", -- Even
  13.     [424233066] = "Moderator", -- Ruper
  14.     [44327816] = "Moderator", -- Roman
  15.     [4900501306] = "Moderator", -- Watermelon/nonsumme
  16.     [451452431] = "Moderator", -- also watermelon???
  17. }
  18. local RankColors = {
  19.     Moderator = Color3.fromHex("#e67e22"),
  20.     Creator = Color3.fromHex("#2ecc71"),
  21.     Unknown = Color3.fromHex("#59156e"),
  22.     SuperrCustom = Color3.fromHex("#db0000"),
  23.     GabrielCustom = Color3.fromHex("#ff08ff"),
  24. }
  25. local ExistingState = false
  26. local timelimit = {}
  27. local DesignTable = require(script.DesignMod)
  28. local function merge(tbl1, tbl2)
  29.     local ntbl = {}
  30.     for k, v in pairs(tbl1) do
  31.         ntbl[k] = v
  32.     end
  33.     for k, v in pairs(tbl2) do
  34.         ntbl[k] = v
  35.     end
  36.     return ntbl
  37. end
  38. local outsideref = {}
  39.  
  40. function module.announce(player: Player, text: string, atype: announceType)
  41.     if not ExistingState then
  42.         local lid = player.UserId
  43.         ExistingState = true
  44.         for _, v in pairs(Players:GetChildren()) do
  45.             task.spawn(function()
  46.                 local uid = v.UserId -- UI Creation begins here god forbid these modern ui devs allow for regular ass instances god damn it
  47.                 local clonescope = Fusion.scoped({
  48.                     Value = Fusion.Value,
  49.                     doCleanup = Fusion.doCleanup,
  50.                     Tween = Fusion.Tween,
  51.                     New = Fusion.New,
  52.                     Observer = Fusion.Observer,
  53.                 })
  54.                 local clonescopetweenable = {
  55.                     FrameTransparency = clonescope:Value(1),
  56.                     GeneralTransparency = clonescope:Value(1),
  57.                     TopCautionPosition = clonescope:Value(UDim2.new(0, 0, 0, 0)),
  58.                     BottomCautionPosition = clonescope:Value(UDim2.new(-0.03, 0, 0.9, 0)),
  59.                     Volume = clonescope:Value(0.2),
  60.                 }
  61.                 local clonescopeval = {
  62.                     FrameTransparency = clonescope:Tween(
  63.                         clonescopetweenable.FrameTransparency,
  64.                         TweenInfo.new(1, Enum.EasingStyle.Linear)
  65.                     ), -- tween to 0.3
  66.                     GeneralTransparency = clonescope:Tween(
  67.                         clonescopetweenable.GeneralTransparency,
  68.                         TweenInfo.new(1, Enum.EasingStyle.Linear)
  69.                     ), -- tween to 0
  70.                     CautionSize = clonescope:Value(UDim2.new(5, 0, 0.1, 0)),
  71.                     TopCautionPosition = clonescope:Tween(
  72.                         clonescopetweenable.TopCautionPosition,
  73.                         TweenInfo.new(40, Enum.EasingStyle.Linear)
  74.                     ),
  75.                     BottomCautionPosition = clonescope:Tween(
  76.                         clonescopetweenable.BottomCautionPosition,
  77.                         TweenInfo.new(40, Enum.EasingStyle.Linear)
  78.                     ),
  79.                     Text = clonescope:Value(""),
  80.                     Name = clonescope:Value(""),
  81.                     NameColor = clonescope:Value(RankColors["Unknown"]),
  82.                     Volume = clonescope:Tween(clonescopetweenable.Volume, TweenInfo.new(1, Enum.EasingStyle.Linear)),
  83.                 }
  84.                 outsideref[uid] = { Text = clonescopeval.Text }
  85.                 local _ScreenGui = clonescope:New("ScreenGui")({
  86.                     IgnoreGuiInset = true,
  87.                     DisplayOrder = 1,
  88.                     Parent = v.PlayerGui,
  89.                 })
  90.                 local _Frame = clonescope:New("Frame")(merge(DesignTable.Frame[atype], {
  91.                     BackgroundTransparency = clonescopeval.FrameTransparency,
  92.                     Parent = _ScreenGui,
  93.                 }))
  94.                 local _Trumpet
  95.                 if atype ~= "Basic" then
  96.                     if atype == "Epsilon" then
  97.                         _Trumpet = clonescope:New("Sound")(merge(DesignTable.Trumpet[atype], {
  98.                             Parent = _ScreenGui,
  99.                             Volume = clonescopeval.Volume,
  100.                         }))
  101.                     else
  102.                         _Trumpet = clonescope:New("Sound")(merge(DesignTable.Trumpet[atype], {
  103.                             Parent = _ScreenGui,
  104.                         }))
  105.                     end
  106.                     clonescope:New("ImageLabel")(merge(DesignTable.CautionTop[atype], {
  107.                         Parent = _Frame,
  108.                         ImageTransparency = clonescopeval.GeneralTransparency,
  109.                         Position = clonescopeval.TopCautionPosition,
  110.                         Size = clonescopeval.CautionSize,
  111.                     }))
  112.                     clonescope:New("ImageLabel")(merge(DesignTable.CautionBottom[atype], {
  113.                         Parent = _Frame,
  114.                         ImageTransparency = clonescopeval.GeneralTransparency,
  115.                         Position = clonescopeval.BottomCautionPosition,
  116.                         Size = clonescopeval.CautionSize,
  117.                     }))
  118.                 end
  119.                 clonescope:New("TextLabel")(merge(DesignTable.Name, {
  120.                     Parent = _Frame,
  121.                     Text = clonescopeval.Name,
  122.                     TextColor3 = clonescopeval.NameColor,
  123.                     TextTransparency = clonescopeval.GeneralTransparency,
  124.                 }))
  125.                 clonescope:New("TextLabel")(merge(DesignTable.Text[atype], {
  126.                     Parent = _Frame,
  127.                     Text = clonescopeval.Text,
  128.                     TextTransparency = clonescopeval.GeneralTransparency,
  129.                 }))
  130.                 -- UI Creation ends here
  131.                 clonescopetweenable.GeneralTransparency:set(0)
  132.                 clonescopetweenable.FrameTransparency:set(0.3)
  133.                 if atype ~= "Basic" then
  134.                     _Trumpet:Play()
  135.                     clonescopetweenable.TopCautionPosition:set(UDim2.new(-4, 0, 0, 0))
  136.                     clonescopetweenable.BottomCautionPosition:set(UDim2.new(-(4 - 0.03), 0, 0.9, 0))
  137.                     clonescope:Observer(clonescopeval.TopCautionPosition):onChange(function()
  138.                         local udim2 = peek(clonescopeval.TopCautionPosition)
  139.                         if udim2.X.Scale == -4 then
  140.                             clonescopetweenable.TopCautionPosition:set(UDim2.new(0, 0, 0, 0))
  141.                         elseif udim2.X.Scale == 0 then
  142.                             clonescopetweenable.TopCautionPosition:set(UDim2.new(-4, 0, 0, 0))
  143.                         end
  144.                     end)
  145.                     clonescope:Observer(clonescopeval.BottomCautionPosition):onChange(function()
  146.                         local udim2 = peek(clonescopeval.BottomCautionPosition)
  147.                         if udim2.X.Scale == -(4 - 0.03) then
  148.                             clonescopetweenable.BottomCautionPosition:set(UDim2.new(-0.03, 0, 0.9, 0))
  149.                         elseif udim2.X.Scale == -0.03 then
  150.                             clonescopetweenable.BottomCautionPosition:set(UDim2.new(-(4 - 0.03), 0, 0, 0))
  151.                         end
  152.                     end)
  153.                 end
  154.                 clonescopeval.Name:set(player.Name)
  155.                 if Ranks[lid] then
  156.                     clonescopeval.NameColor:set(RankColors[Ranks[lid]])
  157.                 else
  158.                     clonescopeval.NameColor:set(RankColors.Unknown)
  159.                 end
  160.                 task.wait(1)
  161.                 task.spawn(function()
  162.                     for i = 1, #text do
  163.                         clonescopeval.Text:set(peek(clonescopeval.Text) .. string.sub(text, i, i))
  164.                         task.wait(0.09)
  165.                     end
  166.                 end)
  167.                 timelimit[uid] = 10 + math.ceil(#text * 0.09)
  168.                 task.spawn(function()
  169.                     while timelimit[uid] do
  170.                         task.wait(1)
  171.                         timelimit[uid] = timelimit[uid] - 1
  172.                         if timelimit[uid] <= 0 then
  173.                             ExistingState = false
  174.                             clonescopetweenable.GeneralTransparency:set(1)
  175.                             clonescopetweenable.FrameTransparency:set(1)
  176.                             if atype == "Epsilon" then
  177.                                 clonescopetweenable.Volume:set(0)
  178.                             end
  179.                             task.wait(1)
  180.                             Fusion.doCleanup(clonescope)
  181.                             timelimit[uid] = nil
  182.                         end
  183.                     end
  184.                 end)
  185.             end)
  186.         end
  187.     else
  188.         for _, v in pairs(Players:GetChildren()) do
  189.             local uid = v.UserId
  190.             if timelimit[uid] then
  191.                 timelimit[uid] = timelimit[uid] + 13
  192.                 glitch(peek(outsideref[uid].Text), text, 30, function(str)
  193.                     outsideref[uid].Text:set(str)
  194.                 end, false, 0.1)
  195.             end
  196.         end
  197.     end
  198. end
  199.  
  200. return module
  201.  
Advertisement
Add Comment
Please, Sign In to add comment