Advertisement
TheYoutuber_Pro

ryerye

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