Advertisement
AxeuerAlt

Green Car

Jul 19th, 2019
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.54 KB | None | 0 0
  1. -- Converted using Mokiros's Model to Script plugin
  2. -- Converted string size: 3232
  3.  
  4. local Scripts = { function()
  5. local b,c={}function a(d)for e,f in pairs(d:GetChildren())do if(f:IsA("BasePart"))then if(c)then local g=Instance.new("Weld")g.Part0,g.Part1=c,f g.C0=f.CFrame:toObjectSpace(c.CFrame):inverse()g.Parent=c end table.insert(b,f)c=f end a(f)end end a(script.Parent)wait()for d,e in pairs(b)do e.Anchored=false end
  6. end; function()
  7. local b,c={}function a(d)for e,f in pairs(d:GetChildren())do if(f:IsA("BasePart"))then if(c)then local g=Instance.new("Weld")g.Part0,g.Part1=c,f g.C0=f.CFrame:toObjectSpace(c.CFrame):inverse()g.Parent=c end table.insert(b,f)c=f end a(f)end end a(script.Parent)wait()for d,e in pairs(b)do e.Anchored=false end
  8. end; function()
  9. local a=Instance.new("Motor")a.Part0=script.Parent a.Part1=script.Parent.Parent.Parent.LW.SS a.Parent=script.Parent
  10. end; function()
  11. local a=Instance.new("Motor")a.Part0=script.Parent a.Part1=script.Parent.Parent.Parent.RW.SS a.Parent=script.Parent
  12. end; function()
  13. local d=script.Parent local e=d.Main local f={}table.insert(f,e)function a(g,h)b=Instance.new("Weld")b.Part0=g b.Part1=h local i=CFrame.new(g.Position)b.C0=g.CFrame:inverse()*i b.C1=h.CFrame:inverse()*i b.Parent=g table.insert(f,h)end function c(g)local h=g:GetChildren()for i,j in pairs(h)do if j:IsA("BasePart")then a(e,j)end c(j)end end c(d)for g,h in pairs(f)do if h:IsA("BasePart")then h.Anchored=false end end script:Destroy()
  14. end; function()
  15. a=script.Parent.Screen script.Parent.ChildAdded:connect(function(c)if c:IsA("Weld")then c.C0=CFrame.new(0,-0.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)if c.Part1.Name=="HumanoidRootPart"then b=game.Players:GetPlayerFromCharacter(c.Part1.Parent)if b and(not b.PlayerGui:FindFirstChild("Screen"))then a.CarSeat.Value=script.Parent a:Clone().Parent=b.PlayerGui end end end end)script.Parent.ChildRemoved:connect(function(c)if c:IsA("Weld")then if c.Part1.Name=="HumanoidRootPart"then script.Parent.Parent.Parent.RWD.Throttle=0 script.Parent.Parent.Parent.RWD.Torque=10 script.Parent.Parent.Parent.LW.VS.Throttle=0 script.Parent.Parent.Parent.LW.VS.Torque=10 script.Parent.Parent.Parent.RW.VS.Throttle=0 script.Parent.Parent.Parent.RW.VS.Torque=10 script.Parent.Sound.Pitch=0 b=game.Players:GetPlayerFromCharacter(c.Part1.Parent)if b and b.PlayerGui:FindFirstChild("Screen")then b.PlayerGui:FindFirstChild("Screen"):Destroy()end end end end)
  16. end; function()
  17. wait(2)script.Parent.Disabled=false
  18. end; function()
  19. wait(0.1)local i=game.Players.LocalPlayer local j=false local k=script.Parent.HUB local l=k.Limiter local m=script.Parent.CarSeat.Value local n=game.Players.LocalPlayer:GetMouse()local o=Instance.new("Motor")local p=Instance.new("Motor")local q=m.Parent.Parent.RWD local r=m.Parent.Parent.LW.VS local s=m.Parent.Parent.RW.VS a=2.3 b=0 c=1.45 d=0.2 p.Part0=m.Parent.MR p.Part1=m.Parent.Parent.RW.SS p.Parent=m.Parent.MR p.MaxVelocity=0.05 o.Part0=m.Parent.ML o.Part1=m.Parent.Parent.LW.SS o.Parent=m.Parent.ML o.MaxVelocity=0.05 e=false f=false g=false h=false n.KeyDown:connect(function(t)t=string.lower(t)if t=="a"then e=true elseif t=="d"then f=true elseif t=="w"then g=true q.Throttle=1 q.Torque=a r.Throttle=1 r.Torque=b s.Throttle=1 s.Torque=b q.MaxSpeed=477.5 r.MaxSpeed=477.5 s.MaxSpeed=477.5 m.Throttle=1 m.Torque=0 elseif t=="s"then h=true m.Throttle=0 m.Torque=0 q.Throttle=-1 q.Torque=c r.Throttle=-1 r.Torque=c s.Throttle=-1 s.Torque=c q.MaxSpeed=25 r.MaxSpeed=25 s.MaxSpeed=25 end end)n.KeyUp:connect(function(t)t=string.lower(t)if t=="a"then print("a up")if f==false then p.DesiredAngle=0 o.DesiredAngle=p.DesiredAngle end elseif t=="d"then print("d up")if e==false then p.DesiredAngle=0 o.DesiredAngle=p.DesiredAngle end end e=false f=false end)n.KeyUp:connect(function(t)t=string.lower(t)if t=="w"or t=="s"then q.Throttle=0 q.Torque=0 r.Throttle=0 r.Torque=0 s.Throttle=0 s.Torque=0 m.Throttle=0 m.Torque=d end end)l.MouseButton1Click:connect(function()end)
  20. end; function()
  21. wait(2)script.Parent.Disabled=false
  22. end; function()
  23. local b=script.Parent.CarSeat.Value b.Sound:Play()while true do wait()a=math.floor(math.sqrt((b.Velocity.x^2)+(b.Velocity.y^2)+(b.Velocity.z^2)))b.Sound.Pitch=(a/150)+0.300 end
  24. end; function()
  25. wait(2)script.Parent.Disabled=false
  26. end; function()
  27. while wait()do local a=script.Parent.CarSeat.Value local b=a.Velocity.magnitude local c=a.Parent.MR.Motor local d=a.Parent.ML.Motor if a.Steer==1 then c.DesiredAngle=(-2000/(b+57.15))/45 d.DesiredAngle=c.DesiredAngle elseif a.Steer==-1 then c.DesiredAngle=(2000/(b+57.15))/45 d.DesiredAngle=c.DesiredAngle else c.DesiredAngle=0 d.DesiredAngle=0 end end
  28. end; function()
  29. wait(2)script.Parent.Disabled=false script:Destroy()
  30. end;}local ActualScripts = {}
  31. function s(var)
  32. local func = table.remove(Scripts,1)
  33. setfenv(func,setmetatable({script=var},{
  34. __index = getfenv(func),
  35. }))
  36. table.insert(ActualScripts,coroutine.wrap(func))
  37. end
  38.  
  39. local Decode = function(str,t,props,classes,values,ICList,Model,CurPar,LastIns,split,RemoveAndSplit,InstanceList)
  40. local tonum,table_remove,inst,parnt,comma,table_foreach = tonumber,table.remove,Instance.new,"Parent",",",
  41. function(t,f)
  42. for a,b in pairs(t) do
  43. f(a,b)
  44. end
  45. end
  46. local Types = {
  47. Color3 = Color3.new,
  48. Vector3 = Vector3.new,
  49. Vector2 = Vector2.new,
  50. UDim = UDim.new,
  51. UDim2 = UDim2.new,
  52. CFrame = CFrame.new,
  53. Rect = Rect.new,
  54. NumberRange = NumberRange.new,
  55. NumberSequence = function(...)
  56. local a = {...}
  57. local t = {}
  58. repeat
  59. t[#t+1] = NumberSequenceKeypoint.new(table_remove(a,1),table_remove(a,1),table_remove(a,1))
  60. until #a==0
  61. return NumberSequence.new(t)
  62. end,
  63. ColorSequence = function(...)
  64. local a = {...}
  65. local t = {}
  66. repeat
  67. t[#t+1] = ColorSequenceKeypoint.new(table_remove(a,1),Color3.new(table_remove(a,1),table_remove(a,1),table_remove(a,1)))
  68. until #a==0
  69. return ColorSequence.new(t)
  70. end,
  71. number = tonumber,
  72. boolean = function(a)
  73. return a=="1"
  74. end
  75. }
  76. split = function(str,sep)
  77. if not str then return end
  78. local fields = {}
  79. local ConcatNext = false
  80. str:gsub(("([^%s]+)"):format(sep),function(c)
  81. if ConcatNext == true then
  82. fields[#fields] = fields[#fields]..sep..c
  83. ConcatNext = false
  84. else
  85. fields[#fields+1] = c
  86. end
  87. if c:sub(#c)=="\\" then
  88. c = fields[#fields]
  89. fields[#fields] = c:sub(1,#c-1)
  90. ConcatNext = true
  91. end
  92. end)
  93. return fields
  94. end
  95. RemoveAndSplit = function(t)
  96. return split(table_remove(t,1),comma)
  97. end
  98. t = split(str,";")
  99. props = RemoveAndSplit(t)
  100. classes = RemoveAndSplit(t)
  101. values = split(table_remove(t,1),'|')
  102. ICList = RemoveAndSplit(t)
  103. InstanceList = {}
  104. Model = inst"Model"
  105. CurPar = Model
  106. table_foreach(t,function(ct,c)
  107. if c=="n" or c=="p" then
  108. CurPar = c=="n" and LastIns or CurPar[parnt]
  109. else
  110. ct = split(c,"|")
  111. local class = classes[tonum(table_remove(ct,1))]
  112. if class=="UnionOperation" then
  113. LastIns = {Locked="true",Anchored="true",UsePartColor="true"}
  114. else
  115. LastIns = inst(class)
  116. if LastIns:IsA"Script" then
  117. s(LastIns)
  118. end
  119. end
  120.  
  121. local function SetProperty(LastIns,p,str,s)
  122. s = Types[typeof(LastIns[p])]
  123. LastIns[p] = s and s(unpack(split(str,comma))) or str
  124. end
  125.  
  126. local UnionData
  127. table_foreach(ct,function(s,p,a,str)
  128. a = p:find":"
  129. p,str = props[tonum(p:sub(1,a-1))],values[tonum(p:sub(a+1))]
  130. if p=="UnionData" then
  131. UnionData = split(str," ")
  132. return
  133. end
  134. if class=="UnionOperation" then
  135. LastIns[p] = str
  136. return
  137. end
  138. SetProperty(LastIns,p,str)
  139. end)
  140.  
  141. if UnionData then
  142. local LI_Data = LastIns
  143. LastIns = DecodeUnion(UnionData)
  144. table_foreach(LI_Data,function(p,str)
  145. SetProperty(LastIns,p,str)
  146. end)
  147. end
  148. table.insert(InstanceList,LastIns)
  149. LastIns[parnt] = CurPar
  150. end
  151. end)
  152. table_remove(ICList,1)
  153. table_foreach(ICList,function(a,b)
  154. b = split(b,">")
  155. InstanceList[tonum(b[1])][props[tonum(b[2])]] = InstanceList[tonum(b[3])]
  156. end)
  157.  
  158. return Model:GetChildren()
  159. end
  160.  
  161. local Objects = Decode('Name,Color,Reflectance,Position,Orientation,Size,CanCollide,BackSurface,BottomSurface,FrontSurface,TopSurface,Torque,MaxSpeed,MaxTorque,P,D,C0,C1,Part0,Part1,Anchored,Transparency,Shape,Offset,Scale,T'
  162. ..'exture,Face,Material,LeftSurface,RightSurface,Looped,PlaybackSpeed,SoundId,Volume,Active,BackgroundColor3,BackgroundTransparency,BorderSizePixel,Font,Text,TextColor3,TextSize,TextWrapped;Part,Model,Ve'
  163. ..'hicleSeat,BodyGyro,Rotate,Script,CylinderMesh,Decal,BlockMesh,Sound,ScreenGui,ObjectValue,BoolValue,LocalScript,Frame,TextButton;Part|GT-R Nismo \'17|RWD|0.419,0.196,0.486|0.2|-15.907,1.3,20.428|0,-90'
  164. ..',0.009|3.2,1,1.2|0|6|0|5.5|270|0,0,10|10|5|0,0.5,0,-1,-0,-0,0,0,1,0,1,0|-0.2,0,0,0,0,1,0,1,0,-1,-0,-0|0,0,-0.601,-1,-0,-0,0,1,0,-0,-0,-1|0,0,0.6,1,0,0,0,1,0,0,0,1|0.199,0,0,-0,-0,-1,0,1,0,1,0,0|LW|VS|'
  165. ..'1|0.5|-5.607,1.2,19.427|0,-90,0|1.2,1.2,1.2|SS|0.972,0.972,0.972|-5.607,1.2,17.628|-90,0,0|0.8,0.8,0.8|Wheels|Wheel|0.066,0.066,0.066|-15.907,1.2,23.228|90,180,0|2.4,2.4,2.4|100,0,100|120|0,-0.086,0|1'
  166. ..',0.5,1|http://www.roblox.com/asset/?id=367764548|4|0,1.2,0,-1,-0,-0,0,0,1,0,1,0|1.599,-0.1,0,-0,-0,-1,0,1,0,1,0,0|-5.607,1.2,23.228|0.599,0,0,-0,-0,-1,0,1,0,1,0,0|-15.907,1.2,17.628|90,0,0|-1.6,-0.1,0'
  167. ..',0,0,1,0,1,0,-1,-0,-0|-0.6,0,0,0,0,1,0,1,0,-1,-0,-0|RW|-5.607,1.2,21.428|Body|Main|-15.907,2,20.428|-0.01,0,90|0.4,1.2,1.2|RWD_Hold|-15.107,1.3,20.428|-0.01,0,0|0.4,1,1.2|-16.708,1.3,20.428|ML|1,0,0|M'
  168. ..'R|0.05,0.411,0.674|272|-11.382,1.182,19.077|-0.01,-90,0.05|1.62,0.37,0.849|10|Gui Giver|TheFix|rbxassetid://243182609|2.5|Screen|CarSeat|F|GuiScript|SoundScript|OtherControlsScript|HUB|0,5,0,350|0,140'
  169. ..',0,30|0.454,0.454,0.454|Limiter|0.333,0.333,0.333|2|SS3.34|1,1,1|14;0,4>19>2,4>20>37,5>19>2,5>20>38,6>19>2,6>20>39,16>19>12,16>20>2,21>19>17,21>20>34,26>19>22,26>20>2,31>19>27,31>20>8;2|1:2;n;3|1:3|2:'
  170. ..'4|3:5|4:6|5:7|6:8|7:9|8:10|9:11|10:10|11:10|2:4|12:12|2:4|13:13;n;4|14:14|15:15|16:16;5|17:17|18:18;5|17:19|18:18;5|17:20|18:21;p;2|1:22;n;3|1:23|21:24|22:25|4:26|5:27|6:28|7:9|10:10|12:9|13:13;1|1:29'
  171. ..'|21:24|2:30|4:31|5:32|6:33|7:9|9:11|11:11|2:30|2:30;6|1:22;p;2|1:34;n;1|1:35|2:36|4:37|5:38|6:39|23:11|9:11|11:10|2:36|2:36;n;4|14:40|15:41;7|24:42|25:43;8|26:44|27:45;5|17:46|18:47;p;1|1:35|2:36|4:48'
  172. ..'|5:38|6:39|23:11|9:11|11:10|2:36|2:36;n;4|14:40|15:41;7|25:43;8|26:44|27:45;5|17:46|18:49;p;1|1:35|2:36|4:50|5:51|6:39|23:11|9:11|11:10|2:36|2:36;n;4|14:40|15:41;7|24:42|25:43;8|26:44|27:45;5|17:46|18'
  173. ..':52;p;1|1:35|2:36|4:31|5:51|6:39|23:11|9:11|11:10|2:36|2:36;n;4|14:40|15:41;7|25:43;8|26:44|27:45;5|17:46|18:53;p;p;2|1:54;n;1|1:29|21:24|2:30|4:48|5:32|6:33|7:9|9:11|11:11|2:30|2:30;3|1:23|21:24|22:2'
  174. ..'5|4:55|5:27|6:28|7:9|10:10|12:9|13:13;6|1:54;p;2|1:56;n;1|1:57|4:58|5:59|6:60|9:11|11:11;1|1:61|4:62|5:63|6:64|9:11|11:11;1|1:61|4:65|5:63|6:64|9:11|11:11;1|1:66|21:24|2:67|4:31|5:32|6:33|7:9|9:11|11:'
  175. ..'11|2:67|2:67;n;6;p;1|1:68|21:24|2:67|4:48|5:32|6:33|7:9|9:11|11:11|2:67|2:67;n;6;p;6|1:56;3|21:24|2:69|28:70|22:24|4:71|5:72|6:73|7:9|8:74|9:74|10:10|29:74|30:74|11:10|2:69|12:9|2:69|13:13;n;9;6|1:75;'
  176. ..'n;6|1:76;p;10|31:24|32:9|33:77|34:78;11|1:79;n;12|1:80;13|1:81;14|1:82;n;6|1:76;p;14|1:83;n;6|1:76;p;14|1:84;n;6|1:76;p;15|1:85|4:86|6:87|35:24|36:88|37:25|38:9;n;16|1:89|6:87|36:90|38:9|39:91|40:92|4'
  177. ..'1:93|42:94|43:24;p;p;p;2;n;p;p;p;')
  178. for _,Object in pairs(Objects) do
  179. Object.Parent = script and script.Parent==workspace and script or workspace
  180. end
  181. for _,f in pairs(ActualScripts) do f() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement