Advertisement
astronaut32

engineer

Nov 5th, 2016
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.64 KB | None | 0 0
  1. local hop = Instance.new("HopperBin")
  2. script.Parent = hop
  3.  
  4. for i, v in pairs(game:service("Players").LocalPlayer.Backpack:children()) do
  5. if v.className == "HopperBin" and v.Name == "Spanner" then
  6. v:remove()
  7. end
  8. end
  9. bin = Instance.new("HopperBin")
  10. bin.Name = "Spanner"
  11. bin.Parent = game:service("Players").LocalPlayer.Backpack
  12.  
  13. local players = game:service("Players")
  14. local character = players.LocalPlayer.Character
  15. local char = players.LocalPlayer.Character
  16. local Torsoz = char:findFirstChild("Torso")
  17. local RA = char:findFirstChild("Right Arm")
  18. local LA = char:findFirstChild("Left Arm")
  19. local RL = char:findFirstChild("Right Leg")
  20. local LL = char:findFirstChild("Left Leg")
  21. local H = char:findFirstChild("Head")
  22. local Hum = char:findFirstChild("Humanoid")
  23. local RS = Torsoz:findFirstChild("Right Shoulder")
  24. local LS = Torsoz:findFirstChild("Left Shoulder")
  25. local RH = Torsoz:findFirstChild("Right Hip")
  26. local LH = Torsoz:findFirstChild("Left Hip")
  27. local N = Torsoz:findFirstChild("Neck")
  28. local GuiTable = {}
  29. local Spanner
  30. local Crowbar
  31. local Joint1
  32. local TurretGui
  33. local HealthPackGui
  34. local SmokeGenGui
  35. local TypeGui
  36. local ModeGui
  37. local WorkNum = 0
  38. local Turrets = {}
  39. local MaxTurrets = 3
  40. local HealthPacks = {}
  41. local MaxHealthPacks = 3
  42. local SmokeGens = {}
  43. local MaxSmokeGens = 3
  44. local SpannerModes = {"Turret", "Health Pack", "Smoke Gen"}
  45. local CrowbarModes = {"Smack", "Destroy"}
  46. local ModeNum = 1
  47. local Animating = false
  48. local Building = false
  49. local Mode = "Turret"
  50. local Type = "Spanner"
  51.  
  52. function Stats()
  53. for i, v in pairs(char:children()) do
  54. if v.className == "Model" and v.Name == "Stats" then
  55. v:remove()
  56. end
  57. end
  58. local m = Instance.new("Model", char)
  59. m.Name = "Stats"
  60. local team = Instance.new("StringValue", m)
  61. team.Name = "Team"
  62. team.Value = "Deep blue"
  63. end
  64. Stats()
  65.  
  66. function GUI(ins)
  67. if ins == "Hide" then
  68. for i, v in pairs(players.LocalPlayer.PlayerGui:children()) do
  69. if v.className == "ScreenGui" and v.Name == "StatsGui" then
  70. v:remove()
  71. end
  72. end
  73. elseif ins == "Show" then
  74. GuiTable = {}
  75. for i, v in pairs(players.LocalPlayer.PlayerGui:children()) do
  76. if v.className == "ScreenGui" and v.Name == "StatsGui" then
  77. v:remove()
  78. end
  79. end
  80. local g = Instance.new("ScreenGui", players.LocalPlayer.PlayerGui)
  81. g.Name = "StatsGui"
  82. local f = Instance.new("Frame", g)
  83. f.Position = UDim2.new(0.375,0,0,0)
  84. f.Size = UDim2.new(0.25,0,0.15,0)
  85. f.BackgroundColor3 = Color3.new(0,0,0)
  86. f.BorderColor = BrickColor.new(char.Stats.Team.Value)
  87. table.insert(GuiTable, f)
  88. for i = 0, 2 do
  89. local f2 = Instance.new("Frame", f)
  90. f2.Name = "Frame"..i+1
  91. f2.Position = UDim2.new((1/3)*i,0,0,0)
  92. f2.Size = UDim2.new(1/3,0,0.5,0)
  93. f2.BackgroundColor3 = Color3.new(0,0,0)
  94. f2.BorderColor = BrickColor.new(char.Stats.Team.Value)
  95. table.insert(GuiTable, f2)
  96. end
  97. for i = 0, 2 do
  98. local t = Instance.new("TextLabel", f:findFirstChild("Frame"..i+1))
  99. t.Size = UDim2.new(0.5,0,1,0)
  100. t.Position = UDim2.new(0.5,0,0,0)
  101. t.BackgroundColor3 = Color3.new(0,0,0)
  102. t.BorderColor = BrickColor.new(char.Stats.Team.Value)
  103. t.TextColor3 = Color3.new(0.8,0.8,0.8)
  104. t.TextStrokeColor3 = BrickColor.new(char.Stats.Team.Value).Color
  105. t.TextStrokeTransparency = 0
  106. t.Text = i
  107. t.Font = 2
  108. t.FontSize = 6
  109. table.insert(GuiTable, t)
  110. local f3 = Instance.new("Frame", f:findFirstChild("Frame"..i+1))
  111. f3.Size = UDim2.new(0.5,0,1,0)
  112. f3.BackgroundColor3 = Color3.new(0,0,0)
  113. f3.BorderColor = BrickColor.new(char.Stats.Team.Value)
  114. table.insert(GuiTable, f3)
  115. local im = Instance.new("ImageLabel", f3)
  116. im.Size = UDim2.new(0.8,0,0.75,0)
  117. im.Position = UDim2.new(0.1,0,0.1,0)
  118. im.BorderSizePixel = 0
  119. im.BackgroundColor3 = Color3.new(0,0,0)
  120. im.BorderColor = BrickColor.new(char.Stats.Team.Value)
  121. table.insert(GuiTable, im)
  122. if i == 0 then
  123. TurretGui = t
  124. im.Image = "http://www.roblox.com/asset/?id=92010919"
  125. t.Text = #Turrets.."/"..MaxTurrets
  126. elseif i == 1 then
  127. HealthPackGui = t
  128. im.Image = "http://www.roblox.com/asset/?id=92009935"
  129. --- new: 92009935
  130. --- old: 51393782
  131. t.Text = #HealthPacks.."/"..MaxHealthPacks
  132. elseif i == 2 then
  133. SmokeGenGui = t
  134. im.Image = "http://www.roblox.com/asset/?id=30512117"
  135. --- round smoke: 31727915
  136. --- blue smoke: 30512117
  137. --- red smoke: 4571186
  138. t.Text = #SmokeGens.."/"..MaxSmokeGens
  139. end
  140. local t2 = t:Clone()
  141. t2.Parent = t.Parent
  142. t2.Text = "="
  143. t2.Position = UDim2.new(0,0,0,0)
  144. t2.Size = UDim2.new(1,0,1,0)
  145. t2.BackgroundTransparency = 1
  146. table.insert(GuiTable, t2)
  147. end
  148.  
  149. for i = 0, 1 do
  150. local t = Instance.new("TextLabel", f)
  151. t.Size = UDim2.new(0.5,0,0.5,0)
  152. t.Position = UDim2.new(0.5*i,0,0.5,0)
  153. t.BackgroundColor3 = Color3.new(0,0,0)
  154. t.BackgroundTransparency = 1
  155. t.BorderColor = BrickColor.new(char.Stats.Team.Value)
  156. t.TextColor3 = Color3.new(0.8,0.8,0.8)
  157. t.TextStrokeColor3 = BrickColor.new(char.Stats.Team.Value).Color
  158. t.TextStrokeTransparency = 0
  159. t.BorderSizePixel = 0
  160. if i == 0 then
  161. t.Text = "Type: "..Type
  162. TypeGui = t
  163. else
  164. t.Text = "Mode: "..Mode
  165. ModeGui = t
  166. end
  167. t.Font = 2
  168. t.FontSize = 5
  169. table.insert(GuiTable, t)
  170. end
  171.  
  172. for i = 0, 1 do
  173. local t = Instance.new("TextLabel", f)
  174. t.Size = UDim2.new(1,0,0.25,0)
  175. t.Position = UDim2.new(0,0,0.5+(0.25*i),0)
  176. t.BackgroundColor3 = Color3.new(0,0,0)
  177. t.BorderColor = BrickColor.new(char.Stats.Team.Value)
  178. t.TextColor3 = Color3.new(0.8,0.8,0.8)
  179. t.TextStrokeColor3 = BrickColor.new(char.Stats.Team.Value).Color
  180. t.TextStrokeTransparency = 0
  181. t.BackgroundTransparency = 1
  182. if i == 0 then
  183. t.Text = [[/\]]
  184. else
  185. t.Text = [[\/]]
  186. end
  187. t.Font = 2
  188. t.FontSize = 6
  189. table.insert(GuiTable, t)
  190. end
  191.  
  192. local t = Instance.new("TextLabel", f)
  193. t.Size = UDim2.new(1,0,0.25,0)
  194. t.Position = UDim2.new(0,0,1,0)
  195. t.BackgroundColor3 = Color3.new(0,0,0)
  196. t.BorderColor = BrickColor.new(char.Stats.Team.Value)
  197. t.BackgroundTransparency = 0
  198. t.Text = ""
  199. table.insert(GuiTable, t)
  200. local t = Instance.new("TextLabel", f)
  201. t.Size = UDim2.new(0,0,0.125,0)
  202. t.Position = UDim2.new(0,0,1+(0.125/2),0)
  203. t.BackgroundColor3 = Color3.new(0,0.75,0.1)
  204. t.BorderColor = BrickColor.new(char.Stats.Team.Value)
  205. t.BackgroundTransparency = 0
  206. t.Text = ""
  207. CentGui = t
  208. table.insert(GuiTable, t)
  209. local t = Instance.new("TextLabel", f)
  210. t.Size = UDim2.new(1,0,0.25,0)
  211. t.Position = UDim2.new(0,0,1,0)
  212. t.BackgroundColor3 = Color3.new(0,0,0)
  213. t.BorderColor = BrickColor.new(char.Stats.Team.Value)
  214. t.TextColor3 = Color3.new(0.8,0.8,0.8)
  215. t.TextStrokeColor3 = BrickColor.new(char.Stats.Team.Value).Color
  216. t.TextStrokeTransparency = 0
  217. t.BackgroundTransparency = 1
  218. t.Font = 2
  219. t.FontSize = 5
  220. t.Text = ""
  221. CentGuiText = t
  222. table.insert(GuiTable, t)
  223.  
  224.  
  225. end
  226. end
  227.  
  228. function Part(parent, name, colour, anc, col, size, ptype)
  229. name = name or "Part"
  230. colour = colour or "Medium stone grey"
  231. anc = anc or false
  232. col = col or false
  233. size = size or Vector3.new(0.5,0.5,0.5)
  234. ptype = ptype or "Part"
  235. local P
  236. if ptype == "Part" then
  237. P = Instance.new("Part", parent)
  238. P.formFactor = "Custom"
  239. elseif ptype == "CornerWedgePart" then
  240. P = Instance.new("CornerWedgePart", parent)
  241. end
  242. P.Anchored = anc
  243. P.CanCollide = col
  244. P.Name = name
  245. P.Size = size
  246. P.Locked = true
  247. P.TopSurface = 0
  248. P.BottomSurface = 0
  249. P.BrickColor = BrickColor.new(colour)
  250. return P
  251. end
  252. function Weld(par, p0, p1, c0, c1)
  253. c0 = c0 or CFrame.new(0,0,0)
  254. c1 = c1 or CFrame.new(0,0,0)
  255. local W = Instance.new("Motor", par)
  256. W.Part0 = p0
  257. W.Part1 = p1
  258. W.C0 = c0
  259. W.C1 = c1
  260. return W
  261. end
  262.  
  263. function Build(team)
  264. for i, v in pairs(char:children()) do
  265. if v.className == "Model" and v.Name == "TeamSuit" then
  266. v:remove()
  267. end
  268. end
  269. local mdl = Instance.new("Model", char)
  270. mdl.Name = "TeamSuit"
  271. team = team or "Black"
  272.  
  273. local p = Part(mdl, "Belt", "Brown")
  274. local mesh = Instance.new("SpecialMesh", p)
  275. mesh.MeshType = "Brick"
  276. mesh.Scale = Vector3.new(4.5,0.8,2.5)
  277. Weld(p, Torsoz, p, CFrame.new(0,-1,0))
  278. local p = Part(mdl, "Strap", "Brown")
  279. local mesh = Instance.new("SpecialMesh", p)
  280. mesh.MeshType = "Brick"
  281. mesh.Scale = Vector3.new(5.7,0.8,2.5)
  282. Weld(p, Torsoz, p, CFrame.new(0,0,0) * CFrame.Angles(0,0,math.pi/4))
  283. local p = Part(mdl, "Strap", "Brown")
  284. local mesh = Instance.new("SpecialMesh", p)
  285. mesh.MeshType = "Brick"
  286. mesh.Scale = Vector3.new(5.7,0.8,2.5)
  287. Weld(p, Torsoz, p, CFrame.new(0,0,0) * CFrame.Angles(0,0,-math.pi/4))
  288. local p = Part(mdl, "TBelt", team)
  289. local mesh = Instance.new("SpecialMesh", p)
  290. mesh.MeshType = "Brick"
  291. mesh.Scale = Vector3.new(4.2,0.35,2.55)
  292. Weld(p, Torsoz, p, CFrame.new(0,-1,0))
  293. local p = Part(mdl, "TStrap", team)
  294. local mesh = Instance.new("SpecialMesh", p)
  295. mesh.MeshType = "Brick"
  296. mesh.Scale = Vector3.new(5.6,0.35,2.55)
  297. Weld(p, Torsoz, p, CFrame.new(-0.03,-0.03,0) * CFrame.Angles(0,0,math.pi/4))
  298. local p = Part(mdl, "TStrap", team)
  299. local mesh = Instance.new("SpecialMesh", p)
  300. mesh.MeshType = "Brick"
  301. mesh.Scale = Vector3.new(5.6,0.35,2.55)
  302. Weld(p, Torsoz, p, CFrame.new(0.03,-0.03,0) * CFrame.Angles(0,0,-math.pi/4))
  303.  
  304. local p = Part(mdl, "Buckle", "Black")
  305. local mesh = Instance.new("SpecialMesh", p)
  306. mesh.MeshType = "Brick"
  307. mesh.Scale = Vector3.new(1.75,0.85,0.58)
  308. Weld(p, Torsoz, p, CFrame.new(0,-1,-0.5))
  309.  
  310. ----------------------------------------------------------------------------------------------
  311. ----------------------------------- LIMBS -------------------------------------------------
  312. ----------------------------------------------------------------------------------------------
  313.  
  314. ------ Torso ------
  315. local p = Part(mdl, "TorsoTC", team)
  316. local mesh = Instance.new("SpecialMesh", p)
  317. mesh.MeshType = "Brick"
  318. mesh.Scale = Vector3.new(4.05,4.05,2.05)
  319. Weld(p, Torsoz, p, CFrame.new(0,0,0))
  320.  
  321. ----------------------------------------------------------------------------------------------
  322. ----------------------------------- TOOLS -------------------------------------------------
  323. ----------------------------------------------------------------------------------------------
  324. local p = Part(mdl, "Spanner")
  325. local mesh = Instance.new("SpecialMesh", p)
  326. mesh.MeshId = "http://www.roblox.com/asset/?id=16884681"
  327. mesh.TextureId = "http://www.roblox.com/asset/?id=16884673"
  328. mesh.Scale = Vector3.new(0.6,0.6,0.6)
  329. Weld(p, Torsoz, p, CFrame.new(1.06,-1.15,0) * CFrame.Angles(math.pi/4,0,0))
  330. Spanner = p
  331.  
  332. local p = Part(mdl, "Crowbar")
  333. local mesh = Instance.new("SpecialMesh", p)
  334. mesh.MeshId = "http://www.roblox.com/asset/?id=21426303"
  335. mesh.TextureId = "http://www.roblox.com/asset/?id=8953043"
  336. mesh.Scale = Vector3.new(0.6,0.6,0.6)
  337. Weld(p, Torsoz, p, CFrame.new(0,-0.3,0.5) * CFrame.Angles(math.pi/2,math.pi-0.4,0))
  338. Crowbar = p
  339.  
  340. ----------------------------------------------------------------------------------------------
  341. ----------------------------------------------------------------------------------------------
  342. ----------------------------------------------------------------------------------------------
  343.  
  344. Torsoz.Transparency = 0
  345. RA.Transparency = Torsoz.Transparency
  346. LA.Transparency = Torsoz.Transparency
  347. RL.Transparency = Torsoz.Transparency
  348. LL.Transparency = Torsoz.Transparency
  349. H.Transparency = Torsoz.Transparency
  350.  
  351. end
  352. Build(char.Stats.Team.Value)
  353.  
  354. function UpdateGui()
  355. TypeGui.Text = "Type: "..Type
  356. ModeGui.Text = "Mode: "..Mode
  357. TurretGui.Text = #Turrets.."/"..MaxTurrets
  358. HealthPackGui.Text = #HealthPacks.."/"..MaxHealthPacks
  359. SmokeGenGui.Text = #SmokeGens.."/"..MaxSmokeGens
  360. end
  361.  
  362. function Stand()
  363. Joint1.DesiredAngle = 0.7
  364. Spanner.Motor.C0 = CFrame.new(15/13,-1.5+(15/30),0) * CFrame.Angles(0,math.pi/2,0) * CFrame.Angles((math.pi/1.5)-(15/7),0,0) * CFrame.new(0,0,-0.7)
  365. Hum.PlatformStand = false
  366. Hum.WalkSpeed = 16
  367. for i, v in pairs(Torsoz:children()) do
  368. if v.className == "Motor" and (v.Name == "RightBottom" or v.Name == "LeftBottom" or v.Name == "LeftTop") then
  369. v:remove()
  370. elseif v.Name == "CrouchBGP" and (v.className == "BodyPosition" or v.className == "BodyGyro") then
  371. v:remove()
  372. end
  373. end
  374. RH.Part0 = Torsoz
  375. RH.Part1 = RL
  376. RH.Parent = Torsoz
  377. LH.Part0 = Torsoz
  378. LH.Part1 = LL
  379. LH.Parent = Torsoz
  380. LS.Part0 = Torsoz
  381. LS.Part1 = LA
  382. LS.Parent = Torsoz
  383. Animating = false
  384. end
  385.  
  386. function CrouchToBuild(mouse)
  387. Animating = true
  388. Hum.WalkSpeed = 0
  389. Hum.PlatformStand = true
  390. RH.Part0 = nil
  391. LH.Part0 = nil
  392. LS.Part0 = nil
  393. local joint3 = Instance.new("Motor", Torsoz)
  394. joint3.Name = "RightBottom"
  395. joint3.Part0 = Torsoz
  396. joint3.Part1 = RL
  397. joint3.C0 = CFrame.new(0.5,-1.3,0.7) * CFrame.Angles((math.pi/2)+0.25,0,0)
  398. local joint4 = Instance.new("Motor", Torsoz)
  399. joint4.Name = "LeftBottom"
  400. joint4.Part0 = Torsoz
  401. joint4.Part1 = LL
  402. joint4.C0 = CFrame.new(-0.5,-0.7,-0.8) * CFrame.Angles(0.4,0,0)
  403. local joint2 = Instance.new("Motor", Torsoz)
  404. joint2.Name = "LeftTop"
  405. joint2.Part0 = Torsoz
  406. joint2.Part1 = LA
  407. joint2.C0 = CFrame.new(-1.3,0,-0.5) * CFrame.Angles(0.8,0,0.22)
  408. local bp = Instance.new("BodyPosition", Torsoz)
  409. bp.Name = "CrouchBGP"
  410. bp.maxForce = Vector3.new(1/0,1/0,1/0)
  411. bp.position = Torsoz.Position + Vector3.new(0,-1.3,0)
  412. local bg = Instance.new("BodyGyro", Torsoz)
  413. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  414. bg.Name = "CrouchBGP"
  415. bg.D = 100
  416. bg.cframe = CFrame.new(Torsoz.Position, Vector3.new(mouse.Hit.x,Torsoz.Position.y,mouse.Hit.z)) * CFrame.Angles(-0.25,0,0)
  417. Spanner.Motor.C0 = Spanner.Motor.C0 * CFrame.new(0.3,-0.3,0.3) * CFrame.Angles(math.pi/6,0.3,0)
  418. Joint1.DesiredAngle = 0.9
  419. end
  420.  
  421. function BuildHealthPack(mouse, enz)
  422. local WNum = WorkNum
  423. CrouchToBuild(mouse)
  424. local mo = Instance.new("Model", char.Stats)
  425. mo.Name = "HealthPack"
  426. local posi = CFrame.new(Torsoz.Position, Vector3.new(mouse.Hit.x,Torsoz.Position.y,mouse.Hit.z))
  427. local Main = Part(mo, "BlackCircleSpawnerPoint", "Really black", true)
  428. Main.CFrame = CFrame.new(Torsoz.Position.x,enz.y,Torsoz.Position.z) + posi.lookVector*4.5
  429. local mesh = Instance.new("CylinderMesh", Main)
  430. mesh.Scale = Vector3.new(8,0.3,8)
  431. wait(0.3)
  432. local Count = 0
  433. local p = Part(mo, "Center", "Black", true, false, Vector3.new(2,1.2,2.6))
  434. p.CFrame = Main.CFrame
  435. p.Transparency = 1
  436. local mesh = Instance.new("SpecialMesh", p)
  437. mesh.MeshType = "Brick"
  438. mesh.Scale = Vector3.new(0,0,0)
  439. for i = 1, 20 do
  440. if WNum ~= WorkNum then
  441. break
  442. end
  443. mesh.Scale = mesh.Scale + Vector3.new(0.05,0.05,0.05)
  444. p.CFrame = p.CFrame + Vector3.new(0,0.1,0)
  445. p.Transparency = p.Transparency - 0.05
  446. Count = Count + 1
  447. CentGui.Size = UDim2.new((Count/80),0,0.125,0)
  448. CentGuiText.Text = math.floor((Count/80*100)) .. "%"
  449. wait(0.017)
  450. end
  451. p.Transparency = 0
  452. local p2 = Part(mo, "Side1", char.Stats.Team.Value, true, false, Vector3.new(2.2,1.4,0.5))
  453. p2.CFrame = p.CFrame
  454. p2.Transparency = 1
  455. local mesh = Instance.new("SpecialMesh", p2)
  456. mesh.MeshType = "Brick"
  457. mesh.Scale = Vector3.new(0,0.5,0)
  458. for i = 1, 20 do
  459. if WNum ~= WorkNum then
  460. break
  461. end
  462. mesh.Scale = mesh.Scale + Vector3.new(0.05,0.025,0.05)
  463. p2.CFrame = p2.CFrame + Vector3.new(0,0,0.04)
  464. p2.Transparency = p2.Transparency - 0.05
  465. Count = Count + 1
  466. CentGui.Size = UDim2.new((Count/80),0,0.125,0)
  467. CentGuiText.Text = math.floor((Count/80*100)) .. "%"
  468. wait(0.017)
  469. end
  470. p2.Transparency = 0
  471. local p2 = Part(mo, "Side2", char.Stats.Team.Value, true, false, Vector3.new(2.2,1.4,0.5))
  472. p2.CFrame = p.CFrame
  473. p2.Transparency = 1
  474. local mesh = Instance.new("SpecialMesh", p2)
  475. mesh.MeshType = "Brick"
  476. mesh.Scale = Vector3.new(0,0.5,0)
  477. for i = 1, 20 do
  478. if WNum ~= WorkNum then
  479. break
  480. end
  481. mesh.Scale = mesh.Scale + Vector3.new(0.05,0.025,0.05)
  482. p2.CFrame = p2.CFrame + Vector3.new(0,0,-0.04)
  483. p2.Transparency = p2.Transparency - 0.05
  484. Count = Count + 1
  485. CentGui.Size = UDim2.new((Count/80),0,0.125,0)
  486. CentGuiText.Text = math.floor((Count/80*100)) .. "%"
  487. wait(0.017)
  488. end
  489. p2.Transparency = 0
  490. local d = Instance.new("Decal", p)
  491. d.Face = "Top"
  492. d.Texture = "http://www.roblox.com/asset/?id=92009935"
  493. d.Transparency = 1
  494. for i = 1, 20 do
  495. if WNum ~= WorkNum then
  496. break
  497. end
  498. d.Transparency = d.Transparency - 0.04
  499. Count = Count + 1
  500. CentGui.Size = UDim2.new((Count/80),0,0.125,0)
  501. CentGuiText.Text = math.floor((Count/80*100)) .. "%"
  502. wait(0.017)
  503. end
  504.  
  505. if Count == 80 then
  506. table.insert(HealthPacks, mo)
  507. HealthPackGui.TextStrokeColor3 = Color3.new(0,1,0)
  508. HealthPackGui.TextColor = BrickColor.new("Really black")
  509. else
  510. mo:remove()
  511. end
  512.  
  513. Stand()
  514.  
  515. CentGui.Size = UDim2.new(0,0,0.125,0)
  516. CentGuiText.Text = ""
  517. UpdateGui()
  518. Main:remove()
  519.  
  520. end
  521.  
  522. function UpdateHealthBox(box)
  523. local center = box:findFirstChild("Center")
  524. local side1 = box:findFirstChild("Side1")
  525. local side2 = box:findFirstChild("Side2")
  526. center.CFrame = center.CFrame * CFrame.Angles(0,(math.pi*2)/90,0)
  527. side1.CFrame = center.CFrame * CFrame.new(0,0,0.04*20)
  528. side2.CFrame = center.CFrame * CFrame.new(0,0,-0.04*20)
  529. end
  530.  
  531. function BuildSmokeGen(mouse, enz)
  532. local WNum = WorkNum
  533. CrouchToBuild(mouse)
  534. local mo = Instance.new("Model", char.Stats)
  535. mo.Name = "SmokeGen"
  536. local posi = CFrame.new(Torsoz.Position, Vector3.new(mouse.Hit.x,Torsoz.Position.y,mouse.Hit.z))
  537. local Main = Part(mo, "BlackCircleSpawnerPoint", "Really black", true)
  538. Main.CFrame = CFrame.new(Torsoz.Position.x,enz.y,Torsoz.Position.z) + posi.lookVector*5.75
  539. local mesh = Instance.new("CylinderMesh", Main)
  540. mesh.Scale = Vector3.new(13.2,0.3,13.2)
  541. wait(0.3)
  542. local Count = 0
  543. local p = Part(mo, "Center", "Black", true, false, Vector3.new(2.2,2.2,2.2))
  544. p.CFrame = Main.CFrame
  545. p.Shape = "Ball"
  546. p.Transparency = 1
  547. local mesh = Instance.new("SpecialMesh", p)
  548. mesh.MeshType = "Sphere"
  549. mesh.Scale = Vector3.new(0,0,0)
  550. local s = Instance.new("Smoke", p)
  551. s.Enabled = false
  552. s.Color = BrickColor.new(char.Stats.Team.Value).Color
  553. s.Size = 13
  554. for i = 1, 20 do
  555. if WNum ~= WorkNum then
  556. break
  557. end
  558. mesh.Scale = mesh.Scale + Vector3.new(0.05,0.05,0.05)
  559. p.CFrame = p.CFrame + Vector3.new(0,0.21,0)
  560. p.Transparency = p.Transparency - 0.05
  561. Count = Count + 1
  562. CentGui.Size = UDim2.new((Count/180),0,0.125,0)
  563. CentGuiText.Text = math.floor((Count/180*100)) .. "%"
  564. wait(0.012)
  565. end
  566. p.Transparency = 0
  567. p.CFrame = Main.CFrame + Vector3.new(0,5.45,0)
  568. local p = Part(mo, "Corner1", "Black", true, false, Vector3.new(2,8,2), "CornerWedgePart")
  569. p.CFrame = Main.CFrame + Vector3.new(0,-4,0)
  570. p.Transparency = 1
  571. for i = 1, 20 do
  572. if WNum ~= WorkNum then
  573. break
  574. end
  575. p.CFrame = p.CFrame + Vector3.new(-0.05,0.4,0.05)
  576. p.Transparency = p.Transparency - 0.05
  577. Count = Count + 1
  578. CentGui.Size = UDim2.new((Count/180),0,0.125,0)
  579. CentGuiText.Text = math.floor((Count/180*100)) .. "%"
  580. wait(0.012)
  581. end
  582. p.Transparency = 0
  583. local p = Part(mo, "Corner2", char.Stats.Team.Value, true, false, Vector3.new(2,8,2), "CornerWedgePart")
  584. p.CFrame = Main.CFrame + Vector3.new(0,-4,0)
  585. p.Transparency = 1
  586. for i = 1, 20 do
  587. if WNum ~= WorkNum then
  588. break
  589. end
  590. p.CFrame = p.CFrame + Vector3.new(0,0.4,0.075)
  591. p.CFrame = p.CFrame * CFrame.Angles(0,(math.pi/4)/20,0)
  592. p.Transparency = p.Transparency - 0.05
  593. Count = Count + 1
  594. CentGui.Size = UDim2.new((Count/180),0,0.125,0)
  595. CentGuiText.Text = math.floor((Count/180*100)) .. "%"
  596. wait(0.012)
  597. end
  598. p.Transparency = 0
  599. local p = Part(mo, "Corner3", "Black", true, false, Vector3.new(2,8,2), "CornerWedgePart")
  600. p.CFrame = Main.CFrame + Vector3.new(0,-4,0)
  601. p.Transparency = 1
  602. for i = 1, 20 do
  603. if WNum ~= WorkNum then
  604. break
  605. end
  606. p.CFrame = p.CFrame + Vector3.new(0.05,0.4,0.05)
  607. p.CFrame = p.CFrame * CFrame.Angles(0,(math.pi/2)/20,0)
  608. p.Transparency = p.Transparency - 0.05
  609. Count = Count + 1
  610. CentGui.Size = UDim2.new((Count/180),0,0.125,0)
  611. CentGuiText.Text = math.floor((Count/180*100)) .. "%"
  612. wait(0.012)
  613. end
  614. p.Transparency = 0
  615. local p = Part(mo, "Corner4", char.Stats.Team.Value, true, false, Vector3.new(2,8,2), "CornerWedgePart")
  616. p.CFrame = Main.CFrame + Vector3.new(0,-4,0)
  617. p.Transparency = 1
  618. for i = 1, 20 do
  619. if WNum ~= WorkNum then
  620. break
  621. end
  622. p.CFrame = p.CFrame + Vector3.new(0.075,0.4,0)
  623. p.CFrame = p.CFrame * CFrame.Angles(0,(math.pi*0.75)/20,0)
  624. p.Transparency = p.Transparency - 0.05
  625. Count = Count + 1
  626. CentGui.Size = UDim2.new((Count/180),0,0.125,0)
  627. CentGuiText.Text = math.floor((Count/180*100)) .. "%"
  628. wait(0.012)
  629. end
  630. p.Transparency = 0
  631. local p = Part(mo, "Corner5", "Black", true, false, Vector3.new(2,8,2), "CornerWedgePart")
  632. p.CFrame = Main.CFrame + Vector3.new(0,-4,0)
  633. p.Transparency = 1
  634. for i = 1, 20 do
  635. if WNum ~= WorkNum then
  636. break
  637. end
  638. p.CFrame = p.CFrame + Vector3.new(0.05,0.4,-0.05)
  639. p.CFrame = p.CFrame * CFrame.Angles(0,math.pi/20,0)
  640. p.Transparency = p.Transparency - 0.05
  641. Count = Count + 1
  642. CentGui.Size = UDim2.new((Count/180),0,0.125,0)
  643. CentGuiText.Text = math.floor((Count/180*100)) .. "%"
  644. wait(0.012)
  645. end
  646. p.Transparency = 0
  647. local p = Part(mo, "Corner6", char.Stats.Team.Value, true, false, Vector3.new(2,8,2), "CornerWedgePart")
  648. p.CFrame = Main.CFrame + Vector3.new(0,-4,0)
  649. p.Transparency = 1
  650. for i = 1, 20 do
  651. if WNum ~= WorkNum then
  652. break
  653. end
  654. p.CFrame = p.CFrame + Vector3.new(0,0.4,-0.075)
  655. p.CFrame = p.CFrame * CFrame.Angles(0,(math.pi*1.25)/20,0)
  656. p.Transparency = p.Transparency - 0.05
  657. Count = Count + 1
  658. CentGui.Size = UDim2.new((Count/180),0,0.125,0)
  659. CentGuiText.Text = math.floor((Count/180*100)) .. "%"
  660. wait(0.012)
  661. end
  662. p.Transparency = 0
  663. local p = Part(mo, "Corner7", "Black", true, false, Vector3.new(2,8,2), "CornerWedgePart")
  664. p.CFrame = Main.CFrame + Vector3.new(0,-4,0)
  665. p.Transparency = 1
  666. for i = 1, 20 do
  667. if WNum ~= WorkNum then
  668. break
  669. end
  670. p.CFrame = p.CFrame + Vector3.new(-0.05,0.4,-0.05)
  671. p.CFrame = p.CFrame * CFrame.Angles(0,-(math.pi/2)/20,0)
  672. p.Transparency = p.Transparency - 0.05
  673. Count = Count + 1
  674. CentGui.Size = UDim2.new((Count/180),0,0.125,0)
  675. CentGuiText.Text = math.floor((Count/180*100)) .. "%"
  676. wait(0.012)
  677. end
  678. p.Transparency = 0
  679. local p = Part(mo, "Corner8", char.Stats.Team.Value, true, false, Vector3.new(2,8,2), "CornerWedgePart")
  680. p.CFrame = Main.CFrame + Vector3.new(0,-4,0)
  681. p.Transparency = 1
  682. for i = 1, 20 do
  683. if WNum ~= WorkNum then
  684. break
  685. end
  686. p.CFrame = p.CFrame + Vector3.new(-0.075,0.4,0)
  687. p.CFrame = p.CFrame * CFrame.Angles(0,(-math.pi/4)/20,0)
  688. p.Transparency = p.Transparency - 0.05
  689. Count = Count + 1
  690. CentGui.Size = UDim2.new((Count/180),0,0.125,0)
  691. CentGuiText.Text = math.floor((Count/180*100)) .. "%"
  692. wait(0.012)
  693. end
  694. p.Transparency = 0
  695. s.Enabled = true
  696.  
  697. if Count == 180 then
  698. table.insert(SmokeGens, mo)
  699. SmokeGenGui.TextStrokeColor3 = Color3.new(0,1,0)
  700. SmokeGenGui.TextColor = BrickColor.new("Really black")
  701. else
  702. mo:remove()
  703. end
  704.  
  705. Stand()
  706.  
  707. CentGui.Size = UDim2.new(0,0,0.125,0)
  708. CentGuiText.Text = ""
  709. UpdateGui()
  710. Main:remove()
  711.  
  712. end
  713.  
  714. function onButton1Down(mouse)
  715. if Building == false and Animating == false then
  716. if Type == "Spanner" then
  717. WorkNum = math.random()
  718. local ray = Ray.new(Torsoz.Position, CFrame.new(Torsoz.Position, Torsoz.Position+Vector3.new(0,-1,0)).lookVector*4)
  719. local hitz, enz = workspace:FindPartOnRay(ray, char)
  720. if hitz ~= nil then
  721. if Mode == "Turret" then
  722. --BuildTurret()
  723. elseif Mode == "Health Pack" then
  724. if #HealthPacks < MaxHealthPacks then
  725. BuildHealthPack(mouse, enz)
  726. end
  727. elseif Mode == "Smoke Gen" then
  728. if #SmokeGens < MaxSmokeGens then
  729. BuildSmokeGen(mouse, enz)
  730. end
  731. end
  732. end
  733. elseif Type == "Crowbar" then
  734. if Mode == "Smack" then
  735. --CrowbarSmack()
  736. elseif Mode == "Destroy" then
  737. end
  738. end
  739. end
  740. end
  741.  
  742. function onButton1Up()
  743. WorkNum = math.random()
  744. end
  745.  
  746. function onKeyDown(key, mouse)
  747. if key ~= nil then
  748. key:lower()
  749. if key == "e" then
  750. if Animating == false then
  751. Unequip()
  752. if Type == "Spanner" then
  753. Type = "Crowbar"
  754. ModeNum = 1
  755. Mode = CrowbarModes[ModeNum]
  756. else
  757. Type = "Spanner"
  758. ModeNum = 1
  759. Mode = SpannerModes[ModeNum]
  760. end
  761. TypeGui.TextStrokeColor3 = Color3.new(0,1,0)
  762. TypeGui.TextColor = BrickColor.new("Really black")
  763. ModeGui.TextStrokeColor3 = Color3.new(0,1,0)
  764. ModeGui.TextColor = BrickColor.new("Really black")
  765. UpdateGui()
  766. Equip()
  767. end
  768.  
  769. elseif key == "q" then
  770. if Animating == false then
  771. ModeNum = ModeNum + 1
  772. if Type == "Spanner" then
  773. if ModeNum > #SpannerModes then
  774. ModeNum = 1
  775. end
  776. Mode = SpannerModes[ModeNum]
  777. elseif Type == "Crowbar" then
  778. if ModeNum > #CrowbarModes then
  779. ModeNum = 1
  780. end
  781. Mode = CrowbarModes[ModeNum]
  782. end
  783. ModeGui.TextStrokeColor3 = Color3.new(0,1,0)
  784. ModeGui.TextColor = BrickColor.new("Really black")
  785. UpdateGui()
  786. end
  787.  
  788. elseif key == "z" then
  789. UpdateGui()
  790. end
  791. end
  792. end
  793.  
  794. function Equip()
  795. Animating = true
  796. if Type == "Spanner" then
  797. RS.Part0 = nil
  798. local joint = Instance.new("Motor", Torsoz)
  799. joint.Name = "RightTop"
  800. joint.Part0 = Torsoz
  801. joint.Part1 = RA
  802. joint.C1 = CFrame.new(0,0.5,0)
  803. Joint1 = joint
  804. Spanner.Motor.Part0 = RA
  805. Spanner.Motor.C0 = CFrame.new(0,-1.6,0) * CFrame.Angles(0,math.pi/2,0) * CFrame.Angles(math.pi/3,0,0)
  806. joint.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(0,math.pi/2,0)
  807. joint.MaxVelocity = 0.08
  808. joint.DesiredAngle = -0.3
  809. wait(0.15)
  810. Spanner.Motor.C0 = CFrame.new(0,-1.6,0) * CFrame.Angles(0,math.pi/2,0) * CFrame.Angles(math.pi/1.5,0,0)
  811. joint.DesiredAngle = 0.7
  812. wait(0.3)
  813. for i = 1, 15 do
  814. Spanner.Motor.C0 = CFrame.new((i/13),-1.5+(i/30),0) * CFrame.Angles(0,math.pi/2,0) * CFrame.Angles((math.pi/1.5)-(i/7),0,0)
  815. wait(0.012)
  816. end
  817. for i = 1, 7 do
  818. Spanner.Motor.C0 = Spanner.Motor.C0 * CFrame.new(0,0,-0.1)
  819. wait(0.015)
  820. end
  821. elseif Type == "Crowbar" then
  822. RS.Part0 = nil
  823. local joint = Instance.new("Motor", Torsoz)
  824. joint.Name = "RightTop"
  825. joint.Part0 = Torsoz
  826. joint.Part1 = RA
  827. joint.C1 = CFrame.new(0,0.5,0)
  828. joint.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(0,math.pi/2,0)
  829. Joint1 = joint
  830. joint.MaxVelocity = 0.3
  831. joint.DesiredAngle = math.pi+0.2
  832. wait(0.38)
  833. Crowbar.Motor.Part0 = RA
  834. Crowbar.Motor.C0 = CFrame.new(0,-1,0)
  835. joint.MaxVelocity = 0.14
  836. joint.DesiredAngle = 0.9
  837. for i = 1, 20 do
  838. Crowbar.Motor.C0 = CFrame.new(0,-1,0) * CFrame.Angles(0,-((math.pi*4.5)/20)*i,0)
  839. wait(0.017)
  840. end
  841. Crowbar.Motor.C0 = CFrame.new(0,-1.14,0) * CFrame.Angles(math.pi/2,0,0) * CFrame.Angles(0,(math.pi/1.75),0)
  842. end
  843. Animating = false
  844. end
  845.  
  846. function Unequip()
  847. Animating = true
  848. if Type == "Spanner" then
  849. for i = 1, 7 do
  850. Spanner.Motor.C0 = Spanner.Motor.C0 * CFrame.new(0,0,0.1)
  851. wait(0.015)
  852. end
  853. Joint1.MaxVelocity = 0.08
  854. Joint1.DesiredAngle = -0.3
  855. for i = 1, 15 do
  856. Spanner.Motor.C0 = CFrame.new((15/13)-(i/13), -1 -(i/30),0) * CFrame.Angles(0,math.pi/2,0) * CFrame.Angles(((math.pi/1.5)-(15/7))+(i/7),0,0)
  857. wait(0.012)
  858. end
  859. Spanner.Motor.Part0 = Torsoz
  860. Spanner.Motor.C0 = CFrame.new(1.06,-1.15,0) * CFrame.Angles(math.pi/4,0,0)
  861. elseif Type == "Crowbar" then
  862. Joint1.MaxVelocity = 0.14
  863. Joint1.DesiredAngle = math.pi+0.2
  864. for i = 1, 20 do
  865. Crowbar.Motor.C0 = CFrame.new(0,-1,0) * CFrame.Angles(0,((math.pi*4.5)/20)*i,0)
  866. wait(0.017)
  867. end
  868. Crowbar.Motor.Part0 = Torsoz
  869. Crowbar.Motor.C0 = CFrame.new(0,-0.3,0.5) * CFrame.Angles(math.pi/2,math.pi-0.4,0)
  870. Joint1.MaxVelocity = 0.28
  871. Joint1.DesiredAngle = 0
  872. wait(0.4)
  873. end
  874. for i, v in pairs(Torsoz:children()) do
  875. if v.className == "Motor" and v.Name == "RightTop" then
  876. v:remove()
  877. end
  878. end
  879. RS.Part0 = Torsoz
  880. RS.Part1 = RA
  881. RS.Parent = Torsoz
  882. Animating = false
  883. end
  884.  
  885. bin.Selected:connect(function(mouse)
  886. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  887. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  888. mouse.Button1Up:connect(function() onButton1Up() end)
  889. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  890. GUI("Show")
  891. if Animating == true then
  892. while Animating == true do
  893. wait()
  894. end
  895. end
  896. Equip()
  897. if players.LocalPlayer.PlayerGui:findFirstChild("StatsGui") == nil then
  898. GUI("Show")
  899. end
  900. end)
  901.  
  902. bin.Deselected:connect(function()
  903. if Animating == true then
  904. while Animating == true do
  905. wait()
  906. end
  907. end
  908. Unequip()
  909. Stand()
  910. Build(char.Stats.Team.Value)
  911. GUI("Hide")
  912. end)
  913.  
  914. local NUUUM = 0
  915. while true do
  916.  
  917. for i, v in pairs(HealthPacks) do
  918. if v.className == "Model" then
  919. UpdateHealthBox(v)
  920. if v:findFirstChild("Center") ~= nil then
  921. for _, vv in pairs(workspace:children()) do
  922. if vv:findFirstChild("Stats") ~= nil and vv:findFirstChild("Humanoid") ~= nil and vv:findFirstChild("Torso") ~= nil then
  923. if (v:findFirstChild("Center").Position - vv:findFirstChild("Torso").Position).magnitude < 2.3 then
  924. if vv:findFirstChild("Stats").Team.Value == char:findFirstChild("Stats").Team.Value then
  925. v:remove()
  926. table.remove(HealthPacks, i)
  927. vv:findFirstChild("Humanoid").Health = vv:findFirstChild("Humanoid").Health + 28
  928. break
  929. end
  930. end
  931. end
  932. end
  933. UpdateGui()
  934. end
  935. end
  936. end
  937.  
  938. if NUUUM%12 == 0 then
  939. for i, v in pairs(GuiTable) do
  940. if v.className == "TextLabel" or v.className == "TextButton" then
  941. v.TextStrokeColor3 = BrickColor.new(char.Stats.Team.Value).Color
  942. v.TextColor = BrickColor.new("White")
  943. end
  944. end
  945. end
  946.  
  947. NUUUM = NUUUM + 1
  948. wait(0.03)
  949. end
  950.  
  951. --mediafire gtfo password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement