local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local VirtualInputManager = game:GetService("VirtualInputManager")
local localPlayer = Players.LocalPlayer
local yoinkersdistance = 10
local lastState = false
local function findknife()
local knifeModel = workspace:FindFirstChild("Model")
return knifeModel and knifeModel:FindFirstChild("KnifeZone")
end
RunService.Heartbeat:Connect(function()
local char = localPlayer.Character
local root = char and char:FindFirstChild("HumanoidRootPart")
local knifezone = findknife()
if not root or not knifezone then
if lastState then
lastState = false
end
return
end
local distance = (knifezone.Position - root.Position).Magnitude
local close = distance <= yoinkersdistance
if close ~= lastState then
if close then
VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.F, false, game)
task.delay(0.1, function()
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.F, false, game)
end)
else
end
lastState = close
end
end) -- To be, is not to b- Oh sorry, I mean Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Comments
No comments yet
Be the first to share your thoughts!