Advertisement
Thecodeeasar

Fe kill

Nov 3rd, 2024 (edited)
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.51 KB | None | 0 0
  1. local OrionLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/shlexware/Orion/main/source"))()
  2.  
  3. -- Create the main window
  4. local Window = OrionLib:MakeWindow({Name = "FE Kill Script", HidePremium = false})
  5.  
  6. -- Create a section for the kill script
  7. local KillScriptSection = Window:MakeTab({
  8. Name = "Kill Script",
  9. Icon = "rbxassetid://4483345998",
  10. PremiumOnly = false
  11. })
  12.  
  13. -- Function to find the linked sword in the backpack
  14. local function findLinkedSword()
  15. local Backpack = game.Players.LocalPlayer:WaitForChild("Backpack")
  16. for _, item in ipairs(Backpack:GetChildren()) do
  17. if item:IsA("Tool") and string.find(item.Name:lower(), "linked") then
  18. return item
  19. end
  20. end
  21. return nil
  22. end
  23.  
  24. local selectedPlayerName
  25.  
  26. -- Add dropdown to select players
  27. KillScriptSection:AddDropdown({
  28. Name = "Select Player",
  29. Default = "",
  30. Options = {},
  31. Callback = function(Value)
  32. selectedPlayerName = Value
  33. end
  34. })
  35.  
  36. -- Function to update player list
  37. local function updatePlayerList()
  38. local playerList = {}
  39. for _, player in ipairs(game.Players:GetPlayers()) do
  40. if player ~= game.Players.LocalPlayer then
  41. table.insert(playerList, player.Name)
  42. end
  43. end
  44. return playerList
  45. end
  46.  
  47. -- Variable to track if the kill action is active
  48. local isKilling = false
  49.  
  50. -- Add a button named "Start Killing"
  51. KillScriptSection:AddButton({
  52. Name = "Start Killing",
  53. Callback = function()
  54. local linkedSword = findLinkedSword()
  55. if linkedSword then
  56. game.Players.LocalPlayer.Character.Humanoid:EquipTool(linkedSword)
  57. isKilling = true
  58.  
  59. local targetPlayer = game.Players:FindFirstChild(selectedPlayerName)
  60. if targetPlayer and targetPlayer.Character then
  61. while isKilling do
  62. wait(0.1)
  63. game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(targetPlayer.Character.PrimaryPart.CFrame + Vector3.new(0, 0, -5))
  64.  
  65. local targetHumanoid = targetPlayer.Character:FindFirstChildOfClass("Humanoid")
  66. if targetHumanoid then
  67. if targetHumanoid.Health <= 0 then
  68. game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(CFrame.new(0, 50, 0))
  69. OrionLib:MakeNotification({
  70. Name = "Success",
  71. Content = selectedPlayerName .. " has been killed!",
  72. Image = "rbxassetid://4483345998",
  73. Time = 5
  74. })
  75. break
  76. end
  77. else
  78. OrionLib:MakeNotification({
  79. Name = "Error",
  80. Content = "Target does not have a humanoid.",
  81. Image = "rbxassetid://4483345998",
  82. Time = 5
  83. })
  84. break
  85. end
  86. end
  87. else
  88. OrionLib:MakeNotification({
  89. Name = "Error",
  90. Content = "Selected player not found.",
  91. Image = "rbxassetid://4483345998",
  92. Time = 5
  93. })
  94. end
  95. else
  96. OrionLib:MakeNotification({
  97. Name = "Error",
  98. Content = "No linked sword found in backpack.",
  99. Image = "rbxassetid://4483345998",
  100. Time = 5
  101. })
  102. end
  103. end
  104. })
  105.  
  106. -- Add a button to stop killing
  107. KillScriptSection:AddButton({
  108. Name = "Stop Killing",
  109. Callback = function()
  110. isKilling = false
  111. OrionLib:MakeNotification({
  112. Name = "Stopped",
  113. Content = "Killing action has been stopped.",
  114. Image = "rbxassetid://4483345998",
  115. Time = 5
  116. })
  117. end
  118. })
  119.  
  120. -- Function to update the dropdown
  121. local function updateDropdown()
  122. local dropdown = KillScriptSection.Options["Select Player"]
  123. if dropdown then
  124. dropdown:Refresh(updatePlayerList(), true)
  125. end
  126. end
  127.  
  128. -- Update player list when players join or leave
  129. game.Players.PlayerAdded:Connect(updateDropdown)
  130. game.Players.PlayerRemoving:Connect(updateDropdown)
  131.  
  132. -- Initial update of the dropdown
  133. updateDropdown()
  134.  
  135. -- Initialize OrionLib
  136. OrionLib:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement