Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views6 pages

Main Lua

This document is a script for a game called Saber Showdown, utilizing the Rayfield interface for creating a GUI. It includes features such as a combat tab with buttons for killing players, auto-farming, and an auto-block function. The script also manages user input and provides a configuration for saving settings and Discord integration.

Uploaded by

eltonting3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views6 pages

Main Lua

This document is a script for a game called Saber Showdown, utilizing the Rayfield interface for creating a GUI. It includes features such as a combat tab with buttons for killing players, auto-farming, and an auto-block function. The script also manages user input and provides a configuration for saving settings and Discord integration.

Uploaded by

eltonting3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

local Rayfield = loadstring(game:HttpGet('https://sirius.

menu/rayfield'))()

local Window = Rayfield:CreateWindow({


Name = "⚔️ saber showdown script ⚔️",
Icon = 0, -- Icon in Topbar. Can use Lucide Icons (string) or Roblox Image
(number). 0 to use no icon (default).
LoadingTitle = "Rayfield Interface Suite",
LoadingSubtitle = "by Muhamed",
Theme = "Default", -- Check
https://docs.sirius.menu/rayfield/configuration/themes

DisableRayfieldPrompts = false,
DisableBuildWarnings = false, -- Prevents Rayfield from warning when the script
has a version mismatch with the interface

ConfigurationSaving = {
Enabled = true,
FolderName = nil, -- Create a custom folder for your hub/game
FileName = "Big Hub"
},

Discord = {
Enabled = false, -- Prompt the user to join your Discord server if their
executor supports it
Invite = "noinvitelink", -- The Discord invite code, do not include
discord.gg/. E.g. discord.gg/ ABCD would be ABCD
RememberJoins = true -- Set this to false to make them join the discord every
time they load it up
},

KeySystem = false, -- Set this to true to use our key system


KeySettings = {
Title = "Untitled",
Subtitle = "Key System",
Note = "No method of obtaining the key is provided", -- Use this to tell the
user how to get a key
FileName = "Key", -- It is recommended to use something unique as other
scripts using Rayfield may overwrite your key file
SaveKey = true, -- The user's key will be saved, but if you change the key,
they will be unable to use your script
GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site
you would like Rayfield to get the key from
Key = {"Hello"} -- List of keys that will be accepted by the system, can be
RAW file links (pastebin, github etc) or simple strings ("hello","key22")

local MainTab = Window:CreateTab("combat ⚔️", nil) -- Title, Image


local MainSection = Tab:CreateSection("auto farm")

local Button = MainTab:CreateButton({


Name = "Kill all",
Callback = function()
-- Saber Showdown Kill Script

-- Services
local player = game.Players.LocalPlayer
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = player:WaitForChild("PlayerGui")
screenGui.ResetOnSpawn = false
game.Players.LocalPlayer.CharacterAdded:Connect(function(character)
-- Reparent screenGui to PlayerGui when the character respawns
if screenGui.Parent == nil then
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
end
end)

-- Main Frame
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 275, 0, 275) -- Adjusted height for better spacing
frame.Position = UDim2.new(0.5, -150, 0.5, -200) -- Centered the frame
frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
frame.BorderSizePixel = 0
frame.Parent = screenGui

-- Rounded Corners for Frame


local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 10)
corner.Parent = frame

-- Dragging Logic
local dragging = false
local dragInput, dragStart, startPos

frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = frame.Position

input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)

frame.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
dragInput = input
end
end)

game:GetService("UserInputService").InputChanged:Connect(function(input)
if input == dragInput and dragging then
local delta = input.Position - dragStart
frame.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end
end)

-- Close Button
local closeButton = Instance.new("TextButton")
closeButton.Size = UDim2.new(0, 30, 0, 30) -- Size of the button
closeButton.Position = UDim2.new(1, -35, 0, 5) -- Top-right corner
closeButton.AnchorPoint = Vector2.new(1, 0) -- Align right edge
closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
closeButton.Text = "X"
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
closeButton.TextScaled = true
closeButton.Parent = frame

local closeCorner = Instance.new("UICorner")


closeCorner.CornerRadius = UDim.new(0, 5) -- Rounded edges
closeCorner.Parent = closeButton

closeButton.MouseButton1Click:Connect(function()
screenGui:Destroy()
end)

-- UIListLayout for Button Alignment


local listLayout = Instance.new("UIListLayout")
listLayout.Padding = UDim.new(0, 10)
listLayout.SortOrder = Enum.SortOrder.LayoutOrder
listLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
listLayout.VerticalAlignment = Enum.VerticalAlignment.Center
listLayout.Parent = frame

-- Username Textbox
local usernameBox = Instance.new("TextBox")
usernameBox.Size = UDim2.new(0, 250, 0, 40)
usernameBox.PlaceholderText = "USERNAME"
usernameBox.Text = ""
usernameBox.TextScaled = true
usernameBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
usernameBox.TextColor3 = Color3.fromRGB(255, 255, 255)
usernameBox.ClearTextOnFocus = false
usernameBox.Parent = frame

local usernameCorner = Instance.new("UICorner")


usernameCorner.CornerRadius = UDim.new(0, 5)
usernameCorner.Parent = usernameBox

-- Kill Button
local killButton = Instance.new("TextButton")
killButton.Size = UDim2.new(0, 250, 0, 40)
killButton.Text = "KILL"
killButton.TextScaled = true
killButton.BackgroundColor3 = Color3.fromRGB(0, 150, 0)
killButton.TextColor3 = Color3.fromRGB(255, 255, 255)
killButton.Parent = frame

local killCorner = Instance.new("UICorner")


killCorner.CornerRadius = UDim.new(0, 5)
killCorner.Parent = killButton

-- KillAll Button
local killAllButton = Instance.new("TextButton")
killAllButton.Size = UDim2.new(0, 250, 0, 40)
killAllButton.Text = "KILL ALL"
killAllButton.TextScaled = true
killAllButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
killAllButton.TextColor3 = Color3.fromRGB(255, 255, 255)
killAllButton.Parent = frame

local killAllCorner = Instance.new("UICorner")


killAllCorner.CornerRadius = UDim.new(0, 5)
killAllCorner.Parent = killAllButton

-- Loop KillAll Button


local loopKillAllButton = Instance.new("TextButton")
loopKillAllButton.Size = UDim2.new(0, 250, 0, 40)
loopKillAllButton.Text = "LOOP KILL ALL"
loopKillAllButton.TextScaled = true
loopKillAllButton.BackgroundColor3 = Color3.fromRGB(255, 100, 0)
loopKillAllButton.TextColor3 = Color3.fromRGB(255, 255, 255)
loopKillAllButton.Parent = frame

local loopKillAllCorner = Instance.new("UICorner")


loopKillAllCorner.CornerRadius = UDim.new(0, 5)
loopKillAllCorner.Parent = loopKillAllButton

-- Kill Logic
local kata = game:GetService("ReplicatedStorage").LightsaberRemotes.Kata
local equip = game:GetService("ReplicatedStorage").LightsaberRemotes.Equip
local ignite = game:GetService("ReplicatedStorage").LightsaberRemotes.Ignite
local block = game:GetService("ReplicatedStorage").LightsaberRemotes.Block

local function getPlr(identifier)


for _, player in pairs(game.Players:GetPlayers()) do
if player.Name:lower():sub(1, #identifier) == identifier:lower() or
player.DisplayName:lower():sub(1, #identifier) == identifier:lower() then
return player
end
end
return nil
end

local function isAlive(character)


local humanoid = character:FindFirstChildOfClass("Humanoid")
return humanoid and humanoid.Health > 0
end

local function killPlayer(targetName)


equip:FireServer()
ignite:FireServer()
local Target = getPlr(targetName)

if not Target then


warn("Player not found!")
return
end

local TargetHRP = Target.Character and


Target.Character:FindFirstChild("HumanoidRootPart")
if TargetHRP and TargetHRP.Position.Y > 4900 then
warn(targetName .. " is in the lobby. Marking as killed.")
return -- Exit the function since they're "killed" and in the lobby
end

local loop = true


local startTime = tick() -- Start time for constant rotation
local angularVelocity = 99999999999999999999999999999999999999 -- Speed of
orbit (adjust as needed)
local orbitRadius = 6 -- Distance from the target (adjust as needed)

while loop and Target.Character and isAlive(Target.Character) do


local LocalPlayer = game.Players.LocalPlayer
local Character = LocalPlayer.Character
if Character and Character:FindFirstChild("HumanoidRootPart") and
Target.Character:FindFirstChild("HumanoidRootPart") then
local targetHRP = Target.Character.HumanoidRootPart
local localHRP = Character.HumanoidRootPart

local elapsedTime = tick() - startTime


local angle = elapsedTime * angularVelocity -- Constantly increasing
angle

local offsetX = math.cos(angle) * orbitRadius


local offsetZ = math.sin(angle) * orbitRadius
local orbitPosition = targetHRP.Position + Vector3.new(offsetX, 2,
offsetZ)

localHRP.CFrame = CFrame.new(orbitPosition, targetHRP.Position) -- Orbit while


facing the target

kata:FireServer()
block:FireServer()
end
wait(0.01)
end
end

killButton.MouseButton1Click:Connect(function()
local username = usernameBox.Text
if username and username ~= "" then
killPlayer(username)
else
warn("Enter a valid username.")
end
end)

killAllButton.MouseButton1Click:Connect(function()
for _, player in pairs(game.Players:GetPlayers()) do
if player ~= game.Players.LocalPlayer and player.Character then
local hrp = player.Character:FindFirstChild("HumanoidRootPart")
if hrp and hrp.Position.Y <= 4900 then -- Skip players in the lobby
equip:FireServer()
ignite:FireServer()
killPlayer(player.Name)
else
warn(player.Name .. " is in the lobby. Skipping.")
end
end
end
end)

loopKillAllButton.MouseButton1Click:Connect(function()
while true do
for _, player in pairs(game.Players:GetPlayers()) do
if player ~= game.Players.LocalPlayer and player.Character then
local hrp = player.Character:FindFirstChild("HumanoidRootPart")
if hrp and hrp.Position.Y <= 4900 then -- Skip players in the lobby
equip:FireServer()
ignite:FireServer()
killPlayer(player.Name)
else
warn(player.Name .. " is in the lobby. Skipping.")
end
end
end
wait(0.1) -- Prevent infinite loops from overwhelming the system
end
end)
end,
})

local Button = OtherTab:CreateButton({


Name = "auto block ",
Callback = function()
loadstring(game:HttpGet("https://raw.githubusercontent.com/GitHubXD22/
Autobloclyy/refs/heads/main/Blazenk",true))();
end,
})

You might also like