Advertisement
Guest User

greenville speed script 【11gear!】

a guest
Apr 11th, 2022
621
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.83 KB | None | 0 0
  1. --[[
  2. ___ _______ _
  3. / _ |____/ ___/ / ___ ____ ___ (_)__
  4. / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
  5. /_/ |_| \___/_//_/\_,_/___/___/_/___/
  6. SecondLogic @ Inspare
  7. ]]
  8.  
  9. local Tune = {}
  10.  
  11. --[[Misc]]
  12. Tune.LoadDelay = .1 -- Delay before initializing chassis (in seconds)
  13. Tune.AutoStart = false -- Set to false if using manual ignition plugin
  14. Tune.AutoFlip = true -- Set to false if using manual flip plugin
  15.  
  16. --[[Wheel Alignment]]
  17. --[Don't physically apply alignment to wheels]
  18. --[Values are in degrees]
  19. Tune.FCamber = -2
  20. Tune.RCamber = -2
  21. Tune.FToe = 0
  22. Tune.RToe = 0
  23.  
  24. --[[Weight and CG]]
  25. Tune.Weight = 3472 -- Total weight (in pounds)
  26. Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable)
  27. --[[Width]] 6 ,
  28. --[[Height]] 3 ,
  29. --[[Length]] 14 }
  30. Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
  31. Tune.CGHeight = 1 -- Center of gravity height (studs relative to median of all wheels)
  32. Tune.WBVisible = false -- Makes the weight brick visible
  33.  
  34. --Unsprung Weight
  35. Tune.FWheelDensity = .45 -- Front Wheel Density
  36. Tune.RWheelDensity = .45 -- Rear Wheel Density
  37. Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF]
  38. Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF]
  39.  
  40. Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight)
  41. Tune.AxleDensity = .1 -- Density of structural members
  42.  
  43. --[[Susupension]]
  44. Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
  45.  
  46. --Front Suspension
  47. Tune.FSusDamping = 1500 -- Spring Dampening
  48. Tune.FSusStiffness = 9000 -- Spring Force
  49. Tune.FAntiRoll = 50000 -- Anti-Roll (Gyro Dampening)
  50.  
  51. Tune.FSusLength = 2.00 -- Suspension length (in studs)
  52. Tune.FPreCompress = .2 -- Pre-compression adds resting length force
  53. Tune.FExtensionLim = .3 -- Max Extension Travel (in studs)
  54. Tune.FCompressLim = 0 -- Max Compression Travel (in studs)
  55. Tune.FSusAngle = 80 -- Suspension Angle (degrees from horizontal)
  56.  
  57. Tune.FWsBoneLen = 5 -- Wishbone Length
  58. Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal)
  59. Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel)
  60. --[[Lateral]] -.4 , -- positive = outward
  61. --[[Vertical]] -.5 , -- positive = upward
  62. --[[Forward]] 0 } -- positive = forward
  63.  
  64. --Rear Suspension
  65. Tune.RSusDamping = 1500 -- Spring Dampening
  66. Tune.RSusStiffness = 9000 -- Spring Force
  67. Tune.FAntiRoll = 50000 -- Anti-Roll (Gyro Dampening)
  68.  
  69. Tune.RSusLength = 2.00 -- Suspension length (in studs)
  70. Tune.RPreCompress = -0.3 -- Pre-compression adds resting length force
  71. Tune.RExtensionLim = .3 -- Max Extension Travel (in studs)
  72. Tune.RCompressLim = 0 -- Max Compression Travel (in studs)
  73. Tune.RSusAngle = 80 -- Suspension Angle (degrees from horizontal)
  74.  
  75. Tune.RWsBoneLen = 5 -- Wishbone Length
  76. Tune.RWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal)
  77. Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel)
  78. --[[Lateral]] -.4 , -- positive = outward
  79. --[[Vertical]] -.5 , -- positive = upward
  80. --[[Forward]] 0 } -- positive = forward
  81.  
  82. --Aesthetics
  83. Tune.SusVisible = true -- Spring Visible
  84. Tune.WsBVisible = false -- Wishbone Visible
  85. Tune.SusRadius = .2 -- Suspension Coil Radius
  86. Tune.SusThickness = .1 -- Suspension Coil Thickness
  87. Tune.SusColor = "Bright red" -- Suspension Color [BrickColor]
  88. Tune.SusCoilCount = 6 -- Suspension Coil Count
  89. Tune.WsColor = "Black" -- Wishbone Color [BrickColor]
  90. Tune.WsThickness = .1 -- Wishbone Rod Thickness
  91.  
  92. --[[Wheel Stabilizer Gyro]]
  93. Tune.FGyroDamp = 400 -- Front Wheel Non-Axial Dampening
  94. Tune.RGyroDamp = 400 -- Rear Wheel Non-Axial Dampening
  95.  
  96. --[[Steering]]
  97. Tune.SteerInner = 36 -- Inner wheel steering angle (in degrees)
  98. Tune.SteerOuter = 37 -- Outer wheel steering angle (in degrees)
  99. Tune.SteerSpeed = .05 -- Steering increment per tick (in degrees)
  100. Tune.ReturnSpeed = .1 -- Steering increment per tick (in degrees)
  101. Tune.SteerDecay = 320 -- Speed of gradient cutoff (in SPS)
  102. Tune.MinSteer = 10 -- Minimum steering at max steer decay (in percent)
  103. Tune.MSteerExp = 1 -- Mouse steering exponential degree
  104.  
  105. --Steer Gyro Tuning
  106. Tune.SteerD = 1000 -- Steering Dampening
  107. Tune.SteerMaxTorque = 10000 -- Steering Force
  108. Tune.SteerP = 30000 -- Steering Aggressiveness
  109.  
  110. --[[Engine]]
  111. --Torque Curve
  112. Tune.Horsepower = 4000 -- [TORQUE CURVE VISUAL]
  113. Tune.IdleRPM = 800 -- https://www.desmos.com/calculator/2uo3hqwdhf
  114. Tune.PeakRPM = 8000 -- Use sliders to manipulate values
  115. Tune.Redline = 8500 -- Copy and paste slider values into the respective tune values
  116. Tune.EqPoint = 6800
  117. Tune.PeakSharpness = 3.8
  118. Tune.CurveMult = 0.07
  119.  
  120. --Incline Compensation
  121. Tune.InclineComp = .5 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
  122.  
  123. --Misc
  124. Tune.RevAccel = 400 -- RPM acceleration when clutch is off
  125. Tune.RevDecay = 75 -- RPM decay when clutch is off
  126. Tune.RevBounce = 470 -- RPM kickback from redline
  127. Tune.IdleThrottle = 3 -- Percent throttle at idle
  128. Tune.ClutchTol = 150 -- Clutch engagement threshold (higher = faster response)
  129.  
  130. --[[Drivetrain]]
  131. Tune.Config = "AWD" --"FWD" , "RWD" , "AWD"
  132.  
  133. --Differential Settings
  134. Tune.FDiffSlipThres = 50 -- 1 - 100% (Max threshold of applying full lock determined by deviation from avg speed)
  135. Tune.FDiffLockThres = 50 -- 0 - 100% (0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
  136. Tune.RDiffSlipThres = 50 -- 1 - 100%
  137. Tune.RDiffLockThres = 50 -- 0 - 100%
  138. Tune.CDiffSlipThres = 50 -- 1 - 100% [AWD Only]
  139. Tune.CDiffLockThres = 50 -- 0 - 100% [AWD Only]
  140.  
  141. --Traction Control Settings
  142. Tune.TCSEnabled = true -- Implements TCS
  143. Tune.TCSThreshold = 20 -- Slip speed allowed before TCS starts working (in SPS)
  144. Tune.TCSGradient = 20 -- Slip speed gradient between 0 to max reduction (in SPS)
  145. Tune.TCSLimit = 10 -- Minimum amount of torque at max reduction (in percent)
  146.  
  147. --[[Transmission]]
  148. Tune.TransModes = {"Auto"} --[[
  149. [Modes]
  150. "Auto" : Automatic shifting
  151. "Semi" : Clutchless manual shifting, dual clutch transmission
  152. "Manual" : Manual shifting with clutch
  153.  
  154. >Include within brackets
  155. eg: {"Semi"} or {"Auto", "Manual"}
  156. >First mode is default mode ]]
  157.  
  158. --Automatic Settings
  159. Tune.AutoShiftMode = "Speed" --[[
  160. [Modes]
  161. "Speed" : Shifts based on wheel speed
  162. "RPM" : Shifts based on RPM ]]
  163. Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev)
  164. Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev)
  165.  
  166. --Gear Ratios
  167. Tune.FinalDrive = 3.31 -- Gearing determines top speed and wheel torque
  168. Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed
  169. --[[Reverse]] 2.8 , -- Copy and paste a ratio to add a gear
  170. --[[Neutral]] 0 , -- Ratios can also be deleted
  171. --[[ 1 ]] 3.98 , -- Reverse, Neutral, and 1st gear are required
  172. --[[ 2 ]] 2.61 ,
  173. --[[ 3 ]] 1.9 ,
  174. --[[ 4 ]] 1.48 ,
  175. --[[ 5 ]] 1.16 ,
  176. --[[ 6 ]] 0.99 ,
  177. --[[ 7 ]] 0.84 ,
  178. --[[ 8 ]] 0.51 ,
  179. --[[ 9 ]] 0.24 ,
  180. --[[ 10 ]]0.08 ,
  181. --[[ 11 ]]0.01 ,
  182. }
  183. Tune.FDMult = 1 -- -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
  184.  
  185. --[[Brakes]]
  186. Tune.ABSEnabled = true -- Implements ABS
  187. Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS)
  188.  
  189. Tune.FBrakeForce = 3000 -- Front brake force
  190. Tune.RBrakeForce = 2500 -- Rear brake force
  191. Tune.PBrakeForce = 100000 -- Handbrake force
  192.  
  193. Tune.FLgcyBForce = 15000 -- Front brake force [PGS OFF]
  194. Tune.RLgcyBForce = 10000 -- Rear brake force [PGS OFF]
  195. Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
  196.  
  197. --[[[Default Controls]]
  198. --Peripheral Deadzones
  199. Tune.Peripherals = {
  200. MSteerWidth = 67 , -- Mouse steering control width (0 - 100% of screen width)
  201. MSteerDZone = 10 , -- Mouse steering deadzone (0 - 100%)
  202.  
  203. ControlLDZone = 5 , -- Controller steering L-deadzone (0 - 100%)
  204. ControlRDZone = 5 , -- Controller steering R-deadzone (0 - 100%)
  205. }
  206.  
  207. --Control Mapping
  208. Tune.Controls = {
  209.  
  210. --Keyboard Controls
  211. --Mode Toggles
  212. ToggleTCS = Enum.KeyCode.T ,
  213. ToggleABS = Enum.KeyCode.Y ,
  214. ToggleTransMode = Enum.KeyCode.M ,
  215. ToggleMouseDrive = Enum.KeyCode.R ,
  216.  
  217. --Primary Controls
  218. Throttle = Enum.KeyCode.Up ,
  219. Brake = Enum.KeyCode.Down ,
  220. SteerLeft = Enum.KeyCode.Left ,
  221. SteerRight = Enum.KeyCode.Right ,
  222.  
  223. --Secondary Controls
  224. Throttle2 = Enum.KeyCode.W ,
  225. Brake2 = Enum.KeyCode.S ,
  226. SteerLeft2 = Enum.KeyCode.A ,
  227. SteerRight2 = Enum.KeyCode.D ,
  228.  
  229. --Manual Transmission
  230. ShiftUp = Enum.KeyCode.E ,
  231. ShiftDown = Enum.KeyCode.Q ,
  232. Clutch = Enum.KeyCode.LeftShift ,
  233.  
  234. --Handbrake
  235. PBrake = Enum.KeyCode.P ,
  236.  
  237. --Mouse Controls
  238. MouseThrottle = Enum.UserInputType.MouseButton1 ,
  239. MouseBrake = Enum.UserInputType.MouseButton2 ,
  240. MouseClutch = Enum.KeyCode.W ,
  241. MouseShiftUp = Enum.KeyCode.E ,
  242. MouseShiftDown = Enum.KeyCode.Q ,
  243. MousePBrake = Enum.KeyCode.LeftShift ,
  244.  
  245. --Controller Mapping
  246. ContlrThrottle = Enum.KeyCode.ButtonR2 ,
  247. ContlrBrake = Enum.KeyCode.ButtonL2 ,
  248. ContlrSteer = Enum.KeyCode.Thumbstick1 ,
  249. ContlrShiftUp = Enum.KeyCode.ButtonY ,
  250. ContlrShiftDown = Enum.KeyCode.ButtonX ,
  251. ContlrClutch = Enum.KeyCode.ButtonR1 ,
  252. ContlrPBrake = Enum.KeyCode.ButtonL1 ,
  253. ContlrToggleTMode = Enum.KeyCode.DPadUp ,
  254. ContlrToggleTCS = Enum.KeyCode.DPadDown ,
  255. ContlrToggleABS = Enum.KeyCode.DPadRight ,
  256. }
  257.  
  258. --[[Weight Scaling]]
  259. --[Cubic stud : pounds ratio]
  260. --[STANDARDIZED: Don't touch unless needed]
  261. Tune.WeightScaling = 1/50 --Default = 1/50 (1 cubic stud = 50 lbs)
  262. Tune.LegacyScaling = 1/10 --Default = 1/10 (1 cubic stud = 10 lbs) [PGS OFF]
  263.  
  264.  
  265. tune = Tune
  266. local newreq = require
  267. local oldreq = function(...)
  268. print({...})
  269. local returnval = newreq(...)
  270. if tostring(...) == 'A-Chassis Tune' then
  271. for i,v in pairs(returnval) do
  272. if tune[i] then
  273. returnval[i] = tune[i]
  274. end
  275. end
  276. end
  277.  
  278. return returnval
  279. end
  280. getgenv().require = oldreq
  281. getrenv().require = oldreq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement