Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local OrionLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/shlexware/Orion/main/source"))()
- -- Create the main window
- local Window = OrionLib:MakeWindow({Name = "FE Kill Script", HidePremium = false})
- -- Create a section for the kill script
- local KillScriptSection = Window:MakeTab({
- Name = "Kill Script",
- Icon = "rbxassetid://4483345998",
- PremiumOnly = false
- })
- -- Function to find the linked sword in the backpack
- local function findLinkedSword()
- local Backpack = game.Players.LocalPlayer:WaitForChild("Backpack")
- for _, item in ipairs(Backpack:GetChildren()) do
- if item:IsA("Tool") and string.find(item.Name:lower(), "linked") then
- return item
- end
- end
- return nil
- end
- local selectedPlayerName
- -- Add dropdown to select players
- KillScriptSection:AddDropdown({
- Name = "Select Player",
- Default = "",
- Options = {},
- Callback = function(Value)
- selectedPlayerName = Value
- end
- })
- -- Function to update player list
- local function updatePlayerList()
- local playerList = {}
- for _, player in ipairs(game.Players:GetPlayers()) do
- if player ~= game.Players.LocalPlayer then
- table.insert(playerList, player.Name)
- end
- end
- return playerList
- end
- -- Variable to track if the kill action is active
- local isKilling = false
- -- Add a button named "Start Killing"
- KillScriptSection:AddButton({
- Name = "Start Killing",
- Callback = function()
- local linkedSword = findLinkedSword()
- if linkedSword then
- game.Players.LocalPlayer.Character.Humanoid:EquipTool(linkedSword)
- isKilling = true
- local targetPlayer = game.Players:FindFirstChild(selectedPlayerName)
- if targetPlayer and targetPlayer.Character then
- while isKilling do
- wait(0.1)
- game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(targetPlayer.Character.PrimaryPart.CFrame + Vector3.new(0, 0, -5))
- local targetHumanoid = targetPlayer.Character:FindFirstChildOfClass("Humanoid")
- if targetHumanoid then
- if targetHumanoid.Health <= 0 then
- game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(CFrame.new(0, 50, 0))
- OrionLib:MakeNotification({
- Name = "Success",
- Content = selectedPlayerName .. " has been killed!",
- Image = "rbxassetid://4483345998",
- Time = 5
- })
- break
- end
- else
- OrionLib:MakeNotification({
- Name = "Error",
- Content = "Target does not have a humanoid.",
- Image = "rbxassetid://4483345998",
- Time = 5
- })
- break
- end
- end
- else
- OrionLib:MakeNotification({
- Name = "Error",
- Content = "Selected player not found.",
- Image = "rbxassetid://4483345998",
- Time = 5
- })
- end
- else
- OrionLib:MakeNotification({
- Name = "Error",
- Content = "No linked sword found in backpack.",
- Image = "rbxassetid://4483345998",
- Time = 5
- })
- end
- end
- })
- -- Add a button to stop killing
- KillScriptSection:AddButton({
- Name = "Stop Killing",
- Callback = function()
- isKilling = false
- OrionLib:MakeNotification({
- Name = "Stopped",
- Content = "Killing action has been stopped.",
- Image = "rbxassetid://4483345998",
- Time = 5
- })
- end
- })
- -- Function to update the dropdown
- local function updateDropdown()
- local dropdown = KillScriptSection.Options["Select Player"]
- if dropdown then
- dropdown:Refresh(updatePlayerList(), true)
- end
- end
- -- Update player list when players join or leave
- game.Players.PlayerAdded:Connect(updateDropdown)
- game.Players.PlayerRemoving:Connect(updateDropdown)
- -- Initial update of the dropdown
- updateDropdown()
- -- Initialize OrionLib
- OrionLib:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement