You are on page 1of 5

local REJOIN = true -- Change to false to disable automatic rejoining.

game.Workspace:WaitForChild("Live", 10)
game.Workspace.Live:WaitForChild(game.Players.LocalPlayer.Name)

local players = game:GetService("Players")


local lplr = players.LocalPlayer
local teles = game:GetService("TeleportService")

players.PlayerRemoving:Connect(function(player)
if player == lplr and REJOIN == true then
teles:Teleport(game.PlaceId)
end
end)

local ms = game:GetService("ReplicatedStorage").Remotes.Mission
local ws = game:GetService("Workspace")
local board = ws.Corkboard.Board["Color this to paint the board"].ClickDetector
local ts = game:GetService("TweenService")
local plr = game:GetService("Players").LocalPlayer
local charr = plr.Character or ws.Live:WaitForChild(plr.Name)
local hrp = charr:WaitForChild("HumanoidRootPart")
local deliverytp = false
local dirt = ws:WaitForChild("Dirt")
local posters = ws:WaitForChild("Posters")

local Speed = 50
function GetTime(Distance, Speed)
-- Time = Distance / Speed
local Time = Distance / Speed
return Time
end
local part = dirt.Part
local Distance = (hrp.Position - part.Position).magnitude
local Time = GetTime(Distance, Speed)

function GetTime2(Distance2, Speed)


-- Time = Distance / Speed
local Time2 = Distance2 / Speed
return Time2
end
local Distance2 = (hrp.Position - Vector3.new(-1925.51, 92.5564,
199.508)).magnitude
local Time2 = GetTime(Distance2, Speed)

function GetTime3(Distance3, Speed)


-- Time = Distance / Speed
local Time3 = Distance3 / Speed
return Time3
end
local Distance3 = (hrp.Position - Vector3.new(-1608.1, 96.5563, -
154.587)).magnitude
local Time3 = GetTime(Distance3, Speed)

for i,v in pairs(ws:GetDescendants()) do


if v:IsA("Seat") then
v:Destroy()
end
end

local vu = game:GetService("VirtualUser")
game:GetService("Players").LocalPlayer.Idled:connect(function()
vu:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
wait(1)
vu:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
end)

for i,v in pairs(charr:GetChildren()) do


if v:IsA("Accessory") or v:IsA("Pants") or v:IsA("Shirt") then
print(v)
v:Destroy()
elseif v:IsA("Model") then
v:Destroy()
end
end

for i,v in pairs(charr:GetChildren()) do


if v:IsA("Part") then
warn(v)
v.Color = Color3.new(0, 0, 0)
end
end

local vars = {}
vars.CFrame = CFrame.new(-1608.09998, 96.5562973, -154.587006, -0.993263364, -
7.50754658e-09, -0.115878858, 8.58404459e-09, 1, -1.38366602e-07, 0.115878858, -
1.38429186e-07, -0.993263364)

local vars2 = {}
vars2.CFrame = CFrame.new(-1921.56787, 94.5563507, 192.469452, 0.998828292, 0, -
0.0483949557, 0, 1, 0, 0.0483949557, 0, 0.998828292)

local ti = TweenInfo.new(Time3, Enum.EasingStyle.Linear)


local deliveryinfo = TweenInfo.new(Time2, Enum.EasingStyle.Linear)
local partinfo = TweenInfo.new(Time, Enum.EasingStyle.Linear)

local tpdelivery = ts:Create(hrp, deliveryinfo, vars2)


local tp = ts:Create(hrp, ti, vars)

local started = false


local farm = false
local currentlytp = false
local boardtp = false

charr.Status.ChildAdded:Connect(function(sts)
if sts.Name == "KO" then
charr.Status:WaitForChild(sts, 0.1)
sts:Destroy()
end
end)

local function getboard()


started = true
while true do
wait()
if not plr:FindFirstChild("Mission") and boardtp == false then
hrp.Anchored = false
Distance3 = (hrp.Position - Vector3.new(-1608.1, 96.5563, -
154.587)).magnitude
GetTime3(Distance3, Speed)
Time3 = GetTime(Distance3, Speed)
local info3 = TweenInfo.new(Time3, Enum.EasingStyle.Linear)
local tween3 = ts:Create(hrp, info3, {CFrame = CFrame.new(-1608.09998, 96.5562973,
-154.587006, -0.993263364, -7.50754658e-09, -0.115878858, 8.58404459e-09, 1, -
1.38366602e-07, 0.115878858, -1.38429186e-07, -0.993263364)})
boardtp = true
tween3:Play()
tween3.Completed:Connect(function()
wait(1)
boardtp = false
end)
elseif not plr:FindFirstChild("Mission") and (hrp.Position -
ws.Corkboard.Board.Cylinder.Position).magnitude < 6 then
print("Mag check board")
fireclickdetector(board, 6)
elseif plr:FindFirstChild("Mission") and charr:FindFirstChild("Grocery") and
deliverytp == false then
deliverytp = true
Distance2 = (hrp.Position - Vector3.new(-1925.51, 94.5564,
199.508)).magnitude
GetTime2(Distance2, Speed)
Time2 = GetTime(Distance2, Speed)
local info2 = TweenInfo.new(Time2, Enum.EasingStyle.Linear)
local tween2 = ts:Create(hrp, info2, {CFrame = CFrame.new(-1921.56787, 94.5563507,
192.469452, 0.998828292, 0, -0.0483949557, 0, 1, 0, 0.0483949557, 0, 0.998828292)})
tween2:Play()
tween2.Completed:Connect(function()
deliverytp = false
end)
elseif plr:FindFirstChild("Mission") and plr:FindFirstChild("Dirt") and farm ==
false then
farm = true
wait()
while farm == true do
wait()
for i,v in pairs(dirt:GetDescendants()) do
if v:IsA("ClickDetector") and plr:FindFirstChild("Dirt") and
v.Parent.Decal.Transparency == 0 and currentlytp == false and not
charr.Status:FindFirstChild("Stunned") and not charr.Status:FindFirstChild("KO")
and plr:FindFirstChild("Dirt").Value ~= 0 then
hrp.Anchored = false
currentlytp = true
part = v.Parent
Distance = (hrp.Position - part.Position).magnitude
GetTime(Distance, Speed)
Time = GetTime(Distance, Speed)
local info = TweenInfo.new(Time, Enum.EasingStyle.Linear)
local tween = ts:Create(hrp, info, {CFrame = part.CFrame + Vector3.new(0,0,0)})
tween:Play()
tween.Completed:Connect(function()
if part.Decal.Transparency == 0 and not charr.Status:FindFirstChild("Stunned") and
plr:FindFirstChild("Dirt") and Distance < 5 and not
charr.Status:FindFirstChild("KO") and plr:FindFirstChild("Dirt").Value ~= 0 then
print("Fired?")
fireclickdetector(v)
hrp.Anchored = true
currentlytp = false
else
hrp.Anchored = true
currentlytp = false
end
end)
tween.Completed:Wait()
elseif not plr:FindFirstChild("Dirt") then
hrp.Anchored = false
farm = false
end
end
end
elseif plr:FindFirstChild("Mission") and plr:FindFirstChild("Poster") then
farm = true
wait()
while farm == true do
wait()
for i,v in pairs(posters:GetDescendants()) do
if v:IsA("ClickDetector") and plr:FindFirstChild("Poster") and
v.Parent.Decal.Transparency == 1 and currentlytp == false and not
charr.Status:FindFirstChild("Stunned") and not charr.Status:FindFirstChild("KO")
and plr:FindFirstChild("Poster").Value ~= 0 then
hrp.Anchored = false
currentlytp = true
part = v.Parent
Distance = (hrp.Position - part.Position).magnitude
GetTime(Distance, Speed)
Time = GetTime(Distance, Speed)
local info = TweenInfo.new(Time, Enum.EasingStyle.Linear)
local tween = ts:Create(hrp, info, {CFrame = part.CFrame + Vector3.new(0,3,0)})
tween:Play()
tween.Completed:Connect(function()
if part.Decal.Transparency == 1 and not charr.Status:FindFirstChild("Stunned") and
not charr.Status:FindFirstChild("KO") and plr:FindFirstChild("Poster") and Distance
< 5 and plr:FindFirstChild("Poster").Value ~= 0 then
fireclickdetector(v)
hrp.Anchored = true
currentlytp = false
else
hrp.Anchored = true
currentlytp = false
end
end)
tween.Completed:Wait()
elseif not plr:FindFirstChild("Poster") then
hrp.Anchored = false
farm = false
end
end
end
end
end
end

tpdelivery.Completed:Connect(function()
deliverytp = false
end)

tp.Completed:Connect(function()
if not plr:FindFirstChild("Mission") then
boardtp = false
end
end)

getboard()

You might also like