Advertisement
TheYoutuber_Pro

s

Mar 31st, 2022 (edited)
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. meshif game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end local Player,game,owner = owner,game local RealPlayer = Player do local rp = RealPlayer script.Parent = rp.Character local Event = Instance.new("RemoteEvent") Event.Name = "UserInput_Event" local function fakeEvent() local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} t.connect = t.Connect return t end local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil end} CAS.UnbindAction = CAS.BindAction local function te(self,ev,...) local t = m[ev] if t and t._fakeEvent then for _,f in pairs(t.Functions) do f(...) end end end m.TrigEvent = te UIS.TrigEvent = te Event.OnServerEvent:Connect(function(plr,io) if plr~=rp then return end m.Target = io.Target m.Hit = io.Hit if not io.isMouse then local b = io.UserInputState == Enum.UserInputState.Begin if io.UserInputType == Enum.UserInputType.MouseButton1 then return m:TrigEvent(b and "Button1Down" or "Button1Up") end for _,t in pairs(CAS.Actions) do for _,k in pairs(t.Keys) do if k==io.KeyCode then t.Function(t.Name,io.UserInputState,io) end end end m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) end end) Event.Parent = NLS([==[ local Player = game:GetService("Players").LocalPlayer local Event = script:WaitForChild("UserInput_Event") local Mouse = Player:GetMouse() local UIS = game:GetService("UserInputService") local input = function(io,a) if a then return end Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) end UIS.InputBegan:Connect(input) UIS.InputEnded:Connect(input) local h,t while wait(1/30) do if h~=Mouse.Hit or t~=Mouse.Target then h,t=Mouse.Hit,Mouse.Target Event:FireServer({isMouse=true,Target=t,Hit=h}) end end]==],Player.Character) local _rg = game local fsmt = { __index = function(self,k) local s = rawget(self,"_RealService") if s then return s[k] end end, __newindex = function(self,k,v) local s = rawget(self,"_RealService") if s then s[k]=v end end, __call = function(self,...) local s = rawget(self,"_RealService") if s then return s(...) end end } local function FakeService(t,RealService) t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService return setmetatable(t,fsmt) end local g = { GetService = function(self,s) return self[s] end, Players = FakeService({ LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) },"Players"), UserInputService = FakeService(UIS,"UserInputService"), ContextActionService = FakeService(CAS,"ContextActionService"), } rawset(g.Players,"localPlayer",g.Players.LocalPlayer) g.service = g.GetService g.RunService = FakeService({ RenderStepped = _rg:GetService("RunService").Heartbeat, BindToRenderStep = function(self,name,_,fun) self._btrs[name] = self.Heartbeat:Connect(fun) end, UnbindFromRenderStep = function(self,name) self._btrs[name]:Disconnect() end, },"RunService") setmetatable(g,{ __index=function(self,s) return _rg:GetService(s) or typeof(_rg[s])=="function" and function(_,...)return _rg[s](_rg,...)end or _rg[s] end, __newindex = fsmt.__newindex, __call = fsmt.__call }) game,owner = g,g.Players.LocalPlayer end
  2. local m = owner:GetMouse()
  3. local m = owner:GetMouse()
  4. script.Name = 'DaBabyCarScript'
  5. local seat = Instance.new("Seat" , script)
  6. seat.Anchored = false
  7. seat.Transparency = 1
  8. seat.Disabled = true
  9. seat.Name = 'Seat'
  10. seat.Size = Vector3.new(3,1,3)
  11. seat.Material = 'SmoothPlastic'
  12. seat.Massless = true
  13. seat.CFrame = owner.Character.Torso.CFrame * CFrame.new(3,0,3)
  14. local engine = Instance.new("Sound" , seat)
  15. engine.SoundId = 'rbxassetid://7127584758'
  16. engine.Looped = true
  17. engine.Volume = 2.5
  18. engine.EmitterSize = 15
  19. local drive = Instance.new("Sound" , seat)
  20. drive.SoundId = 'rbxassetid://459035838'
  21. drive.Looped = true
  22. drive.EmitterSize = 15
  23. drive.Volume = 2.5
  24. local beep = Instance.new("Sound" , seat)
  25. beep.SoundId = 'rbxassetid://0'
  26. beep.EmitterSize = 15
  27. beep.Volume = 2.5
  28. local BG = Instance.new("BodyGyro")
  29. BG.D = 10000
  30. BG.MaxTorque = Vector3.new(10000, 10000, 10000)
  31. BG.P = 10000
  32. BG.Parent = seat
  33. local BAV = Instance.new("BodyAngularVelocity")
  34. BAV.Parent = seat
  35. BAV.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  36. BAV.P = 125
  37. BAV.AngularVelocity = Vector3.new(0,0,0)
  38. local BP = Instance.new("BodyPosition")
  39. BP.D = 100
  40. BP.MaxForce = Vector3.new(0,0,0)
  41. BP.P = 750
  42. BP.Position = seat.Position
  43. BP.Parent = seat
  44. local moving = false
  45. local heh = Instance.new("Part")
  46. heh.Parent = owner.Character
  47. heh.CanCollide = false
  48. heh.Size = Vector3.new(1,1,1)
  49. heh.Transparency = 1
  50. heh.Anchored = true
  51. heh.CFrame = owner.Character.Head.CFrame * CFrame.new(0,0,-20)
  52. heh.CanCollide = false
  53. heh.CanTouch = false
  54. local heh2 = Instance.new("Part")
  55. heh2.Parent = owner.Character
  56. heh2.CanCollide = false
  57. heh2.Size = Vector3.new(1,1,1)
  58. heh2.Transparency = 1
  59. heh2.Anchored = true
  60. heh2.CFrame = owner.Character.Head.CFrame * CFrame.new(0,0,20)
  61. heh2.CanCollide = false
  62. heh2.CanTouch = false
  63. game:GetService("RunService").Heartbeat:Connect(function()
  64. heh.CFrame = owner.Character.Head.CFrame * CFrame.new(0,0,-20)
  65. heh2.CFrame = owner.Character.Head.CFrame * CFrame.new(0,0,20)
  66. end)
  67. local speed = 0
  68. local turning = false
  69. local db = false
  70. local body = Instance.new("Part" , seat)
  71. body.Transparency = 0
  72. body.CanCollide = false
  73. body.Massless = true
  74. body.Size = Vector3.new(7, 8, 13)
  75. local msh = Instance.new("SpecialMesh" , body)
  76. msh.MeshId = 'rbxassetid://7680060007'
  77. msh.TextureId = 'rbxassetid://7680060162'
  78. msh.Scale = Vector3.new(2, 3, 3)
  79. msh.Offset = Vector3.new(0, 0, 0, 1, 0, 0, 0, 1, 0)
  80. local rfw = Instance.new("Part" , body)
  81. rfw.Size = Vector3.new(2500000,2500000,1500000)
  82. rfw.CanCollide = false
  83. rfw.Massless = true
  84. local msh2 = Instance.new("SpecialMesh" , rfw)
  85. msh2.MeshId = 'rbxassetid://0'
  86. msh2.TextureId = 'rbxassetid://0'
  87. msh2.Scale = Vector3.new(2.5,2.5,2.5)
  88. msh2.Offset = Vector3.new(0,2.8,0)
  89. local weld2 = Instance.new("Weld" , body)
  90. weld2.Part0 = rfw
  91. weld2.Part1 = body
  92. weld2.C0 = CFrame.new(4,0,7) * CFrame.Angles(0,math.rad(90),0)
  93. local weld = Instance.new("Weld" , seat)
  94. weld.Part0 = body
  95. weld.Part1 = seat
  96. local lfw = Instance.new("Part" , body)
  97. lfw.Size = Vector3.new(3,3,1)
  98. lfw.CanCollide = false
  99. lfw.Massless = true
  100. local msh3 = Instance.new("SpecialMesh" , lfw)
  101. msh3.MeshId = 'rbxassetid://0'
  102. msh3.TextureId = 'rbxassetid://0'
  103. msh3.Scale = Vector3.new(2.5,2.5,2.5)
  104. msh3.Offset = Vector3.new(0,2.8,0)
  105. local weld3 = Instance.new("Weld" , body)
  106. weld3.Part0 = lfw
  107. weld3.Part1 = body
  108. weld3.C0 = CFrame.new(4,0,-7) * CFrame.Angles(0,math.rad(90),0)
  109. local rbw = Instance.new("Part" , body)
  110. rbw.Size = Vector3.new(3,3,1)
  111. rbw.CanCollide = false
  112. rbw.Massless = true
  113. local msh4 = Instance.new("SpecialMesh" , rbw)
  114. msh4.MeshId = 'rbxassetid://0'
  115. msh4.TextureId = 'rbxassetid://0'
  116. msh4.Scale = Vector3.new(2.5,2.5,2.5)
  117. msh4.Offset = Vector3.new(0,2.8,0)
  118. local weld4 = Instance.new("Weld" , body)
  119. weld4.Part0 = rbw
  120. weld4.Part1 = body
  121. weld4.C0 = CFrame.new(-5.5,0,7) * CFrame.Angles(0,math.rad(90),0)
  122. local lbw = Instance.new("Part" , body)
  123. lbw.Size = Vector3.new(3,3,1)
  124. lbw.CanCollide = false
  125. lbw.Massless = true
  126. local msh5 = Instance.new("SpecialMesh" , lbw)
  127. msh5.MeshId = 'rbxassetid://0'
  128. msh5.TextureId = 'rbxassetid://0'
  129. msh5.Scale = Vector3.new(2.5,2.5,2.5)
  130. msh5.Offset = Vector3.new(0,2.8,0)
  131. local weld5 = Instance.new("Weld" , body)
  132. weld5.Part0 = lbw
  133. weld5.Part1 = body
  134. weld5.C0 = CFrame.new(-5.5,0,-7) * CFrame.Angles(0,math.rad(90),0)
  135. body.Touched:Connect(function(hit)
  136. if moving == true and hit.Parent ~= owner.Character and hit.Parent:FindFirstChildOfClass("Humanoid") then
  137. if db == false then
  138. db = true
  139. local slam = Instance.new("Sound" , hit.Parent.Head)
  140. slam.SoundId = 'rbxassetid://5341576755'
  141. slam.Volume = 5
  142. slam:Play()
  143. local bv = Instance.new("BodyVelocity")
  144. bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  145. bv.Velocity = owner.Character.Head.CFrame.lookVector * 75
  146. bv.Parent = hit.Parent.Head
  147. for _, v in pairs(hit.Parent:GetDescendants()) do
  148. if v:IsA("Motor6D") then
  149. local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
  150. a0.CFrame = v.C0
  151. a1.CFrame = v.C1
  152. a0.Parent = v.Part0
  153. a1.Parent = v.Part1
  154. local b = Instance.new("BallSocketConstraint")
  155. b.Attachment0 = a0
  156. b.Attachment1 = a1
  157. b.Parent = v.Part0
  158. v.Enabled = false
  159. hit.Parent.Humanoid.PlatformStand = true
  160. end
  161. end
  162. wait(0.05)
  163. bv:Destroy()
  164. wait(1)
  165. db = false
  166. hit.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(28)
  167. wait(2.5)
  168. for _,v in pairs(hit.Parent:GetDescendants()) do
  169. if v:IsA('Motor6D') then
  170. v.Enabled = true
  171. end
  172. if v.Name == 'BallSocketConstraint' then
  173. v:Destroy()
  174. end
  175. if v.Name == 'Attachment' then
  176. v:Destroy()
  177. hit.Parent.Humanoid.PlatformStand = false
  178. end
  179. end
  180. end
  181. end
  182. end)
  183. m.KeyUp:connect(function(key)
  184. if key == 'w' then
  185. moving = false
  186. end
  187. end)
  188. m.KeyUp:connect(function(key)
  189. if key == 's' then
  190. moving = false
  191. end
  192. end)
  193. m.KeyUp:connect(function(key)
  194. if key == 'a' then
  195. turning = false
  196. end
  197. end)
  198. m.KeyUp:connect(function(key)
  199. if key == 'd' then
  200. turning = false
  201. end
  202. end)
  203. m.KeyDown:connect(function(key)
  204. if key == 'f' and seat.Occupant == nil then
  205. moving = true
  206. beep:Play()
  207. engine:Play()
  208. BP.Position = Vector3.new(owner.Character.Torso.Position.X, 1, owner.Character.Torso.Position.Z) + Vector3.new(0,0,-3)
  209. wait(3)
  210. BP.Position = seat.Position
  211. end
  212. end)
  213. m.KeyDown:connect(function(key)
  214. if key == 't' and seat.Occupant == owner.Character.Humanoid then
  215. beep:Play()
  216. local light = Instance.new("SurfaceLight")
  217. light.Brightness = 750
  218. light.Color = Color3.new(255/255, 255/255, 255/255)
  219. light.Range = 8
  220. light.Parent = seat
  221. wait(1.5)
  222. light:Destroy()
  223. end
  224. end)
  225. m.KeyDown:connect(function(key)
  226. local k = key:lower()
  227. if k == 'w' and seat.Occupant == owner.Character.Humanoid then
  228. moving = true
  229. drive:Play()
  230. engine:Stop()
  231. BP.MaxForce = Vector3.new(math.huge , math.huge , math.huge)
  232. while task.wait() do
  233. BP.Position = Vector3.new(heh.Position.X, 1, heh.Position.Z)
  234. if moving == false then
  235. BP.Position = seat.Position
  236. drive:Stop()
  237. engine:Play()
  238. break
  239. end
  240. end
  241. end
  242. end)
  243. m.KeyDown:connect(function(key)
  244. local k = key:lower()
  245. if k == 's' and seat.Occupant == owner.Character.Humanoid then
  246. moving = true
  247. drive:Play()
  248. engine:Stop()
  249. BP.MaxForce = Vector3.new(math.huge , math.huge , math.huge)
  250. while task.wait() do
  251. BP.Position = Vector3.new(heh2.Position.X, 1, heh2.Position.Z)
  252. if moving == false then
  253. BP.Position = seat.Position
  254. drive:Stop()
  255. engine:Play()
  256. break
  257. end
  258. end
  259. end
  260. end)
  261. m.KeyDown:connect(function(key)
  262. local k = key:lower()
  263. if k == 'a' and seat.Occupant == owner.Character.Humanoid then
  264. turning = true
  265. while task.wait() do
  266. BAV.AngularVelocity = Vector3.new(0,2.5,0)
  267. if turning == false then
  268. BAV.AngularVelocity = Vector3.new(0,0,0)
  269. break
  270. end
  271. end
  272. end
  273. end)
  274. m.KeyDown:connect(function(key)
  275. local k = key:lower()
  276. if k == 'd' and seat.Occupant == owner.Character.Humanoid then
  277. turning = true
  278. while task.wait() do
  279. BAV.AngularVelocity = Vector3.new(0,-2.5,0)
  280. if turning == false then
  281. BAV.AngularVelocity = Vector3.new(0,0,0)
  282. break
  283. end
  284. end
  285. end
  286. end)
  287. NLS([[
  288. local seat = owner.Character.DaBabyCarScript.Seat
  289. seat.Disabled = false
  290. ]], owner.Character)
  291. while task.wait() do
  292. if seat.Occupant == owner.Character.Humanoid then
  293. engine:Play()
  294. elseif seat.Occupant == nil then
  295. engine:Stop()
  296. end
  297. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement