Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- RushMoving Detector with Beautiful GUI
- -- By YourName
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
- -- Create main screen GUI
- local RushNotifier = Instance.new("ScreenGui")
- RushNotifier.Name = "RushNotifier"
- RushNotifier.ResetOnSpawn = false
- RushNotifier.ZIndexBehavior = Enum.ZIndexBehavior.Global
- RushNotifier.Parent = PlayerGui
- -- Notification frame
- local Notification = Instance.new("Frame")
- Notification.Name = "Notification"
- Notification.AnchorPoint = Vector2.new(0.5, 0.5)
- Notification.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- Notification.BackgroundTransparency = 0.2
- Notification.BorderSizePixel = 0
- Notification.Position = UDim2.new(0.5, 0, 0.2, -100)
- Notification.Size = UDim2.new(0, 0, 0, 0)
- Notification.Visible = false
- Notification.Parent = RushNotifier
- -- Corner rounding
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(0, 12)
- UICorner.Parent = Notification
- -- Glow effect
- local UIStroke = Instance.new("UIStroke")
- UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
- UIStroke.Color = Color3.fromRGB(255, 50, 50)
- UIStroke.LineJoinMode = Enum.LineJoinMode.Round
- UIStroke.Thickness = 3
- UIStroke.Transparency = 0.7
- UIStroke.Parent = Notification
- -- Title text
- local Title = Instance.new("TextLabel")
- Title.Name = "Title"
- Title.Font = Enum.Font.GothamBlack
- Title.Text = "РАШ ВНИМАНИЯ!"
- Title.TextColor3 = Color3.fromRGB(255, 50, 50)
- Title.TextScaled = true
- Title.TextSize = 24
- Title.TextWrapped = true
- Title.BackgroundTransparency = 1
- Title.Position = UDim2.new(0.5, 0, 0.2, 0)
- Title.Size = UDim2.new(0.9, 0, 0.2, 0)
- Title.AnchorPoint = Vector2.new(0.5, 0.5)
- Title.Visible = false
- Title.Parent = Notification
- -- Description text
- local Description = Instance.new("TextLabel")
- Description.Name = "Description"
- Description.Font = Enum.Font.GothamMedium
- Description.Text = "Раш бежит!"
- Description.TextColor3 = Color3.fromRGB(255, 255, 255)
- Description.TextScaled = true
- Description.TextSize = 18
- Description.TextWrapped = true
- Description.BackgroundTransparency = 1
- Description.Position = UDim2.new(0.5, 0, 0.5, 0)
- Description.Size = UDim2.new(0.8, 0, 0.4, 0)
- Description.AnchorPoint = Vector2.new(0.5, 0.5)
- Description.Visible = false
- Description.Parent = Notification
- -- Icon (skull for danger)
- local Icon = Instance.new("ImageLabel")
- Icon.Name = "Icon"
- Icon.Image = "rbxassetid://7733960981" -- Skull icon (replace with your preferred image)
- Icon.BackgroundTransparency = 1
- Icon.Position = UDim2.new(0.5, 0, -0.2, 0)
- Icon.Size = UDim2.new(0, 80, 0, 80)
- Icon.AnchorPoint = Vector2.new(0.5, 0.5)
- Icon.Visible = false
- Icon.Parent = Notification
- -- Pulse animation function
- local function pulseAnimation()
- local pulseIn = game:GetService("TweenService"):Create(
- Icon,
- TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
- {Size = UDim2.new(0, 100, 0, 100)}
- )
- local pulseOut = game:GetService("TweenService"):Create(
- Icon,
- TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
- {Size = UDim2.new(0, 80, 0, 80)}
- )
- while true do
- pulseIn:Play()
- pulseIn.Completed:Wait()
- pulseOut:Play()
- pulseOut.Completed:Wait()
- wait(2) -- Wait 2 seconds between pulses
- end
- end
- -- Show notification function
- local function showNotification()
- -- Play sound effect
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://9114260401" -- Alarm sound
- sound.Volume = 0.5
- sound.Parent = Notification
- sound:Play()
- -- Make notification visible
- Notification.Visible = true
- Title.Visible = true
- Description.Visible = true
- Icon.Visible = true
- -- Animation sequence
- local ts = game:GetService("TweenService")
- -- Expand notification
- local expand = ts:Create(
- Notification,
- TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out),
- {Size = UDim2.new(0, 300, 0, 150)}
- )
- expand:Play()
- -- Fade in stroke
- local strokeFadeIn = ts:Create(
- UIStroke,
- TweenInfo.new(0.3),
- {Transparency = 0}
- )
- strokeFadeIn:Play()
- -- Start pulse animation in a separate thread
- coroutine.wrap(pulseAnimation)()
- -- Wait 5 seconds
- wait(5)
- -- Shrink notification
- local shrink = ts:Create(
- Notification,
- TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.In),
- {Size = UDim2.new(0, 0, 0, 0)}
- )
- shrink:Play()
- -- Fade out stroke
- local strokeFadeOut = ts:Create(
- UIStroke,
- TweenInfo.new(0.3),
- {Transparency = 0.7}
- )
- strokeFadeOut:Play()
- -- Hide elements after animation
- shrink.Completed:Wait()
- Notification.Visible = false
- Title.Visible = false
- Description.Visible = false
- Icon.Visible = false
- end
- -- Check for RushMoving in Workspace
- local function checkForRushMoving()
- while true do
- local rush = game:GetService("Workspace"):FindFirstChild("RushMoving")
- if rush then
- showNotification()
- -- Wait until RushMoving is gone before checking again
- rush:GetPropertyChangedSignal("Parent"):Wait()
- end
- wait(0.5) -- Check every 0.5 seconds
- end
- end
- -- Start the detector
- coroutine.wrap(checkForRushMoving)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement