Advertisement
SkidScripts

Car Hub

Jun 3rd, 2022
2,343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Vars
  2. LocalPlayer = game:GetService("Players").LocalPlayer
  3. Camera = workspace.CurrentCamera
  4. VirtualUser = game:GetService("VirtualUser")
  5. MarketplaceService = game:GetService("MarketplaceService")
  6.  
  7. --Get Current Vehicle
  8. function GetCurrentVehicle()
  9.     return LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") and LocalPlayer.Character.Humanoid.SeatPart and LocalPlayer.Character.Humanoid.SeatPart.Parent
  10. end
  11.  
  12. --Notification Handler
  13. function SendNotification(Title, Message, Duration)
  14.     game.StarterGui:SetCore("SendNotification", {
  15.         Title = Title;
  16.         Text = Message;
  17.         Duration = Duration;
  18.     })
  19. end
  20.  
  21. --Regular TP
  22. function TP(cframe)
  23.     GetCurrentVehicle():SetPrimaryPartCFrame(cframe)
  24. end
  25.  
  26. --Velocity TP
  27. function VelocityTP(cframe)
  28.     TeleportSpeed = math.random(200, 600)
  29.     Car = GetCurrentVehicle()
  30.     local BodyGyro = Instance.new("BodyGyro", Car.PrimaryPart)
  31.     BodyGyro.P = 5000
  32.     BodyGyro.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  33.     BodyGyro.CFrame = Car.PrimaryPart.CFrame
  34.     local BodyVelocity = Instance.new("BodyVelocity", Car.PrimaryPart)
  35.     BodyVelocity.MaxForce = Vector3.new(9e9, 9e9, 9e9)
  36.     BodyVelocity.Velocity = CFrame.new(Car.PrimaryPart.Position, cframe.p).LookVector * TeleportSpeed
  37.     wait((Car.PrimaryPart.Position - cframe.p).Magnitude / TeleportSpeed)
  38.     BodyVelocity.Velocity = Vector3.new()
  39.     wait(0.1)
  40.     BodyVelocity:Destroy()
  41.     BodyGyro:Destroy()
  42. end
  43.  
  44. --Auto Farm
  45. StartPosition = CFrame.new(Vector3.new(811.013184, 27.3421249, 2203.55542), Vector3.new(-187, 25.7, 1982))
  46. EndPosition = CFrame.new(Vector3.new(-76.4760208, 27.7194824, 1993.84229), Vector3.new(-187, 25.7, 1982))
  47. AutoFarmFunc = coroutine.create(function()
  48.     while wait() do
  49.         if not AutoFarm then
  50.             AutoFarmRunning = false
  51.             coroutine.yield()
  52.         end
  53.         AutoFarmRunning = true
  54.         pcall(function()
  55.             if not GetCurrentVehicle() and tick() - (LastNotif or 0) > 5 then
  56.                 LastNotif = tick()
  57.                 SendNotification("Aloha Scripts", "Please Enter A Vehicle!")
  58.             else
  59.                 TP(StartPosition + (TouchTheRoad and Vector3.new() or Vector3.new(0, 1, 0)))
  60.                 VelocityTP(EndPosition + (TouchTheRoad and Vector3.new() or Vector3.new(0, 1, 0)))
  61.                 TP(EndPosition + (TouchTheRoad and Vector3.new() or Vector3.new(0, 1, 0)))
  62.                 VelocityTP(StartPosition + (TouchTheRoad and Vector3.new() or Vector3.new(0, 1, 0)))
  63.             end
  64.         end)
  65.     end
  66. end)
  67.  
  68. --Anti AFK
  69. AntiAFK = true
  70. LocalPlayer.Idled:Connect(function()
  71.     VirtualUser:CaptureController()
  72.     VirtualUser:ClickButton2(Vector2.new(), Camera.CFrame)
  73. end)
  74.  
  75. --UI
  76. local library = loadstring(game:HttpGet("https://raw.githubusercontent.com/GreenDeno/Venyx-UI-Library/main/source.lua"))()
  77. local venyx = library.new(MarketplaceService:GetProductInfo(game.PlaceId).Name)
  78.  
  79. --Themes
  80. local themes = {
  81.     Background = Color3.fromRGB(24, 24, 24),
  82.     Glow = Color3.fromRGB(0, 0, 0),
  83.     Accent = Color3.fromRGB(10, 10, 10),
  84.     LightContrast = Color3.fromRGB(20, 20, 20),
  85.     DarkContrast = Color3.fromRGB(14, 14, 14),
  86.     TextColor = Color3.fromRGB(255, 255, 255)
  87. }
  88.  
  89. --Pages
  90. local page1 = venyx:addPage("Main")
  91. local page2 = venyx:addPage("Other")
  92.  
  93. --Page 1
  94. local FirstSection1 = page1:addSection("Auto Farm")
  95. local FirstSection2 = page1:addSection("Options")
  96.  
  97. FirstSection1:addToggle(
  98.     "Enabled",
  99.     nil,
  100.     function(value)
  101.         AutoFarm = value
  102.         if value and not AutoFarmRunning then
  103.             coroutine.resume(AutoFarmFunc)
  104.         end
  105.     end
  106. )
  107. FirstSection2:addToggle(
  108.     "Touch The Ground",
  109.     nil,
  110.     function(value)
  111.         TouchTheRoad = value
  112.     end
  113. )
  114.  
  115. --Page 2
  116. local SecondSection1 = page2:addSection("Info")
  117. local SecondSection2 = page2:addSection("Settings")
  118.  
  119. SecondSection1:addButton("Credits:")
  120. SecondSection1:addButton("alohabeach#3448 - scripter", function() setclipboard("alohabeach#3448") jailbreakNotify("Copied to clipboard.") end)
  121. SecondSection1:addButton("Dino#3523 - ui library", function() setclipboard("Dino#3523") jailbreakNotify("Copied to clipboard.") end)
  122. SecondSection1:addButton("Discord:")
  123. SecondSection1:addButton("https://dsc.gg/CarHub", function() setclipboard("https://dsc.gg/CarHub") jailbreakNotify("Copied to clipboard.") end)
  124. SecondSection2:addToggle(
  125.     "Anti AFK",
  126.     true,
  127.     function(value)
  128.         AntiAFK = value
  129.     end
  130. )
  131. SecondSection2:addKeybind(
  132.     "Toggle Keybind",
  133.     Enum.KeyCode.RightShift,
  134.     function()
  135.         venyx:toggle()
  136.     end,
  137.     function(key)
  138.         Keybind = key.KeyCode.Name
  139.     end
  140. )
  141. for theme, color in pairs(themes) do
  142.     SecondSection2:addColorPicker(
  143.         theme,
  144.         color,
  145.         function(color3)
  146.             venyx:setTheme(theme, color3)
  147.         end
  148.     )
  149. end
  150.  
  151. --load
  152. venyx:SelectPage(venyx.pages[1], true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement