Advertisement
Vanihgol33

Kill Aura Eat the eat world script (auto kill)

Mar 8th, 2024 (edited)
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.33 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local TweenService = game:GetService("TweenService")
  3. local RunService = game:GetService("RunService")
  4.  
  5. local player = Players.LocalPlayer
  6. local character = player.Character or player.CharacterAdded:Wait()
  7. local playerGui = game:GetService("CoreGui")
  8.  
  9. if playerGui:FindFirstChild("CustomGUI") then
  10.     playerGui:FindFirstChild("CustomGUI"):Destroy()
  11. end
  12.  
  13. local gui = Instance.new("ScreenGui")
  14. gui.Name = "CustomGUI"
  15. gui.ResetOnSpawn = false
  16. gui.Parent = playerGui
  17.  
  18. local frame = Instance.new("Frame", gui)
  19. local textBox = Instance.new("TextBox", frame)
  20. local toggleButton = Instance.new("TextButton", frame)
  21. local uiCorner = Instance.new("UICorner", frame)
  22.  
  23. frame.Size = UDim2.new(0, 200, 0, 120)
  24. frame.Position = UDim2.new(0.5, -100, 0.2, 0)
  25. frame.BackgroundColor3 = Color3.new(0, 0, 0)
  26. frame.Visible = false
  27. frame.ClipsDescendants = true
  28. frame.Active = true
  29. frame.Draggable = true
  30.  
  31. uiCorner.CornerRadius = UDim.new(0, 10)
  32.  
  33. textBox.Size = UDim2.new(0.8, 0, 0.2, 0)
  34. textBox.Position = UDim2.new(0.1, 0, 0.1, 0)
  35. textBox.PlaceholderText = "Введите имя"
  36. local textBoxCorner = Instance.new("UICorner", textBox)
  37. textBoxCorner.CornerRadius = UDim.new(0, 6)
  38.  
  39. toggleButton.Size = UDim2.new(0.8, 0, 0.3, 0)
  40. toggleButton.Position = UDim2.new(0.1, 0, 0.5, 0)
  41. toggleButton.Text = "ON"
  42. toggleButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  43. local buttonCorner = Instance.new("UICorner", toggleButton)
  44. buttonCorner.CornerRadius = UDim.new(0, 6)
  45.  
  46. local function showGui()
  47.     frame.Visible = true
  48.     frame.Size = UDim2.new(0, 0, 0, 0)
  49.     local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  50.     local tween = TweenService:Create(frame, tweenInfo, {Size = UDim2.new(0, 200, 0, 120)})
  51.     tween:Play()
  52. end
  53.  
  54. showGui()
  55.  
  56. local function getRandomPosition()
  57.     return Vector3.new(math.random(-100, 100), math.random(10, 50), math.random(-100, 100))
  58. end
  59.  
  60. local function getTargetPlayer(query)
  61.     for _, otherPlayer in ipairs(Players:GetPlayers()) do
  62.         if otherPlayer ~= player then
  63.             if string.find(string.lower(otherPlayer.Name), string.lower(query)) or string.find(string.lower(otherPlayer.DisplayName), string.lower(query)) then
  64.                 return otherPlayer
  65.             end
  66.         end
  67.     end
  68.     return nil
  69. end
  70.  
  71. local running = false
  72. local followConnection
  73.  
  74. local function executeCycle()
  75.     while running do
  76.         local targetPlayer = getTargetPlayer(textBox.Text)
  77.         if targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
  78.             character:SetPrimaryPartCFrame(CFrame.new(getRandomPosition()))
  79.             wait(1.5)
  80.             if character:FindFirstChild("Events") and character.Events:FindFirstChild("Grab") then    
  81.                 character.Events.Grab:FireServer()    
  82.             end    
  83.             wait(2)
  84.             local targetCFrame = targetPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, 2)
  85.             character:SetPrimaryPartCFrame(targetCFrame)
  86.             followConnection = RunService.Heartbeat:Connect(function()
  87.                 if running and targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then    
  88.                     character:SetPrimaryPartCFrame(targetPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, 2))    
  89.                 end    
  90.             end)
  91.             if character:FindFirstChild("Events") and character.Events:FindFirstChild("Throw") then
  92.                 character.Events.Throw:FireServer()
  93.             end
  94.             wait(1.5)
  95.             if followConnection then
  96.                 followConnection:Disconnect()
  97.                 followConnection = nil
  98.             end
  99.         end
  100.         wait(1)
  101.     end
  102. end
  103.  
  104. toggleButton.MouseButton1Click:Connect(function()
  105.     if not running then
  106.         running = true
  107.         toggleButton.Text = "OFF"
  108.         toggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  109.         executeCycle()
  110.     else
  111.         running = false
  112.         toggleButton.Text = "ON"
  113.         toggleButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  114.     end
  115. end)
  116.  
  117. player.CharacterAdded:Connect(function(newCharacter)
  118.     character = newCharacter
  119.     wait(1)
  120.     showGui()
  121.     if running then
  122.         executeCycle()
  123.     end
  124. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement