Created
March 7, 2021 02:44
-
-
Save TheEpicFace007/74b8f1a22e6b4f30fa6f7c10c897c0a6 to your computer and use it in GitHub Desktop.
Script v3rmies requested
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Script name: Rev autofarm | |
Description: Autofarm for rev. it's really buggy. | |
Game link: https://www.roblox.com/games/2337586413/REV-PUBLIC-BETA?refPageId=03605843-0d33-492a-a127-29a4581d703d | |
--]] | |
local localPlayer = game.Players.localPlayer | |
local function findPlayerCar() | |
for _, v in next, game:GetService("Workspace").Cars:GetChildren() do | |
for __,j in next, v:GetChildren() do | |
if j.Name == "Player" then | |
if j.Value.Name == localPlayer.Name then | |
return v | |
end | |
end | |
end | |
end | |
end | |
-- get the most important parts of a car such as the position brick | |
local function parseCarModel(car) | |
return { | |
brick = car.Base, -- what I think is the equivalent of humanoid root part but for cars | |
id = car.Id, -- I think it's going to be used for remotes | |
model = car -- the model of the car | |
} | |
end | |
local function setCarStraightPos_end(car) | |
car.brick.Rotation = Vector3.new(50 , 90, 120) | |
end | |
local function setCarStraightPos_start(car) | |
car.brick.Rotation = Vector3.new(50 , 60, 100) | |
end | |
local consts = { | |
auto_farm_road_start = CFrame.new(-1912.37402, -44.4318695 + 2, 1080.94653); | |
auto_farm_road_end = CFrame.new(1620.40833, -40.223465 + 2, 1084.34949) | |
} | |
local playerCar = parseCarModel(findPlayerCar()); | |
playerCar.brick:GetPropertyChangedSignal("CFrame"):Connect(function(prop) | |
if props.z >= 500 and prop.z <= 200 then | |
playerCar.brick.CFrame = consts.auto_farm_road_start | |
wait(0.5) | |
setCarStraightPos_end(playerCar) | |
end | |
end) | |
playerCar.brick.CFrame = consts.auto_farm_road_start | |
wait(0.5) | |
setCarStraightPos_end(playerCar) | |
function waitForActiveWin(onActiveWin) | |
repeat wait() until isrbxactive() | |
onActiveWin() | |
end | |
while true do | |
wait() | |
waitForActiveWin(function() keypress(0x57) end) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment