Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while farm do
- pcall(function() -- Wrap in pcall to avoid script crashing if there is an error.
- local que = game:GetService("Workspace")["World Assets"]["Inasal Grab Pickup"].DeliveryAssets.DeliveryQuestGiver
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = que.CFrame + Vector3.new(-8, -5, 5)
- wait(0.5)
- game:GetService("ReplicatedStorage").Events.Delivery.DeliveryStartEvent:FireServer() -- Start Delivery
- local plc = game.Workspace:WaitForChild("Indicator", 5).PrimaryPart -- Get PrimaryPart of Indicator (Max wait 5 seconds)
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = plc.CFrame + Vector3.new(0, 10, 0) -- Teleport a little above
- wait(0.5) -- Give our player time to teleport.
- game:GetService("ReplicatedStorage").Events.Delivery.DeliveryFinishEvent:FireServer(plc.Name) -- Finish Delivery
- game:GetService("ReplicatedStorage").Events.Delivery.DeliveryAbandonEvent:FireServer() -- Call cancel just incase. (This helps avoid more bugs I noticed)
- repeat wait() until game.Workspace:FindFirstChild("Indicator") == nil -- Wait until the game removes the Indeicator or we'll bug out.
- end)
- end
Add Comment
Please, Sign In to add comment