BobMe

Lilscoot

Apr 28th, 2022 (edited)
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.58 KB | None | 0 0
  1. local cf = owner.Character.Head.CFrame * CFrame.new(0,0,-3)
  2.  
  3. Folder0 = Instance.new("Folder")
  4. Base = Instance.new("Part")
  5. BackL = Instance.new("Part")
  6. HingeConstraint3 = Instance.new("HingeConstraint")
  7. FrontL = Instance.new("Part")
  8. HingeConstraint5 = Instance.new("HingeConstraint")
  9. BackR = Instance.new("Part")
  10. HingeConstraint7 = Instance.new("HingeConstraint")
  11. FrontR = Instance.new("Part")
  12. HingeConstraint9 = Instance.new("HingeConstraint")
  13. TurnRight = Instance.new("Part")
  14. HingeConstraint11 = Instance.new("HingeConstraint")
  15. TurnLeft = Instance.new("Part")
  16. HingeConstraint14 = Instance.new("HingeConstraint")
  17. BackSus1 = Instance.new("Part")
  18. WeldConstraint17 = Instance.new("WeldConstraint")
  19. BackSus2 = Instance.new("Part")
  20. WeldConstraint20 = Instance.new("WeldConstraint")
  21.  
  22. local baseattach0 = Instance.new("Attachment",Base)
  23. local baseattach1 = Instance.new("Attachment",Base)
  24. local backlattach = Instance.new("Attachment",BackL)
  25. local sus1attach1 = Instance.new("Attachment",BackSus1)
  26. local sus1attach2 = Instance.new("Attachment",BackSus1)
  27. local turnrightattach1 = Instance.new("Attachment",TurnRight)
  28. local turnrightattach2 = Instance.new("Attachment",TurnRight)
  29. local turnrightattach3 = Instance.new("Attachment",TurnRight)
  30. local turnleftattach1 = Instance.new("Attachment",TurnLeft)
  31. local turnleftattach2 = Instance.new("Attachment",TurnLeft)
  32. local turnleftattach3 = Instance.new("Attachment",TurnLeft)
  33. local frontlattach = Instance.new("Attachment",FrontL)
  34. local backrattach = Instance.new("Attachment",BackR)
  35. local frontrattach = Instance.new("Attachment",FrontR)
  36. local sus2attach1 = Instance.new("Attachment",BackSus2)
  37. local sus2attach2 = Instance.new("Attachment",BackSus2)
  38.  
  39. baseattach0.Orientation = Vector3.new(0, 0, 90)
  40. baseattach0.Position = Vector3.new(0.375, 0.125, 0.125)
  41. baseattach1.Orientation = Vector3.new(0, 0, 90)
  42. baseattach1.Position = Vector3.new(0.375, 0.125, -0.125)
  43. backlattach.Orientation = Vector3.new(0, 0, 0)
  44. backlattach.Position = Vector3.new(0.125, 0, 0)
  45. sus1attach1.Orientation = Vector3.new(0, 90, 90)
  46. sus1attach1.Position = Vector3.new(0, 0.375, 0)
  47. sus1attach2.Orientation = Vector3.new(0, 90, 0)
  48. sus1attach2.Position = Vector3.new(0, 0, 0.125)
  49. turnrightattach1.Orientation = Vector3.new(0, -90, 90)
  50. turnrightattach1.Position = Vector3.new(0, 0.375, 0)
  51. turnrightattach2.Orientation = Vector3.new(0, 0, 90)
  52. turnrightattach2.Position = Vector3.new(0, 0.125, 0)
  53. turnrightattach3.Orientation = Vector3.new(0, 90, 0)
  54. turnrightattach3.Position = Vector3.new(0, 0, 0.125)
  55. turnleftattach1.Orientation = Vector3.new(0, 90, 90)
  56. turnleftattach1.Position = Vector3.new(0, 0.375, 0)
  57. turnleftattach2.Orientation = Vector3.new(0, 0, 90)
  58. turnleftattach2.Position = Vector3.new(0, 0.125, 0)
  59. turnleftattach3.Orientation = Vector3.new(0, -90, 0)
  60. turnleftattach3.Position = Vector3.new(0, 0, -0.125)
  61. frontlattach.Orientation = Vector3.new(0, 0, 0)
  62. frontlattach.Position = Vector3.new(0.125, 0, 0)
  63. backrattach.Orientation = Vector3.new(0, 180, 0)
  64. backrattach.Position = Vector3.new(-0.125, 0, 0)
  65. frontrattach.Orientation = Vector3.new(0, 180, 0)
  66. frontrattach.Position = Vector3.new(-0.125, 0, 0)
  67. sus2attach1.Orientation = Vector3.new(0, 90, 90)
  68. sus2attach1.Position = Vector3.new(0, 0.375, 0)
  69. sus2attach2.Orientation = Vector3.new(0, -90, 0)
  70. sus2attach2.Position = Vector3.new(0, 0, -0.125)
  71.  
  72. Folder0.Name = "LilScoot"..owner.Name
  73. Folder0.Parent = script
  74. Base.Name = "Base"
  75. Base.Parent = Folder0
  76. Base.CFrame = cf
  77. Base.Color = Color3.new(0.780392, 0.67451, 0.470588)
  78. Base.Size = Vector3.new(1, 0.25, 0.5)
  79. Base.BottomSurface = Enum.SurfaceType.Smooth
  80. Base.CanCollide = false
  81. Base.Material = Enum.Material.Wood
  82. Base.TopSurface = Enum.SurfaceType.Smooth
  83. BackL.Name = "BackL"
  84. BackL.Parent = Folder0
  85. BackL.CFrame = cf * CFrame.new(-0.375, 0, -0.375, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  86. BackL.Orientation = Vector3.new(0, -90, 0)
  87. BackL.Color = Color3.new(0.105882, 0.164706, 0.207843)
  88. BackL.Size = Vector3.new(0.25, 0.5, 0.5)
  89. BackL.BottomSurface = Enum.SurfaceType.Smooth
  90. BackL.Material = Enum.Material.Slate
  91. BackL.TopSurface = Enum.SurfaceType.Smooth
  92. BackL.Shape = Enum.PartType.Cylinder
  93. BackL.CustomPhysicalProperties = PhysicalProperties.new(2.691,0.2,0,200,99999)
  94. HingeConstraint3.Parent = BackL
  95. HingeConstraint3.Attachment0 = backlattach
  96. HingeConstraint3.Attachment1 = sus2attach2
  97. HingeConstraint3.ActuatorType = Enum.ActuatorType.Motor
  98. HingeConstraint3.MotorMaxTorque = 100000
  99. FrontL.Name = "FrontL"
  100. FrontL.Parent = Folder0
  101. FrontL.CFrame = cf * CFrame.new(0.375, 0, -0.375, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  102. FrontL.Orientation = Vector3.new(0, -90, 0)
  103. FrontL.Color = Color3.new(0.105882, 0.164706, 0.207843)
  104. FrontL.Size = Vector3.new(0.25, 0.5, 0.5)
  105. FrontL.BottomSurface = Enum.SurfaceType.Smooth
  106. FrontL.Material = Enum.Material.Slate
  107. FrontL.TopSurface = Enum.SurfaceType.Smooth
  108. FrontL.Shape = Enum.PartType.Cylinder
  109. FrontL.CustomPhysicalProperties = PhysicalProperties.new(2.691,0.2,0,200,99999)
  110. HingeConstraint5.Parent = FrontL
  111. HingeConstraint5.Attachment0 = frontlattach
  112. HingeConstraint5.Attachment1 = turnleftattach3
  113. HingeConstraint5.ActuatorType = Enum.ActuatorType.Motor
  114. HingeConstraint5.MotorMaxTorque = 100000
  115. BackR.Name = "BackR"
  116. BackR.Parent = Folder0
  117. BackR.CFrame = cf * CFrame.new(-0.375, 0, 0.375, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  118. BackR.Orientation = Vector3.new(0, -90, 0)
  119. BackR.Color = Color3.new(0.105882, 0.164706, 0.207843)
  120. BackR.Size = Vector3.new(0.25, 0.5, 0.5)
  121. BackR.BottomSurface = Enum.SurfaceType.Smooth
  122. BackR.Material = Enum.Material.Slate
  123. BackR.TopSurface = Enum.SurfaceType.Smooth
  124. BackR.Shape = Enum.PartType.Cylinder
  125. BackR.CustomPhysicalProperties = PhysicalProperties.new(2.691,0.2,0,200,99999)
  126. HingeConstraint7.Parent = BackR
  127. HingeConstraint7.Attachment0 = backrattach
  128. HingeConstraint7.Attachment1 = sus1attach2
  129. HingeConstraint7.ActuatorType = Enum.ActuatorType.Motor
  130. HingeConstraint7.MotorMaxTorque = 100000
  131. FrontR.Name = "FrontR"
  132. FrontR.Parent = Folder0
  133. FrontR.CFrame = cf * CFrame.new(0.375, 0, 0.375, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  134. FrontR.Orientation = Vector3.new(0, -90, 0)
  135. FrontR.Color = Color3.new(0.105882, 0.164706, 0.207843)
  136. FrontR.Size = Vector3.new(0.25, 0.5, 0.5)
  137. FrontR.BottomSurface = Enum.SurfaceType.Smooth
  138. FrontR.Material = Enum.Material.Slate
  139. FrontR.TopSurface = Enum.SurfaceType.Smooth
  140. FrontR.Shape = Enum.PartType.Cylinder
  141. FrontR.CustomPhysicalProperties = PhysicalProperties.new(2.691,0.2,0,200,99999)
  142. HingeConstraint9.Parent = FrontR
  143. HingeConstraint9.Attachment0 = frontrattach
  144. HingeConstraint9.Attachment1 = turnrightattach3
  145. HingeConstraint9.ActuatorType = Enum.ActuatorType.Motor
  146. HingeConstraint9.MotorMaxTorque = 100000
  147. TurnRight.Name = "TurnRight"
  148. TurnRight.Parent = Folder0
  149. TurnRight.CFrame = cf * CFrame.new(0.375, 0, 0.125, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  150. TurnRight.Transparency = 1
  151. TurnRight.Size = Vector3.new(0.25, 0.25, 0.25)
  152. TurnRight.BottomSurface = Enum.SurfaceType.Smooth
  153. TurnRight.CanCollide = false
  154. TurnRight.Material = Enum.Material.Metal
  155. TurnRight.TopSurface = Enum.SurfaceType.Smooth
  156. HingeConstraint11.Parent = TurnRight
  157. HingeConstraint11.Attachment0 = turnrightattach2
  158. HingeConstraint11.Attachment1 = baseattach0
  159. HingeConstraint11.ActuatorType = Enum.ActuatorType.Servo
  160. HingeConstraint11.AngularSpeed = 5
  161. HingeConstraint11.ServoMaxTorque = 100000
  162. HingeConstraint11.TargetAngle = 45
  163. TurnLeft.Name = "TurnLeft"
  164. TurnLeft.Parent = Folder0
  165. TurnLeft.CFrame = cf * CFrame.new(0.375, 0, -0.125, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  166. TurnLeft.Transparency = 1
  167. TurnLeft.Size = Vector3.new(0.25, 0.25, 0.25)
  168. TurnLeft.BottomSurface = Enum.SurfaceType.Smooth
  169. TurnLeft.CanCollide = false
  170. TurnLeft.Material = Enum.Material.Metal
  171. TurnLeft.TopSurface = Enum.SurfaceType.Smooth
  172. HingeConstraint14.Parent = TurnLeft
  173. HingeConstraint14.Attachment0 = turnleftattach2
  174. HingeConstraint14.Attachment1 = baseattach1
  175. HingeConstraint14.ActuatorType = Enum.ActuatorType.Servo
  176. HingeConstraint14.AngularSpeed = 5
  177. HingeConstraint14.ServoMaxTorque = 100000
  178. BackSus1.Name = "BackSus"
  179. BackSus1.Parent = Folder0
  180. BackSus1.CFrame = cf * CFrame.new(-0.375, 0, 0.125, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  181. BackSus1.Transparency = 1
  182. BackSus1.Size = Vector3.new(0.25, 0.25, 0.25)
  183. BackSus1.BottomSurface = Enum.SurfaceType.Smooth
  184. BackSus1.CanCollide = false
  185. BackSus1.Material = Enum.Material.Metal
  186. BackSus1.TopSurface = Enum.SurfaceType.Smooth
  187. WeldConstraint17.Parent = BackSus1
  188. WeldConstraint17.Part0 = BackSus1
  189. WeldConstraint17.Part1 = Base
  190. BackSus2.Name = "BackSus"
  191. BackSus2.Parent = Folder0
  192. BackSus2.CFrame = cf * CFrame.new(-0.375, 0, -0.125, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  193. BackSus2.Transparency = 1
  194. BackSus2.Size = Vector3.new(0.25, 0.25, 0.25)
  195. BackSus2.BottomSurface = Enum.SurfaceType.Smooth
  196. BackSus2.CanCollide = false
  197. BackSus2.Material = Enum.Material.Metal
  198. BackSus2.TopSurface = Enum.SurfaceType.Smooth
  199. WeldConstraint20.Parent = BackSus2
  200. WeldConstraint20.Part0 = BackSus2
  201. WeldConstraint20.Part1 = Base
  202.  
  203. local lilscoot = Folder0
  204.  
  205. --[[for i,v in pairs(lilscoot:GetChildren()) do
  206. if v.ClassName == "Part" then
  207. v.Anchored = true
  208. end
  209. end]]
  210. local maxspeed = Instance.new("NumberValue",lilscoot)
  211. local currentspeed = Instance.new("NumberValue",lilscoot)
  212. local currentdirection = Instance.new("NumberValue",lilscoot)
  213. local ts = game:GetService("TweenService")
  214. local zooming = false
  215.  
  216. local sound = Instance.new("Sound",Base)
  217. sound.Volume = 0
  218. sound.SoundId = "rbxassetid://9063266198"
  219. sound.Looped = true
  220. sound.RollOffMinDistance = 1
  221. sound.RollOffMaxDistance = 150
  222. sound:Play()
  223. local sound2 = Instance.new("Sound",Base)
  224. sound2.Volume = 1
  225. sound2.PlaybackSpeed = 2
  226. sound2.SoundId = "rbxassetid://8916893206"
  227. sound2.Looped = true
  228. sound2.RollOffMinDistance = 1
  229. sound2.RollOffMaxDistance = 150
  230. sound2:Play()
  231. local sound3 = Instance.new("Sound",Base)
  232. sound3.Volume = 1
  233. sound3.PlaybackSpeed = 2
  234. sound3.SoundId = "rbxassetid://5945905639"
  235. sound3.RollOffMinDistance = 3
  236. sound3.RollOffMaxDistance = 300
  237.  
  238. local accelleration = 1
  239. local decelleration = 5
  240.  
  241. owner.Chatted:Connect(function(msg)
  242. local spl = string.split(msg,"/")
  243. if spl[1] == "lilscoot" then
  244. if spl[2] == "setspeed" then
  245. local num = tonumber(spl[3])
  246. if num ~= nil then
  247. maxspeed.Value = num
  248. end
  249. elseif spl[2] == "setaccelleration" then
  250. local num = tonumber(spl[3])
  251. if num ~= nil then
  252. accelleration = num
  253. end
  254. elseif spl[2] == "setdecelleration" then
  255. local num = tonumber(spl[3])
  256. if num ~= nil then
  257. decelleration = num
  258. end
  259. end
  260. end
  261. end)
  262.  
  263. maxspeed.Value = 70
  264.  
  265. maxspeed.Name = "MaxSpeed"
  266. currentspeed.Name = "CurrentSpeed"
  267. currentdirection.Name = "CurrentDirection"
  268.  
  269. local remote = owner:FindFirstChild("wtfbrolol6")
  270. if remote == nil then
  271. remote = Instance.new("RemoteEvent",owner)
  272. end
  273. remote.Name = "wtfbrolol6"
  274. remote.OnServerEvent:Connect(function(plr,key)
  275. if plr == owner then
  276. if key == "StartW" then
  277. ts:Create(currentspeed,TweenInfo.new(accelleration,Enum.EasingStyle.Linear),{Value = maxspeed.Value}):Play()
  278. elseif key == "EndW" then
  279. ts:Create(currentspeed,TweenInfo.new(decelleration,Enum.EasingStyle.Linear),{Value = 0}):Play()
  280. elseif key == "StartS" then
  281. ts:Create(currentspeed,TweenInfo.new(accelleration,Enum.EasingStyle.Linear),{Value = -maxspeed.Value}):Play()
  282. elseif key == "EndS" then
  283. ts:Create(currentspeed,TweenInfo.new(decelleration,Enum.EasingStyle.Linear),{Value = 0}):Play()
  284. elseif key == "StartA" then
  285. ts:Create(currentdirection,TweenInfo.new(0.25,Enum.EasingStyle.Linear),{Value = -30}):Play()
  286. elseif key == "EndA" then
  287. ts:Create(currentdirection,TweenInfo.new(0.125,Enum.EasingStyle.Linear),{Value = 0}):Play()
  288. elseif key == "StartD" then
  289. ts:Create(currentdirection,TweenInfo.new(0.25,Enum.EasingStyle.Linear),{Value = 30}):Play()
  290. elseif key == "EndD" then
  291. ts:Create(currentdirection,TweenInfo.new(0.125,Enum.EasingStyle.Linear),{Value = 0}):Play()
  292. elseif key == "honk" then
  293. sound3:Play()
  294. end
  295. end
  296. end)
  297.  
  298. local s = Instance.new("ScreenGui",owner.PlayerGui)
  299. s.ResetOnSpawn = false
  300.  
  301. wait(0.25)
  302.  
  303. NLS([[script.Parent = game.Players.LocalPlayer.PlayerScripts
  304. local locked = false
  305.  
  306. local cam = workspace.CurrentCamera
  307. cam.CameraType = Enum.CameraType.Scriptable
  308.  
  309. -- Instances:
  310.  
  311. local ScreenGui = Instance.new("ScreenGui")
  312. local Frame = Instance.new("Frame")
  313.  
  314. --Properties:
  315.  
  316. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  317. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  318. ScreenGui.ResetOnSpawn = false
  319.  
  320. Frame.Parent = ScreenGui
  321. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  322. Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  323. Frame.Position = UDim2.new(0.5, 0, 0.5, 0)
  324. Frame.Size = UDim2.new(1.5, 0, 1.5, 0)
  325. Frame.BackgroundTransparency = 1
  326.  
  327. local runService = game:GetService("RunService")
  328. local userInputService = game:GetService("UserInputService")
  329. local camerasubject = nil
  330. local deltaa = Vector2.new(0,0)
  331. local zoom = 10
  332. local sens = 0.0125
  333. local scale = 1
  334. local firstperson = false
  335. local zoomed = false
  336. local subtraction = 0.25
  337. local cameraactive = true
  338. local ts = game:GetService("TweenService")
  339. local walkspeed = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed
  340.  
  341. for i,v in pairs(workspace:GetChildren()) do
  342. if v.ClassName == "Script" and v:FindFirstChild("LilScoot"..owner.Name) ~= nil then
  343. camerasubject = v:FindFirstChild("LilScoot"..owner.Name).Base
  344. break
  345. end
  346. end
  347.  
  348. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
  349. ts:Create(Frame,TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{BackgroundTransparency = 0}):Play()
  350. wait(.5)
  351. if cameraactive then
  352. local sound = Instance.new("Sound",workspace)
  353. sound.Volume = 1
  354. sound.SoundId = "rbxassetid://9068813222"
  355. sound.Looped = true
  356. sound.PlayOnRemove = true
  357. local sound2 = Instance.new("Sound",workspace)
  358. sound2.Volume = 1.5
  359. sound2.PlaybackSpeed = 1
  360. sound2.SoundId = "rbxassetid://376178316"
  361. sound2.Looped = true
  362. sound2.PlayOnRemove = true
  363. sound:Destroy()
  364. sound2:Destroy()
  365. cam.CameraType = Enum.CameraType.Scriptable
  366. else
  367. cam.CameraType = Enum.CameraType.Custom
  368. cam.CameraType = game.Players.LocalPlayer.Character.Humanoid
  369. end
  370. ts:Create(Frame,TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.In),{BackgroundTransparency = 1}):Play()
  371.  
  372. local Search
  373. function Search(Parent, Function)
  374. for Index, Object in next, Parent:children() do
  375. pcall(function()
  376. Function(Object)
  377. end)
  378. Search(Object, Function)
  379. end
  380. end
  381.  
  382. function showchar(char)
  383. coroutine.resume(coroutine.create(function()
  384. local Character = char
  385. Search(Character, function(Object)
  386. if (Object:IsA'BasePart' or Object:IsA'Decal') and Object.Name ~='HumanoidRootPart' then
  387. Object.Transparency = 0
  388. end
  389. end)
  390. end))
  391. end
  392.  
  393. function hidechar(char)
  394. coroutine.resume(coroutine.create(function()
  395. local Character = char
  396. Search(Character, function(Object)
  397. if (Object:IsA'BasePart' or Object:IsA'Decal') and Object.Name ~='HumanoidRootPart' then
  398. Object.Transparency = 1
  399. end
  400. end)
  401. end))
  402. end
  403.  
  404. local function OnRenderStep()
  405. if cameraactive then
  406. if zoom > 0.65 then
  407. local delta = userInputService:GetMouseDelta()
  408. cam.CFrame = CFrame.new(camerasubject.Position + Vector3.new(0,subtraction,0))
  409. delta = Vector2.new((delta.X*sens),(delta.Y*sens))
  410. deltaa = deltaa + (delta*Vector2.new(-1,-1))
  411. cam.CFrame = cam.CFrame * CFrame.Angles(0,deltaa.X,0) * CFrame.Angles(deltaa.Y,0,0) * CFrame.new(0,0,(zoom * (scale/1)))
  412. else
  413. local delta = userInputService:GetMouseDelta()
  414. cam.CFrame = CFrame.new(camerasubject.Position + Vector3.new(0,subtraction,0))
  415. delta = Vector2.new((delta.X*sens),(delta.Y*sens))
  416. deltaa = deltaa + (delta*Vector2.new(-1,-1))
  417. cam.CFrame = cam.CFrame * CFrame.Angles(0,deltaa.X,0) * CFrame.Angles(deltaa.Y,0,0)
  418. end
  419. end
  420. end
  421.  
  422. runService:BindToRenderStep("MeasureMouseMovement", Enum.RenderPriority.Input.Value, OnRenderStep)
  423. -- CAR SCRIPT
  424. local gravity = 50
  425. local remote = game.Players.LocalPlayer:WaitForChild("wtfbrolol6")
  426.  
  427. userInputService.InputBegan:Connect(function(input, gameProcessed)
  428. if input.UserInputType == Enum.UserInputType.MouseButton2 and not gameProcessed and zoom > 0.65 and cameraactive then
  429. userInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
  430. elseif input.UserInputType == Enum.UserInputType.Keyboard and not gameProcessed then
  431. if input.KeyCode == Enum.KeyCode.Z and firstperson then
  432. workspace.CurrentCamera.FieldOfView = 10
  433. sens = 0.0125/10
  434. zoomed = true
  435. elseif input.KeyCode == Enum.KeyCode.W and cameraactive then
  436. remote:FireServer("StartW")
  437. elseif input.KeyCode == Enum.KeyCode.S and cameraactive then
  438. remote:FireServer("StartS")
  439. elseif input.KeyCode == Enum.KeyCode.A and cameraactive then
  440. remote:FireServer("StartA")
  441. elseif input.KeyCode == Enum.KeyCode.D and cameraactive then
  442. remote:FireServer("StartD")
  443. end
  444. end
  445. end)
  446.  
  447. userInputService.InputEnded:Connect(function(input, gameProcessed)
  448. if input.UserInputType == Enum.UserInputType.MouseButton2 and not gameProcessed and zoom > 0.65 and cameraactive then
  449. userInputService.MouseBehavior = Enum.MouseBehavior.Default
  450. elseif input.UserInputType == Enum.UserInputType.Keyboard and not gameProcessed then
  451. if input.KeyCode == Enum.KeyCode.Z and zoomed then
  452. workspace.CurrentCamera.FieldOfView = 70
  453. sens = 0.0125
  454. zoomed = false
  455. elseif input.KeyCode == Enum.KeyCode.W and cameraactive then
  456. remote:FireServer("EndW")
  457. elseif input.KeyCode == Enum.KeyCode.S and cameraactive then
  458. remote:FireServer("EndS")
  459. elseif input.KeyCode == Enum.KeyCode.A and cameraactive then
  460. remote:FireServer("EndA")
  461. elseif input.KeyCode == Enum.KeyCode.D and cameraactive then
  462. remote:FireServer("EndD")
  463. elseif input.KeyCode == Enum.KeyCode.F and cameraactive then
  464. remote:FireServer("honk")
  465. elseif input.KeyCode == Enum.KeyCode.F5 then
  466. ts:Create(Frame,TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out),{BackgroundTransparency = 0}):Play()
  467. wait(.5)
  468. cameraactive = not cameraactive
  469. if cameraactive then
  470. local sound = Instance.new("Sound",workspace)
  471. sound.Volume = 1
  472. sound.SoundId = "rbxassetid://9068813222"
  473. sound.Looped = true
  474. sound.PlayOnRemove = true
  475. local sound2 = Instance.new("Sound",workspace)
  476. sound2.Volume = 1.5
  477. sound2.PlaybackSpeed = 1
  478. sound2.SoundId = "rbxassetid://376178316"
  479. sound2.Looped = true
  480. sound2.PlayOnRemove = true
  481. sound:Destroy()
  482. sound2:Destroy()
  483. cam.CameraType = Enum.CameraType.Scriptable
  484. walkspeed = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed
  485. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
  486. else
  487. cam.CameraType = Enum.CameraType.Custom
  488. cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  489. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = walkspeed
  490. end
  491. ts:Create(Frame,TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.In),{BackgroundTransparency = 1}):Play()
  492. end
  493. end
  494. end)
  495.  
  496. -- END OF CAR SCRIPT
  497.  
  498.  
  499.  
  500. userInputService.InputChanged:Connect(function(input, gameProcessed)
  501. if input.UserInputType == Enum.UserInputType.MouseWheel and cameraactive then
  502. if not zoomed then
  503. if zoom + (input.Position.Z * -1 * (zoom/7)) >= 0 then
  504. if zoom > 0.65 or input.Position.Z == -1 then
  505. zoom = zoom + input.Position.Z * -1 * (zoom/7)
  506. end
  507. end
  508. else
  509. workspace.CurrentCamera.FieldOfView = workspace.CurrentCamera.FieldOfView + ((input.Position.Z*-1)/2)
  510. sens = (workspace.CurrentCamera.FieldOfView/10) * (0.0125/10)
  511. end
  512. end
  513. end)]],s)
  514.  
  515. --coroutine.resume(coroutine.create(function()
  516. while wait() do
  517. lilscoot.FrontL.HingeConstraint.AngularVelocity = currentspeed.Value
  518. lilscoot.BackL.HingeConstraint.AngularVelocity = currentspeed.Value
  519. lilscoot.FrontR.HingeConstraint.AngularVelocity = -currentspeed.Value
  520. lilscoot.BackR.HingeConstraint.AngularVelocity = -currentspeed.Value
  521. lilscoot.TurnRight.HingeConstraint.TargetAngle = currentdirection.Value
  522. lilscoot.TurnLeft.HingeConstraint.TargetAngle = currentdirection.Value
  523. sound.PlaybackSpeed = 0.8 + ((math.abs(currentspeed.Value)/70)*1.5)
  524. if not zooming and math.abs(currentspeed.Value) > 0.25 then
  525. zooming = true
  526. ts:Create(sound,TweenInfo.new(0.5,Enum.EasingStyle.Linear),{Volume = 0.5}):Play()
  527. ts:Create(sound2,TweenInfo.new(0.5,Enum.EasingStyle.Linear),{Volume = 0}):Play()
  528. elseif zooming and math.abs(currentspeed.Value) <= 0.25 then
  529. ts:Create(sound,TweenInfo.new(0.5,Enum.EasingStyle.Linear),{Volume = 0}):Play()
  530. ts:Create(sound2,TweenInfo.new(0.5,Enum.EasingStyle.Linear),{Volume = 0.5}):Play()
  531. zooming = false
  532. end
  533. coroutine.resume(coroutine.create(function()
  534. for i,v in pairs(lilscoot:GetChildren()) do
  535. if v:IsA("BasePart") then
  536. v:SetNetworkOwner(owner)
  537. end
  538. end
  539. end))
  540. end
  541. --end))
Add Comment
Please, Sign In to add comment