Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- https://www.roblox.com/games/11727501024/UPD-Create-a-Cart-Ride
- local up = true -- will move the cart a little up when teleporting, use if cart is glitching through the ground
- print("loading...")
- getgenv().clicktotpcacr = false
- local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
- local Window = Library.CreateLib("Create A Cart Ride", "Sentinel")
- local t1 = Window:NewTab("Main")
- local t1s1 = t1:NewSection("Main")
- local level
- local mouse = game.Players.LocalPlayer:GetMouse()
- local ctrldown = false
- t1s1:NewButton("unlock all levels", "unlock all levels", function()
- for i,v in pairs(workspace.CartRideWorkspace.Objects:GetChildren()) do
- if v.Name == "LevelSpawn" then
- firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart,v.LevelSpawn,0)
- end
- end
- end)
- t1s1:NewButton("get cart (if there is one)", "get cart", function()
- for i,v in pairs(workspace.CartRideWorkspace.Objects:GetChildren()) do
- if v.Name == "CartGiver" then
- for i,v in pairs(v:GetChildren()) do
- if v:FindFirstChild("TouchInterest") then
- firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart,v,0)
- end
- end
- end
- end
- end)
- t1s1:NewButton("TP to end", "teleport to end", function()
- local carts = {}
- for i,v in pairs(workspace.CartRideWorkspace.Objects:GetChildren()) do
- if v.Name == "LevelSpawn" then
- carts[v] = tonumber(string.sub(v.LevelSpawn.BBG.TextLabel.Text,string.find(v.LevelSpawn.BBG.TextLabel.Text," ")+1))
- end
- end
- local winnercart = nil
- for i,v in pairs(carts) do
- if winnercart == nil then
- winnercart = {i,v}
- elseif v > winnercart[2] then
- print(v)
- winnercart = {i,v}
- end
- end
- local cf = winnercart[1].LevelSpawn.CFrame
- if up then
- cf = cf + Vector3.new(0,10,0)
- end
- game.Players.LocalPlayer.Character:PivotTo(cf)
- end)
- t1s1:NewTextBox("level (only number)","level",function(txt)
- level = tonumber(txt)
- end)
- t1s1:NewButton("TP to level", "teleport to level", function()
- for i,v in pairs(workspace.CartRideWorkspace.Objects:GetChildren()) do
- if v.Name == "LevelSpawn" and tonumber(string.sub(v.LevelSpawn.BBG.TextLabel.Text,string.find(v.LevelSpawn.BBG.TextLabel.Text," ")+1)) == level then
- local cf = v.LevelSpawn.CFrame
- if up then
- cf = cf + Vector3.new(0,10,0)
- end
- game.Players.LocalPlayer.Character:PivotTo(cf)
- end
- end
- end)
- game:GetService("UserInputService").InputBegan:Connect(function(input)
- if input.KeyCode == Enum.KeyCode.LeftControl then
- ctrldown = true
- elseif getgenv().clicktotpcacr == true and ctrldown == true and input.UserInputType == Enum.UserInputType.MouseButton1 then
- local cf = mouse.Hit
- if up then
- cf = cf + Vector3.new(0,10,0)
- end
- game.Players.LocalPlayer.Character:PivotTo(cf)
- end
- end)
- game:GetService("UserInputService").InputEnded:Connect(function(input)
- if input.KeyCode == Enum.KeyCode.LeftControl then
- ctrldown = false
- end
- end)
- t1s1:NewToggle("ctrl+click to TP","click to teleport",function(bool)
- getgenv().clicktotpcacr = bool
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement