#Screen Flashbang

1 messages · Page 1 of 1 (latest)

broken egret
#

I want to flashbang the screen when a button is pressed and then I want it to fade out but how??? I need help

snow mural
#

local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

local flashGui = Instance.new("ScreenGui")
flashGui.Name = "FlashGui"
flashGui.ResetOnSpawn = false
flashGui.Parent = playerGui

local flashFrame = Instance.new("Frame")
flashFrame.Name = "FlashFrame"
flashFrame.Size = UDim2.new(1, 0, 1, 0)
flashFrame.Position = UDim2.new(0, 0, 0, 0)
flashFrame.BackgroundColor3 = Color3.new(1, 1, 1)
flashFrame.BackgroundTransparency = 1
flashFrame.ZIndex = 9999
flashFrame.Parent = flashGui

-- Create trigger button
local button = Instance.new("TextButton")
button.Size = UDim2.new(0, 150, 0, 50)
button.Position = UDim2.new(0.5, -75, 0.9, -25)
button.Text = "FLASHBANG 💥"
button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
button.TextColor3 = Color3.new(1, 1, 1)
button.Font = Enum.Font.SourceSansBold
button.TextSize = 20
button.Parent = flashGui

-- Flashbang effect function
local function doFlashbang()
flashFrame.BackgroundTransparency = 0
wait(0.2)

local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local tween = TweenService:Create(flashFrame, tweenInfo, {BackgroundTransparency = 1})
tween:Play()

end

-- Connect button click
button.MouseButton1Click:Connect(doFlashbang)

#

smth like this

broken egret
#

ok

snow mural
#

i just used ai cus its 1:30am and im lazy

#

💔

leaden ridge