Advertisement
memberhero

Turrent???

May 8th, 2018
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 145.09 KB | None | 0 0
  1. --SazErenos
  2.  
  3. SFX={}
  4.  
  5. --SFX
  6. --Bigcannon
  7. SFX["BigCN"]=155270859
  8. --Building
  9. SFX["BuildStart"]=155270863
  10. SFX["Build"]=155270864
  11. --Cannons
  12. SFX["CN1"]=155270865
  13. SFX["CN2"]=155270866
  14. SFX["CN3"]=155270870
  15. --Machineguns
  16. SFX["MG1"]=155270872
  17. SFX["MG2"]=155270877
  18. SFX["MG3"]=155270881
  19.  
  20.  
  21. --VOICESET 2
  22. --Order
  23. SFX["VS2Order1"]=155270886
  24. SFX["VS2Order2"]=155270890
  25. SFX["VS2Order3"]=155270893
  26. SFX["VS2Order4"]=155270900
  27. SFX["VS2Order5"]=155270904
  28. --Selected
  29. SFX["VS2Select1"]=155270915
  30. SFX["VS2Select2"]=155270909
  31. SFX["VS2Select3"]=155270923
  32.  
  33. --VOICESET 3
  34. --Order
  35. SFX["VS3Order1"]=155270930
  36. SFX["VS3Order2"]=155270931
  37. SFX["VS3Order3"]=155270935
  38. SFX["VS3Order4"]=155270935
  39. SFX["VS3Order5"]=155270937
  40. SFX["VS3Order6"]=155270944
  41. SFX["VS3Order7"]=155270948
  42. --Selected
  43. SFX["VS3Select1"]=155270950
  44. SFX["VS3Select2"]=155270952
  45. SFX["VS3Select3"]=155270958
  46. SFX["VS3Select4"]=155270964
  47.  
  48. --VOICESET 1
  49. --Order
  50. SFX["VS1Order1"]=155270969
  51. SFX["VS1Order2"]=155270973
  52. --Selected
  53. SFX["VS1Select1"]=155270978
  54. SFX["VS1Select2"]=155270981
  55.  
  56. --ANNOUNCER
  57.  
  58. SFX["ABombReady"]=155310725
  59. SFX["UnitCannotBuildFull"]=155310751
  60. SFX["UnitBuild"]=155310735
  61. SFX["UnitBuildComplete"]=155314074
  62. SFX["TrainingUnit"]=155314097
  63. SFX["AlreadyBuildingUnitType"]=155314120
  64. SFX["UnitTypeFull"]=155314142
  65. SFX["UnitLost"]=155314158
  66. SFX["BadZone"]=155314170
  67. SFX["UnitReady"]=155314195
  68.  
  69. EnergyAvailable=100
  70. MaxEnergy=1000
  71.  
  72. BaseUnitBuildTime=2.5
  73. MinimumUnitBuildTime=1
  74.  
  75. Units={}
  76.  
  77. ScrubColor=BrickColor.new("Bright red")
  78.  
  79. --Vehicles
  80.  
  81. Units["LightTank"]={}
  82. Units["LightTank"]["EnergyCost"]=8
  83. Units["LightTank"]["MaxUnits"]=10
  84. Units["LightTank"]["BuildTime"]=4
  85. Units["LightTank"]["Model"]=function()
  86. Model=Instance.new("Model")
  87. Model.Name="LightTank" p=Instance.new("Part")
  88. p.Name="Turret"
  89. p.formFactor="Custom"
  90. p.Size=Vector3.new(0.600000024, 0.600000024, 0.600000024)
  91. p.Material=Enum.Material.Plastic
  92. p.BrickColor=BrickColor.new("Pastel Blue")
  93. p.CFrame=CFrame.new(-38.5000076, 0.689999998, 23.6999931, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  94. p.BottomSurface=0
  95. p.TopSurface=0
  96. kl=Instance.new("SpecialMesh")
  97. kl.Scale=Vector3.new(0.699999988, 0.699999988, 0.699999988)
  98. kl.Parent=p
  99. kl.MeshType="Sphere" p.Parent=Model p=Instance.new("Part")
  100. p.Name="Part"
  101. p.formFactor="Custom"
  102. p.Size=Vector3.new(0.200000003, 0.200000003, 0.800000012)
  103. p.Material=Enum.Material.Plastic
  104. p.BrickColor=BrickColor.new("Black")
  105. p.CFrame=CFrame.new(-38.7000046, 0.300000191, 23.6000042, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  106. p.BottomSurface=0
  107. p.TopSurface=0
  108. p.Parent=Model p=Instance.new("Part")
  109. p.Name="Part"
  110. p.formFactor="Custom"
  111. p.Size=Vector3.new(0.600000024, 0.299999952, 1)
  112. p.Material=Enum.Material.Plastic
  113. p.BrickColor=BrickColor.new("Pastel Blue")
  114. p.CFrame=CFrame.new(-38.5000038, 0.549791098, 23.7000008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  115. p.BottomSurface=0
  116. p.TopSurface=0
  117. kl=Instance.new("BlockMesh")
  118. kl.Scale=Vector3.new(1, 1, 1)
  119. kl.Parent=p
  120. p.Parent=Model p=Instance.new("Part")
  121. p.Name="Part"
  122. p.formFactor="Custom"
  123. p.Size=Vector3.new(0.200000003, 0.200000003, 0.800000012)
  124. p.Material=Enum.Material.Plastic
  125. p.BrickColor=BrickColor.new("Black")
  126. p.CFrame=CFrame.new(-38.2999268, 0.290130138, 23.6000023, 0.99999994, 0.000261920795, 1.16415322e-010, -0.000261920795, 0.99999994, 2.91038305e-011, -1.16415322e-010, -2.91038305e-011, 1)
  127. p.BottomSurface=0
  128. p.TopSurface=0
  129. p.Parent=Model p=Instance.new("WedgePart")
  130. p.Name="Wedge"
  131. p.formFactor="Custom"
  132. p.Size=Vector3.new(0.600000024, 0.289999992, 0.200000033)
  133. p.Material=Enum.Material.Plastic
  134. p.BrickColor=BrickColor.new("Pastel Blue")
  135. p.CFrame=CFrame.new(-38.4999962, 0.544999838, 23.0999985, 0.999999881, 0, 0, 0, 0.999999881, 2.98023224e-008, 0, -2.98023224e-008, 0.999999881)
  136. p.BottomSurface=0
  137. p.TopSurface=0
  138. p.Parent=Model p=Instance.new("WedgePart")
  139. p.Name="Wedge"
  140. p.formFactor="Custom"
  141. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  142. p.Material=Enum.Material.Plastic
  143. p.BrickColor=BrickColor.new("Black")
  144. p.CFrame=CFrame.new(-38.7000046, 0.300000191, 23.1000042, -0.99999994, 0.000261920795, -1.16415322e-010, -0.000261920795, -0.99999994, -2.91038305e-011, -1.16415322e-010, -2.91038305e-011, 1)
  145. p.BottomSurface=0
  146. p.TopSurface=0
  147. p.Parent=Model p=Instance.new("WedgePart")
  148. p.Name="Wedge"
  149. p.formFactor="Custom"
  150. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  151. p.Material=Enum.Material.Plastic
  152. p.BrickColor=BrickColor.new("Black")
  153. p.CFrame=CFrame.new(-38.7000046, 0.300000191, 24.1000042, 0.999999762, 0.000575949438, 0.000295014906, 0.000575689133, -0.999999464, 0.000881543267, 0.000295522477, -0.0008813733, -0.999999583)
  154. p.BottomSurface=0
  155. p.TopSurface=0
  156. p.Parent=Model p=Instance.new("Part")
  157. p.Name="Gun"
  158. p.formFactor="Custom"
  159. p.Size=Vector3.new(0.200000003, 0.400000006, 0.200000003)
  160. p.Material=Enum.Material.Plastic
  161. p.BrickColor=BrickColor.new("Black")
  162. p.CFrame=CFrame.new(-38.4999847, 0.759999156, 23.4000015, 1, 0, 0, 0, 0, 1, 0, -1, -4.37113883e-008)
  163. p.BottomSurface=0
  164. p.TopSurface=0
  165. kl=Instance.new("CylinderMesh")
  166. kl.Scale=Vector3.new(0.300000012, 1, 0.300000012)
  167. kl.Parent=p
  168. p.Parent=Model p=Instance.new("WedgePart")
  169. p.Name="Wedge"
  170. p.formFactor="Custom"
  171. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  172. p.Material=Enum.Material.Plastic
  173. p.BrickColor=BrickColor.new("Black")
  174. p.CFrame=CFrame.new(-38.3001823, 0.289672852, 23.1002007, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  175. p.BottomSurface=0
  176. p.TopSurface=0
  177. p.Parent=Model p=Instance.new("WedgePart")
  178. p.Name="Wedge"
  179. p.formFactor="Custom"
  180. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  181. p.Material=Enum.Material.Plastic
  182. p.BrickColor=BrickColor.new("Black")
  183. p.CFrame=CFrame.new(-38.2999458, 0.29003191, 24.0998516, 0.999999881, 0.000314028788, 0.0002952457, 0.000313768425, -0.999999583, 0.000881465967, 0.000295522361, -0.0008813733, -0.999999583)
  184. p.BottomSurface=0
  185. p.TopSurface=0
  186. p.Parent=Model
  187. return Model
  188. end
  189. Units["LightTank"]["Attack"]=function(Unit,Object,Location)
  190. Dist=(Unit.Centroid.Position-(Object:FindFirstChild("Torso").Position-Vector3.new(0,2,0))).magnitude
  191. AttackDist=6
  192. if Dist>AttackDist then
  193. UnitMoveTo(Unit,Object.Torso.Position,"NOE")
  194. unitmove(Unit)
  195. else
  196. unitstop(Unit)
  197. if Unit:FindFirstChild("Cooldown")==nil then
  198. PlaySound("CN3",1,Unit.Centroid,"PEW")
  199.  
  200. Object.Humanoid:TakeDamage(5)
  201.  
  202. t=Instance.new("IntValue")
  203. t.Name="Cooldown"
  204. t.Value=34
  205. t.Parent=Unit
  206.  
  207. coroutine.resume(coroutine.create(function(Unit)
  208. flash=Instance.new("Part")
  209. flash.Name="PEWPEW"
  210. flash.TopSurface=0
  211. flash.BottomSurface=0
  212. flash.BrickColor=BrickColor:Yellow()
  213. flash.formFactor="Custom"
  214. flash.Size=Vector3.new(.2,.2,.2)
  215. mm=Instance.new("SpecialMesh")
  216. mm.MeshType="Sphere"
  217. mm.Scale=Vector3.new(.7,.7,.7)
  218. mm.Parent=flash
  219. flash.Parent=Unit
  220. w=Instance.new("Weld")
  221. w.Part0=Unit.Gun
  222. w.Part1=flash
  223. w.C0=CFrame.new(0,.25,0)
  224. w.Parent=flash
  225. game:GetService("Debris"):AddItem(flash,.12)
  226. end),Unit)
  227.  
  228. else
  229. Unit.Cooldown.Value=Unit.Cooldown.Value-1
  230. if Unit.Cooldown.Value<=-1 then
  231. Unit.Cooldown:Destroy()
  232. end
  233. end
  234. end
  235. end
  236. Units["LightTank"]["Requires"]={"WarFactory"}
  237. Units["LightTank"]["Speed"]=14
  238.  
  239. Units["MediumTank"]={}
  240. Units["MediumTank"]["EnergyCost"]=12
  241. Units["MediumTank"]["Speed"]=9
  242. Units["MediumTank"]["MaxUnits"]=8
  243. Units["MediumTank"]["BuildTime"]=6
  244. Units["MediumTank"]["Model"]=function()
  245. Model=Instance.new("Model")
  246. Model.Name="MediumTank" p=Instance.new("Part")
  247. p.Name="Part"
  248. p.formFactor="Custom"
  249. p.Size=Vector3.new(0.200000003, 0.200000003, 0.800000012)
  250. p.Material=Enum.Material.Plastic
  251. p.BrickColor=BrickColor.new("Black")
  252. p.CFrame=CFrame.new(-40.6999931, 0.290000081, 23.3999996, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  253. p.BottomSurface=0
  254. p.TopSurface=0
  255. p.Parent=Model p=Instance.new("Part")
  256. p.Name="Turret"
  257. p.formFactor="Custom"
  258. p.Size=Vector3.new(0.800000012, 0.600000024, 0.800000012)
  259. p.Material=Enum.Material.Plastic
  260. p.BrickColor=BrickColor.new("Pastel Blue")
  261. p.CFrame=CFrame.new(-40.4000015, 0.80000025, 23.3999996, 0.999999583, 0, -7.4505806e-008, 0, 1, 0, 7.4505806e-008, 0, 0.999999583)
  262. p.BottomSurface=0
  263. p.TopSurface=0
  264. kl=Instance.new("SpecialMesh")
  265. kl.Scale=Vector3.new(0.800000012, 1, 0.949999988)
  266. kl.Parent=p
  267. kl.MeshType="Sphere" p.Parent=Model p=Instance.new("WedgePart")
  268. p.Name="Part"
  269. p.formFactor="Custom"
  270. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  271. p.Material=Enum.Material.Plastic
  272. p.BrickColor=BrickColor.new("Black")
  273. p.CFrame=CFrame.new(-40.6999931, 0.290000558, 22.9000015, -0.999999583, -5.1934741e-008, -2.36300401e-008, 9.78788606e-009, -0.999999404, 2.98023224e-007, -4.47034907e-008, 2.68220901e-007, 0.999999642)
  274. p.BottomSurface=0
  275. p.TopSurface=0
  276. p.Parent=Model p=Instance.new("WedgePart")
  277. p.Name="Part"
  278. p.formFactor="Custom"
  279. p.Size=Vector3.new(0.800000012, 0.200000003, 0.200000033)
  280. p.Material=Enum.Material.Plastic
  281. p.BrickColor=BrickColor.new("Pastel Blue")
  282. p.CFrame=CFrame.new(-40.3999977, 0.690000117, 22.9000015, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  283. p.BottomSurface=0
  284. p.TopSurface=0
  285. p.Parent=Model p=Instance.new("WedgePart")
  286. p.Name="Part"
  287. p.formFactor="Custom"
  288. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  289. p.Material=Enum.Material.Plastic
  290. p.BrickColor=BrickColor.new("Black")
  291. p.CFrame=CFrame.new(-40.6999931, 0.290000319, 23.8999996, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  292. p.BottomSurface=0
  293. p.TopSurface=0
  294. p.Parent=Model p=Instance.new("Part")
  295. p.Name="Gun"
  296. p.formFactor="Custom"
  297. p.Size=Vector3.new(0.400000006, 0.849999785, 0.200000003)
  298. p.Material=Enum.Material.Plastic
  299. p.BrickColor=BrickColor.new("Black")
  300. p.CFrame=CFrame.new(-40.3999977, 0.900000334, 22.9749851, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  301. p.BottomSurface=0
  302. p.TopSurface=0
  303. kl=Instance.new("CylinderMesh")
  304. kl.Scale=Vector3.new(0.449999988, 1, 0.449999988)
  305. kl.Parent=p
  306. p.Parent=Model p=Instance.new("Part")
  307. p.Name="Part"
  308. p.formFactor="Custom"
  309. p.Size=Vector3.new(0.800000012, 0.200000003, 0.200000003)
  310. p.Material=Enum.Material.Plastic
  311. p.BrickColor=BrickColor.new("Pastel Blue")
  312. p.CFrame=CFrame.new(-40.3999977, 0.490000367, 22.9000015, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  313. p.BottomSurface=0
  314. p.TopSurface=0
  315. kl=Instance.new("BlockMesh")
  316. kl.Scale=Vector3.new(1, 1, 1)
  317. kl.Parent=p
  318. p.Parent=Model p=Instance.new("Part")
  319. p.Name="Part"
  320. p.formFactor="Custom"
  321. p.Size=Vector3.new(0.800000012, 0.400000006, 1)
  322. p.Material=Enum.Material.Plastic
  323. p.BrickColor=BrickColor.new("Pastel Blue")
  324. p.CFrame=CFrame.new(-40.4000015, 0.590000272, 23.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  325. p.BottomSurface=0
  326. p.TopSurface=0
  327. kl=Instance.new("BlockMesh")
  328. kl.Scale=Vector3.new(1, 1, 1)
  329. kl.Parent=p
  330. p.Parent=Model p=Instance.new("WedgePart")
  331. p.Name="Part"
  332. p.formFactor="Custom"
  333. p.Size=Vector3.new(0.800000012, 0.400000036, 0.200000003)
  334. p.Material=Enum.Material.Plastic
  335. p.BrickColor=BrickColor.new("Pastel Blue")
  336. p.CFrame=CFrame.new(-40.4000092, 0.590000272, 24.1000023, 1, -0, -4.37113883e-008, 0, -1, 0, -4.37113883e-008, 0, -1)
  337. p.BottomSurface=0
  338. p.TopSurface=0
  339. p.Parent=Model p=Instance.new("Part")
  340. p.Name="Part"
  341. p.formFactor="Custom"
  342. p.Size=Vector3.new(0.200000003, 0.200000003, 0.800000012)
  343. p.Material=Enum.Material.Plastic
  344. p.BrickColor=BrickColor.new("Black")
  345. p.CFrame=CFrame.new(-40.1000023, 0.290000081, 23.3999996, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  346. p.BottomSurface=0
  347. p.TopSurface=0
  348. p.Parent=Model p=Instance.new("WedgePart")
  349. p.Name="Part"
  350. p.formFactor="Custom"
  351. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  352. p.Material=Enum.Material.Plastic
  353. p.BrickColor=BrickColor.new("Black")
  354. p.CFrame=CFrame.new(-40.1000023, 0.290000319, 23.8999996, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  355. p.BottomSurface=0
  356. p.TopSurface=0
  357. p.Parent=Model p=Instance.new("WedgePart")
  358. p.Name="Part"
  359. p.formFactor="Custom"
  360. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  361. p.Material=Enum.Material.Plastic
  362. p.BrickColor=BrickColor.new("Black")
  363. p.CFrame=CFrame.new(-40.0999947, 0.290000558, 22.9000015, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  364. p.BottomSurface=0
  365. p.TopSurface=0
  366. p.Parent=Model
  367. return Model
  368. end
  369. Units["MediumTank"]["Attack"]=function(Unit,Object,Location)
  370. Dist=(Unit.Centroid.Position-(Object:FindFirstChild("Torso").Position-Vector3.new(0,2,0))).magnitude
  371. AttackDist=7.5
  372. if Dist>AttackDist then
  373. UnitMoveTo(Unit,Object.Torso.Position,"NOE")
  374. unitmove(Unit)
  375. else
  376. unitstop(Unit)
  377. if Unit:FindFirstChild("Cooldown")==nil then
  378. PlaySound("CN2",1,Unit.Centroid,"PEW")
  379.  
  380. Object.Humanoid:TakeDamage(9)
  381.  
  382. t=Instance.new("IntValue")
  383. t.Name="Cooldown"
  384. t.Value=45
  385. t.Parent=Unit
  386.  
  387. coroutine.resume(coroutine.create(function(Unit)
  388. flash=Instance.new("Part")
  389. flash.Name="PEWPEW"
  390. flash.TopSurface=0
  391. flash.BottomSurface=0
  392. flash.BrickColor=BrickColor:Yellow()
  393. flash.formFactor="Custom"
  394. flash.Size=Vector3.new(.25,.25,.25)
  395. mm=Instance.new("SpecialMesh")
  396. mm.MeshType="Sphere"
  397. mm.Scale=Vector3.new(.7,.7,.7)
  398. mm.Parent=flash
  399. flash.Parent=Unit
  400. w=Instance.new("Weld")
  401. w.Part0=Unit.Gun
  402. w.Part1=flash
  403. w.C0=CFrame.new(0,.35,0)
  404. w.Parent=flash
  405. game:GetService("Debris"):AddItem(flash,.14)
  406. end),Unit)
  407.  
  408. else
  409. Unit.Cooldown.Value=Unit.Cooldown.Value-1
  410. if Unit.Cooldown.Value<=-1 then
  411. Unit.Cooldown:Destroy()
  412. end
  413. end
  414. end
  415. end
  416. Units["MediumTank"]["Requires"]={"WarFactory"}
  417.  
  418. Units["HeavyTank"]={}
  419. Units["HeavyTank"]["EnergyCost"]=20
  420. Units["HeavyTank"]["Speed"]=5
  421. Units["HeavyTank"]["MaxUnits"]=6
  422. Units["HeavyTank"]["BuildTime"]=10
  423. Units["HeavyTank"]["Model"]=function()
  424. Model=Instance.new("Model")
  425. Model.Name="HeavyTank" p=Instance.new("Part")
  426. p.Name="Part"
  427. p.formFactor="Custom"
  428. p.Size=Vector3.new(0.200000003, 0.200000003, 1.4000001)
  429. p.Material=Enum.Material.Plastic
  430. p.BrickColor=BrickColor.new("Black")
  431. p.CFrame=CFrame.new(-42.5499992, 0.290000796, 23.3000011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  432. p.BottomSurface=0
  433. p.TopSurface=0
  434. p.Parent=Model p=Instance.new("Part")
  435. p.Name="Part"
  436. p.formFactor="Custom"
  437. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  438. p.Material=Enum.Material.Plastic
  439. p.BrickColor=BrickColor.new("Black")
  440. p.CFrame=CFrame.new(-42.5499992, 0.390000701, 23.9999981, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  441. p.BottomSurface=0
  442. p.TopSurface=0
  443. kl=Instance.new("CylinderMesh")
  444. kl.Scale=Vector3.new(1, 1, 1)
  445. kl.Parent=p
  446. p.Parent=Model p=Instance.new("Part")
  447. p.Name="Part"
  448. p.formFactor="Custom"
  449. p.Size=Vector3.new(0.200000003, 0.200000003, 1.4000001)
  450. p.Material=Enum.Material.Plastic
  451. p.BrickColor=BrickColor.new("Black")
  452. p.CFrame=CFrame.new(-43.2500076, 0.300000072, 23.3000011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  453. p.BottomSurface=0
  454. p.TopSurface=0
  455. p.Parent=Model p=Instance.new("Part")
  456. p.Name="Part"
  457. p.formFactor="Custom"
  458. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  459. p.Material=Enum.Material.Plastic
  460. p.BrickColor=BrickColor.new("Black")
  461. p.CFrame=CFrame.new(-42.5499992, 0.390000701, 22.5999966, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  462. p.BottomSurface=0
  463. p.TopSurface=0
  464. kl=Instance.new("CylinderMesh")
  465. kl.Scale=Vector3.new(1, 1, 1)
  466. kl.Parent=p
  467. p.Parent=Model p=Instance.new("Part")
  468. p.Name="Gun1"
  469. p.formFactor="Custom"
  470. p.Size=Vector3.new(0.400000006, 0.849999785, 0.200000003)
  471. p.Material=Enum.Material.Plastic
  472. p.BrickColor=BrickColor.new("Black")
  473. p.CFrame=CFrame.new(-43.0000076, 0.909998894, 22.6150017, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  474. p.BottomSurface=0
  475. p.TopSurface=0
  476. kl=Instance.new("CylinderMesh")
  477. kl.Scale=Vector3.new(0.449999988, 1, 0.449999988)
  478. kl.Parent=p
  479. p.Parent=Model p=Instance.new("Part")
  480. p.Name="Part"
  481. p.formFactor="Custom"
  482. p.Size=Vector3.new(1, 0.200000003, 1.80000019)
  483. p.Material=Enum.Material.Plastic
  484. p.BrickColor=BrickColor.new("Pastel Blue")
  485. p.CFrame=CFrame.new(-42.8999977, 0.490000546, 23.2999992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  486. p.BottomSurface=0
  487. p.TopSurface=0
  488. kl=Instance.new("BlockMesh")
  489. kl.Scale=Vector3.new(1, 1, 1)
  490. kl.Parent=p
  491. p.Parent=Model p=Instance.new("Part")
  492. p.Name="Part"
  493. p.formFactor="Custom"
  494. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  495. p.Material=Enum.Material.Plastic
  496. p.BrickColor=BrickColor.new("Black")
  497. p.CFrame=CFrame.new(-43.2499962, 0.399998069, 24.0000114, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  498. p.BottomSurface=0
  499. p.TopSurface=0
  500. kl=Instance.new("CylinderMesh")
  501. kl.Scale=Vector3.new(1, 1, 1)
  502. kl.Parent=p
  503. p.Parent=Model p=Instance.new("Part")
  504. p.Name="Part"
  505. p.formFactor="Custom"
  506. p.Size=Vector3.new(1, 0.200000033, 1.4000001)
  507. p.Material=Enum.Material.Plastic
  508. p.BrickColor=BrickColor.new("Pastel Blue")
  509. p.CFrame=CFrame.new(-42.9000015, 0.68999958, 23.5000038, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  510. p.BottomSurface=0
  511. p.TopSurface=0
  512. kl=Instance.new("BlockMesh")
  513. kl.Scale=Vector3.new(1, 1, 1)
  514. kl.Parent=p
  515. p.Parent=Model p=Instance.new("Part")
  516. p.Name="Turret"
  517. p.formFactor="Custom"
  518. p.Size=Vector3.new(1, 0.600000024, 1)
  519. p.Material=Enum.Material.Plastic
  520. p.BrickColor=BrickColor.new("Pastel Blue")
  521. p.CFrame=CFrame.new(-42.9000053, 0.769998848, 23.340004, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  522. p.BottomSurface=0
  523. p.TopSurface=0
  524. kl=Instance.new("SpecialMesh")
  525. kl.Scale=Vector3.new(1, 1, 1)
  526. kl.Parent=p
  527. kl.MeshType="Sphere" p.Parent=Model p=Instance.new("Part")
  528. p.Name="Gun2"
  529. p.formFactor="Custom"
  530. p.Size=Vector3.new(0.400000006, 0.849999785, 0.200000003)
  531. p.Material=Enum.Material.Plastic
  532. p.BrickColor=BrickColor.new("Black")
  533. p.CFrame=CFrame.new(-42.8000069, 0.910000026, 22.6149998, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  534. p.BottomSurface=0
  535. p.TopSurface=0
  536. kl=Instance.new("CylinderMesh")
  537. kl.Scale=Vector3.new(0.449999988, 1, 0.449999988)
  538. kl.Parent=p
  539. p.Parent=Model p=Instance.new("Part")
  540. p.Name="Part"
  541. p.formFactor="Custom"
  542. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  543. p.Material=Enum.Material.Plastic
  544. p.BrickColor=BrickColor.new("Black")
  545. p.CFrame=CFrame.new(-43.2499962, 0.399998069, 22.600008, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  546. p.BottomSurface=0
  547. p.TopSurface=0
  548. kl=Instance.new("CylinderMesh")
  549. kl.Scale=Vector3.new(1, 1, 1)
  550. kl.Parent=p
  551. p.Parent=Model p=Instance.new("WedgePart")
  552. p.Name="Wedge"
  553. p.formFactor="Custom"
  554. p.Size=Vector3.new(0.600000024, 0.200000003, 0.600000024)
  555. p.Material=Enum.Material.Plastic
  556. p.BrickColor=BrickColor.new("Pastel Blue")
  557. p.CFrame=CFrame.new(-42.9000015, 0.68999958, 22.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  558. p.BottomSurface=0
  559. p.TopSurface=0
  560. p.Parent=Model p=Instance.new("WedgePart")
  561. p.Name="Wedge"
  562. p.formFactor="Custom"
  563. p.Size=Vector3.new(1, 0.200000003, 0.200000003)
  564. p.Material=Enum.Material.Plastic
  565. p.BrickColor=BrickColor.new("Pastel Blue")
  566. p.CFrame=CFrame.new(-42.8999977, 0.490000546, 24.2999992, 0.999999285, 1.77635684e-015, 1.81058404e-008, -3.55271368e-015, -0.999999642, 1.03316012e-007, 1.81058439e-008, 4.54845586e-023, -0.999999523)
  567. p.BottomSurface=0
  568. p.TopSurface=0
  569. p.Parent=Model p=Instance.new("WedgePart")
  570. p.Name="Wedge"
  571. p.formFactor="Custom"
  572. p.Size=Vector3.new(1, 0.200000003, 0.200000003)
  573. p.Material=Enum.Material.Plastic
  574. p.BrickColor=BrickColor.new("Pastel Blue")
  575. p.CFrame=CFrame.new(-42.9000015, 0.689999461, 24.300005, -1, 0, -4.37113883e-008, 0, 1, 0, 4.37113883e-008, 0, -1)
  576. p.BottomSurface=0
  577. p.TopSurface=0
  578. p.Parent=Model p=Instance.new("WedgePart")
  579. p.Name="Wedge"
  580. p.formFactor="Custom"
  581. p.Size=Vector3.new(0.600000024, 0.200000003, 0.200000003)
  582. p.Material=Enum.Material.Plastic
  583. p.BrickColor=BrickColor.new("Pastel Blue")
  584. p.CFrame=CFrame.new(-42.8999977, 0.490000546, 22.3000011, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  585. p.BottomSurface=0
  586. p.TopSurface=0
  587. p.Parent=Model p=Instance.new("WedgePart")
  588. p.Name="Wedge"
  589. p.formFactor="Custom"
  590. p.Size=Vector3.new(1, 0.200000003, 0.400000006)
  591. p.Material=Enum.Material.Plastic
  592. p.BrickColor=BrickColor.new("Pastel Blue")
  593. p.CFrame=CFrame.new(-42.9000015, 0.68999958, 22.6000023, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  594. p.BottomSurface=0
  595. p.TopSurface=0
  596. p.Parent=Model
  597. return Model
  598. end
  599. Units["HeavyTank"]["Attack"]=function(Unit,Object,Location)
  600. Dist=(Unit.Centroid.Position-(Object:FindFirstChild("Torso").Position-Vector3.new(0,2,0))).magnitude
  601. AttackDist=8
  602. if Dist>AttackDist then
  603. UnitMoveTo(Unit,Object.Torso.Position,"NOE")
  604. unitmove(Unit)
  605. else
  606. unitstop(Unit)
  607. if Unit:FindFirstChild("Cooldown")==nil then
  608. t=Instance.new("IntValue")
  609. t.Name="Cooldown"
  610. t.Value=57
  611. t.Parent=Unit
  612.  
  613. coroutine.resume(coroutine.create(function(Unit)
  614. flash=Instance.new("Part")
  615. flash.Name="PEWPEW"
  616. flash.TopSurface=0
  617. flash.BottomSurface=0
  618. flash.BrickColor=BrickColor:Yellow()
  619. flash.formFactor="Custom"
  620. flash.Size=Vector3.new(.28,.28,.28)
  621. mm=Instance.new("SpecialMesh")
  622. mm.MeshType="Sphere"
  623. mm.Scale=Vector3.new(.75,.75,.75)
  624. mm.Parent=flash
  625. flash.Parent=Unit
  626. w=Instance.new("Weld")
  627. w.Part0=Unit.Gun1
  628. w.Part1=flash
  629. w.C0=CFrame.new(0,.4,0)
  630. w.Parent=flash
  631. game:GetService("Debris"):AddItem(flash,.18)
  632. wait(.1)
  633. flash=Instance.new("Part")
  634. flash.Name="PEWPEW"
  635. flash.TopSurface=0
  636. flash.BottomSurface=0
  637. flash.BrickColor=BrickColor:Yellow()
  638. flash.formFactor="Custom"
  639. flash.Size=Vector3.new(.28,.28,.28)
  640. mm=Instance.new("SpecialMesh")
  641. mm.MeshType="Sphere"
  642. mm.Scale=Vector3.new(.75,.75,.75)
  643. mm.Parent=flash
  644. flash.Parent=Unit
  645. w=Instance.new("Weld")
  646. w.Part0=Unit.Gun2
  647. w.Part1=flash
  648. w.C0=CFrame.new(0,.4,0)
  649. w.Parent=flash
  650. game:GetService("Debris"):AddItem(flash,.18)
  651. end),Unit)
  652. for i=1, 2 do
  653. PlaySound("CN1",1,Unit.Centroid,"PEW")
  654. Object.Humanoid:TakeDamage(8)
  655. wait(.1)
  656. end
  657. else
  658. Unit.Cooldown.Value=Unit.Cooldown.Value-1
  659. if Unit.Cooldown.Value<=-1 then
  660. Unit.Cooldown:Destroy()
  661. end
  662. end
  663. end
  664. end
  665. Units["HeavyTank"]["Requires"]={"WarFactory"}
  666.  
  667. Units["Ranger"]={}
  668. Units["Ranger"]["EnergyCost"]=6
  669. Units["Ranger"]["Speed"]=16
  670. Units["Ranger"]["MaxUnits"]=5
  671. Units["Ranger"]["BuildTime"]=3.5
  672. Units["Ranger"]["Model"]=function()
  673. Model=Instance.new("Model")
  674. Model.Name="Ranger" p=Instance.new("Part")
  675. p.Name="Part"
  676. p.formFactor="Custom"
  677. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  678. p.Material=Enum.Material.Plastic
  679. p.BrickColor=BrickColor.new("Black")
  680. p.CFrame=CFrame.new(-34.6999893, 0.390000045, 23.0000038, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  681. p.BottomSurface=0
  682. p.TopSurface=0
  683. kl=Instance.new("CylinderMesh")
  684. kl.Scale=Vector3.new(0.800000012, 0.800000012, 0.800000012)
  685. kl.Parent=p
  686. p.Parent=Model p=Instance.new("Part")
  687. p.Name="Gun"
  688. p.formFactor="Custom"
  689. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  690. p.Material=Enum.Material.Plastic
  691. p.BrickColor=BrickColor.new("Black")
  692. p.CFrame=CFrame.new(-34.7756767, 1.03000069, 23.0472469, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  693. p.BottomSurface=0
  694. p.TopSurface=0
  695. kl=Instance.new("CylinderMesh")
  696. kl.Scale=Vector3.new(0.150000006, 1, 0.150000006)
  697. kl.Parent=p
  698. p.Parent=Model p=Instance.new("Part")
  699. p.Name="Turret"
  700. p.formFactor="Custom"
  701. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  702. p.Material=Enum.Material.Plastic
  703. p.BrickColor=BrickColor.new("Pastel Blue")
  704. p.CFrame=CFrame.new(-34.7599831, 0.990000129, 23.1000061, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  705. p.BottomSurface=0
  706. p.TopSurface=0
  707. kl=Instance.new("SpecialMesh")
  708. kl.Scale=Vector3.new(0.699999988, 0.699999988, 0.699999988)
  709. kl.Parent=p
  710. kl.MeshType="Sphere" p.Parent=Model p=Instance.new("Part")
  711. p.Name="Part"
  712. p.formFactor="Custom"
  713. p.Size=Vector3.new(0.600000024, 0.200000003, 0.200000003)
  714. p.Material=Enum.Material.Plastic
  715. p.BrickColor=BrickColor.new("Pastel Blue")
  716. p.CFrame=CFrame.new(-34.8999786, 0.659999967, 22.9000053, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  717. p.BottomSurface=0
  718. p.TopSurface=0
  719. kl=Instance.new("BlockMesh")
  720. kl.Scale=Vector3.new(1, 1, 1)
  721. kl.Parent=p
  722. p.Parent=Model p=Instance.new("Part")
  723. p.Name="Part"
  724. p.formFactor="Custom"
  725. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  726. p.Material=Enum.Material.Plastic
  727. p.BrickColor=BrickColor.new("Black")
  728. p.CFrame=CFrame.new(-34.6999893, 0.390000045, 23.6000023, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  729. p.BottomSurface=0
  730. p.TopSurface=0
  731. kl=Instance.new("CylinderMesh")
  732. kl.Scale=Vector3.new(0.800000012, 0.800000012, 0.800000012)
  733. kl.Parent=p
  734. p.Parent=Model p=Instance.new("Part")
  735. p.Name="Part"
  736. p.formFactor="Custom"
  737. p.Size=Vector3.new(0.600000024, 0.200000003, 1)
  738. p.Material=Enum.Material.Plastic
  739. p.BrickColor=BrickColor.new("Pastel Blue")
  740. p.CFrame=CFrame.new(-34.8999786, 0.49000001, 23.300005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  741. p.BottomSurface=0
  742. p.TopSurface=0
  743. kl=Instance.new("BlockMesh")
  744. kl.Scale=Vector3.new(1, 1, 1)
  745. kl.Parent=p
  746. p.Parent=Model p=Instance.new("Part")
  747. p.Name="Part"
  748. p.formFactor="Custom"
  749. p.Size=Vector3.new(0.600000024, 0.200000003, 0.200000003)
  750. p.Material=Enum.Material.Plastic
  751. p.BrickColor=BrickColor.new("Pastel Blue")
  752. p.CFrame=CFrame.new(-34.8999786, 0.889999986, 23.1000061, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  753. p.BottomSurface=0
  754. p.TopSurface=0
  755. kl=Instance.new("BlockMesh")
  756. kl.Scale=Vector3.new(1, 1, 1)
  757. kl.Parent=p
  758. p.Parent=Model p=Instance.new("Part")
  759. p.Name="Part"
  760. p.formFactor="Custom"
  761. p.Size=Vector3.new(0.600000024, 0.200000003, 0.200000003)
  762. p.Material=Enum.Material.Plastic
  763. p.BrickColor=BrickColor.new("Pastel Blue")
  764. p.CFrame=CFrame.new(-34.8999786, 0.689999998, 23.1000061, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  765. p.BottomSurface=0
  766. p.TopSurface=0
  767. kl=Instance.new("BlockMesh")
  768. kl.Scale=Vector3.new(1, 1, 1)
  769. kl.Parent=p
  770. p.Parent=Model p=Instance.new("Part")
  771. p.Name="Part"
  772. p.formFactor="Custom"
  773. p.Size=Vector3.new(0.600000024, 0.200000003, 0.200000003)
  774. p.Material=Enum.Material.Plastic
  775. p.BrickColor=BrickColor.new("Pastel Blue")
  776. p.CFrame=CFrame.new(-34.8999786, 0.75000006, 23.5000057, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  777. p.BottomSurface=0
  778. p.TopSurface=0
  779. kl=Instance.new("BlockMesh")
  780. kl.Scale=Vector3.new(1, 1, 1)
  781. kl.Parent=p
  782. p.Parent=Model p=Instance.new("Part")
  783. p.Name="Part"
  784. p.formFactor="Custom"
  785. p.Size=Vector3.new(0.600000024, 0.200000003, 0.400000036)
  786. p.Material=Enum.Material.Plastic
  787. p.BrickColor=BrickColor.new("Pastel Blue")
  788. p.CFrame=CFrame.new(-34.8999786, 0.689999998, 23.6000061, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  789. p.BottomSurface=0
  790. p.TopSurface=0
  791. kl=Instance.new("BlockMesh")
  792. kl.Scale=Vector3.new(1, 1, 1)
  793. kl.Parent=p
  794. p.Parent=Model p=Instance.new("Part")
  795. p.Name="Part"
  796. p.formFactor="Custom"
  797. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  798. p.Material=Enum.Material.Plastic
  799. p.BrickColor=BrickColor.new("Black")
  800. p.CFrame=CFrame.new(-35.0999908, 0.399999976, 23.0000019, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  801. p.BottomSurface=0
  802. p.TopSurface=0
  803. kl=Instance.new("CylinderMesh")
  804. kl.Scale=Vector3.new(0.800000012, 0.800000012, 0.800000012)
  805. kl.Parent=p
  806. p.Parent=Model p=Instance.new("Part")
  807. p.Name="Part"
  808. p.formFactor="Custom"
  809. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  810. p.Material=Enum.Material.Plastic
  811. p.BrickColor=BrickColor.new("Black")
  812. p.CFrame=CFrame.new(-35.099987, 0.399999976, 23.6000023, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  813. p.BottomSurface=0
  814. p.TopSurface=0
  815. kl=Instance.new("CylinderMesh")
  816. kl.Scale=Vector3.new(0.800000012, 0.800000012, 0.800000012)
  817. kl.Parent=p
  818. p.Parent=Model
  819. return Model
  820. end
  821. Units["Ranger"]["Attack"]=function(Unit,Object,Location)
  822. Dist=(Unit.Centroid.Position-(Object:FindFirstChild("Torso").Position-Vector3.new(0,2,0))).magnitude
  823. AttackDist=6
  824. if Dist>AttackDist then
  825. UnitMoveTo(Unit,Object.Torso.Position,"NOE")
  826. unitmove(Unit)
  827. else
  828. unitstop(Unit)
  829. if Unit:FindFirstChild("Cooldown")==nil then
  830. t=Instance.new("IntValue")
  831. t.Name="Cooldown"
  832. t.Value=22
  833. t.Parent=Unit
  834.  
  835. coroutine.resume(coroutine.create(function(Unit)
  836. flash=Instance.new("Part")
  837. flash.Name="PEWPEW"
  838. flash.TopSurface=0
  839. flash.BottomSurface=0
  840. flash.BrickColor=BrickColor:Yellow()
  841. flash.formFactor="Custom"
  842. flash.Size=Vector3.new(.2,.2,.2)
  843. mm=Instance.new("SpecialMesh")
  844. mm.MeshType="Sphere"
  845. mm.Scale=Vector3.new(.4,.4,.4)
  846. mm.Parent=flash
  847. flash.Parent=Unit
  848. w=Instance.new("Weld")
  849. w.Part0=Unit.Gun
  850. w.Part1=flash
  851. w.C0=CFrame.new(0,.1,0)
  852. w.Parent=flash
  853. game:GetService("Debris"):AddItem(flash,.1)
  854. end),Unit)
  855. PlaySound("MG2",1,Unit.Centroid,"PEW")
  856. Object.Humanoid:TakeDamage(3)
  857. else
  858. Unit.Cooldown.Value=Unit.Cooldown.Value-1
  859. if Unit.Cooldown.Value<=-1 then
  860. Unit.Cooldown:Destroy()
  861. end
  862. end
  863. end
  864. end
  865. Units["Ranger"]["Requires"]={"WarFactory"}
  866.  
  867. Units["Artillery"]={}
  868. Units["Artillery"]["Speed"]=7
  869. Units["Artillery"]["EnergyCost"]=15
  870. Units["Artillery"]["MaxUnits"]=5
  871. Units["Artillery"]["BuildTime"]=8
  872. Units["Artillery"]["Model"]=function()
  873. Model=Instance.new("Model")
  874. Model.Name="Artillery" p=Instance.new("WedgePart")
  875. p.Name="Wedge"
  876. p.formFactor="Custom"
  877. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  878. p.Material=Enum.Material.Plastic
  879. p.BrickColor=BrickColor.new("Black")
  880. p.CFrame=CFrame.new(-48.7000046, 0.289999962, 22.6999989, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  881. p.BottomSurface=0
  882. p.TopSurface=0
  883. p.Parent=Model p=Instance.new("Part")
  884. p.Name="Part"
  885. p.formFactor="Custom"
  886. p.Size=Vector3.new(0.400000036, 0.200000033, 0.200000033)
  887. p.Material=Enum.Material.Plastic
  888. p.BrickColor=BrickColor.new("Pastel Blue")
  889. p.CFrame=CFrame.new(-48.4000168, 0.890000165, 23.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  890. p.BottomSurface=0
  891. p.TopSurface=0
  892. kl=Instance.new("BlockMesh")
  893. kl.Scale=Vector3.new(1, 1, 1)
  894. kl.Parent=p
  895. p.Parent=Model p=Instance.new("Part")
  896. p.Name="Part"
  897. p.formFactor="Custom"
  898. p.Size=Vector3.new(0.800000012, 0.200000033, 0.600000024)
  899. p.Material=Enum.Material.Plastic
  900. p.BrickColor=BrickColor.new("Pastel Blue")
  901. p.CFrame=CFrame.new(-48.400013, 0.690000057, 23.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  902. p.BottomSurface=0
  903. p.TopSurface=0
  904. kl=Instance.new("BlockMesh")
  905. kl.Scale=Vector3.new(1, 1, 1)
  906. kl.Parent=p
  907. p.Parent=Model p=Instance.new("Part")
  908. p.Name="Part"
  909. p.formFactor="Custom"
  910. p.Size=Vector3.new(0.800000012, 0.200000033, 1.4000001)
  911. p.Material=Enum.Material.Plastic
  912. p.BrickColor=BrickColor.new("Pastel Blue")
  913. p.CFrame=CFrame.new(-48.4000092, 0.49000001, 23.2999992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  914. p.BottomSurface=0
  915. p.TopSurface=0
  916. kl=Instance.new("BlockMesh")
  917. kl.Scale=Vector3.new(1, 1, 1)
  918. kl.Parent=p
  919. p.Parent=Model p=Instance.new("WedgePart")
  920. p.Name="Wedge"
  921. p.formFactor="Custom"
  922. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  923. p.Material=Enum.Material.Plastic
  924. p.BrickColor=BrickColor.new("Black")
  925. p.CFrame=CFrame.new(-48.1000061, 0.289999962, 22.6999989, -0.999999762, -2.29844701e-007, 2.47987071e-008, 1.19209247e-007, -0.999999642, -6.33299067e-008, 8.95835157e-008, -9.3132229e-008, 0.999999702)
  926. p.BottomSurface=0
  927. p.TopSurface=0
  928. p.Parent=Model p=Instance.new("WedgePart")
  929. p.Name="Wedge"
  930. p.formFactor="Custom"
  931. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  932. p.Material=Enum.Material.Plastic
  933. p.BrickColor=BrickColor.new("Black")
  934. p.CFrame=CFrame.new(-48.1000137, 0.289999962, 23.8999996, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  935. p.BottomSurface=0
  936. p.TopSurface=0
  937. p.Parent=Model p=Instance.new("WedgePart")
  938. p.Name="Wedge"
  939. p.formFactor="Custom"
  940. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  941. p.Material=Enum.Material.Plastic
  942. p.BrickColor=BrickColor.new("Black")
  943. p.CFrame=CFrame.new(-48.7000122, 0.290000021, 23.8999996, 0.999999702, 3.34179404e-008, 8.72888428e-009, 1.23445183e-008, -0.999999642, 2.38418579e-007, 2.98023224e-008, -2.98023224e-007, -0.999999881)
  944. p.BottomSurface=0
  945. p.TopSurface=0
  946. p.Parent=Model p=Instance.new("WedgePart")
  947. p.Name="Wedge"
  948. p.formFactor="Custom"
  949. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  950. p.Material=Enum.Material.Plastic
  951. p.BrickColor=BrickColor.new("Pastel Blue")
  952. p.CFrame=CFrame.new(-48.400013, 0.890000165, 23.2000008, 1, 0, 4.37113883e-008, 0, 1, 0, -4.37113883e-008, 0, 1)
  953. p.BottomSurface=0
  954. p.TopSurface=0
  955. p.Parent=Model p=Instance.new("WedgePart")
  956. p.Name="Wedge"
  957. p.formFactor="Custom"
  958. p.Size=Vector3.new(0.400000036, 0.200000003, 0.200000003)
  959. p.Material=Enum.Material.Plastic
  960. p.BrickColor=BrickColor.new("Pastel Blue")
  961. p.CFrame=CFrame.new(-48.400013, 0.890000165, 23.7000027, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  962. p.BottomSurface=0
  963. p.TopSurface=0
  964. p.Parent=Model p=Instance.new("WedgePart")
  965. p.Name="Wedge"
  966. p.formFactor="Custom"
  967. p.Size=Vector3.new(0.800000012, 0.200000003, 0.200000003)
  968. p.Material=Enum.Material.Plastic
  969. p.BrickColor=BrickColor.new("Pastel Blue")
  970. p.CFrame=CFrame.new(-48.400013, 0.890000045, 22.6999989, 1, 0, 4.37113883e-008, 0, 1, 0, -4.37113883e-008, 0, 1)
  971. p.BottomSurface=0
  972. p.TopSurface=0
  973. p.Parent=Model p=Instance.new("WedgePart")
  974. p.Name="Wedge"
  975. p.formFactor="Custom"
  976. p.Size=Vector3.new(0.800000012, 0.200000003, 0.200000003)
  977. p.Material=Enum.Material.Plastic
  978. p.BrickColor=BrickColor.new("Pastel Blue")
  979. p.CFrame=CFrame.new(-48.4000092, 0.689999998, 23.8999996, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  980. p.BottomSurface=0
  981. p.TopSurface=0
  982. p.Parent=Model p=Instance.new("Part")
  983. p.Name="Part"
  984. p.formFactor="Custom"
  985. p.Size=Vector3.new(0.800000012, 0.200000033, 0.200000003)
  986. p.Material=Enum.Material.Plastic
  987. p.BrickColor=BrickColor.new("Pastel Blue")
  988. p.CFrame=CFrame.new(-48.400013, 0.890000165, 22.8999996, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  989. p.BottomSurface=0
  990. p.TopSurface=0
  991. kl=Instance.new("BlockMesh")
  992. kl.Scale=Vector3.new(1, 1, 1)
  993. kl.Parent=p
  994. p.Parent=Model p=Instance.new("Part")
  995. p.Name="Part"
  996. p.formFactor="Custom"
  997. p.Size=Vector3.new(0.800000012, 0.200000033, 0.600000024)
  998. p.Material=Enum.Material.Plastic
  999. p.BrickColor=BrickColor.new("Pastel Blue")
  1000. p.CFrame=CFrame.new(-48.400013, 0.690000057, 22.9000015, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1001. p.BottomSurface=0
  1002. p.TopSurface=0
  1003. kl=Instance.new("BlockMesh")
  1004. kl.Scale=Vector3.new(1, 1, 1)
  1005. kl.Parent=p
  1006. p.Parent=Model p=Instance.new("Part")
  1007. p.Name="Gun"
  1008. p.formFactor="Custom"
  1009. p.Size=Vector3.new(0.400000006, 1.04999983, 0.200000003)
  1010. p.Material=Enum.Material.Plastic
  1011. p.BrickColor=BrickColor.new("Black")
  1012. p.CFrame=CFrame.new(-48.4000168, 1.26000035, 23.218399, 1, 0, 0, 0, 0.707106769, 0.707106709, 0, -0.707106709, 0.707106769)
  1013. p.BottomSurface=0
  1014. p.TopSurface=0
  1015. kl=Instance.new("BlockMesh")
  1016. kl.Scale=Vector3.new(0.300000012, 1, 0.600000024)
  1017. kl.Parent=p
  1018. p.Parent=Model p=Instance.new("Part")
  1019. p.Name="Part"
  1020. p.formFactor="Custom"
  1021. p.Size=Vector3.new(0.200000003, 0.200000003, 1)
  1022. p.Material=Enum.Material.Plastic
  1023. p.BrickColor=BrickColor.new("Black")
  1024. p.CFrame=CFrame.new(-48.1000061, 0.290000021, 23.3000031, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1025. p.BottomSurface=0
  1026. p.TopSurface=0
  1027. p.Parent=Model p=Instance.new("Part")
  1028. p.Name="Part"
  1029. p.formFactor="Custom"
  1030. p.Size=Vector3.new(0.200000003, 0.200000003, 1)
  1031. p.Material=Enum.Material.Plastic
  1032. p.BrickColor=BrickColor.new("Black")
  1033. p.CFrame=CFrame.new(-48.7000084, 0.290000021, 23.2999992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1034. p.BottomSurface=0
  1035. p.TopSurface=0
  1036. p.Parent=Model
  1037. return Model
  1038. end
  1039. Units["Artillery"]["Attack"]=function(Unit,Object,Location)
  1040. Dist=(Unit.Centroid.Position-(Object:FindFirstChild("Torso").Position-Vector3.new(0,2,0))).magnitude
  1041. AttackDist=20
  1042. if Dist>AttackDist then
  1043. UnitMoveTo(Unit,Object.Torso.Position,"NOE")
  1044. unitmove(Unit)
  1045. else
  1046. unitstop(Unit)
  1047. if Unit:FindFirstChild("Cooldown")==nil then
  1048. t=Instance.new("IntValue")
  1049. t.Name="Cooldown"
  1050. t.Value=75
  1051. t.Parent=Unit
  1052. coroutine.resume(coroutine.create(function(Unit)
  1053. flash=Instance.new("Part")
  1054. flash.Name="PEWPEW"
  1055. flash.TopSurface=0
  1056. flash.BottomSurface=0
  1057. flash.BrickColor=BrickColor:Yellow()
  1058. flash.formFactor="Custom"
  1059. flash.Size=Vector3.new(.2,.2,.2)
  1060. mm=Instance.new("SpecialMesh")
  1061. mm.MeshType="Sphere"
  1062. mm.Scale=Vector3.new(1.2,1.2,1.2)
  1063. mm.Parent=flash
  1064. flash.Parent=Unit
  1065. w=Instance.new("Weld")
  1066. w.Part0=Unit.Gun
  1067. w.Part1=flash
  1068. w.C0=CFrame.new(0,.6,0)
  1069. w.Parent=flash
  1070. game:GetService("Debris"):AddItem(flash,.1)
  1071. end),Unit)
  1072. PlaySound("BigCN",1,Unit.Centroid,"PEW")
  1073. wait(.3)
  1074. Object.Humanoid:TakeDamage(12)
  1075. else
  1076. Unit.Cooldown.Value=Unit.Cooldown.Value-1
  1077. if Unit.Cooldown.Value<=-1 then
  1078. Unit.Cooldown:Destroy()
  1079. end
  1080. end
  1081. end
  1082. end
  1083. Units["Artillery"]["Requires"]={"WarFactory","RadarDome"}
  1084.  
  1085. Units["TeslaTank"]={}
  1086. Units["TeslaTank"]["Speed"]=10
  1087. Units["TeslaTank"]["EnergyCost"]=30
  1088. Units["TeslaTank"]["MaxUnits"]=4
  1089. Units["TeslaTank"]["BuildTime"]=15
  1090. Units["TeslaTank"]["Model"]=function()
  1091. Model=Instance.new("Model")
  1092. Model.Name="TeslaTank" p=Instance.new("WedgePart")
  1093. p.Name="Wedge"
  1094. p.formFactor="Custom"
  1095. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1096. p.Material=Enum.Material.Plastic
  1097. p.BrickColor=BrickColor.new("Black")
  1098. p.CFrame=CFrame.new(-62.170002, 0.100000001, 24.1000004, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  1099. p.BottomSurface=0
  1100. p.TopSurface=0
  1101. p.Parent=Model p=Instance.new("WedgePart")
  1102. p.Name="Wedge"
  1103. p.formFactor="Custom"
  1104. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1105. p.Material=Enum.Material.Plastic
  1106. p.BrickColor=BrickColor.new("Black")
  1107. p.CFrame=CFrame.new(-62.1699905, 0.100000001, 23.3000011, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1108. p.BottomSurface=0
  1109. p.TopSurface=0
  1110. p.Parent=Model p=Instance.new("Part")
  1111. p.Name="Part"
  1112. p.formFactor="Custom"
  1113. p.Size=Vector3.new(0.200000003, 0.200000003, 0.600000024)
  1114. p.Material=Enum.Material.Plastic
  1115. p.BrickColor=BrickColor.new("Black")
  1116. p.CFrame=CFrame.new(-62.170002, 0.100000001, 23.7000008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1117. p.BottomSurface=0
  1118. p.TopSurface=0
  1119. p.Parent=Model p=Instance.new("Part")
  1120. p.Name="Part"
  1121. p.formFactor="Custom"
  1122. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  1123. p.Material=Enum.Material.Plastic
  1124. p.BrickColor=BrickColor.new("Black")
  1125. p.CFrame=CFrame.new(-62.3699875, 0.190000027, 22.8000031, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  1126. p.BottomSurface=0
  1127. p.TopSurface=0
  1128. kl=Instance.new("CylinderMesh")
  1129. kl.Scale=Vector3.new(1.10000002, 0.949999988, 1.10000002)
  1130. kl.Parent=p
  1131. p.Parent=Model p=Instance.new("Part")
  1132. p.Name="Part"
  1133. p.formFactor="Custom"
  1134. p.Size=Vector3.new(1, 0.200000003, 1)
  1135. p.Material=Enum.Material.Plastic
  1136. p.BrickColor=BrickColor.new("Dark stone grey")
  1137. p.CFrame=CFrame.new(-62.5699921, 0.600000143, 23.7000027, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1138. p.BottomSurface=0
  1139. p.TopSurface=0
  1140. kl=Instance.new("CylinderMesh")
  1141. kl.Scale=Vector3.new(0.899999976, 1, 0.899999976)
  1142. kl.Parent=p
  1143. p.Parent=Model p=Instance.new("Part")
  1144. p.Name="Part"
  1145. p.formFactor="Custom"
  1146. p.Size=Vector3.new(0.600000024, 0.300000012, 0.200000003)
  1147. p.Material=Enum.Material.Plastic
  1148. p.BrickColor=BrickColor.new("Pastel Blue")
  1149. p.CFrame=CFrame.new(-62.5699921, 0.340000212, 22.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1150. p.BottomSurface=0
  1151. p.TopSurface=0
  1152. kl=Instance.new("BlockMesh")
  1153. kl.Scale=Vector3.new(1, 1, 1)
  1154. kl.Parent=p
  1155. p.Parent=Model p=Instance.new("Part")
  1156. p.Name="Tesla"
  1157. p.formFactor="Custom"
  1158. p.Size=Vector3.new(1, 0.200000003, 1)
  1159. p.Material=Enum.Material.Plastic
  1160. p.BrickColor=BrickColor.new("Medium stone grey")
  1161. p.CFrame=CFrame.new(-62.5699921, 0.600000024, 23.7000008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1162. p.BottomSurface=0
  1163. p.TopSurface=0
  1164. kl=Instance.new("SpecialMesh")
  1165. kl.Scale=Vector3.new(0.800000012, 4, 0.800000012)
  1166. kl.Parent=p
  1167. kl.MeshType="Sphere" p.Parent=Model p=Instance.new("WedgePart")
  1168. p.Name="Wedge"
  1169. p.formFactor="Custom"
  1170. p.Size=Vector3.new(0.5, 0.200000003, 0.200000003)
  1171. p.Material=Enum.Material.Plastic
  1172. p.BrickColor=BrickColor.new("Pastel Blue")
  1173. p.CFrame=CFrame.new(-62.1699944, 0.440000176, 23.1000004, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  1174. p.BottomSurface=0
  1175. p.TopSurface=0
  1176. p.Parent=Model p=Instance.new("Part")
  1177. p.Name="Part"
  1178. p.formFactor="Custom"
  1179. p.Size=Vector3.new(1, 0.49999994, 1)
  1180. p.Material=Enum.Material.Plastic
  1181. p.BrickColor=BrickColor.new("Pastel Blue")
  1182. p.CFrame=CFrame.new(-62.5699921, 0.440000027, 23.7000008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1183. p.BottomSurface=0
  1184. p.TopSurface=0
  1185. kl=Instance.new("BlockMesh")
  1186. kl.Scale=Vector3.new(1, 1, 1)
  1187. kl.Parent=p
  1188. p.Parent=Model p=Instance.new("Part")
  1189. p.Name="Part"
  1190. p.formFactor="Custom"
  1191. p.Size=Vector3.new(0.600000024, 0.5, 0.600000024)
  1192. p.Material=Enum.Material.Plastic
  1193. p.BrickColor=BrickColor.new("Pastel Blue")
  1194. p.CFrame=CFrame.new(-62.5699883, 0.439999998, 22.8999996, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1195. p.BottomSurface=0
  1196. p.TopSurface=0
  1197. kl=Instance.new("BlockMesh")
  1198. kl.Scale=Vector3.new(1, 1, 1)
  1199. kl.Parent=p
  1200. p.Parent=Model p=Instance.new("WedgePart")
  1201. p.Name="Wedge"
  1202. p.formFactor="Custom"
  1203. p.Size=Vector3.new(0.599999964, 0.200000003, 0.200000003)
  1204. p.Material=Enum.Material.Plastic
  1205. p.BrickColor=BrickColor.new("Pastel Blue")
  1206. p.CFrame=CFrame.new(-62.5699654, 0.589999914, 22.5, -1, 4.37113883e-008, -4.37113883e-008, 0, 4.37113883e-008, -1, 0, -1, -4.37113847e-008)
  1207. p.BottomSurface=0
  1208. p.TopSurface=0
  1209. p.Parent=Model p=Instance.new("WedgePart")
  1210. p.Name="Wedge"
  1211. p.formFactor="Custom"
  1212. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1213. p.Material=Enum.Material.Plastic
  1214. p.BrickColor=BrickColor.new("Black")
  1215. p.CFrame=CFrame.new(-62.9700012, 0.100000001, 24.1000004, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  1216. p.BottomSurface=0
  1217. p.TopSurface=0
  1218. p.Parent=Model p=Instance.new("Part")
  1219. p.Name="Part"
  1220. p.formFactor="Custom"
  1221. p.Size=Vector3.new(0.200000003, 0.200000003, 0.600000024)
  1222. p.Material=Enum.Material.Plastic
  1223. p.BrickColor=BrickColor.new("Black")
  1224. p.CFrame=CFrame.new(-62.9700012, 0.100000001, 23.7000008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1225. p.BottomSurface=0
  1226. p.TopSurface=0
  1227. p.Parent=Model p=Instance.new("Part")
  1228. p.Name="Part"
  1229. p.formFactor="Custom"
  1230. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  1231. p.Material=Enum.Material.Plastic
  1232. p.BrickColor=BrickColor.new("Black")
  1233. p.CFrame=CFrame.new(-62.7699928, 0.189999998, 22.8000011, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  1234. p.BottomSurface=0
  1235. p.TopSurface=0
  1236. kl=Instance.new("CylinderMesh")
  1237. kl.Scale=Vector3.new(1.10000002, 0.949999988, 1.10000002)
  1238. kl.Parent=p
  1239. p.Parent=Model p=Instance.new("WedgePart")
  1240. p.Name="Wedge"
  1241. p.formFactor="Custom"
  1242. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1243. p.Material=Enum.Material.Plastic
  1244. p.BrickColor=BrickColor.new("Black")
  1245. p.CFrame=CFrame.new(-62.9699936, 0.100000001, 23.3000011, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1246. p.BottomSurface=0
  1247. p.TopSurface=0
  1248. p.Parent=Model p=Instance.new("WedgePart")
  1249. p.Name="Wedge"
  1250. p.formFactor="Custom"
  1251. p.Size=Vector3.new(0.5, 0.200000003, 0.200000003)
  1252. p.Material=Enum.Material.Plastic
  1253. p.BrickColor=BrickColor.new("Pastel Blue")
  1254. p.CFrame=CFrame.new(-62.9699898, 0.440000117, 23.1000004, 0, -1, 0, 1, 0, -0, 0, 0, 1)
  1255. p.BottomSurface=0
  1256. p.TopSurface=0
  1257. p.Parent=Model
  1258. return Model
  1259. end
  1260. Units["TeslaTank"]["Attack"]=function(Unit,Object,Location)
  1261. end
  1262. Units["TeslaTank"]["Requires"]={"WarFactory","TechCenter"}
  1263.  
  1264. Units["APC"]={}
  1265. Units["APC"]["Speed"]=12
  1266. Units["APC"]["EnergyCost"]=15
  1267. Units["APC"]["MaxUnits"]=3
  1268. Units["APC"]["BuildTime"]=7.4
  1269. Units["APC"]["Model"]=function()
  1270. Model=Instance.new("Model")
  1271. Model.Name="APC" p=Instance.new("Part")
  1272. p.Name="Part"
  1273. p.formFactor="Custom"
  1274. p.Size=Vector3.new(0.200000003, 0.200000003, 1)
  1275. p.Material=Enum.Material.Plastic
  1276. p.BrickColor=BrickColor.new("Black")
  1277. p.CFrame=CFrame.new(-46.7000008, 0.300000072, 23.3000031, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1278. p.BottomSurface=0
  1279. p.TopSurface=0
  1280. p.Parent=Model p=Instance.new("WedgePart")
  1281. p.Name="Wedge"
  1282. p.formFactor="Custom"
  1283. p.Size=Vector3.new(0.600000024, 0.5, 0.200000003)
  1284. p.Material=Enum.Material.Plastic
  1285. p.BrickColor=BrickColor.new("Pastel Blue")
  1286. p.CFrame=CFrame.new(-46.9000015, 0.640000045, 24.1000004, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  1287. p.BottomSurface=0
  1288. p.TopSurface=0
  1289. p.Parent=Model p=Instance.new("WedgePart")
  1290. p.Name="Wedge"
  1291. p.formFactor="Custom"
  1292. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1293. p.Material=Enum.Material.Plastic
  1294. p.BrickColor=BrickColor.new("Black")
  1295. p.CFrame=CFrame.new(-46.7000008, 0.300000012, 23.9000053, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  1296. p.BottomSurface=0
  1297. p.TopSurface=0
  1298. p.Parent=Model p=Instance.new("Part")
  1299. p.Name="Part"
  1300. p.formFactor="Custom"
  1301. p.Size=Vector3.new(0.600000024, 0.49999994, 1)
  1302. p.Material=Enum.Material.Plastic
  1303. p.BrickColor=BrickColor.new("Pastel Blue")
  1304. p.CFrame=CFrame.new(-46.9000015, 0.640000045, 23.5000019, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1305. p.BottomSurface=0
  1306. p.TopSurface=0
  1307. kl=Instance.new("BlockMesh")
  1308. kl.Scale=Vector3.new(1, 1, 1)
  1309. kl.Parent=p
  1310. p.Parent=Model p=Instance.new("WedgePart")
  1311. p.Name="Wedge"
  1312. p.formFactor="Custom"
  1313. p.Size=Vector3.new(0.600000024, 0.5, 0.400000006)
  1314. p.Material=Enum.Material.Plastic
  1315. p.BrickColor=BrickColor.new("Pastel Blue")
  1316. p.CFrame=CFrame.new(-46.9000015, 0.639999986, 22.7999992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1317. p.BottomSurface=0
  1318. p.TopSurface=0
  1319. p.Parent=Model p=Instance.new("Part")
  1320. p.Name="Part"
  1321. p.formFactor="Custom"
  1322. p.Size=Vector3.new(0.600000024, 0.300000012, 0.299999923)
  1323. p.Material=Enum.Material.Plastic
  1324. p.BrickColor=BrickColor.new("Black")
  1325. p.CFrame=CFrame.new(-46.9000015, 0.697662115, 22.9357719, 1, 0, 0, 0, 0.780868769, -0.624695003, 0, 0.624695003, 0.780868769)
  1326. p.BottomSurface=0
  1327. p.TopSurface=0
  1328. kl=Instance.new("BlockMesh")
  1329. kl.Scale=Vector3.new(0.600000024, 0.5, 0.5)
  1330. kl.Parent=p
  1331. p.Parent=Model p=Instance.new("WedgePart")
  1332. p.Name="Wedge"
  1333. p.formFactor="Custom"
  1334. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1335. p.Material=Enum.Material.Plastic
  1336. p.BrickColor=BrickColor.new("Black")
  1337. p.CFrame=CFrame.new(-47.0999985, 0.300000012, 23.8999996, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  1338. p.BottomSurface=0
  1339. p.TopSurface=0
  1340. p.Parent=Model p=Instance.new("Part")
  1341. p.Name="Part"
  1342. p.formFactor="Custom"
  1343. p.Size=Vector3.new(0.200000003, 0.200000003, 1)
  1344. p.Material=Enum.Material.Plastic
  1345. p.BrickColor=BrickColor.new("Black")
  1346. p.CFrame=CFrame.new(-47.1000023, 0.300000012, 23.3000011, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1347. p.BottomSurface=0
  1348. p.TopSurface=0
  1349. p.Parent=Model p=Instance.new("WedgePart")
  1350. p.Name="Wedge"
  1351. p.formFactor="Custom"
  1352. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1353. p.Material=Enum.Material.Plastic
  1354. p.BrickColor=BrickColor.new("Black")
  1355. p.CFrame=CFrame.new(-46.7000008, 0.300000012, 22.6999989, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1356. p.BottomSurface=0
  1357. p.TopSurface=0
  1358. p.Parent=Model p=Instance.new("WedgePart")
  1359. p.Name="Wedge"
  1360. p.formFactor="Custom"
  1361. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1362. p.Material=Enum.Material.Plastic
  1363. p.BrickColor=BrickColor.new("Black")
  1364. p.CFrame=CFrame.new(-47.1000023, 0.300000012, 22.7000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1365. p.BottomSurface=0
  1366. p.TopSurface=0
  1367. p.Parent=Model
  1368. return Model
  1369. end
  1370. Units["APC"]["Requires"]={"WarFactory","RadarDome"}
  1371.  
  1372. Units["MCV"]={} --Converts into a ConYard
  1373. Units["MCV"]["EnergyCost"]=0
  1374. Units["MCV"]["Speed"]=3
  1375. Units["MCV"]["MaxUnits"]=1
  1376. Units["MCV"]["BuildTime"]=0
  1377. Units["MCV"]["Model"]=function()
  1378. Model=Instance.new("Model")
  1379. Model.Name="MCV" p=Instance.new("Part")
  1380. p.Name="Part"
  1381. p.formFactor="Custom"
  1382. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  1383. p.Material=Enum.Material.Plastic
  1384. p.BrickColor=BrickColor.new("Black")
  1385. p.CFrame=CFrame.new(-68.6999969, 0.99000001, 24, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  1386. p.BottomSurface=0
  1387. p.TopSurface=0
  1388. kl=Instance.new("CylinderMesh")
  1389. kl.Scale=Vector3.new(1.10000002, 0.949999988, 1.10000002)
  1390. kl.Parent=p
  1391. p.Parent=Model p=Instance.new("Part")
  1392. p.Name="Part"
  1393. p.formFactor="Custom"
  1394. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  1395. p.Material=Enum.Material.Plastic
  1396. p.BrickColor=BrickColor.new("Black")
  1397. p.CFrame=CFrame.new(-68.6999969, 0.99000001, 23.6000004, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  1398. p.BottomSurface=0
  1399. p.TopSurface=0
  1400. kl=Instance.new("CylinderMesh")
  1401. kl.Scale=Vector3.new(1.10000002, 0.949999988, 1.10000002)
  1402. kl.Parent=p
  1403. p.Parent=Model p=Instance.new("Part")
  1404. p.Name="Part"
  1405. p.formFactor="Custom"
  1406. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  1407. p.Material=Enum.Material.Plastic
  1408. p.BrickColor=BrickColor.new("Black")
  1409. p.CFrame=CFrame.new(-68.6999969, 0.990000069, 22.9999962, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  1410. p.BottomSurface=0
  1411. p.TopSurface=0
  1412. kl=Instance.new("CylinderMesh")
  1413. kl.Scale=Vector3.new(1.10000002, 0.949999988, 1.10000002)
  1414. kl.Parent=p
  1415. p.Parent=Model p=Instance.new("Part")
  1416. p.Name="Part"
  1417. p.formFactor="Custom"
  1418. p.Size=Vector3.new(0.200000003, 0.600000024, 0.200000003)
  1419. p.Material=Enum.Material.Plastic
  1420. p.BrickColor=BrickColor.new("Dark stone grey")
  1421. p.CFrame=CFrame.new(-68.6999817, 1.69000018, 23.2999992, 0, 4.37113883e-008, -1, 0, 1, 4.37113883e-008, 1, -3.82137093e-015, 4.37113883e-008)
  1422. p.BottomSurface=0
  1423. p.TopSurface=0
  1424. kl=Instance.new("CylinderMesh")
  1425. kl.Scale=Vector3.new(1, 1, 1)
  1426. kl.Parent=p
  1427. p.Parent=Model p=Instance.new("Part")
  1428. p.Name="Part"
  1429. p.formFactor="Custom"
  1430. p.Size=Vector3.new(1, 1, 1)
  1431. p.Material=Enum.Material.Plastic
  1432. p.BrickColor=BrickColor.new("Pastel Blue")
  1433. p.CFrame=CFrame.new(-68.2999878, 1.49000025, 23.9000015, 0, 0, 1, -1, 0, 0, 0, -1, -4.37113883e-008)
  1434. p.BottomSurface=0
  1435. p.TopSurface=0
  1436. kl=Instance.new("CylinderMesh")
  1437. kl.Scale=Vector3.new(1.02999997, 1, 1.02999997)
  1438. kl.Parent=p
  1439. p.Parent=Model p=Instance.new("Part")
  1440. p.Name="Part"
  1441. p.formFactor="Custom"
  1442. p.Size=Vector3.new(0.600000024, 0.200000003, 0.200000003)
  1443. p.Material=Enum.Material.Plastic
  1444. p.BrickColor=BrickColor.new("Pastel Blue")
  1445. p.CFrame=CFrame.new(-68.2999954, 1.09000003, 24.3400078, 1, 0, 0, 0, 0.707106709, -0.707106769, 0, 0.707106769, 0.707106709)
  1446. p.BottomSurface=0
  1447. p.TopSurface=0
  1448. kl=Instance.new("BlockMesh")
  1449. kl.Scale=Vector3.new(1, 1, 1)
  1450. kl.Parent=p
  1451. p.Parent=Model p=Instance.new("Part")
  1452. p.Name="Part"
  1453. p.formFactor="Custom"
  1454. p.Size=Vector3.new(1, 0.600000024, 0.600000024)
  1455. p.Material=Enum.Material.Plastic
  1456. p.BrickColor=BrickColor.new("Dark stone grey")
  1457. p.CFrame=CFrame.new(-68.2999878, 1.49000025, 24.159996, 0, 0, 1, -1, 0, 0, 0, -1, -4.37113883e-008)
  1458. p.BottomSurface=0
  1459. p.TopSurface=0
  1460. kl=Instance.new("CylinderMesh")
  1461. kl.Scale=Vector3.new(1, 1, 1)
  1462. kl.Parent=p
  1463. p.Parent=Model p=Instance.new("Part")
  1464. p.Name="Part"
  1465. p.formFactor="Custom"
  1466. p.Size=Vector3.new(1, 0.600000024, 1)
  1467. p.Material=Enum.Material.Plastic
  1468. p.BrickColor=BrickColor.new("Dark stone grey")
  1469. p.CFrame=CFrame.new(-68.2999954, 1.53000009, 23.9000015, 0, 0, 1, -1, 0, 0, 0, -1, -4.37113883e-008)
  1470. p.BottomSurface=0
  1471. p.TopSurface=0
  1472. kl=Instance.new("CylinderMesh")
  1473. kl.Scale=Vector3.new(1, 1, 1)
  1474. kl.Parent=p
  1475. p.Parent=Model p=Instance.new("Part")
  1476. p.Name="Part"
  1477. p.formFactor="Custom"
  1478. p.Size=Vector3.new(1, 0.400000036, 1.80000019)
  1479. p.Material=Enum.Material.Plastic
  1480. p.BrickColor=BrickColor.new("Pastel Blue")
  1481. p.CFrame=CFrame.new(-68.2999878, 1.19000006, 23.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1482. p.BottomSurface=0
  1483. p.TopSurface=0
  1484. kl=Instance.new("BlockMesh")
  1485. kl.Scale=Vector3.new(1, 1, 1)
  1486. kl.Parent=p
  1487. p.Parent=Model p=Instance.new("Part")
  1488. p.Name="Part"
  1489. p.formFactor="Custom"
  1490. p.Size=Vector3.new(0.600000024, 0.400000036, 0.200000003)
  1491. p.Material=Enum.Material.Plastic
  1492. p.BrickColor=BrickColor.new("Pastel Blue")
  1493. p.CFrame=CFrame.new(-68.2999878, 1.19000006, 22.659996, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1494. p.BottomSurface=0
  1495. p.TopSurface=0
  1496. kl=Instance.new("BlockMesh")
  1497. kl.Scale=Vector3.new(1, 1, 1)
  1498. kl.Parent=p
  1499. p.Parent=Model p=Instance.new("Part")
  1500. p.Name="Part"
  1501. p.formFactor="Custom"
  1502. p.Size=Vector3.new(1, 0.200000003, 0.400000036)
  1503. p.Material=Enum.Material.Plastic
  1504. p.BrickColor=BrickColor.new("Pastel Blue")
  1505. p.CFrame=CFrame.new(-68.2999878, 1.49000013, 23.1999989, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1506. p.BottomSurface=0
  1507. p.TopSurface=0
  1508. kl=Instance.new("BlockMesh")
  1509. kl.Scale=Vector3.new(1, 1, 1)
  1510. kl.Parent=p
  1511. p.Parent=Model p=Instance.new("Part")
  1512. p.Name="Part"
  1513. p.formFactor="Custom"
  1514. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  1515. p.Material=Enum.Material.Plastic
  1516. p.BrickColor=BrickColor.new("Black")
  1517. p.CFrame=CFrame.new(-67.8999939, 0.98999995, 24.0000057, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  1518. p.BottomSurface=0
  1519. p.TopSurface=0
  1520. kl=Instance.new("CylinderMesh")
  1521. kl.Scale=Vector3.new(1.10000002, 0.949999988, 1.10000002)
  1522. kl.Parent=p
  1523. p.Parent=Model p=Instance.new("Part")
  1524. p.Name="Part"
  1525. p.formFactor="Custom"
  1526. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  1527. p.Material=Enum.Material.Plastic
  1528. p.BrickColor=BrickColor.new("Black")
  1529. p.CFrame=CFrame.new(-67.8999939, 0.99000001, 23.6000004, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  1530. p.BottomSurface=0
  1531. p.TopSurface=0
  1532. kl=Instance.new("CylinderMesh")
  1533. kl.Scale=Vector3.new(1.10000002, 0.949999988, 1.10000002)
  1534. kl.Parent=p
  1535. p.Parent=Model p=Instance.new("Part")
  1536. p.Name="Part"
  1537. p.formFactor="Custom"
  1538. p.Size=Vector3.new(0.400000036, 0.200000003, 0.400000006)
  1539. p.Material=Enum.Material.Plastic
  1540. p.BrickColor=BrickColor.new("Black")
  1541. p.CFrame=CFrame.new(-67.8999939, 0.98999995, 23.0000019, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  1542. p.BottomSurface=0
  1543. p.TopSurface=0
  1544. kl=Instance.new("CylinderMesh")
  1545. kl.Scale=Vector3.new(1.10000002, 0.949999988, 1.10000002)
  1546. kl.Parent=p
  1547. p.Parent=Model p=Instance.new("Part")
  1548. p.Name="Part"
  1549. p.formFactor="Custom"
  1550. p.Size=Vector3.new(0.200000003, 0.600000024, 0.200000003)
  1551. p.Material=Enum.Material.Plastic
  1552. p.BrickColor=BrickColor.new("Dark stone grey")
  1553. p.CFrame=CFrame.new(-67.8999939, 1.6900003, 23.3000011, 0, 4.37113883e-008, -1, 0, 1, 4.37113883e-008, 1, -3.82137093e-015, 4.37113883e-008)
  1554. p.BottomSurface=0
  1555. p.TopSurface=0
  1556. kl=Instance.new("CylinderMesh")
  1557. kl.Scale=Vector3.new(1, 1, 1)
  1558. kl.Parent=p
  1559. p.Parent=Model
  1560. return Model
  1561. end
  1562. Units["MCV"]["Requires"]={}
  1563.  
  1564. Units["ConYard"]={}
  1565. Units["ConYard"]["EnergyCost"]=0
  1566. Units["ConYard"]["MaxUnits"]=1
  1567. Units["ConYard"]["BuildTime"]=3
  1568. Units["ConYard"]["Model"]=function()
  1569. Model=Instance.new("Model")
  1570. Model.Name="ConYard" p=Instance.new("Part")
  1571. p.Name="Part"
  1572. p.formFactor="Custom"
  1573. p.Size=Vector3.new(0.80000025, 0.200000003, 0.799999952)
  1574. p.Material=Enum.Material.Plastic
  1575. p.BrickColor=BrickColor.new("Dark stone grey")
  1576. p.CFrame=CFrame.new(-39.0000038, 0.890000165, 17.1999989, 0, 0, 1, 0, -1, 0, 1, 0, -4.37113883e-008)
  1577. p.BottomSurface=0
  1578. p.TopSurface=0
  1579. kl=Instance.new("BlockMesh")
  1580. kl.Scale=Vector3.new(1.45000005, 1, 1)
  1581. kl.Parent=p
  1582. p.Parent=Model p=Instance.new("Part")
  1583. p.Name="Part"
  1584. p.formFactor="Custom"
  1585. p.Size=Vector3.new(0.600000262, 0.600000024, 1.79999995)
  1586. p.Material=Enum.Material.Plastic
  1587. p.BrickColor=BrickColor.new("Pastel Blue")
  1588. p.CFrame=CFrame.new(-38.3000069, 0.490000039, 16.7000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1589. p.BottomSurface=0
  1590. p.TopSurface=0
  1591. kl=Instance.new("BlockMesh")
  1592. kl.Scale=Vector3.new(1, 1, 1)
  1593. kl.Parent=p
  1594. p.Parent=Model p=Instance.new("Part")
  1595. p.Name="Part"
  1596. p.formFactor="Custom"
  1597. p.Size=Vector3.new(0.800000012, 0.600000024, 0.799999833)
  1598. p.Material=Enum.Material.Plastic
  1599. p.BrickColor=BrickColor.new("Pastel Blue")
  1600. p.CFrame=CFrame.new(-38.9999962, 0.490000039, 17.2000027, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1601. p.BottomSurface=0
  1602. p.TopSurface=0
  1603. kl=Instance.new("BlockMesh")
  1604. kl.Scale=Vector3.new(1, 1, 1)
  1605. kl.Parent=p
  1606. p.Parent=Model p=Instance.new("Part")
  1607. p.Name="Plate"
  1608. p.formFactor="Custom"
  1609. p.Size=Vector3.new(3.00000048, 0.200000003, 4)
  1610. p.Material=Enum.Material.Plastic
  1611. p.BrickColor=BrickColor.new("Medium stone grey")
  1612. p.CFrame=CFrame.new(-39.0999985, 0.090000011, 16, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1613. p.BottomSurface=0
  1614. p.TopSurface=0
  1615. p.Parent=Model p=Instance.new("Part")
  1616. p.Name="Part"
  1617. p.formFactor="Custom"
  1618. p.Size=Vector3.new(0.600000262, 0.200000003, 1.79999995)
  1619. p.Material=Enum.Material.Plastic
  1620. p.BrickColor=BrickColor.new("Dark stone grey")
  1621. p.CFrame=CFrame.new(-38.3000069, 0.890000105, 16.7000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1622. p.BottomSurface=0
  1623. p.TopSurface=0
  1624. kl=Instance.new("BlockMesh")
  1625. kl.Scale=Vector3.new(1.20000005, 1, 1.20000005)
  1626. kl.Parent=p
  1627. p.Parent=Model p=Instance.new("Part")
  1628. p.Name="Part"
  1629. p.formFactor="Custom"
  1630. p.Size=Vector3.new(1.20000005, 1.80000019, 1)
  1631. p.Material=Enum.Material.Plastic
  1632. p.BrickColor=BrickColor.new("Pastel Blue")
  1633. p.CFrame=CFrame.new(-39.8999977, 1.3900001, 16.6999989, 0, 0, 1, -1, 0, 0, 0, -1, -4.37113883e-008)
  1634. p.BottomSurface=0
  1635. p.TopSurface=0
  1636. kl=Instance.new("CylinderMesh")
  1637. kl.Scale=Vector3.new(1, 1, 1)
  1638. kl.Parent=p
  1639. p.Parent=Model p=Instance.new("Part")
  1640. p.Name="Part"
  1641. p.formFactor="Custom"
  1642. p.Size=Vector3.new(1.00000024, 1.20000005, 1.79999995)
  1643. p.Material=Enum.Material.Plastic
  1644. p.BrickColor=BrickColor.new("Pastel Blue")
  1645. p.CFrame=CFrame.new(-39.8999977, 0.790000081, 16.7000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1646. p.BottomSurface=0
  1647. p.TopSurface=0
  1648. kl=Instance.new("BlockMesh")
  1649. kl.Scale=Vector3.new(1, 1, 1)
  1650. kl.Parent=p
  1651. p.Parent=Model p=Instance.new("Part")
  1652. p.Name="Part"
  1653. p.formFactor="Custom"
  1654. p.Size=Vector3.new(1.20000005, 1.80000019, 1)
  1655. p.Material=Enum.Material.Plastic
  1656. p.BrickColor=BrickColor.new("Dark stone grey")
  1657. p.CFrame=CFrame.new(-39.9000015, 1.38999987, 16.7000008, 0, 0, 1, -1, 0, 0, 0, -1, -4.37113883e-008)
  1658. p.BottomSurface=0
  1659. p.TopSurface=0
  1660. kl=Instance.new("CylinderMesh")
  1661. kl.Scale=Vector3.new(0.800000012, 1, 0.800000012)
  1662. kl.Parent=p
  1663. p.Parent=Model p=Instance.new("Part")
  1664. p.Name="Part"
  1665. p.formFactor="Custom"
  1666. p.Size=Vector3.new(0.200000003, 1, 0.200000003)
  1667. p.Material=Enum.Material.Plastic
  1668. p.BrickColor=BrickColor.new("Medium stone grey")
  1669. p.CFrame=CFrame.new(-39.5000038, 0.690000057, 14.500001, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1670. p.BottomSurface=0
  1671. p.TopSurface=0
  1672. kl=Instance.new("BlockMesh")
  1673. kl.Scale=Vector3.new(1, 1, 1)
  1674. kl.Parent=p
  1675. p.Parent=Model p=Instance.new("Part")
  1676. p.Name="Part"
  1677. p.formFactor="Custom"
  1678. p.Size=Vector3.new(1.00000024, 1.20000005, 1.5999999)
  1679. p.Material=Enum.Material.Plastic
  1680. p.BrickColor=BrickColor.new("Dark stone grey")
  1681. p.CFrame=CFrame.new(-39.9000015, 0.790000081, 16.6000004, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1682. p.BottomSurface=0
  1683. p.TopSurface=0
  1684. kl=Instance.new("BlockMesh")
  1685. kl.Scale=Vector3.new(0.800000012, 1, 1.00999999)
  1686. kl.Parent=p
  1687. p.Parent=Model p=Instance.new("Part")
  1688. p.Name="Part"
  1689. p.formFactor="Custom"
  1690. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1691. p.Material=Enum.Material.Plastic
  1692. p.BrickColor=BrickColor.new("Medium stone grey")
  1693. p.CFrame=CFrame.new(-39.9000015, 0.889999986, 14.500001, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1694. p.BottomSurface=0
  1695. p.TopSurface=0
  1696. kl=Instance.new("BlockMesh")
  1697. kl.Scale=Vector3.new(1, 1, 1)
  1698. kl.Parent=p
  1699. p.Parent=Model p=Instance.new("Part")
  1700. p.Name="Part"
  1701. p.formFactor="Custom"
  1702. p.Size=Vector3.new(1.00000024, 0.200000003, 1.5999999)
  1703. p.Material=Enum.Material.Plastic
  1704. p.BrickColor=BrickColor.new("Dark stone grey")
  1705. p.CFrame=CFrame.new(-39.8999901, 0.290000021, 14.999999, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1706. p.BottomSurface=0
  1707. p.TopSurface=0
  1708. kl=Instance.new("BlockMesh")
  1709. kl.Scale=Vector3.new(1, 1, 1.00999999)
  1710. kl.Parent=p
  1711. p.Parent=Model p=Instance.new("Part")
  1712. p.Name="Part"
  1713. p.formFactor="Custom"
  1714. p.Size=Vector3.new(0.200000033, 0.200000003, 0.200000003)
  1715. p.Material=Enum.Material.Plastic
  1716. p.BrickColor=BrickColor.new("Bright yellow")
  1717. p.CFrame=CFrame.new(-39.9000015, 0.689999998, 14.500001, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1718. p.BottomSurface=0
  1719. p.TopSurface=0
  1720. kl=Instance.new("BlockMesh")
  1721. kl.Scale=Vector3.new(1, 1, 1)
  1722. kl.Parent=p
  1723. p.Parent=Model p=Instance.new("Part")
  1724. p.Name="Part"
  1725. p.formFactor="Custom"
  1726. p.Size=Vector3.new(0.600000024, 0.200000003, 0.200000003)
  1727. p.Material=Enum.Material.Plastic
  1728. p.BrickColor=BrickColor.new("Medium stone grey")
  1729. p.CFrame=CFrame.new(-39.8999977, 1.09000015, 14.500001, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1730. p.BottomSurface=0
  1731. p.TopSurface=0
  1732. kl=Instance.new("BlockMesh")
  1733. kl.Scale=Vector3.new(1, 1, 1)
  1734. kl.Parent=p
  1735. p.Parent=Model p=Instance.new("Part")
  1736. p.Name="Part"
  1737. p.formFactor="Custom"
  1738. p.Size=Vector3.new(0.200000003, 1, 0.200000003)
  1739. p.Material=Enum.Material.Plastic
  1740. p.BrickColor=BrickColor.new("Medium stone grey")
  1741. p.CFrame=CFrame.new(-40.3000031, 0.690000057, 14.500001, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1742. p.BottomSurface=0
  1743. p.TopSurface=0
  1744. kl=Instance.new("BlockMesh")
  1745. kl.Scale=Vector3.new(1, 1, 1)
  1746. kl.Parent=p
  1747. p.Parent=Model
  1748. return Model
  1749. end
  1750. Units["ConYard"]["Requires"]={"MCV"}
  1751.  
  1752. Units["PowerPlant"]={}
  1753. Units["PowerPlant"]["EnergyCost"]=-100
  1754. Units["PowerPlant"]["MaxUnits"]=5
  1755. Units["PowerPlant"]["BuildTime"]=6
  1756. Units["PowerPlant"]["Model"]=function()
  1757. Model=Instance.new("Model")
  1758. Model.Name="PowerPlant" p=Instance.new("Part")
  1759. p.Name="Part"
  1760. p.formFactor="Custom"
  1761. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  1762. p.Material=Enum.Material.Plastic
  1763. p.BrickColor=BrickColor.new("Mid gray")
  1764. p.CFrame=CFrame.new(-31.9999924, 0.5, 17, 0, 0, -1, 0, -1, -0, -1, 0, -0)
  1765. p.BottomSurface=0
  1766. p.TopSurface=0
  1767. kl=Instance.new("BlockMesh")
  1768. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  1769. kl.Parent=p
  1770. p.Parent=Model p=Instance.new("Part")
  1771. p.Name="Part"
  1772. p.formFactor="Custom"
  1773. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  1774. p.Material=Enum.Material.Plastic
  1775. p.BrickColor=BrickColor.new("Mid gray")
  1776. p.CFrame=CFrame.new(-31.9999924, 0.5, 16, 0, 0, -1, 0, -1, -0, -1, 0, -0)
  1777. p.BottomSurface=0
  1778. p.TopSurface=0
  1779. kl=Instance.new("BlockMesh")
  1780. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  1781. kl.Parent=p
  1782. p.Parent=Model p=Instance.new("Part")
  1783. p.Name="Part"
  1784. p.formFactor="Custom"
  1785. p.Size=Vector3.new(0.400000006, 0.200000003, 1.79999995)
  1786. p.Material=Enum.Material.Plastic
  1787. p.BrickColor=BrickColor.new("Mid gray")
  1788. p.CFrame=CFrame.new(-31.9999924, 0.5, 16.5, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  1789. p.BottomSurface=0
  1790. p.TopSurface=0
  1791. kl=Instance.new("BlockMesh")
  1792. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  1793. kl.Parent=p
  1794. p.Parent=Model p=Instance.new("Part")
  1795. p.Name="Part"
  1796. p.formFactor="Custom"
  1797. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  1798. p.Material=Enum.Material.Plastic
  1799. p.BrickColor=BrickColor.new("Mid gray")
  1800. p.CFrame=CFrame.new(-31.9999924, 0.900000036, 17, 0, 0, -1, 0, -1, -0, -1, 0, -0)
  1801. p.BottomSurface=0
  1802. p.TopSurface=0
  1803. kl=Instance.new("BlockMesh")
  1804. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  1805. kl.Parent=p
  1806. p.Parent=Model p=Instance.new("Part")
  1807. p.Name="Part"
  1808. p.formFactor="Custom"
  1809. p.Size=Vector3.new(0.400000006, 0.200000003, 1.79999995)
  1810. p.Material=Enum.Material.Plastic
  1811. p.BrickColor=BrickColor.new("Mid gray")
  1812. p.CFrame=CFrame.new(-31.9999924, 0.900000036, 16.5, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  1813. p.BottomSurface=0
  1814. p.TopSurface=0
  1815. kl=Instance.new("BlockMesh")
  1816. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  1817. kl.Parent=p
  1818. p.Parent=Model p=Instance.new("Part")
  1819. p.Name="Part"
  1820. p.formFactor="Custom"
  1821. p.Size=Vector3.new(1, 1.4000001, 1.79999995)
  1822. p.Material=Enum.Material.Plastic
  1823. p.BrickColor=BrickColor.new("Pastel Blue")
  1824. p.CFrame=CFrame.new(-31.8999939, 0.900000036, 16.5, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  1825. p.BottomSurface=0
  1826. p.TopSurface=0
  1827. kl=Instance.new("BlockMesh")
  1828. kl.Scale=Vector3.new(1, 1, 1)
  1829. kl.Parent=p
  1830. p.Parent=Model p=Instance.new("Part")
  1831. p.Name="Part"
  1832. p.formFactor="Custom"
  1833. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  1834. p.Material=Enum.Material.Plastic
  1835. p.BrickColor=BrickColor.new("Mid gray")
  1836. p.CFrame=CFrame.new(-31.9999924, 0.900000036, 16, 0, 0, -1, 0, -1, -0, -1, 0, -0)
  1837. p.BottomSurface=0
  1838. p.TopSurface=0
  1839. kl=Instance.new("BlockMesh")
  1840. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  1841. kl.Parent=p
  1842. p.Parent=Model p=Instance.new("Part")
  1843. p.Name="Part"
  1844. p.formFactor="Custom"
  1845. p.Size=Vector3.new(0.400000006, 0.200000003, 1.79999995)
  1846. p.Material=Enum.Material.Plastic
  1847. p.BrickColor=BrickColor.new("Mid gray")
  1848. p.CFrame=CFrame.new(-31.9999924, 1.30000007, 16.5, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  1849. p.BottomSurface=0
  1850. p.TopSurface=0
  1851. kl=Instance.new("BlockMesh")
  1852. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  1853. kl.Parent=p
  1854. p.Parent=Model p=Instance.new("Part")
  1855. p.Name="Part"
  1856. p.formFactor="Custom"
  1857. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  1858. p.Material=Enum.Material.Plastic
  1859. p.BrickColor=BrickColor.new("Mid gray")
  1860. p.CFrame=CFrame.new(-31.9999924, 1.30000007, 16, 0, 0, -1, 0, -1, -0, -1, 0, -0)
  1861. p.BottomSurface=0
  1862. p.TopSurface=0
  1863. kl=Instance.new("BlockMesh")
  1864. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  1865. kl.Parent=p
  1866. p.Parent=Model p=Instance.new("Part")
  1867. p.Name="Part"
  1868. p.formFactor="Custom"
  1869. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  1870. p.Material=Enum.Material.Plastic
  1871. p.BrickColor=BrickColor.new("Mid gray")
  1872. p.CFrame=CFrame.new(-31.9999924, 1.30000007, 17, 0, 0, -1, 0, -1, -0, -1, 0, -0)
  1873. p.BottomSurface=0
  1874. p.TopSurface=0
  1875. kl=Instance.new("BlockMesh")
  1876. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  1877. kl.Parent=p
  1878. p.Parent=Model p=Instance.new("Part")
  1879. p.Name="Part"
  1880. p.formFactor="Custom"
  1881. p.Size=Vector3.new(0.600000024, 0.400000006, 0.799999833)
  1882. p.Material=Enum.Material.Plastic
  1883. p.BrickColor=BrickColor.new("Dark stone grey")
  1884. p.CFrame=CFrame.new(-31.8999901, 2.20000029, 16.8000011, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1885. p.BottomSurface=0
  1886. p.TopSurface=0
  1887. kl=Instance.new("CylinderMesh")
  1888. kl.Scale=Vector3.new(0.600000024, 1, 0.600000024)
  1889. kl.Parent=p
  1890. p.Parent=Model p=Instance.new("Part")
  1891. p.Name="Part"
  1892. p.formFactor="Custom"
  1893. p.Size=Vector3.new(0.600000024, 0.200000003, 0.799999833)
  1894. p.Material=Enum.Material.Plastic
  1895. p.BrickColor=BrickColor.new("Dark stone grey")
  1896. p.CFrame=CFrame.new(-31.8999901, 1.9000001, 16.2000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1897. p.BottomSurface=0
  1898. p.TopSurface=0
  1899. kl=Instance.new("CylinderMesh")
  1900. kl.Scale=Vector3.new(0.899999976, 1, 0.899999976)
  1901. kl.Parent=p
  1902. p.Parent=Model p=Instance.new("Part")
  1903. p.Name="Part"
  1904. p.formFactor="Custom"
  1905. p.Size=Vector3.new(0.600000024, 0.200000003, 0.799999833)
  1906. p.Material=Enum.Material.Plastic
  1907. p.BrickColor=BrickColor.new("Dark stone grey")
  1908. p.CFrame=CFrame.new(-31.8999901, 1.90000021, 16.8000011, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1909. p.BottomSurface=0
  1910. p.TopSurface=0
  1911. kl=Instance.new("CylinderMesh")
  1912. kl.Scale=Vector3.new(0.899999976, 1, 0.899999976)
  1913. kl.Parent=p
  1914. p.Parent=Model p=Instance.new("Part")
  1915. p.Name="Part"
  1916. p.formFactor="Custom"
  1917. p.Size=Vector3.new(0.600000024, 0.200000003, 1.39999986)
  1918. p.Material=Enum.Material.Plastic
  1919. p.BrickColor=BrickColor.new("Dark stone grey")
  1920. p.CFrame=CFrame.new(-31.8999939, 1.70000017, 16.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1921. p.BottomSurface=0
  1922. p.TopSurface=0
  1923. kl=Instance.new("BlockMesh")
  1924. kl.Scale=Vector3.new(1, 1, 1)
  1925. kl.Parent=p
  1926. p.Parent=Model p=Instance.new("Part")
  1927. p.Name="Part"
  1928. p.formFactor="Custom"
  1929. p.Size=Vector3.new(0.600000024, 0.400000006, 0.799999833)
  1930. p.Material=Enum.Material.Plastic
  1931. p.BrickColor=BrickColor.new("Dark stone grey")
  1932. p.CFrame=CFrame.new(-31.8999901, 2.20000005, 16.2000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1933. p.BottomSurface=0
  1934. p.TopSurface=0
  1935. kl=Instance.new("CylinderMesh")
  1936. kl.Scale=Vector3.new(0.600000024, 1, 0.600000024)
  1937. kl.Parent=p
  1938. p.Parent=Model p=Instance.new("Part")
  1939. p.Name="Plate"
  1940. p.formFactor="Custom"
  1941. p.Size=Vector3.new(3.00000048, 0.200000003, 3.00000024)
  1942. p.Material=Enum.Material.Plastic
  1943. p.BrickColor=BrickColor.new("Medium stone grey")
  1944. p.CFrame=CFrame.new(-31.0999908, 0.090000011, 16.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1945. p.BottomSurface=0
  1946. p.TopSurface=0
  1947. p.Parent=Model p=Instance.new("Part")
  1948. p.Name="Part"
  1949. p.formFactor="Custom"
  1950. p.Size=Vector3.new(0.600000024, 0.800000012, 0.400000036)
  1951. p.Material=Enum.Material.Plastic
  1952. p.BrickColor=BrickColor.new("Pastel Blue")
  1953. p.CFrame=CFrame.new(-31.0999832, 0.390000015, 15.5999832, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1954. p.BottomSurface=0
  1955. p.TopSurface=0
  1956. kl=Instance.new("BlockMesh")
  1957. kl.Scale=Vector3.new(1, 1, 1)
  1958. kl.Parent=p
  1959. p.Parent=Model p=Instance.new("Part")
  1960. p.Name="Part"
  1961. p.formFactor="Custom"
  1962. p.Size=Vector3.new(0.600000024, 0.200000003, 0.999999821)
  1963. p.Material=Enum.Material.Plastic
  1964. p.BrickColor=BrickColor.new("Dark stone grey")
  1965. p.CFrame=CFrame.new(-31.0999908, 1.09000003, 16.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1966. p.BottomSurface=0
  1967. p.TopSurface=0
  1968. kl=Instance.new("BlockMesh")
  1969. kl.Scale=Vector3.new(1, 1, 1)
  1970. kl.Parent=p
  1971. p.Parent=Model p=Instance.new("Part")
  1972. p.Name="Part"
  1973. p.formFactor="Custom"
  1974. p.Size=Vector3.new(0.600000024, 0.800000012, 1.39999986)
  1975. p.Material=Enum.Material.Plastic
  1976. p.BrickColor=BrickColor.new("Pastel Blue")
  1977. p.CFrame=CFrame.new(-31.1000099, 0.589999795, 16.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  1978. p.BottomSurface=0
  1979. p.TopSurface=0
  1980. kl=Instance.new("BlockMesh")
  1981. kl.Scale=Vector3.new(1, 1, 1)
  1982. kl.Parent=p
  1983. p.Parent=Model p=Instance.new("Part")
  1984. p.Name="Part"
  1985. p.formFactor="Custom"
  1986. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  1987. p.Material=Enum.Material.Plastic
  1988. p.BrickColor=BrickColor.new("Mid gray")
  1989. p.CFrame=CFrame.new(-30.2000046, 0.490000069, 17, 0, 0, 1, 0, -1, 0, 1, 0, -0)
  1990. p.BottomSurface=0
  1991. p.TopSurface=0
  1992. kl=Instance.new("BlockMesh")
  1993. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  1994. kl.Parent=p
  1995. p.Parent=Model p=Instance.new("Part")
  1996. p.Name="Part"
  1997. p.formFactor="Custom"
  1998. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  1999. p.Material=Enum.Material.Plastic
  2000. p.BrickColor=BrickColor.new("Mid gray")
  2001. p.CFrame=CFrame.new(-30.1999931, 0.890000045, 17, 0, 0, 1, 0, -1, 0, 1, 0, -0)
  2002. p.BottomSurface=0
  2003. p.TopSurface=0
  2004. kl=Instance.new("BlockMesh")
  2005. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  2006. kl.Parent=p
  2007. p.Parent=Model p=Instance.new("Part")
  2008. p.Name="Part"
  2009. p.formFactor="Custom"
  2010. p.Size=Vector3.new(0.400000006, 0.200000003, 1.79999995)
  2011. p.Material=Enum.Material.Plastic
  2012. p.BrickColor=BrickColor.new("Mid gray")
  2013. p.CFrame=CFrame.new(-30.2000046, 0.49000001, 16.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2014. p.BottomSurface=0
  2015. p.TopSurface=0
  2016. kl=Instance.new("BlockMesh")
  2017. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  2018. kl.Parent=p
  2019. p.Parent=Model p=Instance.new("Part")
  2020. p.Name="Part"
  2021. p.formFactor="Custom"
  2022. p.Size=Vector3.new(1, 1.4000001, 1.79999995)
  2023. p.Material=Enum.Material.Plastic
  2024. p.BrickColor=BrickColor.new("Pastel Blue")
  2025. p.CFrame=CFrame.new(-30.3000069, 0.890000105, 16.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2026. p.BottomSurface=0
  2027. p.TopSurface=0
  2028. kl=Instance.new("BlockMesh")
  2029. kl.Scale=Vector3.new(1, 1, 1)
  2030. kl.Parent=p
  2031. p.Parent=Model p=Instance.new("Part")
  2032. p.Name="Part"
  2033. p.formFactor="Custom"
  2034. p.Size=Vector3.new(0.400000006, 0.200000003, 1.79999995)
  2035. p.Material=Enum.Material.Plastic
  2036. p.BrickColor=BrickColor.new("Mid gray")
  2037. p.CFrame=CFrame.new(-30.1999931, 0.890000045, 16.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2038. p.BottomSurface=0
  2039. p.TopSurface=0
  2040. kl=Instance.new("BlockMesh")
  2041. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  2042. kl.Parent=p
  2043. p.Parent=Model p=Instance.new("Part")
  2044. p.Name="Part"
  2045. p.formFactor="Custom"
  2046. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  2047. p.Material=Enum.Material.Plastic
  2048. p.BrickColor=BrickColor.new("Mid gray")
  2049. p.CFrame=CFrame.new(-30.2000046, 0.490000069, 16, 0, 0, 1, 0, -1, 0, 1, 0, -4.37113883e-008)
  2050. p.BottomSurface=0
  2051. p.TopSurface=0
  2052. kl=Instance.new("BlockMesh")
  2053. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  2054. kl.Parent=p
  2055. p.Parent=Model p=Instance.new("Part")
  2056. p.Name="Part"
  2057. p.formFactor="Custom"
  2058. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  2059. p.Material=Enum.Material.Plastic
  2060. p.BrickColor=BrickColor.new("Mid gray")
  2061. p.CFrame=CFrame.new(-30.1999931, 1.29000008, 17, 0, 0, 1, 0, -1, 0, 1, 0, -0)
  2062. p.BottomSurface=0
  2063. p.TopSurface=0
  2064. kl=Instance.new("BlockMesh")
  2065. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  2066. kl.Parent=p
  2067. p.Parent=Model p=Instance.new("Part")
  2068. p.Name="Part"
  2069. p.formFactor="Custom"
  2070. p.Size=Vector3.new(0.400000006, 0.200000003, 1.79999995)
  2071. p.Material=Enum.Material.Plastic
  2072. p.BrickColor=BrickColor.new("Mid gray")
  2073. p.CFrame=CFrame.new(-30.1999931, 1.29000008, 16.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2074. p.BottomSurface=0
  2075. p.TopSurface=0
  2076. kl=Instance.new("BlockMesh")
  2077. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  2078. kl.Parent=p
  2079. p.Parent=Model p=Instance.new("Part")
  2080. p.Name="Part"
  2081. p.formFactor="Custom"
  2082. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  2083. p.Material=Enum.Material.Plastic
  2084. p.BrickColor=BrickColor.new("Mid gray")
  2085. p.CFrame=CFrame.new(-30.1999931, 0.890000045, 16, 0, 0, 1, 0, -1, 0, 1, 0, -4.37113883e-008)
  2086. p.BottomSurface=0
  2087. p.TopSurface=0
  2088. kl=Instance.new("BlockMesh")
  2089. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  2090. kl.Parent=p
  2091. p.Parent=Model p=Instance.new("Part")
  2092. p.Name="Part"
  2093. p.formFactor="Custom"
  2094. p.Size=Vector3.new(0.600000024, 0.200000003, 0.799999833)
  2095. p.Material=Enum.Material.Plastic
  2096. p.BrickColor=BrickColor.new("Dark stone grey")
  2097. p.CFrame=CFrame.new(-30.3000069, 1.88999999, 16.7999992, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2098. p.BottomSurface=0
  2099. p.TopSurface=0
  2100. kl=Instance.new("CylinderMesh")
  2101. kl.Scale=Vector3.new(0.899999976, 1, 0.899999976)
  2102. kl.Parent=p
  2103. p.Parent=Model p=Instance.new("Part")
  2104. p.Name="Part"
  2105. p.formFactor="Custom"
  2106. p.Size=Vector3.new(0.600000024, 0.200000003, 1.39999986)
  2107. p.Material=Enum.Material.Plastic
  2108. p.BrickColor=BrickColor.new("Dark stone grey")
  2109. p.CFrame=CFrame.new(-30.3000069, 1.69000018, 16.4999981, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2110. p.BottomSurface=0
  2111. p.TopSurface=0
  2112. kl=Instance.new("BlockMesh")
  2113. kl.Scale=Vector3.new(1, 1, 1)
  2114. kl.Parent=p
  2115. p.Parent=Model p=Instance.new("Part")
  2116. p.Name="Part"
  2117. p.formFactor="Custom"
  2118. p.Size=Vector3.new(0.400000006, 0.200000003, 0.799999833)
  2119. p.Material=Enum.Material.Plastic
  2120. p.BrickColor=BrickColor.new("Mid gray")
  2121. p.CFrame=CFrame.new(-30.1999931, 1.29000008, 16, 0, 0, 1, 0, -1, 0, 1, 0, -4.37113883e-008)
  2122. p.BottomSurface=0
  2123. p.TopSurface=0
  2124. kl=Instance.new("BlockMesh")
  2125. kl.Scale=Vector3.new(1.04999995, 1, 1.04999995)
  2126. kl.Parent=p
  2127. p.Parent=Model p=Instance.new("Part")
  2128. p.Name="Part"
  2129. p.formFactor="Custom"
  2130. p.Size=Vector3.new(0.600000024, 0.400000006, 0.799999833)
  2131. p.Material=Enum.Material.Plastic
  2132. p.BrickColor=BrickColor.new("Dark stone grey")
  2133. p.CFrame=CFrame.new(-30.3000069, 2.19000006, 16.7999992, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2134. p.BottomSurface=0
  2135. p.TopSurface=0
  2136. kl=Instance.new("CylinderMesh")
  2137. kl.Scale=Vector3.new(0.600000024, 1, 0.600000024)
  2138. kl.Parent=p
  2139. p.Parent=Model p=Instance.new("Part")
  2140. p.Name="Part"
  2141. p.formFactor="Custom"
  2142. p.Size=Vector3.new(0.600000024, 0.200000003, 0.799999833)
  2143. p.Material=Enum.Material.Plastic
  2144. p.BrickColor=BrickColor.new("Dark stone grey")
  2145. p.CFrame=CFrame.new(-30.3000069, 1.8900001, 16.2000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2146. p.BottomSurface=0
  2147. p.TopSurface=0
  2148. kl=Instance.new("CylinderMesh")
  2149. kl.Scale=Vector3.new(0.899999976, 1, 0.899999976)
  2150. kl.Parent=p
  2151. p.Parent=Model p=Instance.new("Part")
  2152. p.Name="Part"
  2153. p.formFactor="Custom"
  2154. p.Size=Vector3.new(0.600000024, 0.400000006, 0.799999833)
  2155. p.Material=Enum.Material.Plastic
  2156. p.BrickColor=BrickColor.new("Dark stone grey")
  2157. p.CFrame=CFrame.new(-30.3000069, 2.19000006, 16.2000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2158. p.BottomSurface=0
  2159. p.TopSurface=0
  2160. kl=Instance.new("CylinderMesh")
  2161. kl.Scale=Vector3.new(0.600000024, 1, 0.600000024)
  2162. kl.Parent=p
  2163. p.Parent=Model
  2164. return Model
  2165. end
  2166. Units["PowerPlant"]["Requires"]={"ConYard"}
  2167.  
  2168. Units["WarFactory"]={}
  2169. Units["WarFactory"]["EnergyCost"]=40
  2170. Units["WarFactory"]["MaxUnits"]=2
  2171. Units["WarFactory"]["BuildTime"]=4
  2172. Units["WarFactory"]["Model"]=function()
  2173. Model=Instance.new("Model")
  2174. Model.Name="WarFactory" p=Instance.new("Part")
  2175. p.Name="Part"
  2176. p.formFactor="Custom"
  2177. p.Size=Vector3.new(0.200000003, 1, 0.200000003)
  2178. p.Material=Enum.Material.Plastic
  2179. p.BrickColor=BrickColor.new("Pastel Blue")
  2180. p.CFrame=CFrame.new(-35.8999939, 0.690000057, 15.7000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2181. p.BottomSurface=0
  2182. p.TopSurface=0
  2183. kl=Instance.new("BlockMesh")
  2184. kl.Scale=Vector3.new(1, 1, 1)
  2185. kl.Parent=p
  2186. p.Parent=Model p=Instance.new("WedgePart")
  2187. p.Name="Part"
  2188. p.formFactor="Custom"
  2189. p.Size=Vector3.new(1.80000019, 0.200000003, 0.400000006)
  2190. p.Material=Enum.Material.Plastic
  2191. p.BrickColor=BrickColor.new("Pastel Blue")
  2192. p.CFrame=CFrame.new(-35.9999962, 1.49000013, 16.7000008, 0, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-008)
  2193. p.BottomSurface=0
  2194. p.TopSurface=0
  2195. p.Parent=Model p=Instance.new("Part")
  2196. p.Name="Part"
  2197. p.formFactor="Custom"
  2198. p.Size=Vector3.new(1, 0.400000036, 0.200000003)
  2199. p.Material=Enum.Material.Plastic
  2200. p.BrickColor=BrickColor.new("Pastel Blue")
  2201. p.CFrame=CFrame.new(-35.5, 0.390000165, 17.7000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2202. p.BottomSurface=0
  2203. p.TopSurface=0
  2204. kl=Instance.new("BlockMesh")
  2205. kl.Scale=Vector3.new(1, 1, 1)
  2206. kl.Parent=p
  2207. p.Parent=Model p=Instance.new("Part")
  2208. p.Name="Plate"
  2209. p.formFactor="Custom"
  2210. p.Size=Vector3.new(3.00000048, 0.200000003, 3.00000024)
  2211. p.Material=Enum.Material.Plastic
  2212. p.BrickColor=BrickColor.new("Medium stone grey")
  2213. p.CFrame=CFrame.new(-35.0999908, 0.090000011, 16.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2214. p.BottomSurface=0
  2215. p.TopSurface=0
  2216. p.Parent=Model p=Instance.new("Part")
  2217. p.Name="Part"
  2218. p.formFactor="Custom"
  2219. p.Size=Vector3.new(1.40000033, 1, 0.200000003)
  2220. p.Material=Enum.Material.Plastic
  2221. p.BrickColor=BrickColor.new("Dark stone grey")
  2222. p.CFrame=CFrame.new(-35.0999947, 0.690000117, 15.7899971, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2223. p.BottomSurface=0
  2224. p.TopSurface=0
  2225. kl=Instance.new("BlockMesh")
  2226. kl.Scale=Vector3.new(1, 1, 1)
  2227. kl.Parent=p
  2228. p.Parent=Model p=Instance.new("Part")
  2229. p.Name="Part"
  2230. p.formFactor="Custom"
  2231. p.Size=Vector3.new(0.200000003, 1.79999995, 0.200000003)
  2232. p.Material=Enum.Material.Plastic
  2233. p.BrickColor=BrickColor.new("Pastel Blue")
  2234. p.CFrame=CFrame.new(-35.0999908, 1.29000008, 15.7000008, 4.37113741e-008, 0.999999881, -8.74227695e-008, 0, -4.37113776e-008, -0.999999821, -0.999999821, -1.91068462e-015, 3.55271368e-015)
  2235. p.BottomSurface=0
  2236. p.TopSurface=0
  2237. kl=Instance.new("BlockMesh")
  2238. kl.Scale=Vector3.new(1, 1, 1)
  2239. kl.Parent=p
  2240. p.Parent=Model p=Instance.new("Part")
  2241. p.Name="Part"
  2242. p.formFactor="Custom"
  2243. p.Size=Vector3.new(1.4000001, 0.200000003, 1.79999995)
  2244. p.Material=Enum.Material.Plastic
  2245. p.BrickColor=BrickColor.new("Pastel Blue")
  2246. p.CFrame=CFrame.new(-35.0999947, 1.49000001, 16.7000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2247. p.BottomSurface=0
  2248. p.TopSurface=0
  2249. kl=Instance.new("BlockMesh")
  2250. kl.Scale=Vector3.new(1, 1, 1)
  2251. kl.Parent=p
  2252. p.Parent=Model p=Instance.new("Part")
  2253. p.Name="Part"
  2254. p.formFactor="Custom"
  2255. p.Size=Vector3.new(2.20000029, 1.20000005, 1.79999995)
  2256. p.Material=Enum.Material.Plastic
  2257. p.BrickColor=BrickColor.new("Pastel Blue")
  2258. p.CFrame=CFrame.new(-35.0999985, 0.790000021, 16.7000008, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2259. p.BottomSurface=0
  2260. p.TopSurface=0
  2261. kl=Instance.new("BlockMesh")
  2262. kl.Scale=Vector3.new(1, 1, 1)
  2263. kl.Parent=p
  2264. p.Parent=Model p=Instance.new("Part")
  2265. p.Name="Part"
  2266. p.formFactor="Custom"
  2267. p.Size=Vector3.new(0.200000003, 1, 0.200000003)
  2268. p.Material=Enum.Material.Plastic
  2269. p.BrickColor=BrickColor.new("Pastel Blue")
  2270. p.CFrame=CFrame.new(-34.3000031, 0.690000057, 15.7000017, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2271. p.BottomSurface=0
  2272. p.TopSurface=0
  2273. kl=Instance.new("BlockMesh")
  2274. kl.Scale=Vector3.new(1, 1, 1)
  2275. kl.Parent=p
  2276. p.Parent=Model p=Instance.new("WedgePart")
  2277. p.Name="Part"
  2278. p.formFactor="Custom"
  2279. p.Size=Vector3.new(1.80000019, 0.200000003, 0.400000006)
  2280. p.Material=Enum.Material.Plastic
  2281. p.BrickColor=BrickColor.new("Pastel Blue")
  2282. p.CFrame=CFrame.new(-34.1999969, 1.49000013, 16.7000008, 4.37113883e-008, 0, -1, 0, 1, 0, 1, 0, 4.37113883e-008)
  2283. p.BottomSurface=0
  2284. p.TopSurface=0
  2285. p.Parent=Model
  2286. return Model
  2287. end
  2288. Units["WarFactory"]["Requires"]={"ConYard"}
  2289.  
  2290. Units["Barracks"]={}
  2291. Units["Barracks"]["EnergyCost"]=20
  2292. Units["Barracks"]["MaxUnits"]=3
  2293. Units["Barracks"]["BuildTime"]=2
  2294. Units["Barracks"]["Model"]=function()
  2295. Model=Instance.new("Model")
  2296. Model.Name="Barracks" p=Instance.new("WedgePart")
  2297. p.Name="Part"
  2298. p.formFactor="Custom"
  2299. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2300. p.Material=Enum.Material.Plastic
  2301. p.BrickColor=BrickColor.new("Pastel Blue")
  2302. p.CFrame=CFrame.new(-42.8999939, 0.690000057, 15.3000002, -8.74227766e-008, 0, 1, 0, 1, 0, -1, 0, -1.31134158e-007)
  2303. p.BottomSurface=0
  2304. p.TopSurface=0
  2305. p.Parent=Model p=Instance.new("WedgePart")
  2306. p.Name="Part"
  2307. p.formFactor="Custom"
  2308. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2309. p.Material=Enum.Material.Plastic
  2310. p.BrickColor=BrickColor.new("Pastel Blue")
  2311. p.CFrame=CFrame.new(-42.6999931, 0.690000057, 15.3000002, 2.18556949e-007, 0, -1, 0, 1, 0, 1, 0, 2.62268344e-007)
  2312. p.BottomSurface=0
  2313. p.TopSurface=0
  2314. p.Parent=Model p=Instance.new("Part")
  2315. p.Name="Part"
  2316. p.formFactor="Custom"
  2317. p.Size=Vector3.new(0.400000274, 0.400000036, 0.200000003)
  2318. p.Material=Enum.Material.Plastic
  2319. p.BrickColor=BrickColor.new("Pastel Blue")
  2320. p.CFrame=CFrame.new(-42.7999954, 0.390000045, 15.2999992, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2321. p.BottomSurface=0
  2322. p.TopSurface=0
  2323. kl=Instance.new("BlockMesh")
  2324. kl.Scale=Vector3.new(1, 1, 1)
  2325. kl.Parent=p
  2326. p.Parent=Model p=Instance.new("Part")
  2327. p.Name="Part"
  2328. p.formFactor="Custom"
  2329. p.Size=Vector3.new(1.60000038, 0.800000012, 2.4000001)
  2330. p.Material=Enum.Material.Plastic
  2331. p.BrickColor=BrickColor.new("Pastel Blue")
  2332. p.CFrame=CFrame.new(-42.3999939, 0.590000033, 16.6000004, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2333. p.BottomSurface=0
  2334. p.TopSurface=0
  2335. kl=Instance.new("BlockMesh")
  2336. kl.Scale=Vector3.new(1, 1, 1)
  2337. kl.Parent=p
  2338. p.Parent=Model p=Instance.new("Part")
  2339. p.Name="Plate"
  2340. p.formFactor="Custom"
  2341. p.Size=Vector3.new(2.00000048, 0.200000003, 3.00000024)
  2342. p.Material=Enum.Material.Plastic
  2343. p.BrickColor=BrickColor.new("Medium stone grey")
  2344. p.CFrame=CFrame.new(-42.3999939, 0.090000011, 16.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2345. p.BottomSurface=0
  2346. p.TopSurface=0
  2347. p.Parent=Model p=Instance.new("WedgePart")
  2348. p.Name="Part"
  2349. p.formFactor="Custom"
  2350. p.Size=Vector3.new(2.40000033, 0.200000003, 0.200000003)
  2351. p.Material=Enum.Material.Plastic
  2352. p.BrickColor=BrickColor.new("Pastel Blue")
  2353. p.CFrame=CFrame.new(-43.0999947, 1.09000003, 16.6000004, 0, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-008)
  2354. p.BottomSurface=0
  2355. p.TopSurface=0
  2356. p.Parent=Model p=Instance.new("WedgePart")
  2357. p.Name="Part"
  2358. p.formFactor="Custom"
  2359. p.Size=Vector3.new(2.40000033, 0.200000003, 0.200000003)
  2360. p.Material=Enum.Material.Plastic
  2361. p.BrickColor=BrickColor.new("Pastel Blue")
  2362. p.CFrame=CFrame.new(-42.4999962, 1.09000003, 16.5999985, 1.31134158e-007, 0, -1, 0, 1, 0, 1, 0, 1.74845553e-007)
  2363. p.BottomSurface=0
  2364. p.TopSurface=0
  2365. p.Parent=Model p=Instance.new("Part")
  2366. p.Name="Part"
  2367. p.formFactor="Custom"
  2368. p.Size=Vector3.new(0.400000393, 0.200000003, 2.4000001)
  2369. p.Material=Enum.Material.Plastic
  2370. p.BrickColor=BrickColor.new("Pastel Blue")
  2371. p.CFrame=CFrame.new(-42.7999954, 1.09000003, 16.6000004, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2372. p.BottomSurface=0
  2373. p.TopSurface=0
  2374. kl=Instance.new("BlockMesh")
  2375. kl.Scale=Vector3.new(1, 1, 1)
  2376. kl.Parent=p
  2377. p.Parent=Model p=Instance.new("WedgePart")
  2378. p.Name="Part"
  2379. p.formFactor="Custom"
  2380. p.Size=Vector3.new(2.40000033, 0.200000003, 0.200000003)
  2381. p.Material=Enum.Material.Plastic
  2382. p.BrickColor=BrickColor.new("Pastel Blue")
  2383. p.CFrame=CFrame.new(-42.2999916, 1.09000003, 16.6000004, -8.74227766e-008, 0, 1, 0, 1, 0, -1, 0, -1.31134158e-007)
  2384. p.BottomSurface=0
  2385. p.TopSurface=0
  2386. p.Parent=Model p=Instance.new("WedgePart")
  2387. p.Name="Part"
  2388. p.formFactor="Custom"
  2389. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2390. p.Material=Enum.Material.Plastic
  2391. p.BrickColor=BrickColor.new("Pastel Blue")
  2392. p.CFrame=CFrame.new(-42.0999947, 0.690000057, 15.3000002, -1.74845553e-007, 0, 1, 0, 1, 0, -1, 0, -1.74845553e-007)
  2393. p.BottomSurface=0
  2394. p.TopSurface=0
  2395. p.Parent=Model p=Instance.new("Part")
  2396. p.Name="Part"
  2397. p.formFactor="Custom"
  2398. p.Size=Vector3.new(0.400000274, 0.400000036, 0.200000003)
  2399. p.Material=Enum.Material.Plastic
  2400. p.BrickColor=BrickColor.new("Pastel Blue")
  2401. p.CFrame=CFrame.new(-42.0000114, 0.389999956, 15.2999992, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2402. p.BottomSurface=0
  2403. p.TopSurface=0
  2404. kl=Instance.new("BlockMesh")
  2405. kl.Scale=Vector3.new(1, 1, 1)
  2406. kl.Parent=p
  2407. p.Parent=Model p=Instance.new("Part")
  2408. p.Name="Part"
  2409. p.formFactor="Custom"
  2410. p.Size=Vector3.new(0.400000393, 0.200000003, 2.4000001)
  2411. p.Material=Enum.Material.Plastic
  2412. p.BrickColor=BrickColor.new("Pastel Blue")
  2413. p.CFrame=CFrame.new(-42, 1.08999991, 16.6000004, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2414. p.BottomSurface=0
  2415. p.TopSurface=0
  2416. kl=Instance.new("BlockMesh")
  2417. kl.Scale=Vector3.new(1, 1, 1)
  2418. kl.Parent=p
  2419. p.Parent=Model p=Instance.new("WedgePart")
  2420. p.Name="Part"
  2421. p.formFactor="Custom"
  2422. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2423. p.Material=Enum.Material.Plastic
  2424. p.BrickColor=BrickColor.new("Pastel Blue")
  2425. p.CFrame=CFrame.new(-41.900013, 0.689999998, 15.2999992, 1.31134158e-007, 0, -1, 0, 1, 0, 1, 0, 1.74845553e-007)
  2426. p.BottomSurface=0
  2427. p.TopSurface=0
  2428. p.Parent=Model p=Instance.new("Part")
  2429. p.Name="Part"
  2430. p.formFactor="Custom"
  2431. p.Size=Vector3.new(0.200000003, 0.800000012, 0.200000003)
  2432. p.Material=Enum.Material.Plastic
  2433. p.BrickColor=BrickColor.new("Dark stone grey")
  2434. p.CFrame=CFrame.new(-42.8600044, 1.59000015, 17.5000038, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2435. p.BottomSurface=0
  2436. p.TopSurface=0
  2437. kl=Instance.new("CylinderMesh")
  2438. kl.Scale=Vector3.new(0.300000012, 1, 0.300000012)
  2439. kl.Parent=p
  2440. p.Parent=Model p=Instance.new("Part")
  2441. p.Name="Part"
  2442. p.formFactor="Custom"
  2443. p.Size=Vector3.new(0.400000006, 0.339999944, 0.200000003)
  2444. p.Material=Enum.Material.Plastic
  2445. p.BrickColor=BrickColor.new("Pastel Blue")
  2446. p.CFrame=CFrame.new(-43.0600014, 1.76000023, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2447. p.BottomSurface=0
  2448. p.TopSurface=0
  2449. kl=Instance.new("BlockMesh")
  2450. kl.Scale=Vector3.new(1, 1, 0.100000001)
  2451. kl.Parent=p
  2452. p.Parent=Model p=Instance.new("WedgePart")
  2453. p.Name="Part"
  2454. p.formFactor="Custom"
  2455. p.Size=Vector3.new(2.40000033, 0.200000003, 0.200000003)
  2456. p.Material=Enum.Material.Plastic
  2457. p.BrickColor=BrickColor.new("Pastel Blue")
  2458. p.CFrame=CFrame.new(-41.7000008, 1.09000003, 16.6000023, 4.37113883e-008, 0, -1, 0, 1, 0, 1, 0, 8.74227766e-008)
  2459. p.BottomSurface=0
  2460. p.TopSurface=0
  2461. p.Parent=Model
  2462. return Model
  2463. end
  2464. Units["Barracks"]["Requires"]={"ConYard"}
  2465.  
  2466. Units["RadarDome"]={}
  2467. Units["RadarDome"]["EnergyCost"]=50
  2468. Units["RadarDome"]["MaxUnits"]=1
  2469. Units["RadarDome"]["BuildTime"]=5
  2470. Units["RadarDome"]["Model"]=function()
  2471. Model=Instance.new("Model")
  2472. Model.Name="RadarDome" p=Instance.new("Part")
  2473. p.Name="Part"
  2474. p.formFactor="Custom"
  2475. p.Size=Vector3.new(1.60000014, 1.60000014, 1.60000014)
  2476. p.Material=Enum.Material.Plastic
  2477. p.BrickColor=BrickColor.new("Mid gray")
  2478. p.CFrame=CFrame.new(-45.3999939, 0.390000224, 17, -4.37113954e-008, -4.37113812e-008, 1, -7.37408419e-015, 1, 4.37113705e-008, -1, -7.10542736e-015, -8.74227908e-008)
  2479. p.BottomSurface=0
  2480. p.TopSurface=0
  2481. kl=Instance.new("SpecialMesh")
  2482. kl.Scale=Vector3.new(0.949999988, 0.949999988, 0.949999988)
  2483. kl.Parent=p
  2484. kl.MeshType="Sphere" p.Parent=Model p=Instance.new("Part")
  2485. p.Name="Part"
  2486. p.formFactor="Custom"
  2487. p.Size=Vector3.new(2.00000024, 0.400000006, 1.20000005)
  2488. p.Material=Enum.Material.Plastic
  2489. p.BrickColor=BrickColor.new("Dark stone grey")
  2490. p.CFrame=CFrame.new(-45.8000069, 0.390000015, 17, -4.37113954e-008, -4.37113812e-008, 1, -7.37408419e-015, 1, 4.37113705e-008, -1, -7.10542736e-015, -8.74227908e-008)
  2491. p.BottomSurface=0
  2492. p.TopSurface=0
  2493. kl=Instance.new("CylinderMesh")
  2494. kl.Scale=Vector3.new(1, 1, 1)
  2495. kl.Parent=p
  2496. p.Parent=Model p=Instance.new("Part")
  2497. p.Name="Part"
  2498. p.formFactor="Custom"
  2499. p.Size=Vector3.new(2.00000024, 0.400000006, 1.20000005)
  2500. p.Material=Enum.Material.Plastic
  2501. p.BrickColor=BrickColor.new("Dark stone grey")
  2502. p.CFrame=CFrame.new(-45.0000076, 0.390000015, 17, -4.37113954e-008, -4.37113812e-008, 1, -7.37408419e-015, 1, 4.37113705e-008, -1, -7.10542736e-015, -8.74227908e-008)
  2503. p.BottomSurface=0
  2504. p.TopSurface=0
  2505. kl=Instance.new("CylinderMesh")
  2506. kl.Scale=Vector3.new(1, 1, 1)
  2507. kl.Parent=p
  2508. p.Parent=Model p=Instance.new("Part")
  2509. p.Name="Part"
  2510. p.formFactor="Custom"
  2511. p.Size=Vector3.new(2.00000024, 0.200000003, 2.00000024)
  2512. p.Material=Enum.Material.Plastic
  2513. p.BrickColor=BrickColor.new("Pastel Blue")
  2514. p.CFrame=CFrame.new(-45.4000015, 0.290000021, 17.0000019, -4.37113954e-008, -4.37113812e-008, 1, -7.37408419e-015, 1, 4.37113705e-008, -1, -7.10542736e-015, -8.74227908e-008)
  2515. p.BottomSurface=0
  2516. p.TopSurface=0
  2517. kl=Instance.new("CylinderMesh")
  2518. kl.Scale=Vector3.new(0.800000012, 1, 0.800000012)
  2519. kl.Parent=p
  2520. p.Parent=Model p=Instance.new("Part")
  2521. p.Name="Plate"
  2522. p.formFactor="Custom"
  2523. p.Size=Vector3.new(2, 0.200000003, 2)
  2524. p.Material=Enum.Material.Plastic
  2525. p.BrickColor=BrickColor.new("Medium stone grey")
  2526. p.CFrame=CFrame.new(-45.3999939, 0.090000011, 17, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2527. p.BottomSurface=0
  2528. p.TopSurface=0
  2529. p.Parent=Model p=Instance.new("Part")
  2530. p.Name="Part"
  2531. p.formFactor="Custom"
  2532. p.Size=Vector3.new(0.799999833, 0.400000006, 0.400000006)
  2533. p.Material=Enum.Material.Plastic
  2534. p.BrickColor=BrickColor.new("Medium stone grey")
  2535. p.CFrame=CFrame.new(-45.4000015, 0.390000075, 16.4000015, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2536. p.BottomSurface=0
  2537. p.TopSurface=0
  2538. kl=Instance.new("BlockMesh")
  2539. kl.Scale=Vector3.new(1, 1, 1)
  2540. kl.Parent=p
  2541. p.Parent=Model
  2542. return Model
  2543. end
  2544. Units["RadarDome"]["Requires"]={"ConYard"}
  2545.  
  2546. Units["TechCenter"]={}
  2547. Units["TechCenter"]["EnergyCost"]=70
  2548. Units["TechCenter"]["MaxUnits"]=1
  2549. Units["TechCenter"]["BuildTime"]=8
  2550. Units["TechCenter"]["Model"]=function()
  2551. Model=Instance.new("Model")
  2552. Model.Name="TechCenter" p=Instance.new("Part")
  2553. p.Name="Part"
  2554. p.formFactor="Custom"
  2555. p.Size=Vector3.new(0.999999821, 0.200000003, 1.60000002)
  2556. p.Material=Enum.Material.Plastic
  2557. p.BrickColor=BrickColor.new("Medium stone grey")
  2558. p.CFrame=CFrame.new(-56.7000122, 0.290000021, 23, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2559. p.BottomSurface=0
  2560. p.TopSurface=0
  2561. p.Parent=Model p=Instance.new("Part")
  2562. p.Name="Part"
  2563. p.formFactor="Custom"
  2564. p.Size=Vector3.new(0.599999845, 0.400000036, 1.4000001)
  2565. p.Material=Enum.Material.Plastic
  2566. p.BrickColor=BrickColor.new("Pastel Blue")
  2567. p.CFrame=CFrame.new(-56.7000008, 0.590000033, 23.1000004, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2568. p.BottomSurface=0
  2569. p.TopSurface=0
  2570. p.Parent=Model p=Instance.new("WedgePart")
  2571. p.Name="Part"
  2572. p.formFactor="Custom"
  2573. p.Size=Vector3.new(0.80000025, 0.200000003, 0.200000003)
  2574. p.Material=Enum.Material.Plastic
  2575. p.BrickColor=BrickColor.new("Pastel Blue")
  2576. p.CFrame=CFrame.new(-56.8999977, 0.890000105, 22.7999992, 0, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-008)
  2577. p.BottomSurface=0
  2578. p.TopSurface=0
  2579. p.Parent=Model p=Instance.new("WedgePart")
  2580. p.Name="Part"
  2581. p.formFactor="Custom"
  2582. p.Size=Vector3.new(0.600000262, 0.200000003, 0.200000003)
  2583. p.Material=Enum.Material.Plastic
  2584. p.BrickColor=BrickColor.new("Pastel Blue")
  2585. p.CFrame=CFrame.new(-56.8999977, 1.09000015, 23.5000019, -8.74227766e-008, 0, 1, 0, 1, 0, -1, 0, -1.31134158e-007)
  2586. p.BottomSurface=0
  2587. p.TopSurface=0
  2588. p.Parent=Model p=Instance.new("Part")
  2589. p.Name="Part"
  2590. p.formFactor="Custom"
  2591. p.Size=Vector3.new(0.799999833, 0.200000003, 0.200000003)
  2592. p.Material=Enum.Material.Plastic
  2593. p.BrickColor=BrickColor.new("Pastel Blue")
  2594. p.CFrame=CFrame.new(-56.7000046, 0.890000045, 22.7999992, 0, 0, 1, 0, -1, 0, 1, 0, -4.37113883e-008)
  2595. p.BottomSurface=0
  2596. p.TopSurface=0
  2597. p.Parent=Model p=Instance.new("Part")
  2598. p.Name="Part"
  2599. p.formFactor="Custom"
  2600. p.Size=Vector3.new(0.999999821, 1.20000005, 0.600000024)
  2601. p.Material=Enum.Material.Plastic
  2602. p.BrickColor=BrickColor.new("Pastel Blue")
  2603. p.CFrame=CFrame.new(-55.9000015, 0.99000001, 23.5000019, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2604. p.BottomSurface=0
  2605. p.TopSurface=0
  2606. p.Parent=Model p=Instance.new("Part")
  2607. p.Name="Part"
  2608. p.formFactor="Custom"
  2609. p.Size=Vector3.new(0.200000003, 0.200000033, 0.600000024)
  2610. p.Material=Enum.Material.Plastic
  2611. p.BrickColor=BrickColor.new("Pastel Blue")
  2612. p.CFrame=CFrame.new(-56.9000092, 0.890000045, 23.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2613. p.BottomSurface=0
  2614. p.TopSurface=0
  2615. p.Parent=Model p=Instance.new("Part")
  2616. p.Name="Part"
  2617. p.formFactor="Custom"
  2618. p.Size=Vector3.new(0.599999845, 0.200000003, 0.799999952)
  2619. p.Material=Enum.Material.Plastic
  2620. p.BrickColor=BrickColor.new("Medium stone grey")
  2621. p.CFrame=CFrame.new(-55.9000053, 0.290000021, 23.4000015, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2622. p.BottomSurface=0
  2623. p.TopSurface=0
  2624. p.Parent=Model p=Instance.new("Part")
  2625. p.Name="Plate"
  2626. p.formFactor="Custom"
  2627. p.Size=Vector3.new(3, 0.200000003, 2)
  2628. p.Material=Enum.Material.Plastic
  2629. p.BrickColor=BrickColor.new("Medium stone grey")
  2630. p.CFrame=CFrame.new(-55.9000015, 0.0900000781, 23, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2631. p.BottomSurface=0
  2632. p.TopSurface=0
  2633. p.Parent=Model p=Instance.new("Part")
  2634. p.Name="Part"
  2635. p.formFactor="Custom"
  2636. p.Size=Vector3.new(0.400000006, 0.400000036, 0.600000024)
  2637. p.Material=Enum.Material.Plastic
  2638. p.BrickColor=BrickColor.new("Pastel Blue")
  2639. p.CFrame=CFrame.new(-56.5999985, 0.99000001, 23.5000019, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2640. p.BottomSurface=0
  2641. p.TopSurface=0
  2642. p.Parent=Model p=Instance.new("Part")
  2643. p.Name="Part"
  2644. p.formFactor="Custom"
  2645. p.Size=Vector3.new(1, 0.200000003, 0.399999857)
  2646. p.Material=Enum.Material.Plastic
  2647. p.BrickColor=BrickColor.new("Mid gray")
  2648. p.CFrame=CFrame.new(-55.8999977, 0.889999807, 23.3999939, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  2649. p.BottomSurface=0
  2650. p.TopSurface=0
  2651. kl=Instance.new("BlockMesh")
  2652. kl.Scale=Vector3.new(0.949999988, 1, 1.04999995)
  2653. kl.Parent=p
  2654. p.Parent=Model p=Instance.new("WedgePart")
  2655. p.Name="Part"
  2656. p.formFactor="Custom"
  2657. p.Size=Vector3.new(0.80000025, 0.200000003, 0.200000003)
  2658. p.Material=Enum.Material.Plastic
  2659. p.BrickColor=BrickColor.new("Pastel Blue")
  2660. p.CFrame=CFrame.new(-56.5, 0.890000045, 22.8000011, 0, 0, -1, 0, 1, 0, 1, 0, 4.37113883e-008)
  2661. p.BottomSurface=0
  2662. p.TopSurface=0
  2663. p.Parent=Model p=Instance.new("WedgePart")
  2664. p.Name="Part"
  2665. p.formFactor="Custom"
  2666. p.Size=Vector3.new(0.80000025, 0.200000003, 0.200000003)
  2667. p.Material=Enum.Material.Plastic
  2668. p.BrickColor=BrickColor.new("Pastel Blue")
  2669. p.CFrame=CFrame.new(-54.9000053, 0.890000165, 22.8000031, 4.37113883e-008, 0, -1, 0, 1, 0, 1, 0, 8.74227766e-008)
  2670. p.BottomSurface=0
  2671. p.TopSurface=0
  2672. p.Parent=Model p=Instance.new("WedgePart")
  2673. p.Name="Part"
  2674. p.formFactor="Custom"
  2675. p.Size=Vector3.new(0.80000025, 0.200000003, 0.200000003)
  2676. p.Material=Enum.Material.Plastic
  2677. p.BrickColor=BrickColor.new("Pastel Blue")
  2678. p.CFrame=CFrame.new(-55.2999992, 0.890000165, 22.8000031, 0, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-008)
  2679. p.BottomSurface=0
  2680. p.TopSurface=0
  2681. p.Parent=Model p=Instance.new("Part")
  2682. p.Name="Part"
  2683. p.formFactor="Custom"
  2684. p.Size=Vector3.new(0.399999857, 0.400000036, 0.600000024)
  2685. p.Material=Enum.Material.Plastic
  2686. p.BrickColor=BrickColor.new("Pastel Blue")
  2687. p.CFrame=CFrame.new(-55.2000008, 0.99000001, 23.5000019, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2688. p.BottomSurface=0
  2689. p.TopSurface=0
  2690. p.Parent=Model p=Instance.new("Part")
  2691. p.Name="Part"
  2692. p.formFactor="Custom"
  2693. p.Size=Vector3.new(0.799999833, 0.200000003, 0.200000003)
  2694. p.Material=Enum.Material.Plastic
  2695. p.BrickColor=BrickColor.new("Pastel Blue")
  2696. p.CFrame=CFrame.new(-55.1000023, 0.890000105, 22.8000031, 0, 0, 1, 0, -1, 0, 1, 0, -4.37113883e-008)
  2697. p.BottomSurface=0
  2698. p.TopSurface=0
  2699. p.Parent=Model p=Instance.new("Part")
  2700. p.Name="Part"
  2701. p.formFactor="Custom"
  2702. p.Size=Vector3.new(0.599999845, 0.400000036, 1.4000001)
  2703. p.Material=Enum.Material.Plastic
  2704. p.BrickColor=BrickColor.new("Pastel Blue")
  2705. p.CFrame=CFrame.new(-55.0999985, 0.590000033, 23.1000023, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2706. p.BottomSurface=0
  2707. p.TopSurface=0
  2708. p.Parent=Model p=Instance.new("WedgePart")
  2709. p.Name="Part"
  2710. p.formFactor="Custom"
  2711. p.Size=Vector3.new(0.600000262, 0.200000003, 0.200000003)
  2712. p.Material=Enum.Material.Plastic
  2713. p.BrickColor=BrickColor.new("Pastel Blue")
  2714. p.CFrame=CFrame.new(-54.9000015, 1.09000003, 23.5000038, 4.37113883e-008, 0, -1, 0, 1, 0, 1, 0, 8.74227766e-008)
  2715. p.BottomSurface=0
  2716. p.TopSurface=0
  2717. p.Parent=Model p=Instance.new("Part")
  2718. p.Name="Part"
  2719. p.formFactor="Custom"
  2720. p.Size=Vector3.new(0.200000003, 0.200000033, 0.600000024)
  2721. p.Material=Enum.Material.Plastic
  2722. p.BrickColor=BrickColor.new("Pastel Blue")
  2723. p.CFrame=CFrame.new(-54.9000015, 0.890000045, 23.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2724. p.BottomSurface=0
  2725. p.TopSurface=0
  2726. p.Parent=Model p=Instance.new("Part")
  2727. p.Name="Part"
  2728. p.formFactor="Custom"
  2729. p.Size=Vector3.new(1, 0.200000003, 0.399999857)
  2730. p.Material=Enum.Material.Plastic
  2731. p.BrickColor=BrickColor.new("Mid gray")
  2732. p.CFrame=CFrame.new(-55.9000015, 1.28999996, 23.4000015, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  2733. p.BottomSurface=0
  2734. p.TopSurface=0
  2735. kl=Instance.new("BlockMesh")
  2736. kl.Scale=Vector3.new(0.949999988, 1, 1.04999995)
  2737. kl.Parent=p
  2738. p.Parent=Model p=Instance.new("Part")
  2739. p.Name="Part"
  2740. p.formFactor="Custom"
  2741. p.Size=Vector3.new(0.999999821, 0.200000003, 1.60000002)
  2742. p.Material=Enum.Material.Plastic
  2743. p.BrickColor=BrickColor.new("Medium stone grey")
  2744. p.CFrame=CFrame.new(-55.1000061, 0.290000021, 23.0000019, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2745. p.BottomSurface=0
  2746. p.TopSurface=0
  2747. p.Parent=Model p=Instance.new("WedgePart")
  2748. p.Name="Part"
  2749. p.formFactor="Custom"
  2750. p.Size=Vector3.new(0.600000262, 0.200000003, 0.200000003)
  2751. p.Material=Enum.Material.Plastic
  2752. p.BrickColor=BrickColor.new("Pastel Blue")
  2753. p.CFrame=CFrame.new(-55.5000038, 1.69000006, 23.5000019, 0, 0, -1, 0, 1, 0, 1, 0, 4.37113883e-008)
  2754. p.BottomSurface=0
  2755. p.TopSurface=0
  2756. p.Parent=Model p=Instance.new("Part")
  2757. p.Name="Part"
  2758. p.formFactor="Custom"
  2759. p.Size=Vector3.new(0.599999845, 0.200000003, 0.600000024)
  2760. p.Material=Enum.Material.Plastic
  2761. p.BrickColor=BrickColor.new("Pastel Blue")
  2762. p.CFrame=CFrame.new(-55.8999977, 1.68999994, 23.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2763. p.BottomSurface=0
  2764. p.TopSurface=0
  2765. p.Parent=Model p=Instance.new("WedgePart")
  2766. p.Name="Part"
  2767. p.formFactor="Custom"
  2768. p.Size=Vector3.new(0.600000262, 0.200000003, 0.200000003)
  2769. p.Material=Enum.Material.Plastic
  2770. p.BrickColor=BrickColor.new("Pastel Blue")
  2771. p.CFrame=CFrame.new(-56.2999992, 1.69000006, 23.4999981, 0, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-008)
  2772. p.BottomSurface=0
  2773. p.TopSurface=0
  2774. p.Parent=Model
  2775. return Model
  2776. end
  2777. Units["TechCenter"]["Requires"]={"ConYard","RadarDome"}
  2778.  
  2779. Units["Wall"]={}
  2780. Units["Wall"]["EnergyCost"]=2
  2781. Units["Wall"]["MaxUnits"]=120
  2782. Units["Wall"]["BuildTime"]=1
  2783. Units["Wall"]["Model"]=function()
  2784. Model=Instance.new("Model")
  2785. Model.Name="Wall" p=Instance.new("Part")
  2786. p.Name="Part"
  2787. p.formFactor="Custom"
  2788. p.Size=Vector3.new(1, 0.600000024, 0.200000033)
  2789. p.Material=Enum.Material.Plastic
  2790. p.BrickColor=BrickColor.new("Medium stone grey")
  2791. p.CFrame=CFrame.new(-53.5000038, 0.49000001, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2792. p.BottomSurface=0
  2793. p.TopSurface=0
  2794. p.Parent=Model p=Instance.new("Part")
  2795. p.Name="Part"
  2796. p.formFactor="Custom"
  2797. p.Size=Vector3.new(1, 0.200000003, 0.200000033)
  2798. p.Material=Enum.Material.Plastic
  2799. p.BrickColor=BrickColor.new("Pastel Blue")
  2800. p.CFrame=CFrame.new(-53.5000038, 0.889999986, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2801. p.BottomSurface=0
  2802. p.TopSurface=0
  2803. kl=Instance.new("BlockMesh")
  2804. kl.Scale=Vector3.new(1, 1, 1.20000005)
  2805. kl.Parent=p
  2806. p.Parent=Model p=Instance.new("Part")
  2807. p.Name="Plate"
  2808. p.formFactor="Custom"
  2809. p.Size=Vector3.new(1, 0.200000003, 1)
  2810. p.Material=Enum.Material.Plastic
  2811. p.BrickColor=BrickColor.new("Medium stone grey")
  2812. p.CFrame=CFrame.new(-53.5, 0.090000011, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2813. p.BottomSurface=0
  2814. p.TopSurface=0
  2815. p.Parent=Model
  2816. return Model
  2817. end
  2818. Units["Wall"]["Requires"]={"ConYard"}
  2819.  
  2820. Units["WallCorner"]={}
  2821. Units["WallCorner"]["EnergyCost"]=2
  2822. Units["WallCorner"]["MaxUnits"]=50
  2823. Units["WallCorner"]["BuildTime"]=2
  2824. Units["WallCorner"]["Model"]=function()
  2825. Model=Instance.new("Model")
  2826. Model.Name="WallCorner" p=Instance.new("Part")
  2827. p.Name="Part"
  2828. p.formFactor="Custom"
  2829. p.Size=Vector3.new(0.400000006, 0.200000003, 0.200000033)
  2830. p.Material=Enum.Material.Plastic
  2831. p.BrickColor=BrickColor.new("Pastel Blue")
  2832. p.CFrame=CFrame.new(-55.1000099, 0.889999926, 17.8000011, 0, 0, 1, 0, -1, 0, 1, 0, -4.37113883e-008)
  2833. p.BottomSurface=0
  2834. p.TopSurface=0
  2835. kl=Instance.new("BlockMesh")
  2836. kl.Scale=Vector3.new(1, 1, 1.20000005)
  2837. kl.Parent=p
  2838. p.Parent=Model p=Instance.new("Part")
  2839. p.Name="Part"
  2840. p.formFactor="Custom"
  2841. p.Size=Vector3.new(0.200000003, 0.600000024, 0.200000033)
  2842. p.Material=Enum.Material.Plastic
  2843. p.BrickColor=BrickColor.new("Medium stone grey")
  2844. p.CFrame=CFrame.new(-55.1000137, 0.490000039, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2845. p.BottomSurface=0
  2846. p.TopSurface=0
  2847. p.Parent=Model p=Instance.new("Part")
  2848. p.Name="Part"
  2849. p.formFactor="Custom"
  2850. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  2851. p.Material=Enum.Material.Plastic
  2852. p.BrickColor=BrickColor.new("Pastel Blue")
  2853. p.CFrame=CFrame.new(-55.1000023, 0.890000045, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2854. p.BottomSurface=0
  2855. p.TopSurface=0
  2856. kl=Instance.new("BlockMesh")
  2857. kl.Scale=Vector3.new(1.20000005, 1.20000005, 1.20000005)
  2858. kl.Parent=p
  2859. p.Parent=Model p=Instance.new("Part")
  2860. p.Name="Part"
  2861. p.formFactor="Custom"
  2862. p.Size=Vector3.new(0.400000036, 0.600000024, 0.200000033)
  2863. p.Material=Enum.Material.Plastic
  2864. p.BrickColor=BrickColor.new("Medium stone grey")
  2865. p.CFrame=CFrame.new(-55.1000099, 0.490000069, 17.8000011, 0, 0, 1, 0, -1, 0, 1, 0, -4.37113883e-008)
  2866. p.BottomSurface=0
  2867. p.TopSurface=0
  2868. p.Parent=Model p=Instance.new("Part")
  2869. p.Name="Plate"
  2870. p.formFactor="Custom"
  2871. p.Size=Vector3.new(1, 0.200000003, 1)
  2872. p.Material=Enum.Material.Plastic
  2873. p.BrickColor=BrickColor.new("Medium stone grey")
  2874. p.CFrame=CFrame.new(-55.1000099, 0.0900000632, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2875. p.BottomSurface=0
  2876. p.TopSurface=0
  2877. p.Parent=Model p=Instance.new("Part")
  2878. p.Name="Part"
  2879. p.formFactor="Custom"
  2880. p.Size=Vector3.new(0.400000006, 0.200000003, 0.200000033)
  2881. p.Material=Enum.Material.Plastic
  2882. p.BrickColor=BrickColor.new("Pastel Blue")
  2883. p.CFrame=CFrame.new(-54.8000107, 0.889999926, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2884. p.BottomSurface=0
  2885. p.TopSurface=0
  2886. kl=Instance.new("BlockMesh")
  2887. kl.Scale=Vector3.new(1, 1, 1.20000005)
  2888. kl.Parent=p
  2889. p.Parent=Model p=Instance.new("Part")
  2890. p.Name="Part"
  2891. p.formFactor="Custom"
  2892. p.Size=Vector3.new(0.400000036, 0.600000024, 0.200000033)
  2893. p.Material=Enum.Material.Plastic
  2894. p.BrickColor=BrickColor.new("Medium stone grey")
  2895. p.CFrame=CFrame.new(-54.8000107, 0.490000069, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2896. p.BottomSurface=0
  2897. p.TopSurface=0
  2898. p.Parent=Model
  2899. return Model
  2900. end
  2901. Units["WallCorner"]["Requires"]={"ConYard"}
  2902.  
  2903. Units["Pillbox"]={}
  2904. Units["Pillbox"]["EnergyCost"]=12
  2905. Units["Pillbox"]["MaxUnits"]=5
  2906. Units["Pillbox"]["BuildTime"]=6.2
  2907. Units["Pillbox"]["Model"]=function()
  2908. Model=Instance.new("Model")
  2909. Model.Name="Pillbox" p=Instance.new("WedgePart")
  2910. p.Name="Part"
  2911. p.formFactor="Custom"
  2912. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2913. p.Material=Enum.Material.Plastic
  2914. p.BrickColor=BrickColor.new("Pastel Blue")
  2915. p.CFrame=CFrame.new(-51.3000031, 0.290000021, 17.7000027, 0, 0, -1, -1, 0, 0, 0, 1, 4.37113883e-008)
  2916. p.BottomSurface=0
  2917. p.TopSurface=0
  2918. p.Parent=Model p=Instance.new("Part")
  2919. p.Name="Part"
  2920. p.formFactor="Custom"
  2921. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  2922. p.Material=Enum.Material.Plastic
  2923. p.BrickColor=BrickColor.new("Black")
  2924. p.CFrame=CFrame.new(-51.2999992, 0.290000021, 17.5000019, 0, 0, -1, 0, -1, -0, -1, 0, -0)
  2925. p.BottomSurface=0
  2926. p.TopSurface=0
  2927. kl=Instance.new("BlockMesh")
  2928. kl.Scale=Vector3.new(1, 0.330000013, 1)
  2929. kl.Parent=p
  2930. p.Parent=Model p=Instance.new("WedgePart")
  2931. p.Name="Part"
  2932. p.formFactor="Custom"
  2933. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2934. p.Material=Enum.Material.Plastic
  2935. p.BrickColor=BrickColor.new("Pastel Blue")
  2936. p.CFrame=CFrame.new(-51.2999992, 0.290000021, 17.3000011, 0, 0, -1, 1, 0, 0, 0, -1, 4.37113883e-008)
  2937. p.BottomSurface=0
  2938. p.TopSurface=0
  2939. p.Parent=Model p=Instance.new("Part")
  2940. p.Name="Part"
  2941. p.formFactor="Custom"
  2942. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  2943. p.Material=Enum.Material.Plastic
  2944. p.BrickColor=BrickColor.new("Pastel Blue")
  2945. p.CFrame=CFrame.new(-51.5, 0.290000021, 17.6999989, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2946. p.BottomSurface=0
  2947. p.TopSurface=0
  2948. kl=Instance.new("BlockMesh")
  2949. kl.Scale=Vector3.new(1, 1, 1)
  2950. kl.Parent=p
  2951. p.Parent=Model p=Instance.new("Part")
  2952. p.Name="Plate"
  2953. p.formFactor="Custom"
  2954. p.Size=Vector3.new(1, 0.200000003, 1)
  2955. p.Material=Enum.Material.Plastic
  2956. p.BrickColor=BrickColor.new("Medium stone grey")
  2957. p.CFrame=CFrame.new(-51.5, 0.090000011, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2958. p.BottomSurface=0
  2959. p.TopSurface=0
  2960. p.Parent=Model p=Instance.new("Part")
  2961. p.Name="Part"
  2962. p.formFactor="Custom"
  2963. p.Size=Vector3.new(0.600000024, 0.200000003, 0.200000033)
  2964. p.Material=Enum.Material.Plastic
  2965. p.BrickColor=BrickColor.new("Pastel Blue")
  2966. p.CFrame=CFrame.new(-51.5000038, 0.290000021, 17.5, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2967. p.BottomSurface=0
  2968. p.TopSurface=0
  2969. kl=Instance.new("BlockMesh")
  2970. kl.Scale=Vector3.new(1, 1, 1)
  2971. kl.Parent=p
  2972. p.Parent=Model p=Instance.new("WedgePart")
  2973. p.Name="Part"
  2974. p.formFactor="Custom"
  2975. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2976. p.Material=Enum.Material.Plastic
  2977. p.BrickColor=BrickColor.new("Pastel Blue")
  2978. p.CFrame=CFrame.new(-51.7000008, 0.290000021, 17.7000008, 0, 0, 1, 1, 0, 0, 0, 1, -4.37113883e-008)
  2979. p.BottomSurface=0
  2980. p.TopSurface=0
  2981. p.Parent=Model p=Instance.new("WedgePart")
  2982. p.Name="Part"
  2983. p.formFactor="Custom"
  2984. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  2985. p.Material=Enum.Material.Plastic
  2986. p.BrickColor=BrickColor.new("Pastel Blue")
  2987. p.CFrame=CFrame.new(-51.6999931, 0.290000021, 17.3000011, 0, 0, 1, -1, 0, 0, 0, -1, -4.37113883e-008)
  2988. p.BottomSurface=0
  2989. p.TopSurface=0
  2990. p.Parent=Model p=Instance.new("Part")
  2991. p.Name="Part"
  2992. p.formFactor="Custom"
  2993. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  2994. p.Material=Enum.Material.Plastic
  2995. p.BrickColor=BrickColor.new("Black")
  2996. p.CFrame=CFrame.new(-51.5, 0.290000021, 17.2999992, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  2997. p.BottomSurface=0
  2998. p.TopSurface=0
  2999. kl=Instance.new("BlockMesh")
  3000. kl.Scale=Vector3.new(1, 0.330000013, 1)
  3001. kl.Parent=p
  3002. p.Parent=Model p=Instance.new("Part")
  3003. p.Name="Part"
  3004. p.formFactor="Custom"
  3005. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  3006. p.Material=Enum.Material.Plastic
  3007. p.BrickColor=BrickColor.new("Pastel Blue")
  3008. p.CFrame=CFrame.new(-51.5, 0.290000021, 17.2999992, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  3009. p.BottomSurface=0
  3010. p.TopSurface=0
  3011. kl=Instance.new("BlockMesh")
  3012. kl.Scale=Vector3.new(1, 1, 1)
  3013. kl.Parent=p
  3014. p.Parent=Model p=Instance.new("Part")
  3015. p.Name="Part"
  3016. p.formFactor="Custom"
  3017. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  3018. p.Material=Enum.Material.Plastic
  3019. p.BrickColor=BrickColor.new("Black")
  3020. p.CFrame=CFrame.new(-51.7000046, 0.290000021, 17.5, 0, 0, 1, 0, -1, 0, 1, 0, -0)
  3021. p.BottomSurface=0
  3022. p.TopSurface=0
  3023. kl=Instance.new("BlockMesh")
  3024. kl.Scale=Vector3.new(1, 0.330000013, 1)
  3025. kl.Parent=p
  3026. p.Parent=Model p=Instance.new("Part")
  3027. p.Name="Part"
  3028. p.formFactor="Custom"
  3029. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000033)
  3030. p.Material=Enum.Material.Plastic
  3031. p.BrickColor=BrickColor.new("Black")
  3032. p.CFrame=CFrame.new(-51.5000038, 0.290000021, 17.7000008, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  3033. p.BottomSurface=0
  3034. p.TopSurface=0
  3035. kl=Instance.new("BlockMesh")
  3036. kl.Scale=Vector3.new(1, 0.330000013, 1)
  3037. kl.Parent=p
  3038. p.Parent=Model
  3039. return Model
  3040. end
  3041. Units["Pillbox"]["Attack"]=function(Unit,Object,Location)
  3042. Dist=(Unit.Centroid.Position-(Object:FindFirstChild("Torso").Position-Vector3.new(0,2,0))).magnitude
  3043. AttackDist=25
  3044. if Dist>AttackDist then
  3045. else
  3046. if Unit:FindFirstChild("Cooldown")==nil then
  3047. t=Instance.new("IntValue")
  3048. t.Name="Cooldown"
  3049. t.Value=25
  3050. t.Parent=Unit
  3051. coroutine.resume(coroutine.create(function(Unit)
  3052. flash=Instance.new("Part")
  3053. flash.Name="PEWPEW"
  3054. flash.TopSurface=0
  3055. flash.BottomSurface=0
  3056. flash.BrickColor=BrickColor:Yellow()
  3057. flash.formFactor="Custom"
  3058. flash.Size=Vector3.new(.2,.2,.2)
  3059. mm=Instance.new("SpecialMesh")
  3060. mm.MeshType="Sphere"
  3061. mm.Scale=Vector3.new(.8,.4,.4)
  3062. mm.Parent=flash
  3063. flash.Parent=Unit
  3064. w=Instance.new("Weld")
  3065. w.Part0=Unit.Centroid
  3066. w.Part1=flash
  3067. w.C0=CFrame.new(0,0,.5)
  3068. w.Parent=flash
  3069. game:GetService("Debris"):AddItem(flash,.1)
  3070. end),Unit)
  3071. PlaySound("MG1",1,Unit.Centroid,"PEW")
  3072. Object.Humanoid:TakeDamage(15)
  3073. else
  3074. Unit.Cooldown.Value=Unit.Cooldown.Value-1
  3075. if Unit.Cooldown.Value<=-1 then
  3076. Unit.Cooldown:Destroy()
  3077. end
  3078. end
  3079. end
  3080. end
  3081. Units["Pillbox"]["Requires"]={"ConYard","Barracks"}
  3082.  
  3083. Units["TeslaCoil"]={}
  3084. Units["TeslaCoil"]["EnergyCost"]=35
  3085. Units["TeslaCoil"]["MaxUnits"]=4
  3086. Units["TeslaCoil"]["BuildTime"]=8
  3087. Units["TeslaCoil"]["Model"]=function()
  3088. Model=Instance.new("Model")
  3089. Model.Name="TeslaCoil" p=Instance.new("Part")
  3090. p.Name="Part"
  3091. p.formFactor="Custom"
  3092. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  3093. p.Material=Enum.Material.Plastic
  3094. p.BrickColor=BrickColor.new("Medium stone grey")
  3095. p.CFrame=CFrame.new(-64.3000031, 1.2700001, 23.5000057, -4.37113954e-008, -4.37113812e-008, 1, -7.37408419e-015, 1, 4.37113705e-008, -1, -7.10542736e-015, -8.74227908e-008)
  3096. p.BottomSurface=0
  3097. p.TopSurface=0
  3098. kl=Instance.new("SpecialMesh")
  3099. kl.Scale=Vector3.new(1, 1, 1)
  3100. kl.Parent=p
  3101. kl.MeshType="Sphere" p.Parent=Model p=Instance.new("Part")
  3102. p.Name="Rung3"
  3103. p.formFactor="Custom"
  3104. p.Size=Vector3.new(0.600000262, 0.200000003, 0.600000024)
  3105. p.Material=Enum.Material.Plastic
  3106. p.BrickColor=BrickColor.new("Mid gray")
  3107. p.CFrame=CFrame.new(-64.3000031, 1.03000009, 23.5000057, -4.37113954e-008, -4.37113812e-008, 1, -7.37408419e-015, 1, 4.37113705e-008, -1, -7.10542736e-015, -8.74227908e-008)
  3108. p.BottomSurface=0
  3109. p.TopSurface=0
  3110. kl=Instance.new("CylinderMesh")
  3111. kl.Scale=Vector3.new(0.400000006, 0.200000003, 0.400000006)
  3112. kl.Parent=p
  3113. p.Parent=Model p=Instance.new("Part")
  3114. p.Name="Part"
  3115. p.formFactor="Custom"
  3116. p.Size=Vector3.new(0.200000003, 1, 0.600000024)
  3117. p.Material=Enum.Material.Plastic
  3118. p.BrickColor=BrickColor.new("Pastel Blue")
  3119. p.CFrame=CFrame.new(-64.3000031, 0.730000257, 23.5000057, -4.37113954e-008, -4.37113812e-008, 1, -7.37408419e-015, 1, 4.37113705e-008, -1, -7.10542736e-015, -8.74227908e-008)
  3120. p.BottomSurface=0
  3121. p.TopSurface=0
  3122. kl=Instance.new("CylinderMesh")
  3123. kl.Scale=Vector3.new(0.5, 1, 0.5)
  3124. kl.Parent=p
  3125. p.Parent=Model p=Instance.new("Part")
  3126. p.Name="Rung2"
  3127. p.formFactor="Custom"
  3128. p.Size=Vector3.new(0.600000262, 0.200000003, 0.600000024)
  3129. p.Material=Enum.Material.Plastic
  3130. p.BrickColor=BrickColor.new("Mid gray")
  3131. p.CFrame=CFrame.new(-64.3000031, 0.850000441, 23.5000057, -4.37113954e-008, -4.37113812e-008, 1, -7.37408419e-015, 1, 4.37113705e-008, -1, -7.10542736e-015, -8.74227908e-008)
  3132. p.BottomSurface=0
  3133. p.TopSurface=0
  3134. kl=Instance.new("CylinderMesh")
  3135. kl.Scale=Vector3.new(0.600000024, 0.200000003, 0.600000024)
  3136. kl.Parent=p
  3137. p.Parent=Model p=Instance.new("Part")
  3138. p.Name="Rung1"
  3139. p.formFactor="Custom"
  3140. p.Size=Vector3.new(0.600000262, 0.200000003, 0.600000024)
  3141. p.Material=Enum.Material.Plastic
  3142. p.BrickColor=BrickColor.new("Mid gray")
  3143. p.CFrame=CFrame.new(-64.3000031, 0.640000582, 23.5000057, -4.37113954e-008, -4.37113812e-008, 1, -7.37408419e-015, 1, 4.37113705e-008, -1, -7.10542736e-015, -8.74227908e-008)
  3144. p.BottomSurface=0
  3145. p.TopSurface=0
  3146. kl=Instance.new("CylinderMesh")
  3147. kl.Scale=Vector3.new(0.699999988, 0.200000003, 0.699999988)
  3148. kl.Parent=p
  3149. p.Parent=Model p=Instance.new("Part")
  3150. p.Name="Part"
  3151. p.formFactor="Custom"
  3152. p.Size=Vector3.new(0.600000262, 0.200000003, 0.600000024)
  3153. p.Material=Enum.Material.Plastic
  3154. p.BrickColor=BrickColor.new("Pastel Blue")
  3155. p.CFrame=CFrame.new(-64.2999954, 0.219999984, 23.5000057, -4.37113954e-008, -4.37113812e-008, 1, -7.37408419e-015, 1, 4.37113705e-008, -1, -7.10542736e-015, -8.74227908e-008)
  3156. p.BottomSurface=0
  3157. p.TopSurface=0
  3158. kl=Instance.new("CylinderMesh")
  3159. kl.Scale=Vector3.new(1, 0.5, 1)
  3160. kl.Parent=p
  3161. p.Parent=Model p=Instance.new("Part")
  3162. p.Name="Plate"
  3163. p.formFactor="Custom"
  3164. p.Size=Vector3.new(1, 0.200000003, 1)
  3165. p.Material=Enum.Material.Plastic
  3166. p.BrickColor=BrickColor.new("Medium stone grey")
  3167. p.CFrame=CFrame.new(-64.3000031, 0.090000011, 23.5000057, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  3168. p.BottomSurface=0
  3169. p.TopSurface=0
  3170. p.Parent=Model
  3171. return Model
  3172. end
  3173. Units["TeslaCoil"]["Attack"]=function(Unit,Object,Location)
  3174. end
  3175. Units["TeslaCoil"]["Requires"]={"ConYard","TechCenter"}
  3176.  
  3177. Units["ABombSilo"]={}
  3178. Units["ABombSilo"]["EnergyCost"]=60
  3179. Units["ABombSilo"]["MaxUnits"]=1
  3180. Units["ABombSilo"]["BuildTime"]=10
  3181. Units["ABombSilo"]["Model"]=function()
  3182. Model=Instance.new("Model")
  3183. Model.Name="ABombSilo" p=Instance.new("Part")
  3184. p.Name="SliderBottom"
  3185. p.formFactor="Custom"
  3186. p.Size=Vector3.new(0.600000501, 0.200000003, 0.600000024)
  3187. p.Material=Enum.Material.Plastic
  3188. p.BrickColor=BrickColor.new("Pastel Blue")
  3189. p.CFrame=CFrame.new(-66.3000031, 0.290000021, 22.9000092, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  3190. p.BottomSurface=0
  3191. p.TopSurface=0
  3192. kl=Instance.new("BlockMesh")
  3193. kl.Scale=Vector3.new(1, 1, 1)
  3194. kl.Parent=p
  3195. p.Parent=Model p=Instance.new("Part")
  3196. p.Name="Part"
  3197. p.formFactor="Custom"
  3198. p.Size=Vector3.new(0.600000501, 0.200000003, 0.800000012)
  3199. p.Material=Enum.Material.Plastic
  3200. p.BrickColor=BrickColor.new("Pastel Blue")
  3201. p.CFrame=CFrame.new(-66.3000031, 0.290000021, 23.8000145, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  3202. p.BottomSurface=0
  3203. p.TopSurface=0
  3204. kl=Instance.new("BlockMesh")
  3205. kl.Scale=Vector3.new(1, 1, 1)
  3206. kl.Parent=p
  3207. p.Parent=Model p=Instance.new("Part")
  3208. p.Name="Plate"
  3209. p.formFactor="Custom"
  3210. p.Size=Vector3.new(1.00000048, 0.200000003, 2.00000024)
  3211. p.Material=Enum.Material.Plastic
  3212. p.BrickColor=BrickColor.new("Medium stone grey")
  3213. p.CFrame=CFrame.new(-66.3000031, 0.090000011, 23.4000111, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  3214. p.BottomSurface=0
  3215. p.TopSurface=0
  3216. p.Parent=Model p=Instance.new("Part")
  3217. p.Name="Hole"
  3218. p.formFactor="Custom"
  3219. p.Size=Vector3.new(0.600000501, 0.200000003, 0.600000024)
  3220. p.Material=Enum.Material.Plastic
  3221. p.BrickColor=BrickColor.new("Black")
  3222. p.CFrame=CFrame.new(-66.3000031, 0.290000081, 23.900013, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  3223. p.BottomSurface=0
  3224. p.TopSurface=0
  3225. kl=Instance.new("CylinderMesh")
  3226. kl.Scale=Vector3.new(0.600000024, 1.00999999, 0.600000024)
  3227. kl.Parent=p
  3228. p.Parent=Model p=Instance.new("Part")
  3229. p.Name="Part"
  3230. p.formFactor="Custom"
  3231. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  3232. p.Material=Enum.Material.Plastic
  3233. p.BrickColor=BrickColor.new("Bright yellow")
  3234. p.CFrame=CFrame.new(-66.3000031, 0.290000021, 23.3000126, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  3235. p.BottomSurface=0
  3236. p.TopSurface=0
  3237. kl=Instance.new("BlockMesh")
  3238. kl.Scale=Vector3.new(1, 1, 1)
  3239. kl.Parent=p
  3240. p.Parent=Model p=Instance.new("Part")
  3241. p.Name="Part"
  3242. p.formFactor="Custom"
  3243. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  3244. p.Material=Enum.Material.Plastic
  3245. p.BrickColor=BrickColor.new("Black")
  3246. p.CFrame=CFrame.new(-66.5, 0.290000081, 23.3000107, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  3247. p.BottomSurface=0
  3248. p.TopSurface=0
  3249. kl=Instance.new("BlockMesh")
  3250. kl.Scale=Vector3.new(1, 1, 1)
  3251. kl.Parent=p
  3252. p.Parent=Model p=Instance.new("Part")
  3253. p.Name="Slider"
  3254. p.formFactor="Custom"
  3255. p.Size=Vector3.new(0.600000501, 0.200000003, 0.800000012)
  3256. p.Material=Enum.Material.Plastic
  3257. p.BrickColor=BrickColor.new("Dark stone grey")
  3258. p.CFrame=CFrame.new(-66.3000031, 0.49000001, 23.8000126, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  3259. p.BottomSurface=0
  3260. p.TopSurface=0
  3261. kl=Instance.new("BlockMesh")
  3262. kl.Scale=Vector3.new(1, 1, 1)
  3263. kl.Parent=p
  3264. p.Parent=Model p=Instance.new("Part")
  3265. p.Name="Part"
  3266. p.formFactor="Custom"
  3267. p.Size=Vector3.new(0.200000003, 0.200000003, 0.200000003)
  3268. p.Material=Enum.Material.Plastic
  3269. p.BrickColor=BrickColor.new("Black")
  3270. p.CFrame=CFrame.new(-66.1000061, 0.290000021, 23.3000107, -1, 0, 0, 0, -1, 0, 0, 0, 1)
  3271. p.BottomSurface=0
  3272. p.TopSurface=0
  3273. kl=Instance.new("BlockMesh")
  3274. kl.Scale=Vector3.new(1, 1, 1)
  3275. kl.Parent=p
  3276. p.Parent=Model
  3277. return Model
  3278. end
  3279. Units["ABombSilo"]["Attack"]=function(Unit,Object,Location)
  3280. end
  3281. Units["ABombSilo"]["Requires"]={"ConYard","TechCenter","RadarDome","WarFactory"}
  3282.  
  3283. Units["Soldier"]={}
  3284. Units["Soldier"]["EnergyCost"]=4
  3285. Units["Soldier"]["Speed"]=6
  3286. Units["Soldier"]["MaxUnits"]=10
  3287. Units["Soldier"]["BuildTime"]=2.5
  3288. Units["Soldier"]["Attack"]=function(Unit,Object,Location)
  3289. Dist=(Unit.Centroid.Position-(Object:FindFirstChild("Torso").Position-Vector3.new(0,2,0))).magnitude
  3290. AttackDist=5.6
  3291. if Dist>AttackDist then
  3292. UnitMoveTo(Unit,Object.Torso.Position,"NOE")
  3293. unitmove(Unit)
  3294. else
  3295. unitstop(Unit)
  3296. if Unit:FindFirstChild("Cooldown")==nil then
  3297. t=Instance.new("IntValue")
  3298. t.Name="Cooldown"
  3299. t.Value=25
  3300. t.Parent=Unit
  3301. coroutine.resume(coroutine.create(function(Unit)
  3302. flash=Instance.new("Part")
  3303. flash.Name="PEWPEW"
  3304. flash.TopSurface=0
  3305. flash.BottomSurface=0
  3306. flash.BrickColor=BrickColor:Yellow()
  3307. flash.formFactor="Custom"
  3308. flash.Size=Vector3.new(.2,.2,.2)
  3309. mm=Instance.new("SpecialMesh")
  3310. mm.MeshType="Sphere"
  3311. mm.Scale=Vector3.new(.4,.4,.4)
  3312. mm.Parent=flash
  3313. flash.Parent=Unit
  3314. w=Instance.new("Weld")
  3315. w.Part0=Unit.Gun
  3316. w.Part1=flash
  3317. w.C0=CFrame.new(0,.2,0)
  3318. w.Parent=flash
  3319. game:GetService("Debris"):AddItem(flash,.1)
  3320. end),Unit)
  3321. PlaySound("MG3",1,Unit.Centroid,"PEW")
  3322. Object.Humanoid:TakeDamage(2)
  3323. else
  3324. Unit.Cooldown.Value=Unit.Cooldown.Value-1
  3325. if Unit.Cooldown.Value<=-1 then
  3326. Unit.Cooldown:Destroy()
  3327. end
  3328. end
  3329. end
  3330. end
  3331. Units["Soldier"]["Requires"]={"Barracks"}
  3332.  
  3333. Units["RocketSoldier"]={}
  3334. Units["RocketSoldier"]["Speed"]=4.5
  3335. Units["RocketSoldier"]["EnergyCost"]=6
  3336. Units["RocketSoldier"]["MaxUnits"]=5
  3337. Units["RocketSoldier"]["BuildTime"]=3.5
  3338. Units["RocketSoldier"]["Attack"]=function(Unit,Object,Location)
  3339. end
  3340. Units["RocketSoldier"]["Requires"]={"Barracks"}
  3341.  
  3342. Units["TeslaSoldier"]={}
  3343. Units["TeslaSoldier"]["Speed"]=3.5
  3344. Units["TeslaSoldier"]["EnergyCost"]=10
  3345. Units["TeslaSoldier"]["MaxUnits"]=5
  3346. Units["TeslaSoldier"]["BuildTime"]=5
  3347. Units["TeslaSoldier"]["Attack"]=function(Unit,Object,Location)
  3348. end
  3349. Units["TeslaSoldier"]["Requires"]={"Barracks","TeslaCoil"}
  3350.  
  3351. Units["FlameSoldier"]={}
  3352. Units["FlameSoldier"]["Speed"]=3.5
  3353. Units["FlameSoldier"]["EnergyCost"]=9
  3354. Units["FlameSoldier"]["MaxUnits"]=5
  3355. Units["FlameSoldier"]["BuildTime"]=6
  3356. Units["FlameSoldier"]["Attack"]=function(Unit,Object,Location)
  3357. end
  3358. Units["FlameSoldier"]["Requires"]={"Barracks","TechCenter","WarFactory"}
  3359.  
  3360. PlaySound=function(Sound,Volume,Parent,Name)
  3361. p=Instance.new("Sound")
  3362. p.SoundId="http://www.roblox.com/asset/?id="..SFX[Sound]
  3363. p.Volume=Volume
  3364. p.Parent=Parent
  3365. p.Name=Name
  3366. p:Play()
  3367. game:GetService("Debris"):AddItem(p,5)
  3368. end
  3369.  
  3370. GetUnits=function(Type)
  3371. s=0
  3372. for _,v in pairs(ActiveUnits) do
  3373. if v.Name==Type then
  3374. s=s+1
  3375. end
  3376. end
  3377. return s
  3378. end
  3379. LastUnitResponse=time()
  3380. UnitsAtPos=function(Pos)
  3381. s=0
  3382. for _,v in pairs(Units) do
  3383. if (v.DesiredPosition.Value-Pos).magnitude<1 then
  3384. s=s+1
  3385. end
  3386. end
  3387. return s
  3388. end
  3389. SelectedUnits={}
  3390. SpreadVector=function(noun)
  3391. noun=noun*1.5+2
  3392. return Vector3.new(math.cos(math.random(-90,90))*math.random(-noun,noun),0,math.cos(math.random(-90,90))*math.random(-noun,noun)) / 4
  3393. end
  3394. UnitMoveTo=function(Unit,Pos,NoVoice)
  3395. Unit.DesiredPosition.Value=Pos
  3396. if Unit:FindFirstChild("VoiceSet")~=nil and time()-LastUnitResponse>.45 and NoVoice==nil then
  3397. LastUnitResponse=time()
  3398. PlaySound("VS"..Unit.VoiceSet.Value.."Order"..math.random(1,Unit.VoiceSet.Comply.Value),1,Unit.Centroid,"Yessir!")
  3399. end
  3400. end
  3401. unitmove=function(Unit)
  3402. Pos=Unit.DesiredPosition.Value
  3403. Unit.Centroid.BodyGyro.cframe=CFrame.new(Unit.Centroid.Position,Vector3.new(Pos.x,Unit.Centroid.Position.y,Pos.z)) * CFrame.fromEulerAnglesXYZ(0,math.pi,0)
  3404. Unit.Centroid.BodyVelocity.velocity=(Unit.Centroid.Position-Pos).unit*(-Unit.Speed.Value)
  3405. end
  3406. unitstop=function(Unit)
  3407. Pos=Unit.DesiredPosition.Value
  3408. Unit.Centroid.BodyGyro.cframe=CFrame.new(Unit.Centroid.Position,Vector3.new(Pos.x,Unit.Centroid.Position.y,Pos.z)) * CFrame.fromEulerAnglesXYZ(0,math.pi,0)
  3409. Unit.Centroid.BodyVelocity.velocity=Vector3.new(0,0,0)
  3410. end
  3411. MakeTinyBabyMan=function(Arm)
  3412. Model=Instance.new("Model")
  3413. Model.Name=Arm.."Soldier"
  3414.  
  3415. p=Instance.new("Part")
  3416. p.TopSurface=0
  3417. p.BottomSurface=0
  3418. p.formFactor="Custom"
  3419. p.Size=Vector3.new(.2,.2,.2)
  3420. p.CFrame=CFrame.new(0,1,0)
  3421. p.Parent=Model
  3422. p.BrickColor=BrickColor.new("Light yellow")
  3423. p.Name="Head"
  3424. m=Instance.new("SpecialMesh")
  3425. m.Scale=Vector3.new(1.25,1.25,1.25)/2
  3426. m.Parent=p
  3427.  
  3428. p=Instance.new("Part")
  3429. p.TopSurface=0
  3430. p.BottomSurface=0
  3431. p.formFactor="Custom"
  3432. p.Size=Vector3.new(.2,.2,.2)
  3433. p.CFrame=CFrame.new(0,1,0)
  3434. p.Parent=Model
  3435. p.BrickColor=ScrubColor
  3436. p.Name="Torso"
  3437. m=Instance.new("BlockMesh")
  3438. m.Scale=Vector3.new(1,1,.5)
  3439. m.Parent=p
  3440.  
  3441. p=Instance.new("Part")
  3442. p.TopSurface=0
  3443. p.BottomSurface=0
  3444. p.formFactor="Custom"
  3445. p.Size=Vector3.new(.2,.2,.2)
  3446. p.CFrame=CFrame.new(0,1,0)
  3447. p.Parent=Model
  3448. p.BrickColor=BrickColor.new("Light yellow")
  3449. p.Name="Left Arm"
  3450. m=Instance.new("BlockMesh")
  3451. m.Scale=Vector3.new(.5,1,.5)
  3452. m.Parent=p
  3453.  
  3454. p=Instance.new("Part")
  3455. p.TopSurface=0
  3456. p.BottomSurface=0
  3457. p.formFactor="Custom"
  3458. p.Size=Vector3.new(.2,.2,.2)
  3459. p.CFrame=CFrame.new(0,1,0)
  3460. p.Parent=Model
  3461. p.BrickColor=ScrubColor
  3462. p.Name="Left Leg"
  3463. m=Instance.new("BlockMesh")
  3464. m.Scale=Vector3.new(.5,1,.5)
  3465. m.Parent=p
  3466.  
  3467. p=Instance.new("Part")
  3468. p.TopSurface=0
  3469. p.BottomSurface=0
  3470. p.formFactor="Custom"
  3471. p.Size=Vector3.new(.2,.2,.2)
  3472. p.CFrame=CFrame.new(0,1,0)
  3473. p.Parent=Model
  3474. p.BrickColor=ScrubColor
  3475. p.Name="Right Leg"
  3476. m=Instance.new("BlockMesh")
  3477. m.Scale=Vector3.new(.5,1,.5)
  3478. m.Parent=p
  3479.  
  3480. p=Instance.new("Part")
  3481. p.TopSurface=0
  3482. p.BottomSurface=0
  3483. p.formFactor="Custom"
  3484. p.Size=Vector3.new(.2,.2,.2)
  3485. p.CFrame=CFrame.new(0,1,0)
  3486. p.Parent=Model
  3487. p.BrickColor=BrickColor.new("Light yellow")
  3488. p.Name="Right Arm"
  3489. m=Instance.new("BlockMesh")
  3490. m.Scale=Vector3.new(.5,1,.5)
  3491. m.Parent=p
  3492.  
  3493. if Arm~="Tesla" and Arm~="Flame" then
  3494. p=Instance.new("Part")
  3495. p.TopSurface=0
  3496. p.BottomSurface=0
  3497. p.formFactor="Custom"
  3498. p.Size=Vector3.new(.2,.2,.2)
  3499. p.CFrame=CFrame.new(0,1,0)
  3500. p.Parent=Model
  3501. p.BrickColor=BrickColor.new("Dark stone grey")
  3502. p.Name="Helmet"
  3503. m=Instance.new("SpecialMesh")
  3504. m.MeshId="http://www.roblox.com/asset/?id=1045381"
  3505. m.Scale=Vector3.new(.12,.12,.12)
  3506. m.Parent=p
  3507. w=Instance.new("Motor6D")
  3508. w.Name="Hat"
  3509. w.Part0=Model.Torso
  3510. w.Part1=Model["Helmet"]
  3511. w.C0=CFrame.new(0,.21,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3512. w.C1=CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3513. w.Parent=w.Part0
  3514. elseif Arm=="Tesla" then
  3515. p=Instance.new("Part")
  3516. p.TopSurface=0
  3517. p.BottomSurface=0
  3518. p.formFactor="Custom"
  3519. p.Size=Vector3.new(.2,.2,.2)
  3520. p.CFrame=CFrame.new(0,1,0)
  3521. p.Parent=Model
  3522. p.BrickColor=ScrubColor
  3523. p.Name="Helmet"
  3524. m=Instance.new("SpecialMesh")
  3525. m.MeshId="http://www.roblox.com/asset/?id=112643970"
  3526. m.Scale=Vector3.new(.12,.12,.12)
  3527. m.Parent=p
  3528. w=Instance.new("Motor6D")
  3529. w.Name="Hat"
  3530. w.Part0=Model.Torso
  3531. w.Part1=Model["Helmet"]
  3532. w.C0=CFrame.new(0,.15,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(180),0)
  3533. w.C1=CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3534. w.Parent=w.Part0
  3535. Model["Right Arm"].BrickColor=BrickColor.new("Dark stone grey")
  3536. Model["Left Arm"].BrickColor=BrickColor.new("Dark stone grey")
  3537. Model["Right Leg"].BrickColor=BrickColor.new("Dark stone grey")
  3538. Model["Left Leg"].BrickColor=BrickColor.new("Dark stone grey")
  3539.  
  3540. p=Instance.new("Part")
  3541. p.TopSurface=0
  3542. p.BottomSurface=0
  3543. p.formFactor="Custom"
  3544. p.Size=Vector3.new(.2,.2,.2)
  3545. p.CFrame=CFrame.new(0,1,0)
  3546. p.Parent=Model
  3547. p.BrickColor=ScrubColor
  3548. p.Name="Generator"
  3549. m=Instance.new("SpecialMesh")
  3550. m.Scale=Vector3.new(1,1,1)
  3551. m.Parent=p
  3552. w=Instance.new("Motor6D")
  3553. w.Name="Generator"
  3554. w.Part0=Model.Torso
  3555. w.Part1=Model["Generator"]
  3556. w.C0=CFrame.new(0,.02,-.08) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3557. w.C1=CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3558. w.Parent=w.Part0
  3559. elseif Arm=="Flame" then
  3560. p=Instance.new("Part")
  3561. p.TopSurface=0
  3562. p.BottomSurface=0
  3563. p.formFactor="Custom"
  3564. p.Size=Vector3.new(.2,.2,.2)
  3565. p.CFrame=CFrame.new(0,1,0)
  3566. p.Parent=Model
  3567. p.BrickColor=ScrubColor
  3568. p.Name="Helmet"
  3569. m=Instance.new("SpecialMesh")
  3570. m.MeshId="http://www.roblox.com/asset/?id=16378042"
  3571. m.Scale=Vector3.new(.12,.12,.12)
  3572. m.Parent=p
  3573. w=Instance.new("Motor6D")
  3574. w.Name="Hat"
  3575. w.Part0=Model.Torso
  3576. w.Part1=Model["Helmet"]
  3577. w.C0=CFrame.new(0,.12,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(180),0)
  3578. w.C1=CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3579. w.Parent=w.Part0
  3580. Model["Right Arm"].BrickColor=BrickColor.new("Medium stone grey")
  3581. Model["Left Arm"].BrickColor=BrickColor.new("Medium stone grey")
  3582. Model["Right Leg"].BrickColor=BrickColor.new("Dark stone grey")
  3583. Model["Left Leg"].BrickColor=BrickColor.new("Dark stone grey")
  3584.  
  3585. p=Instance.new("Part")
  3586. p.TopSurface=0
  3587. p.BottomSurface=0
  3588. p.formFactor="Custom"
  3589. p.Size=Vector3.new(.2,.2,.2)
  3590. p.CFrame=CFrame.new(0,1,0)
  3591. p.Parent=Model
  3592. p.BrickColor=BrickColor.new("Light stone grey")
  3593. p.Name="Generator"
  3594. m=Instance.new("SpecialMesh")
  3595. m.Scale=Vector3.new(.6,1.2,.6)
  3596. m.Parent=p
  3597. w=Instance.new("Motor6D")
  3598. w.Name="Generator"
  3599. w.Part0=Model.Torso
  3600. w.Part1=Model["Generator"]
  3601. w.C0=CFrame.new(0.06,0,-.05) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3602. w.C1=CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3603. w.Parent=w.Part0
  3604.  
  3605. p=Instance.new("Part")
  3606. p.TopSurface=0
  3607. p.BottomSurface=0
  3608. p.formFactor="Custom"
  3609. p.Size=Vector3.new(.2,.2,.2)
  3610. p.CFrame=CFrame.new(0,1,0)
  3611. p.Parent=Model
  3612. p.BrickColor=BrickColor.new("Light stone grey")
  3613. p.Name="Generator2"
  3614. m=Instance.new("SpecialMesh")
  3615. m.Scale=Vector3.new(.6,1.2,.6)
  3616. m.Parent=p
  3617. w=Instance.new("Motor6D")
  3618. w.Name="Generator2"
  3619. w.Part0=Model.Torso
  3620. w.Part1=Model["Generator2"]
  3621. w.C0=CFrame.new(-0.06,0,-.05) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3622. w.C1=CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3623. w.Parent=w.Part0
  3624.  
  3625. end
  3626.  
  3627. w=Instance.new("Motor6D")
  3628. w.Name="Neck"
  3629. w.Part0=Model.Torso
  3630. w.Part1=Model["Head"]
  3631. w.C0=CFrame.new(0,.15,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3632. w.C1=CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3633. w.Parent=w.Part0
  3634.  
  3635.  
  3636.  
  3637. w=Instance.new("Motor6D")
  3638. w.Name="Right Shoulder"
  3639. w.Part0=Model.Torso
  3640. w.Part1=Model["Right Arm"]
  3641. w.C0=CFrame.new(-.07,.05,0.05) * CFrame.fromEulerAnglesXYZ(0,-math.rad(60),0)
  3642. w.C1=CFrame.new(0,.05,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3643. w.MaxVelocity=.15
  3644. w.DesiredAngle=math.rad(90)
  3645. w.Parent=w.Part0
  3646.  
  3647. w=Instance.new("Motor6D")
  3648. w.Name="Left Shoulder"
  3649. w.Part0=Model.Torso
  3650. w.Part1=Model["Left Arm"]
  3651. w.C0=CFrame.new(0,.05,.05) * CFrame.fromEulerAnglesXYZ(0,-math.rad(40),0)
  3652. w.C1=CFrame.new(0,.05,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3653. w.MaxVelocity=.15
  3654. w.DesiredAngle=math.rad(90)
  3655. w.Parent=w.Part0
  3656.  
  3657. w=Instance.new("Motor6D")
  3658. w.Name="Right Hip"
  3659. w.Part0=Model.Torso
  3660. w.Part1=Model["Right Leg"]
  3661. w.C0=CFrame.new(-.05,.05 - .2,0) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0)
  3662. w.C1=CFrame.new(0,.05,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3663. w.MaxVelocity=.15
  3664. w.DesiredAngle=0
  3665. w.Parent=w.Part0
  3666.  
  3667. w=Instance.new("Motor6D")
  3668. w.Name="Left Hip"
  3669. w.Part0=Model.Torso
  3670. w.Part1=Model["Left Leg"]
  3671. w.C0=CFrame.new(.05,.05 - .2,0) * CFrame.fromEulerAnglesXYZ(0,-math.rad(90),0)
  3672. w.C1=CFrame.new(0,.05,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  3673. w.MaxVelocity=.15
  3674. w.DesiredAngle=0
  3675. w.Parent=w.Part0
  3676.  
  3677. Model.Parent=workspace
  3678. Model:MoveTo(Vector3.new(0,100,0))
  3679.  
  3680. gans={}
  3681. gans["Tesla"]=Instance.new("SpecialMesh")
  3682. gans["Tesla"].MeshId="http://www.roblox.com/asset/?id=28909790"
  3683. gans["Tesla"].Scale=Vector3.new(.1,.1,.1)
  3684. gans[""]=Instance.new("SpecialMesh")
  3685. gans[""].MeshId="http://www.roblox.com/asset/?id=72012671"
  3686. gans[""].Scale=Vector3.new(.1,.1,.1)
  3687. gans["Rocket"]=Instance.new("SpecialMesh")
  3688. gans["Rocket"].MeshId="rbxasset://fonts/rocketlauncher.mesh"
  3689. gans["Rocket"].Scale=Vector3.new(-.08,.08,-.08)
  3690. gans["Flame"]=Instance.new("SpecialMesh")
  3691. gans["Flame"].MeshId="http://www.roblox.com/asset/?id=33798955"
  3692. gans["Flame"].Scale=Vector3.new(.1,.1,.1)
  3693.  
  3694. p=Instance.new("Part")
  3695. p.TopSurface=0
  3696. p.BottomSurface=0
  3697. p.formFactor="Custom"
  3698. p.Size=Vector3.new(.2,.2,.2)
  3699. p.CFrame=CFrame.new(0,1,0)
  3700. p.Parent=Model
  3701. p.BrickColor=BrickColor.new("Dark stone grey")
  3702. p.Name="Gun"
  3703. gans[Arm]:clone().Parent=p
  3704.  
  3705. w=Instance.new("Weld")
  3706. w.Name="RightGrip"
  3707. w.Part0=Model["Right Arm"]
  3708. w.Part1=p
  3709. w.Parent=p
  3710.  
  3711. if Arm=="" then
  3712. w.C0=CFrame.new(0.05,-0.1,-.02) * CFrame.fromEulerAnglesXYZ(math.pi+.05,math.pi/2.2,0)
  3713. elseif Arm=="Tesla" then
  3714. w.C0=CFrame.new(0.06,-0.12,-.02) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,-math.pi/2)
  3715. elseif Arm=="Rocket" then
  3716. w.C0=CFrame.new(0.05,-0,-.02) * CFrame.fromEulerAnglesXYZ(0,-math.pi/2,math.pi/2)
  3717. elseif Arm=="Flame" then
  3718. w.C0=CFrame.new(0,-.13,-.01) * CFrame.fromEulerAnglesXYZ(-math.pi/2,0,-math.pi/2)
  3719. end
  3720.  
  3721. for _,v in pairs(Model:children()) do
  3722. v.Elasticity=0
  3723. v.Friction=.66
  3724. v.CanCollide=false
  3725. end
  3726.  
  3727. p=Model["Right Arm"]:clone()
  3728. p.Transparency=1
  3729. p.Size=Vector3.new(.3,.7,.3)
  3730. p.Parent=Model
  3731. p.Name="Centroid"
  3732. p.CanCollide=true
  3733. w=Instance.new("Weld")
  3734. w.Part0=p
  3735. w.Part1=Model.Torso
  3736. w.Parent=w.Part0
  3737. w.Name="RootJoint"
  3738.  
  3739. p=Instance.new("BodyGyro")
  3740. p.Parent=Model.Centroid
  3741. p.maxTorque=Vector3.new(500,500,500)
  3742. p=Instance.new("BodyVelocity")
  3743. p.Parent=Model.Centroid
  3744. p.maxForce=Vector3.new(math.huge,0,math.huge)
  3745. p.P=5000
  3746. f=Instance.new("BodyForce")
  3747. f.force=Vector3.new(0,12,0)
  3748. f.Parent=Model.Centroid
  3749.  
  3750. return Model
  3751. end
  3752. SetUnitVoiceSet=function(Unit)
  3753. r=math.floor(math.random(10,39)/10)
  3754. math.randomseed(r)
  3755. p=Instance.new("IntValue")
  3756. p.Name="VoiceSet"
  3757. p.Value=r
  3758. p.Parent=Unit
  3759. x=Instance.new("IntValue")
  3760. x.Name="Comply"
  3761. if p.Value==1 then
  3762. x.Value=2
  3763. elseif p.Value==2 then
  3764. x.Value=5
  3765. elseif p.Value==3 then
  3766. x.Value=7
  3767. end
  3768. x.Parent=p
  3769. x=Instance.new("IntValue")
  3770. x.Name="Select"
  3771. if p.Value==1 then
  3772. x.Value=2
  3773. elseif p.Value==2 then
  3774. x.Value=3
  3775. elseif p.Value==3 then
  3776. x.Value=4
  3777. end
  3778. x.Parent=p
  3779. end
  3780. SetUnitParameters=function(Unit,Speed)
  3781. p=Instance.new("IntValue")
  3782. p.Name="Speed"
  3783. p.Value=Speed
  3784. p.Parent=Unit
  3785. p=Instance.new("StringValue")
  3786. p.Name="Status"
  3787. p.Value="Move"
  3788. p.Parent=Unit
  3789. p=Instance.new("Vector3Value")
  3790. p.Name="DesiredPosition"
  3791. p.Value=Unit.Centroid.Position
  3792. p.Parent=Unit
  3793. end
  3794. SetUnitCentroid=function(Unit,Pos,Anchored) --Units which need centroids placed
  3795. if Unit:FindFirstChild("Plate")==nil then
  3796. for _,v in pairs(Unit:children()) do
  3797. if v:IsA("BasePart") then
  3798. v.CanCollide=false
  3799. end
  3800. end
  3801. cpos=Unit:GetModelCFrame().p
  3802. csize=Unit:GetModelSize()
  3803.  
  3804. p=Instance.new("Part")
  3805. p.Name="Centroid"
  3806. p.TopSurface=0
  3807. p.BottomSurface=0
  3808. p.formFactor="Custom"
  3809. p.Size=csize + Vector3.new(.1,.1,.1)
  3810. p.CFrame=CFrame.new(cpos) * CFrame.fromEulerAnglesXYZ(0,math.pi,0)
  3811. p.Parent=Unit
  3812. p.Transparency=1
  3813.  
  3814. for _,v in pairs(Unit:children()) do
  3815. if v:IsA("BasePart") then
  3816. w=Instance.new("Weld")
  3817. w.Name="AUTOJOINT"
  3818. w.Part0=p
  3819. w.Part1=v
  3820. w.C0=p.CFrame:inverse()*CFrame.new(p.Position)
  3821. w.C1=v.CFrame:inverse()*CFrame.new(p.Position)
  3822. w.Parent=w.Part0
  3823. end
  3824. end
  3825.  
  3826. else
  3827.  
  3828. cpos=Unit:GetModelCFrame().p
  3829. csize=Unit:GetModelSize()
  3830.  
  3831. p=Instance.new("Part")
  3832. p.Name="Centroid"
  3833. p.TopSurface=0
  3834. p.BottomSurface=0
  3835. p.formFactor="Custom"
  3836. p.Size=Unit.Plate.Size
  3837. p.CFrame=Unit.Plate.CFrame * CFrame.fromEulerAnglesXYZ(math.pi,0,0)
  3838. p.Parent=Unit
  3839. p.Transparency=1
  3840.  
  3841. for _,v in pairs(Unit:children()) do
  3842. if v:IsA("BasePart") then
  3843. w=Instance.new("Weld")
  3844. w.Name="AUTOJOINT"
  3845. w.Part0=p
  3846. w.Part1=v
  3847. w.C0=p.CFrame:inverse()*CFrame.new(p.Position)
  3848. w.C1=v.CFrame:inverse()*CFrame.new(p.Position)
  3849. w.Parent=w.Part0
  3850. end
  3851. end
  3852.  
  3853. end
  3854. end
  3855.  
  3856. UNITCONT=workspace:FindFirstChild(game.Players.LocalPlayer.Name.."UNITS")
  3857. if UNITCONT==nil then
  3858. else
  3859. UNITCONT:Remove()
  3860. end
  3861. m=Instance.new("Model")
  3862. m.Name=game.Players.LocalPlayer.Name.."UNITS"
  3863. m.Parent=workspace
  3864. UNITCONT=m
  3865.  
  3866. ActiveUnits={}
  3867. SelectedUnits={}
  3868. MakingUnit=false
  3869. Rotation=0
  3870. RequestNewUnit=function(Pos,UnitType)
  3871. if MakingUnit==true then return end
  3872. MakingUnit=true
  3873. MeetsRequirements=false
  3874. Needs={}
  3875. for _,v in pairs(Units[UnitType]["Requires"]) do
  3876. for __,vv in pairs(ActiveUnits) do
  3877. if vv.Name==v then
  3878. table.insert(Needs,"Gottam")
  3879. end
  3880. end
  3881. end
  3882. if #Needs>=#Units[UnitType]["Requires"] then
  3883. MeetsRequirements=true
  3884. end
  3885. Needs={}
  3886. print(tostring(MeetsRequirements))
  3887. if GetUnits(UnitType) < Units[UnitType]["MaxUnits"] and MeetsRequirements then
  3888. UnitAType="Mobile"
  3889. LEL={"ConYard","PowerPlant","WarFactory","RadarDome","Barracks","Pillbox","TeslaCoil","Wall","WallCorner","TechCenter"}
  3890. for _,v in pairs(LEL) do
  3891. if v==UnitType then
  3892. UnitAType="Stationary"
  3893. end
  3894. end
  3895. if UnitAType=="Mobile" then
  3896. if string.match(UnitType,"Soldier")=="Soldier" then
  3897. newUnit=MakeTinyBabyMan(string.gsub(UnitType,"Soldier",""))
  3898. newUnit:MoveTo(Pos+Vector3.new(0,2,0))
  3899. SetUnitParameters(newUnit,Units[UnitType]["Speed"])
  3900. SetUnitVoiceSet(newUnit)
  3901. newUnit:MoveTo(Pos+Vector3.new(0,5,0))
  3902. newUnit.Parent=UNITCONT
  3903. table.insert(ActiveUnits,newUnit)
  3904. v=Instance.new("ObjectValue")
  3905. v.Name="AttackObj"
  3906. v.Value=nil
  3907. v.Parent=newUnit
  3908. v=Instance.new("Vector3Value")
  3909. v.Name="AttackPos"
  3910. v.Parent=newUnit
  3911. else
  3912. print("rarbing")
  3913. newUnit=Units[UnitType]["Model"]()
  3914. newUnit:MoveTo(Pos+Vector3.new(0,2,0))
  3915. wait(.1)
  3916. SetUnitCentroid(newUnit)
  3917. SetUnitParameters(newUnit,Units[UnitType]["Speed"])
  3918. SetUnitVoiceSet(newUnit)
  3919. newUnit.Parent=UNITCONT
  3920. p=newUnit.Centroid
  3921. wait(.2)
  3922. p2=Instance.new("BodyGyro")
  3923. p2.Parent=p
  3924. p2.maxTorque=Vector3.new(50000,50000,50000)
  3925. p2.D=10
  3926. p2.P=200
  3927. p2=Instance.new("BodyVelocity")
  3928. p2.Parent=p
  3929. p2.maxForce=Vector3.new(50000000000,0,50000000000)
  3930. p2.P=5000
  3931. f2=Instance.new("BodyForce")
  3932. f2.force=Vector3.new(0,50,0)
  3933. f2.Parent=p
  3934. v=Instance.new("ObjectValue")
  3935. v.Name="AttackObj"
  3936. v.Value=nil
  3937. v.Parent=newUnit
  3938. v=Instance.new("Vector3Value")
  3939. v.Name="AttackPos"
  3940. v.Parent=newUnit
  3941. for i=1, 3 do
  3942. newUnit:MoveTo(Pos+Vector3.new(0,6,0))
  3943. newUnit.DesiredPosition.Value=Pos
  3944. wait(.2)
  3945. end
  3946. table.insert(ActiveUnits,newUnit)
  3947. end
  3948. else
  3949. --Buildings
  3950. if UnitType=="ConYard" then
  3951. newUnit=Units[UnitType]["Model"]()
  3952. Pos=UNITCONT["MCV"].Centroid.Position-Vector3.new(0,.5,0)
  3953. UNITCONT["MCV"]:Remove()
  3954. despos=Vector3.new(math.floor(Pos.x+.5),Pos.y,math.floor(Pos.z+.5))
  3955. newUnit:MoveTo(despos)
  3956. SetUnitCentroid(newUnit)
  3957. newUnit.Parent=UNITCONT
  3958. newUnit:MoveTo(despos)
  3959. newUnit.Centroid.Anchored=true
  3960. PlaySound("BuildStart",1,newUnit.Plate,"Stuff")
  3961. newUnit.Centroid.CFrame=CFrame.new(despos-Vector3.new(0,2,0))*CFrame.fromEulerAnglesXYZ(0,Rotation,0)
  3962. wait(.1)
  3963. v=Instance.new("ObjectValue")
  3964. v.Name="AttackObj"
  3965. v.Value=nil
  3966. v.Parent=newUnit
  3967. v=Instance.new("Vector3Value")
  3968. v.Name="AttackPos"
  3969. v.Parent=newUnit
  3970. PlaySound("Build",1,newUnit.Plate,"Stuff")
  3971. Loop=Units[UnitType]["BuildTime"]*10
  3972. newUnit.Centroid.CFrame=newUnit.Centroid.CFrame*CFrame.fromEulerAnglesXYZ(0,-math.rad(Loop*2),0)
  3973. for i=1, Loop do
  3974. newUnit.Centroid.Anchored=false
  3975. newUnit.Centroid.CFrame=newUnit.Centroid.CFrame*CFrame.fromEulerAnglesXYZ(0,math.rad(2),0)+Vector3.new(0,2/Loop,0)
  3976. newUnit.Centroid.Anchored=true
  3977. wait()
  3978. end
  3979. table.insert(ActiveUnits,newUnit)
  3980. else
  3981. newUnit=Units[UnitType]["Model"]()
  3982. despos=Vector3.new(math.floor(Pos.x+.5),Pos.y,math.floor(Pos.z+.5))
  3983. newUnit:MoveTo(despos)
  3984. SetUnitCentroid(newUnit)
  3985. newUnit.Parent=UNITCONT
  3986. newUnit:MoveTo(despos)
  3987. newUnit.Centroid.Anchored=true
  3988.  
  3989. if newUnit.Name=="Pillbox" then
  3990. t=Instance.new("IntValue")
  3991. t.Name="AutoAttack"
  3992. t.Value=8
  3993. t.Parent=newUnit
  3994.  
  3995. SetUnitParameters(newUnit)
  3996.  
  3997. end
  3998.  
  3999. PlaySound("BuildStart",1,newUnit.Plate,"Stuff")
  4000. newUnit.Centroid.CFrame=CFrame.new(despos-Vector3.new(0,2,0))*CFrame.fromEulerAnglesXYZ(0,Rotation,0)
  4001. wait(.1)
  4002. PlaySound("Build",1,newUnit.Plate,"Stuff")
  4003. Loop=Units[UnitType]["BuildTime"]*10
  4004. newUnit.Centroid.CFrame=newUnit.Centroid.CFrame*CFrame.fromEulerAnglesXYZ(0,-math.rad(Loop*2),0)
  4005. for i=1, Loop do
  4006. newUnit.Centroid.Anchored=false
  4007. newUnit.Centroid.CFrame=newUnit.Centroid.CFrame*CFrame.fromEulerAnglesXYZ(0,math.rad(2),0)+Vector3.new(0,2/Loop,0)
  4008. newUnit.Centroid.Anchored=true
  4009. wait()
  4010. end
  4011. table.insert(ActiveUnits,newUnit)
  4012. end
  4013. end
  4014. end
  4015. MakingUnit=false
  4016. end
  4017.  
  4018. vPlayer=game.Players.LocalPlayer
  4019. Mouse=vPlayer:GetMouse()
  4020.  
  4021. if vPlayer.PlayerGui:FindFirstChild("CONTROLPANEL")~=nil then vPlayer.PlayerGui.CONTROLPANEL:Destroy() end
  4022.  
  4023. g=Instance.new("ScreenGui")
  4024. g.Name="CONTROLPANEL"
  4025. g.Parent=vPlayer.PlayerGui
  4026.  
  4027. t=Instance.new("TextBox")
  4028. t.Parent=g
  4029. t.Size=UDim2.new(0,80,0,15)
  4030. t.Position=UDim2.new(.2,0,.5,0)
  4031. t.Parent=g
  4032. t.Name="MachineType"
  4033.  
  4034. t=Instance.new("TextBox")
  4035. t.Parent=g
  4036. t.Text="Attack"
  4037. t.Size=UDim2.new(0,80,0,15)
  4038. t.Position=UDim2.new(.2,0,.5,20)
  4039. t.Parent=g
  4040. t.Name="CommandType"
  4041.  
  4042. Mouse.KeyDown:connect(function(key)
  4043. if key=="f" then
  4044. print(g.MachineType.Text)
  4045. coroutine.resume(coroutine.create(RequestNewUnit),Mouse.Hit.p,g.MachineType.Text)
  4046. end
  4047. if key=="r" then
  4048. Rotation=Rotation+math.rad(90)
  4049. end
  4050. end)
  4051.  
  4052. Select=function(Radius,Pos)
  4053. SelectedUnits={}
  4054. for _,v in pairs(ActiveUnits) do
  4055. if (v.Centroid.Position-Pos).magnitude<=Radius then
  4056. table.insert(SelectedUnits,v)
  4057. end
  4058. end
  4059. end
  4060.  
  4061. timedown=time()
  4062. radstart=nil
  4063. Mouse.TargetFilter=nil
  4064. mode=1
  4065. Mouse.Button1Down:connect(function()
  4066. timedown=time()
  4067. doselectstart=true
  4068. radstart=nil
  4069. print(Mouse.Target)
  4070. if Mouse.Target~=nil then
  4071. for _,v in pairs(ActiveUnits) do
  4072. for __,vv in pairs(v:children()) do
  4073. if vv==Mouse.Target then
  4074. doselectstart=false
  4075. SelectedUnits={v}
  4076. if Units[v.Name]["Attack"]~=nil then
  4077. print("WEEEE")
  4078. end
  4079. end
  4080. end
  4081. end
  4082. end
  4083. if doselectstart==true then
  4084. radstart=Mouse.Hit.p
  4085. if workspace.CurrentCamera:FindFirstChild("SILENCE")~=nil then workspace.CurrentCamera.SILENCE:Destroy() end
  4086. orb=Instance.new("Part")
  4087. orb.Name="SILENCE"
  4088. orb.Parent=workspace.CurrentCamera
  4089. orb.TopSurface=0
  4090. orb.BottomSurface=0
  4091. orb.CanCollide=false
  4092. orb.Anchored=true
  4093. orb.CFrame=CFrame.new(radstart)
  4094. orb.BrickColor=BrickColor:Red()
  4095. orb.Transparency=.9
  4096. orb.Size=Vector3.new(1,1,1)
  4097. orb.formFactor="Symmetric"
  4098. s=Instance.new("SpecialMesh")
  4099. s.MeshType="Sphere"
  4100. s.Parent=orb
  4101. while radstart~=nil do
  4102. orb.Mesh.Scale=Vector3.new(1,1,1)*((radstart-Mouse.Hit.p).magnitude*2)
  4103. wait(.03)
  4104. end
  4105. orb:Remove()
  4106. end
  4107. end)
  4108.  
  4109. Mouse.Button1Up:connect(function()
  4110. print(":D")
  4111. print(radstart)
  4112. if radstart~=nil then
  4113. print("GOE")
  4114. Select((radstart-Mouse.Hit.p).magnitude,radstart)
  4115. radstart=nil
  4116. orb:Remove()
  4117. end
  4118. end)
  4119.  
  4120. Mouse.Button2Down:connect(function()
  4121. twodowntime=time()
  4122. end)
  4123. Mouse.Button2Up:connect(function()
  4124. if mode==1 then
  4125. if time()-twodowntime<.15 then
  4126. print("AIDS")
  4127. for _,v in pairs(SelectedUnits) do
  4128. if v:FindFirstChild("DesiredPosition")~=nil then
  4129. v.Status.Value="Move"
  4130. UnitMoveTo(v,Mouse.Hit.p+SpreadVector(#SelectedUnits))
  4131. end
  4132. end
  4133. end
  4134. elseif mode==2 then
  4135. if time()-twodowntime<.15 then
  4136. for _,v in pairs(SelectedUnits) do
  4137. v.Parent=nil
  4138. end
  4139. end
  4140. elseif mode==3 then
  4141. if time()-twodowntime<.15 then
  4142. print("AIDS")
  4143. Targ=Mouse.Target
  4144. cTarg=nil
  4145. if Targ~=nil then
  4146. if Targ.Parent~=nil then
  4147. if Targ.Parent:FindFirstChild("Humanoid")~=nil then
  4148. cTarg=Targ.Parent
  4149. end
  4150. end
  4151. end
  4152.  
  4153. if cTarg~=nil then
  4154.  
  4155. for _,v in pairs(SelectedUnits) do
  4156. if v:FindFirstChild("DesiredPosition")~=nil and Units[v.Name]["Attack"]~=nil then
  4157. v.Status.Value="Attack"
  4158. v.AttackPos.Value=Mouse.Hit.p
  4159. v.AttackObj.Value=cTarg
  4160. UnitMoveTo(v,Mouse.Hit.p+SpreadVector(#SelectedUnits))
  4161. end
  4162. end
  4163.  
  4164. else
  4165.  
  4166. if time()-twodowntime<.15 then
  4167. print("AIDS")
  4168. for _,v in pairs(SelectedUnits) do
  4169. if v:FindFirstChild("DesiredPosition")~=nil then
  4170. v.Status.Value="Move"
  4171. UnitMoveTo(v,Mouse.Hit.p+SpreadVector(#SelectedUnits))
  4172. end
  4173. end
  4174. end
  4175.  
  4176. end
  4177. end
  4178. end
  4179. end)
  4180.  
  4181. UnitType="MCV"
  4182. Pos=(vPlayer.Character.Torso.CFrame*CFrame.new(0,0,5)).p
  4183. print("rarbing")
  4184. newUnit=Units[UnitType]["Model"]()
  4185. newUnit:MoveTo(Pos+Vector3.new(0,2,0))
  4186. wait(.1)
  4187. SetUnitCentroid(newUnit)
  4188. SetUnitParameters(newUnit,3)
  4189. SetUnitVoiceSet(newUnit)
  4190. newUnit.Parent=UNITCONT
  4191. p=newUnit.Centroid
  4192. wait(.2)
  4193. p2=Instance.new("BodyGyro")
  4194. p2.Parent=p
  4195. p2.maxTorque=Vector3.new(50000,50000,50000)
  4196. p2.D=10
  4197. p2.P=200
  4198. p2=Instance.new("BodyVelocity")
  4199. p2.Parent=p
  4200. p2.maxForce=Vector3.new(50000000000,0,50000000000)
  4201. p2.P=5000
  4202. f2=Instance.new("BodyForce")
  4203. f2.force=Vector3.new(0,50,0)
  4204. f2.Parent=p
  4205. for i=1, 3 do
  4206. newUnit:MoveTo(Pos+Vector3.new(0,6,0))
  4207. newUnit.DesiredPosition.Value=Pos
  4208. wait(.2)
  4209. end
  4210. table.insert(ActiveUnits,newUnit)
  4211.  
  4212.  
  4213. game:GetService("RunService").Stepped:connect(function()
  4214. for _,v in pairs(vPlayer.PlayerGui:children()) do
  4215. if v.className=="SelectionBox" then
  4216. if mode==1 then
  4217. v.Color=BrickColor.new("Bright blue")
  4218. v.Transparency=.95
  4219. elseif mode==2 then
  4220. v.Color=BrickColor:Green()
  4221. v.Transparency=.5
  4222. elseif mode==3 then
  4223. v.Color=BrickColor.new("Bright red")
  4224. v.Transparency=.95
  4225. end
  4226. if v.Adornee==nil then
  4227. v:Remove()
  4228. else
  4229. if v.Adornee.Parent==nil then
  4230. v:Remove()
  4231. end
  4232. end
  4233. end
  4234. end
  4235. mode=vPlayer.PlayerGui.CONTROLPANEL.CommandType.Text
  4236. if mode=="Move" then
  4237. mode=1
  4238. elseif mode=="Destroy" then
  4239. mode=2
  4240. elseif mode=="Attack" then
  4241. mode=3
  4242. end
  4243. for _,v in pairs(ActiveUnits) do
  4244. if v==nil then
  4245. table.remove(ActiveUnits,_)
  4246. else
  4247. if v.Parent==nil then
  4248. table.remove(ActiveUnits,_)
  4249. end
  4250. end
  4251. if v~=nil then
  4252. IsSel=false
  4253. for __,vv in pairs(SelectedUnits) do
  4254. if vv==v then
  4255. IsSel=true
  4256. end
  4257. end
  4258.  
  4259. if IsSel==true then
  4260. if v:FindFirstChild("Selected")==nil then
  4261. p=Instance.new("ObjectValue")
  4262. p.Name="Selected"
  4263. p.Parent=v
  4264.  
  4265. gg=Instance.new("SelectionBox")
  4266. gg.Adornee=v
  4267. gg.Parent=vPlayer.PlayerGui
  4268. gg.Transparency=.95
  4269. p.Value=gg
  4270.  
  4271. if v:FindFirstChild("VoiceSet")~=nil then
  4272. PlaySound("VS"..v.VoiceSet.Value.."Select"..math.random(1,v.VoiceSet.Select.Value),1,v.Centroid,"Yessir!")
  4273. end
  4274.  
  4275. end
  4276. else
  4277. if v:FindFirstChild("Selected")~=nil then
  4278. v.Selected.Value:Destroy()
  4279. v.Selected:Destroy()
  4280. end
  4281. end
  4282.  
  4283. if v~=nil then
  4284. if v.Parent~=nil and v:FindFirstChild("Status")~=nil then
  4285. if v:FindFirstChild("AutoAttack")==nil then
  4286.  
  4287. if v.Status.Value=="Move" then
  4288. if v.Centroid:FindFirstChild("BodyVelocity")~=nil then
  4289. if (v.Centroid.Position-Vector3.new(v.DesiredPosition.Value.x,v.Centroid.Position.y,v.DesiredPosition.Value.z)).magnitude>=3.3 then
  4290. unitmove(v)
  4291. else
  4292. unitstop(v)
  4293. end
  4294. end
  4295. elseif v.Status.Value=="Attack" then
  4296. if Units[v.Name]["Attack"]~=nil then
  4297. Units[v.Name]["Attack"](v,v.AttackObj.Value,v.AttackPos.Value)
  4298. end
  4299. end
  4300.  
  4301. else
  4302. print(":>")
  4303. rads=v.AutoAttack.Value
  4304. for __,vv in pairs(workspace:children()) do
  4305. if vv:FindFirstChild("Humanoid")~=nil then
  4306. if vv~=vPlayer.Character then
  4307. if vv:FindFirstChild("Torso")~=nil then
  4308. despos=vv.Torso.Position-Vector3.new(0,2.5,0)
  4309. if (v.Centroid.Position-despos).magnitude<rads then
  4310. Units[v.Name]["Attack"](v,vv,vv.Torso.Position)
  4311. end
  4312. end
  4313. end
  4314. end
  4315. end
  4316.  
  4317. end
  4318.  
  4319. end
  4320. end
  4321. end
  4322. end
  4323. vPlayer=game.Players.LocalPlayer
  4324. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement