this code.
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local player = Players:FindFirstChild("AlphonsoGames")
if not player then return end
local BASE_SIZE = 150
local WINDUP_SIZE = BASE_SIZE * 25
local MIN_SIZE = 15
local FLOAT_HEIGHT = 2
local FLOAT_DURATION = 2
local WINDUP_DURATION = 9.25
local APPEAR_DELAY = 0.5
local SHRINK_DURATION = 3.25
local BASE_TEXTURE_SPEED = 0.325
local WINDUP_TEXTURE_SPEED = 50
local HEALTH_DRAIN_RATE = 5
local DAMAGE_CHECK_INTERVAL = 0.1
local deadPlayers = {}
local part = Instance.new("Part")
part.Name = "Main"
part.BottomSurface = Enum.SurfaceType.Smooth
part.CanCollide = false
part.Transparency = 0.5
part.TopSurface = Enum.SurfaceType.Smooth
part.Color = Color3.fromRGB(0, 255, 255)
part.Massless = true
part.Reflectance = 1
part.Material = Enum.Material.Neon
part.Size = Vector3.new(2, 2, 2)
part.CanTouch = false
part.Anchored = true
part.AudioCanCollide = false
part.Position = player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character.HumanoidRootPart.Position or Vector3.new(0, 0, 0)
local attachment1 = Instance.new("Attachment")
attachment1.Name = "Attachment1"
attachment1.Position = Vector3.new(0, 0, -1 * BASE_SIZE)
attachment1.Parent = part
local attachment2 = Instance.new("Attachment")
attachment2.Name = "Attachment2"
attachment2.Position = Vector3.new(0, 0, 1 * BASE_SIZE)
attachment2.Parent = part
local redAttachment1 = Instance.new("Attachment")
redAttachment1.Name = "RedAttachment1"
redAttachment1.Position = Vector3.new(0, 0, -1 * BASE_SIZE)
redAttachment1.Parent = part
local redAttachment2 = Instance.new("Attachment")
redAttachment2.Name = "RedAttachment2"
redAttachment2.Position = Vector3.new(0, 0, 1 * BASE_SIZE)
redAttachment2.Parent = part
local beam1 = Instance.new("Beam")
beam1.CurveSize1 = -1.35 * BASE_SIZE
beam1.CurveSize0 = 1.35 * BASE_SIZE
beam1.LightInfluence = 1
beam1.Segments = 999
beam1.TextureSpeed = BASE_TEXTURE_SPEED
beam1.Width1 = 999999
beam1.Width0 = 999999
beam1.Transparency = NumberSequence.new(0)
beam1.TextureLength = 5
beam1.LightEmission = 0.75
beam1.Texture = "rbxassetid://124670965229302"
beam1.Attachment0 = attachment1
beam1.Attachment1 = attachment2
beam1.Enabled = false
beam1.Parent = part
local beam2 = Instance.new("Beam")
beam2.CurveSize1 = 1.35 * BASE_SIZE
beam2.CurveSize0 = -1.35 * BASE_SIZE
beam2.LightInfluence = 1
beam2.Segments = 999
beam2.TextureSpeed = -BASE_TEXTURE_SPEED
beam2.Width1 = 999999
beam2.Width0 = 999999
beam2.Transparency = NumberSequence.new(0)
beam2.TextureLength = 5
beam2.LightEmission = 0.75
beam2.Texture = "rbxassetid://124670965229302"
beam2.Attachment0 = attachment1
beam2.Attachment1 = attachment2
beam2.Enabled = false
beam2.Parent = part
local redBeam1 = Instance.new("Beam")
redBeam1.CurveSize1 = -1.35 * BASE_SIZE
redBeam1.CurveSize0 = 1.35 * BASE_SIZE
redBeam1.LightInfluence = 1
redBeam1.Segments = 999
redBeam1.TextureSpeed = BASE_TEXTURE_SPEED
redBeam1.Width1 = 999999
redBeam1.Width0 = 999999
redBeam1.Transparency = NumberSequence.new(0)
redBeam1.TextureLength = 5
redBeam1.LightEmission = 1.5
redBeam1.Color = ColorSequence.new(Color3.fromRGB(255, 0, 0))
redBeam1.Texture = "rbxassetid://124670965229302"
redBeam1.Attachment0 = redAttachment1
redBeam1.Attachment1 = redAttachment2
redBeam1.Enabled = false
redBeam1.Parent = part
local redBeam2 = Instance.new("Beam")
redBeam2.CurveSize1 = 1.35 * BASE_SIZE
redBeam2.CurveSize0 = -1.35 * BASE_SIZE
redBeam2.LightInfluence = 1
redBeam2.Segments = 999
redBeam2.TextureSpeed = -BASE_TEXTURE_SPEED
redBeam2.Width1 = 999999
redBeam2.Width0 = 999999
redBeam2.Transparency = NumberSequence.new(0)
redBeam2.TextureLength = 5
redBeam2.LightEmission = 1.5
redBeam2.Color = ColorSequence.new(Color3.fromRGB(255, 0, 0))
redBeam2.Texture = "rbxassetid://124670965229302"
redBeam2.Attachment0 = redAttachment1
redBeam2.Attachment1 = redAttachment2
redBeam2.Enabled = false
redBeam2.Parent = part
for _, face in ipairs({Enum.NormalId.Front, Enum.NormalId.Back, Enum.NormalId.Left, Enum.NormalId.Right, Enum.NormalId.Top, Enum.NormalId.Bottom}) do
local decal = Instance.new("Decal")
decal.Face = face
decal.Transparency = 0.5
decal.Color3 = Color3.fromRGB(0, 213, 255)
decal.Texture = "rbxassetid://283481847"
decal.Parent = part
end
local billboard = Instance.new("BillboardGui")
billboard.AlwaysOnTop = true
billboard.Size = UDim2.new(1.25, 0, 1.25, 0)
billboard.StudsOffset = Vector3.new(0, 3.5, 0)
billboard.Adornee = part
local outline = Instance.new("Frame")
outline.AnchorPoint = Vector2.new(0.5, 0.5)
outline.Position = UDim2.new(0.5, 0, 0.5, 0)
outline.Size = UDim2.new(1, 4, 1, 4)
outline.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
outline.BorderSizePixel = 0
outline.Rotation = 45
outline.Parent = billboard
local diamond = Instance.new("Frame")
diamond.AnchorPoint = Vector2.new(0.5, 0.5)
diamond.Position = UDim2.new(0.5, 0, 0.5, 0)
diamond.Size = UDim2.new(1, 0, 1, 0)
diamond.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
diamond.BackgroundTransparency = 0
diamond.BorderSizePixel = 0
diamond.Rotation = 45
diamond.Parent = billboard
billboard.Parent = part
part.Parent = workspace
local floatTween = TweenService:Create(part, TweenInfo.new(FLOAT_DURATION, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, -1, true), {Position = part.Position + Vector3.new(0, FLOAT_HEIGHT, 0)})
floatTween:Play()
local function flickerBeams(intensity, speed)
local flickerTime = 0
local flickerConnection = RunService.Heartbeat:Connect(function(deltaTime)
flickerTime = flickerTime + deltaTime * speed
local flickerValue = (math.sin(flickerTime * 10) + 1) / 2 * intensity
beam1.LightEmission = 0.75 + flickerValue
beam2.LightEmission = 0.75 + flickerValue
end)
return flickerConnection
end
local function windUpEffect()
redBeam1.Enabled = true
redBeam2.Enabled = true
TweenService:Create(diamond, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {
BackgroundColor3 = Color3.fromRGB(255, 0, 0),
Size = UDim2.new(6, 0, 6, 0)
}):Play()
beam1.CurveSize1 = -1.35 * WINDUP_SIZE
beam1.CurveSize0 = 1.35 * WINDUP_SIZE
beam2.CurveSize1 = 1.35 * WINDUP_SIZE
beam2.CurveSize0 = -1.35 * WINDUP_SIZE
attachment1.Position = Vector3.new(0, 0, -1 * WINDUP_SIZE)
attachment2.Position = Vector3.new(0, 0, 1 * WINDUP_SIZE)
beam1.TextureSpeed = WINDUP_TEXTURE_SPEED
beam2.TextureSpeed = -WINDUP_TEXTURE_SPEED
local flickerConnection = flickerBeams(0.5, 10)
local windupTweenInfo = TweenInfo.new(WINDUP_DURATION, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local beam1Tween = TweenService:Create(beam1, windupTweenInfo, {
CurveSize1 = -1.35 * BASE_SIZE,
CurveSize0 = 1.35 * BASE_SIZE,
TextureSpeed = BASE_TEXTURE_SPEED
})
local beam2Tween = TweenService:Create(beam2, windupTweenInfo, {
CurveSize1 = 1.35 * BASE_SIZE,
CurveSize0 = -1.35 * BASE_SIZE,
TextureSpeed = -BASE_TEXTURE_SPEED
})
local attachment1Tween = TweenService:Create(attachment1, windupTweenInfo, {
Position = Vector3.new(0, 0, -1 * BASE_SIZE)
})
local attachment2Tween = TweenService:Create(attachment2, windupTweenInfo, {
Position = Vector3.new(0, 0, 1 * BASE_SIZE)
})
beam1Tween:Play()
beam2Tween:Play()
attachment1Tween:Play()
attachment2Tween:Play()
task.delay(WINDUP_DURATION * 0.75, function()
flickerConnection:Disconnect()
flickerConnection = flickerBeams(0.2, 5)
end)
task.delay(WINDUP_DURATION, function()
flickerConnection:Disconnect()
beam1.LightEmission = 0.75
beam2.LightEmission = 0.75
redBeam1.Enabled = false
redBeam2.Enabled = false
TweenService:Create(diamond, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {
BackgroundColor3 = Color3.fromRGB(0, 170, 255),
Size = UDim2.new(1, 0, 1, 0)
}):Play()
end)
end
local function shrinkEffect()
local tweenInfo = TweenInfo.new(SHRINK_DURATION, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local currentSize = BASE_SIZE
while currentSize > MIN_SIZE do
local targetSize = math.max(currentSize - 1, MIN_SIZE)
TweenService:Create(beam1, tweenInfo, {CurveSize1 = -1.35 * targetSize}):Play()
TweenService:Create(beam1, tweenInfo, {CurveSize0 = 1.35 * targetSize}):Play()
TweenService:Create(beam2, tweenInfo, {CurveSize1 = 1.35 * targetSize}):Play()
TweenService:Create(beam2, tweenInfo, {CurveSize0 = -1.35 * targetSize}):Play()
TweenService:Create(attachment1, tweenInfo, {Position = Vector3.new(0, 0, -1 * targetSize)}):Play()
TweenService:Create(attachment2, tweenInfo, {Position = Vector3.new(0, -0.25 * targetSize, 1 * targetSize)}):Play()
currentSize = targetSize
task.wait(0.2)
end
end
local function createBlueDeathEffect(character)
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if not humanoidRootPart then return end
local deathSound = Instance.new("Sound")
deathSound.SoundId = "rbxassetid://4620904701"
deathSound.Volume = 3
deathSound.Pitch = 1
deathSound.MaxDistance = 150
deathSound.Parent = humanoidRootPart
deathSound:Play()
TweenService:Create(deathSound, TweenInfo.new(4, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Pitch = 0.25}):Play()
local deathSound2 = Instance.new("Sound")
deathSound2.SoundId = "rbxassetid://698224146"
deathSound2.Volume = 2
deathSound2.Pitch = 0.8
deathSound2.MaxDistance = 150
deathSound2.Parent = humanoidRootPart
deathSound2:Play()
for _, part in ipairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.Color = Color3.fromRGB(0, 170, 255)
part.Material = Enum.Material.Neon
local evaporate = Instance.new("ParticleEmitter")
evaporate.LightInfluence = 1
evaporate.Lifetime = NumberRange.new(1, 1)
evaporate.SpreadAngle = Vector2.new(380, 380)
evaporate.Transparency = NumberSequence.new(0.5)
evaporate.LightEmission = 0.7
evaporate.Color = ColorSequence.new(Color3.fromRGB(0, 170, 255))
evaporate.Drag = 0.5
evaporate.VelocitySpread = 380
evaporate.Squash = NumberSequence.new(-3, 3)
evaporate.Speed = NumberRange.new(5, 7)
evaporate.Size = NumberSequence.new(1, 1.4999998)
evaporate.ZOffset = 5
evaporate.Rate = 350
evaporate.Texture = "http://www.roblox.com/asset/?id=9668592056"
evaporate.RotSpeed = NumberRange.new(90, 390)
evaporate.Parent = part
local tween = TweenService:Create(part, TweenInfo.new(4, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Transparency = 1})
tween:Play()
tween.Completed:Connect(function() part:Destroy() end)
if part ~= humanoidRootPart then
part.Anchored = false
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(100000, 100000, 100000)
bodyVelocity.Velocity = Vector3.new(math.random(-10, 10), math.random(5, 15), math.random(-10, 10))
bodyVelocity.Parent = part
end
end
end
end
local function checkPlayersInCircle()
local damageConnection = RunService.Heartbeat:Connect(function()
local currentSize = beam1.CurveSize1 / -1.35
local center = part.Position
local allPlayersDead = true
local atLeastOneAlive = false
for _, player in ipairs(Players:GetPlayers()) do
if player.Character then
local humanoid = player.Character:FindFirstChild("Humanoid")
local rootPart = player.Character:FindFirstChild("HumanoidRootPart")
if humanoid and rootPart and humanoid.Health > 0 then
local horizontalDistance = (Vector3.new(rootPart.Position.X, 0, rootPart.Position.Z) - Vector3.new(center.X, 0, center.Z)).Magnitude
if horizontalDistance > currentSize and not deadPlayers[player] then
humanoid:TakeDamage(HEALTH_DRAIN_RATE * DAMAGE_CHECK_INTERVAL)
if humanoid.Health <= 0 then
deadPlayers[player] = true
createBlueDeathEffect(player.Character)
else
allPlayersDead = false
atLeastOneAlive = true
end
elseif deadPlayers[player] then
allPlayersDead = allPlayersDead and true
else
allPlayersDead = false
atLeastOneAlive = true
end
end
end
end
if allPlayersDead or (not atLeastOneAlive and #Players:GetPlayers() > 0) then
damageConnection:Disconnect()
part:Destroy()
end
end)
end
task.delay(APPEAR_DELAY, function()
beam1.Enabled = true
beam2.Enabled = true
windUpEffect()
task.delay(WINDUP_DURATION, shrinkEffect)
task.spawn(checkPlayersInCircle)
end)
make it that the visuals appear without needing a part.