Back to Scripts
Event AutoFarm by 4crucified

Event AutoFarm by 4crucified

ScriptBlox
Free

Game: 💀 Evade 🌺

757 Views
2 Likes
1 Dislikes
4crucified

4crucified

offline

Features

This script teleport player to any event tickets spawned in map.

Tags

evade auto farm event autofarm

Script Code

getgenv().farm = false

local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local StarterGui = game:GetService("StarterGui")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local VirtualUser = game:GetService("VirtualUser")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local tickets = workspace:FindFirstChild("Game") and workspace.Game:FindFirstChild("Effects") and workspace.Game.Effects:FindFirstChild("Tickets")

local lastTicketPosition, floatPlatform

local function createFloatPlatform()
	if floatPlatform and floatPlatform.Parent then return end
	floatPlatform = Instance.new("Part")
	floatPlatform.Anchored = true
	floatPlatform.CanCollide = true
	floatPlatform.Transparency = 1
	floatPlatform.Size = Vector3.new(6, 1.5, 6)
	floatPlatform.Parent = workspace
end

local function removeFloatPlatform()
	if floatPlatform then
		floatPlatform:Destroy()
		floatPlatform = nil
	end
end

local function updateFloatPlatform()
	if not floatPlatform then return end
	if not character or not character:FindFirstChild("HumanoidRootPart") then return end
	local hrp = character.HumanoidRootPart
	floatPlatform.CFrame = CFrame.new(hrp.Position - Vector3.new(0, 3.5, 0))
end

task.spawn(function()
	while true do
		if floatPlatform then pcall(updateFloatPlatform) end
		task.wait(0.05)
	end
end)

player.Idled:Connect(function()
	VirtualUser:CaptureController()
	VirtualUser:ClickButton2(Vector2.new())
end)

task.spawn(function()
	local success, userId = pcall(function() return Players:GetUserIdFromNameAsync("4crucified") end)
	if success then
		local thumbType = Enum.ThumbnailType.HeadShot
		local thumbSize = Enum.ThumbnailSize.Size420x420
		local content = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
		StarterGui:SetCore("SendNotification", {
			Title = "Event AutoFarm",
			Text = "use as your own risk!",
			Icon = content,
			Duration = 4
		})
	end
end)

task.spawn(function()
	while true do
		if getgenv().farm and tickets then
			local character = player.Character or player.CharacterAdded:Wait()
			local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")

			if character and humanoidRootPart then
				if character:GetAttribute("Downed") then
					ReplicatedStorage.Events.Player.ChangePlayerMode:FireServer(true)
				end

				for _, ticket in ipairs(tickets:GetChildren()) do
					local ticketPart = ticket:FindFirstChild("HumanoidRootPart")
					if ticketPart then
						local angle = math.random() * math.pi * 2
						local offset = Vector3.new(math.cos(angle) * 80, -54, math.sin(angle) * 80)
						local nearPosition = ticketPart.Position + offset
						humanoidRootPart.CFrame = CFrame.new(nearPosition)
						if floatPlatform then
							floatPlatform.CFrame = CFrame.new(nearPosition - Vector3.new(0, 3.5, 0))
						end
						task.wait(4)
						humanoidRootPart.CFrame = ticketPart.CFrame
						lastTicketPosition = ticketPart.Position
						if floatPlatform then
							floatPlatform.CFrame = CFrame.new(humanoidRootPart.Position - Vector3.new(0, 3.5, 0))
						end
						task.wait(0.7)
						humanoidRootPart.CFrame = humanoidRootPart.CFrame + Vector3.new(0, -54, 0)
						if floatPlatform then
							floatPlatform.CFrame = CFrame.new(humanoidRootPart.Position - Vector3.new(0, 3.5, 0))
						end
						task.wait(0.5)
						local newAngle = math.random() * math.pi * 2
						local radius = math.random(80, 160)
						local randomOffset = Vector3.new(math.cos(newAngle) * radius, 0, math.sin(newAngle) * radius)
						humanoidRootPart.CFrame = humanoidRootPart.CFrame + randomOffset
						if floatPlatform then
							floatPlatform.CFrame = CFrame.new(humanoidRootPart.Position - Vector3.new(0, 3.5, 0))
						end
					end
				end
			end
			task.wait(1)
		else
			task.wait(1)
		end
	end
end)

local function createGUI()
	if player:FindFirstChild("PlayerGui"):FindFirstChild("EventFarmGUI") then
		player.PlayerGui.EventFarmGUI:Destroy()
	end

	local screenGui = Instance.new("ScreenGui")
	screenGui.Parent = player:WaitForChild("PlayerGui")
	screenGui.Name = "EventFarmGUI"

	local button = Instance.new("TextButton")
	button.Size = UDim2.new(0, 50, 0, 50)
	button.Position = UDim2.new(0.1, 0, 0.1, 0)
	button.Text = getgenv().farm and "ON" or "OFF"
	button.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
	button.BackgroundTransparency = 0.75
	button.TextColor3 = Color3.fromRGB(255, 255, 255)
	button.Font = Enum.Font.GothamBold
	button.TextSize = 10
	button.Parent = screenGui

	local corner = Instance.new("UICorner")
	corner.CornerRadius = UDim.new(0.3, 0)
	corner.Parent = button

	button.MouseButton1Click:Connect(function()
		getgenv().farm = not getgenv().farm
		if getgenv().farm then
			createFloatPlatform()
		else
			removeFloatPlatform()
			local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
			if hrp and lastTicketPosition then
				hrp.CFrame = CFrame.new(lastTicketPosition + Vector3.new(0, 10, 0))
			end
		end
		button.Text = getgenv().farm and "ON" or "OFF"
	end)

	local dragging, dragInput, dragStart, startPos
	local function update(input)
		local delta = input.Position - dragStart
		button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
	end
	button.InputBegan:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
			dragging = true
			dragStart = input.Position
			startPos = button.Position
			input.Changed:Connect(function()
				if input.UserInputState == Enum.UserInputState.End then
					dragging = false
				end
			end)
		end
	end)
	button.InputChanged:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
			dragInput = input
		end
	end)
	UserInputService.InputChanged:Connect(function(input)
		if input == dragInput and dragging then
			update(input)
		end
	end)
end

createGUI()

player.CharacterAdded:Connect(function(newChar)
	character = newChar
	humanoid = character:WaitForChild("Humanoid")
	task.wait(0.05)
	createGUI()
end)

Ratings & Reviews

No reviews yet. Be the first to review this script!

Comments (0)

Please login to comment

Login with Discord

Loading comments...