--// RayBeats Loadstring Error Notificafion
getgenv().RAYFIELDFAILEDLOADED = true
local TweenService=game:GetService("TweenService")
local screenGui=Instance.new("ScreenGui",gethui())
screenGui.ResetOnSpawn=false
screenGui.IgnoreGuiInset=true
screenGui.ScreenInsets=Enum.ScreenInsets.None
screenGui.DisplayOrder=2147483647
local frame=Instance.new("Frame",screenGui)
frame.Size=UDim2.new(0.5,0,1,0)
frame.Position=UDim2.new(0,-600,0,0)
frame.BackgroundTransparency=0
frame.BackgroundColor3=Color3.new(0,0,0)
frame.BorderSizePixel=0
frame.ClipsDescendants=true
local gradient=Instance.new("UIGradient",frame)
gradient.Color=ColorSequence.new(Color3.new(40,40,40))
gradient.Transparency=NumberSequence.new({
NumberSequenceKeypoint.new(0,0),
NumberSequenceKeypoint.new(0.5,0),
NumberSequenceKeypoint.new(0.5,0.3),
NumberSequenceKeypoint.new(1,1)
})
gradient.Rotation=0
local label=Instance.new("TextLabel",frame)
label.RichText=true
label.Text='Failed to load Rayfield Library.\nTry clicking the <b>Re-execute</b> button.'
label.FontFace=Font.new("rbxasset://fonts/families/GothamSSm.json",Enum.FontWeight.Medium,Enum.FontStyle.Normal)
label.TextSize=40
label.TextColor3=Color3.new(1,1,1)
label.TextXAlignment=Enum.TextXAlignment.Left
label.TextYAlignment=Enum.TextYAlignment.Top
label.Size=UDim2.new(1,-40,0,150)
label.TextScaled=true
label.Position=UDim2.new(0,-600,0,20)
label.BackgroundTransparency=1
local btn1=Instance.new("TextButton",frame)
btn1.Text="Cancel"
btn1.FontFace=Font.new("rbxasset://fonts/families/GothamSSm.json",Enum.FontWeight.Regular,Enum.FontStyle.Normal)
btn1.TextSize=20
btn1.TextColor3=Color3.new(1,1,1)
btn1.Size=UDim2.new(0,120,0,45)
btn1.Position=UDim2.new(0,-600,1,-65)
btn1.BackgroundColor3=Color3.fromRGB(80,80,80)
btn1.AutoButtonColor=false
Instance.new("UICorner",btn1).CornerRadius=UDim.new(0,16)
local btn1Stroke=Instance.new("UIStroke",btn1)
btn1Stroke.Thickness=2
btn1Stroke.Color=Color3.fromRGB(170,170,170)
btn1Stroke.ApplyStrokeMode=Enum.ApplyStrokeMode.Border
local btn2=Instance.new("TextButton",frame)
btn2.Text="Re-execute"
btn2.FontFace=Font.new("rbxasset://fonts/families/GothamSSm.json",Enum.FontWeight.Regular,Enum.FontStyle.Normal)
btn2.TextSize=20
btn2.TextColor3=Color3.new(1,1,1)
btn2.Size=UDim2.new(0,120,0,45)
btn2.Position=UDim2.new(0,-600,1,-65)
btn2.BackgroundColor3=Color3.fromRGB(100,100,100)
btn2.AutoButtonColor=false
Instance.new("UICorner",btn2).CornerRadius=UDim.new(0,16)
local btn2Stroke=Instance.new("UIStroke",btn2)
btn2Stroke.Thickness=2
btn2Stroke.Color=Color3.fromRGB(170,170,170)
btn2Stroke.ApplyStrokeMode=Enum.ApplyStrokeMode.Border
TweenService:Create(frame,TweenInfo.new(1.6,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut),{
Position=UDim2.new(0,0,0,0)
}):Play()
TweenService:Create(label,TweenInfo.new(2,Enum.EasingStyle.Quint),{
Position=UDim2.new(0,20,0,50)
}):Play()
TweenService:Create(btn1,TweenInfo.new(2,Enum.EasingStyle.Quint),{
Position=UDim2.new(0,20,1,-65)
}):Play()
TweenService:Create(btn2,TweenInfo.new(2,Enum.EasingStyle.Quint),{
Position=UDim2.new(0,160,1,-65)
}):Play()
local function adjustColor(c,offset)
return Color3.fromRGB(
math.clamp(c.R * 255 + offset,0,255),
math.clamp(c.G * 255 + offset,0,255),
math.clamp(c.B * 255 + offset,0,255)
)
end
btn1.MouseEnter:Connect(function()
TweenService:Create(btn1Stroke,TweenInfo.new(0.6,Enum.EasingStyle.Quint),{Thickness=0.3}):Play()
TweenService:Create(btn1,TweenInfo.new(0.6,Enum.EasingStyle.Quint),{
BackgroundColor3=adjustColor(btn1.BackgroundColor3,40)
}):Play()
end)
btn1.MouseLeave:Connect(function()
TweenService:Create(btn1Stroke,TweenInfo.new(0.6,Enum.EasingStyle.Quint),{Thickness=2}):Play()
TweenService:Create(btn1,TweenInfo.new(0.6,Enum.EasingStyle.Quint),{
BackgroundColor3=adjustColor(btn1.BackgroundColor3,-40)
}):Play()
end)
btn2.MouseEnter:Connect(function()
TweenService:Create(btn2Stroke,TweenInfo.new(0.6,Enum.EasingStyle.Quint),{Thickness=0.3}):Play()
TweenService:Create(btn2,TweenInfo.new(0.6,Enum.EasingStyle.Quint),{
BackgroundColor3=adjustColor(btn2.BackgroundColor3,40)
}):Play()
end)
btn2.MouseLeave:Connect(function()
TweenService:Create(btn2Stroke,TweenInfo.new(0.6,Enum.EasingStyle.Quint),{Thickness=2}):Play()
TweenService:Create(btn2,TweenInfo.new(0.6,Enum.EasingStyle.Quint),{
BackgroundColor3=adjustColor(btn2.BackgroundColor3,-40)
}):Play()
end)
btn1.MouseButton1Click:Connect(function()
TweenService:Create(frame,TweenInfo.new(0.4),{
Position=UDim2.new(0,-600,0,0),
BackgroundTransparency=1
}):Play()
wait(0.4)
screenGui:Destroy()
end)
btn2.MouseButton1Click:Connect(function()
TweenService:Create(frame,TweenInfo.new(0.4),{
Position=UDim2.new(0,-600,0,0),
BackgroundTransparency=1
}):Play()
wait(0.4)
screenGui:Destroy()
getgenv().RAYFIELDFAILEDLOADED = false
loadstring(game:HttpGet('https://raw.githubusercontent.com/reprenzy-hue/RayBeats/refs/heads/main/source.lua'))()
end)