Advertisement
robloxianscripter

jetpack

Jun 30th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 25.09 KB | None | 0 0
  1. --Jet Pack V2.0 Gifted by TheRedAngel, Local Script!
  2.  
  3. if (script.Parent.className ~= "HopperBin") then
  4. local h = Instance.new("HopperBin")
  5. h.Name = "Action"
  6. h.Parent = game.Players["mrsircraft"].Backpack
  7. script.Parent = h
  8. script.Name = "Function"
  9. end
  10. Bin = script.Parent
  11. Person = game.Players.LocalPlayer
  12. PersonT = Person.Character.Torso
  13. Hold = false
  14. Lazer = false
  15. Grabbed = nil
  16. Debounce = false
  17. FDebounce = false
  18. Flight = false
  19. NormalHand = 2 --Change to your preffered hand 1 being "Right" and 2 begin "Left"
  20. NormalFoot = 4 --Change to your preffered foot 3 being "Right" and 4 begin "Left"
  21. Joints = {PersonT:findFirstChild("Right Shoulder"), PersonT:findFirstChild("Left Shoulder"), PersonT:findFirstChild("Right Hip"), PersonT:findFirstChild("Left Hip")}
  22. Limbs = {Person.Character:findFirstChild("Right Arm"), Person.Character:findFirstChild("Left Arm"), Person.Character:findFirstChild("Right Leg"), Person.Character:findFirstChild("Left Leg")}
  23. if (Person.Character:findFirstChild("Suit") ~= nil) then
  24. Person.Character.Suit:remove()
  25. end
  26. Suit = Instance.new("Model")
  27. Suit.Parent = Person.Character
  28. Suit.Name = "Suit"
  29. LJet = Instance.new("Part")
  30. LJet.Parent = Suit
  31. LJet.Name = "Left Jet"
  32. LJet.CanCollide = false
  33. LJet.formFactor = "Symmetric"
  34. LJet.Size = Vector3.new(1, 1, 1)
  35. LJet.BrickColor = BrickColor.new("Dark orange")
  36. LJet.Reflectance = 1
  37. LJet.TopSurface = 0
  38. LJet.BottomSurface = 0
  39. LJMesh = Instance.new("CylinderMesh")
  40. LJMesh.Parent = LJet
  41. LJMesh.Scale = Vector3.new(0.8, 2, 0.8)
  42. LJet:BreakJoints()
  43. Weld = Instance.new("Weld")
  44. Weld.Parent = LJet
  45. Weld.Part0 = PersonT
  46. Weld.Part1 = LJet
  47. Weld.C0 = CFrame.new(-0.3, -0.2, 0.8) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  48. LJetT = Instance.new("Part")
  49. LJetT.Parent = Suit
  50. LJetT.Name = "Left Jet Tip"
  51. LJetT.CanCollide = false
  52. LJetT.formFactor = "Symmetric"
  53. LJetT.Size = Vector3.new(1, 1, 1)
  54. LJetT.BrickColor = BrickColor.new("Dark orange")
  55. LJetT.Reflectance = 1
  56. LJetT.TopSurface = 0
  57. LJetT.BottomSurface = 0
  58. LJTMesh = Instance.new("SpecialMesh")
  59. LJTMesh.Parent = LJetT
  60. LJTMesh.MeshType = "Sphere"
  61. LJTMesh.Scale = Vector3.new(0.8, 0.8, 0.8)
  62. LJetT:BreakJoints()
  63. Weld = Instance.new("Weld")
  64. Weld.Parent = LJet
  65. Weld.Part0 = LJet
  66. Weld.Part1 = LJetT
  67. Weld.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  68. LJetB = Instance.new("Part")
  69. LJetB.Parent = Suit
  70. LJetB.Name = "Left Jet Barrel"
  71. LJetB.CanCollide = false
  72. LJetB.formFactor = "Symmetric"
  73. LJetB.Size = Vector3.new(1, 1, 1)
  74. LJetB.BrickColor = BrickColor.new("Dark orange")
  75. LJetB.Reflectance = 1
  76. LJetB.TopSurface = 0
  77. LJetB.BottomSurface = 0
  78. S = Instance.new("Smoke")
  79. S.Parent = LJetB
  80. S.Enabled = false
  81. S.Color = Color3.new(103, 205, 1)
  82. S.RiseVelocity = 5
  83. LJBMesh = Instance.new("CylinderMesh")
  84. LJBMesh.Parent = LJetB
  85. LJBMesh.Scale = Vector3.new(0.1, 0.2, 0.1)
  86. LJetB:BreakJoints()
  87. Weld = Instance.new("Weld")
  88. Weld.Parent = LJet
  89. Weld.Part0 = LJet
  90. Weld.Part1 = LJetB
  91. Weld.C0 = CFrame.new(0, -1.1, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  92. ---Right Jet
  93. RJet = Instance.new("Part")
  94. RJet.Parent = Suit
  95. RJet.Name = "Right Jet"
  96. RJet.CanCollide = false
  97. RJet.formFactor = "Symmetric"
  98. RJet.Size = Vector3.new(1, 1, 1)
  99. RJet.BrickColor = BrickColor.new("Dark orange")
  100. RJet.Reflectance = 1
  101. RJet.TopSurface = 0
  102. RJet.BottomSurface = 0
  103. RJMesh = Instance.new("CylinderMesh")
  104. RJMesh.Parent = RJet
  105. RJMesh.Scale = Vector3.new(0.8, 2, 0.8)
  106. RJet:BreakJoints()
  107. Weld = Instance.new("Weld")
  108. Weld.Parent = RJet
  109. Weld.Part0 = PersonT
  110. Weld.Part1 = RJet
  111. Weld.C0 = CFrame.new(0.3, -0.2, 0.8) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  112. RJetT = Instance.new("Part")
  113. RJetT.Parent = Suit
  114. RJetT.Name = "Right Jet Tip"
  115. RJetT.CanCollide = false
  116. RJetT.formFactor = "Symmetric"
  117. RJetT.Size = Vector3.new(1, 1, 1)
  118. RJetT.BrickColor = BrickColor.new("Dark orange")
  119. RJetT.Reflectance = 1
  120. RJetT.TopSurface = 0
  121. RJetT.BottomSurface = 0
  122. RJTMesh = Instance.new("SpecialMesh")
  123. RJTMesh.Parent = RJetT
  124. RJTMesh.MeshType = "Sphere"
  125. RJTMesh.Scale = Vector3.new(0.8, 0.8, 0.8)
  126. RJetT:BreakJoints()
  127. Weld = Instance.new("Weld")
  128. Weld.Parent = RJet
  129. Weld.Part0 = RJet
  130. Weld.Part1 = RJetT
  131. Weld.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  132. RJetB = Instance.new("Part")
  133. RJetB.Parent = Suit
  134. RJetB.Name = "Right Jet Barrel"
  135. RJetB.CanCollide = false
  136. RJetB.formFactor = "Symmetric"
  137. RJetB.Size = Vector3.new(1, 1, 1)
  138. RJetB.BrickColor = BrickColor.new("Dark orange")
  139. RJetB.Reflectance = 1
  140. RJetB.TopSurface = 0
  141. RJetB.BottomSurface = 0
  142. S = Instance.new("Smoke")
  143. S.Parent = RJetB
  144. S.Enabled = false
  145. S.Color = Color3.new(103, 205, 1)
  146. S.RiseVelocity = 5
  147. RJBMesh = Instance.new("CylinderMesh")
  148. RJBMesh.Parent = RJetB
  149. RJBMesh.Scale = Vector3.new(0.1, 0.2, 0.1)
  150. RJetB:BreakJoints()
  151. Weld = Instance.new("Weld")
  152. Weld.Parent = RJet
  153. Weld.Part0 = RJet
  154. Weld.Part1 = RJetB
  155. Weld.C0 = CFrame.new(0, -1.1, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  156. ---Watch
  157. Band = Instance.new("Part")
  158. Band.Parent = Suit
  159. Band.Name = "Band"
  160. Band.CanCollide = false
  161. Band.formFactor = "Symmetric"
  162. Band.Size = Vector3.new(1, 1, 1)
  163. Band.BrickColor = BrickColor.new("Black")
  164. Band.TopSurface = 0
  165. Band.BottomSurface = 0
  166. BandM = Instance.new("SpecialMesh")
  167. BandM.MeshType = "Brick"
  168. BandM.Parent = Band
  169. BandM.Scale = Vector3.new(1.03, 0.2, 1.03)
  170. Band:BreakJoints()
  171. Weld = Instance.new("Weld")
  172. Weld.Parent = Band
  173. Weld.Part0 = Limbs[NormalHand]
  174. Weld.Part1 = Band
  175. Weld.C0 = CFrame.new(0, -0.6, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  176. Watch1 = Instance.new("Part")
  177. Watch1.Parent = Suit
  178. Watch1.Name = "Watch1"
  179. Watch1.CanCollide = false
  180. Watch1.formFactor = "Symmetric"
  181. Watch1.Size = Vector3.new(1, 1, 1)
  182. Watch1.BrickColor = BrickColor.new("Black")
  183. Watch1.TopSurface = 0
  184. Watch1.BottomSurface = 0
  185. Watch1M = Instance.new("CylinderMesh")
  186. Watch1M.Parent = Watch1
  187. Watch1M.Scale = Vector3.new(0.3, 0.2, 0.3)
  188. Watch1:BreakJoints()
  189. Weld = Instance.new("Weld")
  190. Weld.Parent = Watch1
  191. Weld.Part0 = Band
  192. Weld.Part1 = Watch1
  193. Weld.C0 = CFrame.new(0, 0, -0.41) * CFrame.fromEulerAnglesXYZ(1.57, 0, 0)
  194. Watch2 = Instance.new("Part")
  195. Watch2.Parent = Suit
  196. Watch2.Name = "Watch2"
  197. Watch2.CanCollide = false
  198. Watch2.formFactor = "Symmetric"
  199. Watch2.Size = Vector3.new(1, 1, 1)
  200. Watch2.BrickColor = BrickColor.new("White")
  201. Watch2.TopSurface = 0
  202. Watch2.BottomSurface = 0
  203. Watch2M = Instance.new("CylinderMesh")
  204. Watch2M.Parent = Watch2
  205. Watch2M.Scale = Vector3.new(0.25, 0.2, 0.25)
  206. Watch2:BreakJoints()
  207. Weld = Instance.new("Weld")
  208. Weld.Parent = Watch2
  209. Weld.Part0 = Band
  210. Weld.Part1 = Watch2
  211. Weld.C0 = CFrame.new(0, 0, -0.42) * CFrame.fromEulerAnglesXYZ(1.57, 0, 0)
  212. ---Real Function
  213. function SetAngle(Joint, Angle)
  214. if (Joint == 1) or (Joint == 3) then
  215. Joints[Joint].DesiredAngle = Angle
  216. end
  217. if (Joint == 2) or (Joint == 4) then
  218. Joints[Joint].DesiredAngle = -Angle
  219. end
  220. end
  221. function DisableLimb(Limb)
  222. Joints[Limb]:remove()
  223.  
  224. Joint = Instance.new("Motor")
  225. Joint.Parent = Person.Character.Torso
  226. Joint.Part0 = Person.Character.Torso
  227. Joint.Part1 = Limbs[Limb]
  228. Joint.MaxVelocity = 0.1
  229. if (Limb == 1) then
  230. C0 = CFrame.new(PersonT.Size.x/2 + Limbs[Limb].Size.x/2, Limbs[Limb].Size.y/4, 0) * CFrame.fromEulerAnglesXYZ(0, 3.14/2, 0)
  231. Joint.C1 = CFrame.new(0, Limbs[Limb].Size.y/4, 0) * CFrame.fromEulerAnglesXYZ(0, 3.14/2, 0)
  232. Joint.Name = "Right Joint Top"
  233. elseif (Limb == 2) then
  234. C0 = CFrame.new(-PersonT.Size.x/2 - Limbs[Limb].Size.x/2, Limbs[Limb].Size.y/4, 0) * CFrame.fromEulerAnglesXYZ(0, -3.14/2, 0)
  235. Joint.C1 = CFrame.new(0, Limbs[Limb].Size.y/4, 0) * CFrame.fromEulerAnglesXYZ(0, -3.14/2, 0)
  236. Joint.Name = "Left Joint Top"
  237. elseif (Limb == 3) then
  238. C0 = CFrame.new(Limbs[Limb].Size.x/2, -(Limbs[Limb].Size.y/4) * 3, 0) * CFrame.fromEulerAnglesXYZ(0, 3.14/2, 0)
  239. Joint.C1 = CFrame.new(0, Limbs[Limb].Size.y/4, 0) * CFrame.fromEulerAnglesXYZ(0, 3.14/2, 0)
  240. Joint.Name = "Right Joint Bottom"
  241. elseif(Limb == 4) then
  242. C0 = CFrame.new(-Limbs[Limb].Size.x/2, -(Limbs[Limb].Size.y/4) * 3, 0) * CFrame.fromEulerAnglesXYZ(0, -3.14/2, 0)
  243. Joint.C1 = CFrame.new(0, Limbs[Limb].Size.y/4, 0) * CFrame.fromEulerAnglesXYZ(0, -3.14/2, 0)
  244. Joint.Name = "Left Joint Bottom"
  245. end
  246. Joint.C0 = C0
  247. Joints[Limb] = Joint
  248. end
  249. function EnableLimb(Limb)
  250. if (Limb == 1) then
  251. Joints[Limb].Name = "Right Shoulder"
  252. elseif (Limb == 2) then
  253. Joints[Limb].Name = "Left Shoulder"
  254. elseif (Limb == 3) then
  255. Joints[Limb].Name = "Right Hip"
  256. elseif(Limb == 4) then
  257. Joints[Limb].Name = "Left Hip"
  258. end
  259. Anim = Person.Character.Animate:clone()
  260. Person.Character.Animate:remove()
  261. Anim.Parent = Person.Character
  262. end
  263. function Grab(Part)
  264. if (Grabbed == nil) then
  265. if (Part.Parent ~= nil) then
  266. Human = Part.Parent:findFirstChild("Humanoid")
  267. if (Human ~= nil) then
  268. Player = game.Players:GetPlayerFromCharacter(Human.Parent)
  269. if (Player ~= nil) then
  270. if (Player ~= Person) then
  271. Human.Sit = true
  272. Weld = Instance.new("Weld")
  273. Weld.Name = "Grip"
  274. Weld.Parent = Person.Character.Torso
  275. Weld.Part0 = Person.Character.Torso
  276. Weld.Part1 = Player.Character.Torso
  277. Weld.C0 = CFrame.new(0, 2.5, 0) * CFrame.fromEulerAnglesXYZ(3.14/2, 0, 0)
  278. SetAngle(1, 3.14)
  279. SetAngle(2, 3.14)
  280. Grabbed = Player
  281. Human.Sit = true
  282. Connection1:disconnect()
  283. Connection2:disconnect()
  284. while true do
  285. if (Weld.Part1 == nil) then
  286. Debounce = false
  287. EnableLimb(1)
  288. EnableLimb(2)
  289. Grabbed = nil
  290. break
  291. elseif (Weld.Parent == nil) then
  292. Debounce = false
  293. EnableLimb(1)
  294. EnableLimb(2)
  295. Grabbed = nil
  296. break
  297. else
  298. Human.Sit = true
  299. end
  300. wait()
  301. end
  302. end
  303. end
  304. end
  305. end
  306. end
  307. end
  308. function Click(mouse)
  309. Hold = true
  310. if (Flight == true) then
  311. Person.Character.Engine.BodyPosition.maxForce = Vector3.new(0, 0, 0)
  312. Person.Character.Engine.BodyVelocity.maxForce = Vector3.new(4e+030, 4e+030, 4e+030)
  313. Position = Person.Character.Engine.Position
  314. Person.Character.Suit["Left Jet Barrel"].Smoke.Enabled = true
  315. Person.Character.Suit["Right Jet Barrel"].Smoke.Enabled = true
  316. Person.Character.Engine.Weld.C0 = CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(3.14/2, 0, 0)
  317. SetAngle(NormalHand, 3.14)
  318. while true do
  319. if (Flight == false) then
  320. break
  321. end
  322. if (Hold == false) then
  323. break
  324. end
  325. Direction = Person.Character.Engine.CFrame.lookVector
  326. Position = Position + 2 * 3 * Direction
  327. error = Position - Person.Character.Engine.Position
  328. Person.Character.Engine.BodyVelocity.velocity = 2 * error
  329. wait()
  330. end
  331. BodyP.position = Engine.Position
  332. Person.Character.Engine.BodyPosition.maxForce = Vector3.new(4e+050, 4e+050, 4e+050)
  333. Person.Character.Suit["Left Jet Barrel"].Smoke.Enabled = false
  334. Person.Character.Suit["Right Jet Barrel"].Smoke.Enabled = false
  335. Person.Character.Engine.Weld.C0 = CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  336. SetAngle(NormalHand, 0)
  337.  
  338. end
  339.  
  340. end
  341.  
  342.  
  343. function Release(mouse)
  344. Hold = false
  345. end
  346. function Direct(En, Target)
  347. local OriginCFrame = En:findFirstChild("BodyGyro").cframe
  348. local Direction = (Target - En.Position).unit
  349. local SpawnPosition = En.Position
  350. local Position = SpawnPosition + (Direction * 1)
  351. En:findFirstChild("BodyGyro").maxTorque = Vector3.new(9000, 9000, 9000)
  352. En:findFirstChild("BodyGyro").cframe = CFrame.new(Position, Position + Direction)
  353. end
  354. function PressKey(key, mouse)
  355. key = key:upper()
  356. if (key == "Z") then
  357. if (Debounce == false) then
  358. Debounce = true
  359. DisableLimb(1)
  360. DisableLimb(2)
  361. Joints[1].MaxVelocity = 1
  362. SetAngle(1, 3.14)
  363. Joints[2].MaxVelocity = 1
  364. SetAngle(2, 3.14)
  365. function Touch(Part)
  366. if (Part.Parent ~= nil) then
  367. Human = Part.Parent:findFirstChild("Humanoid")
  368. if (Human ~= nil) then
  369. --Human.Sit = true
  370. Human.Parent.Torso.Velocity = Vector3.new(0, 300, 0)
  371. end
  372. end
  373. end
  374. Connection = Limbs[1].Touched:connect(Touch)
  375. ConnectionB = Limbs[2].Touched:connect(Touch)
  376. wait(0.5)
  377. Joints[1].MaxVelocity = 0.1
  378. Joints[2].MaxVelocity = 0.1
  379. EnableLimb(1)
  380. EnableLimb(2)
  381. Connection:disconnect()
  382. ConnectionB:disconnect()
  383. Debounce = false
  384. end
  385. end
  386. if (key == "N") then
  387. X = game.Workspace:GetChildren()
  388. for I, E in pairs(X) do
  389. if (E.Name == "Bomb") then
  390. Ex = Instance.new("Explosion")
  391. Ex.Parent = game.Workspace
  392. Ex.BlastRadius = 12
  393. Ex.Position = E.Position
  394. Ex.BlastPressure = 1000
  395. E:remove()
  396. end
  397. end
  398. end
  399. if (key == "Y") then
  400. Bomb = Instance.new("Part")
  401. Bomb.Name = "Bomb"
  402. Bomb.formFactor = "Plate"
  403. Bomb.Size = Vector3.new(1, 0.4, 1)
  404. Bomb.TopSurface = 0
  405. Bomb.BottomSurface = 0
  406. Bomb.BrickColor = BrickColor.new("Black")
  407. Bomb.CFrame = CFrame.new(Person.Character.Suit.Watch2.Position)
  408. Bomb.CanCollide = true
  409. Bomb.Parent = game.Workspace
  410. Smoke = Instance.new("Smoke")
  411. Smoke.Parent = Bomb
  412. local c = (PersonT.Color.r + PersonT.Color.g + PersonT.Color.b)/3
  413. Smoke.Color = Color3.new(c, c, c)
  414. Smoke.Size = 1
  415. Smoke.Opacity = 0.7
  416. Smoke.RiseVelocity = 10
  417. Bomb:BreakJoints()
  418. end
  419. if (key == "Q") then
  420. if (Debounce == false) then
  421. Debounce = true
  422. DisableLimb(NormalFoot)
  423. Joints[NormalFoot].MaxVelocity = 1
  424. SetAngle(NormalFoot, 0.7)
  425. function Touch(Part)
  426. if (Part.Parent ~= nil) then
  427. Human = Part.Parent:findFirstChild("Humanoid")
  428. if (Human ~= nil) then
  429. Human.Sit = true
  430. Position = Human.Parent.Torso.Position
  431. Direction = PersonT.CFrame.lookVector
  432. Position = Position + 10 * 3 * Direction
  433. error = Position - PersonT.Position
  434. Human.Parent.Torso.Velocity = 10 * error
  435. Human.Parent.Torso.Velocity = Human.Parent.Torso.Velocity + Vector3.new(0, 100, 0)
  436. end
  437. end
  438. end
  439. Connection = Limbs[NormalFoot].Touched:connect(Touch)
  440. wait(0.5)
  441. Joints[NormalFoot].MaxVelocity = 0.1
  442. EnableLimb(NormalFoot)
  443. Connection:disconnect()
  444. Debounce = false
  445. end
  446. end
  447. if (key == "F") then
  448. if (Debounce == false) then
  449. Debounce = true
  450. DisableLimb(NormalFoot)
  451. Joints[NormalFoot].MaxVelocity = 1
  452. SetAngle(NormalFoot, 0.7)
  453. function Touch(Part)
  454. if (Part.Parent ~= nil) then
  455. Human = Part.Parent:findFirstChild("Humanoid")
  456. if (Human ~= nil) then
  457. Player = game.Players:GetPlayerFromCharacter(Human.Parent)
  458. if (Player ~= nil) then
  459. if (Player ~= Person) then
  460. Human.Sit = true
  461. Position = Human.Parent.Torso.Position
  462. Direction = PersonT.CFrame.lookVector
  463. Position = Position + 10 * 3 * Direction
  464. error = Position - PersonT.Position
  465. Human.Parent.Torso.Velocity = 10 * error
  466. Human.Parent.Torso.Velocity = Human.Parent.Torso.Velocity + Vector3.new(0, 100, 0)
  467. wait(0.4)
  468. Player:remove()
  469. end
  470. end
  471. end
  472. end
  473. end
  474. Connection = Limbs[NormalFoot].Touched:connect(Touch)
  475. wait(0.5)
  476. Joints[NormalFoot].MaxVelocity = 0.1
  477. EnableLimb(NormalFoot)
  478. Connection:disconnect()
  479. Debounce = false
  480. end
  481. end
  482. if (key == "E") then
  483. if (Flight == true) then
  484. if (FDebounce == false) then
  485. FDebounce = true
  486. function Touch(Part)
  487. if (Part.Parent ~= nil) then
  488. Human = Part.Parent:findFirstChild("Humanoid")
  489. if (Human ~= nil) then
  490. Human.Sit = true
  491. Position = Human.Parent.Torso.Position
  492. Direction = Person.Character.Engine.CFrame.lookVector
  493. Position = Position + 10 * 3 * Direction
  494. error = Position - PersonT.Position
  495. Human.Parent.Torso.Velocity = 10 * error
  496. end
  497. end
  498. end
  499. Connection = PersonT.Touched:connect(Touch)
  500. wait(2)
  501. Connection:disconnect()
  502. FDebounce = false
  503. end
  504. end
  505. if (Debounce == false) then
  506. Debounce = true
  507. DisableLimb(NormalHand)
  508. Joints[NormalHand].MaxVelocity = 1
  509. SetAngle(NormalHand, 1.57)
  510. function Touch(Part)
  511. if (Part.Parent ~= nil) then
  512. Human = Part.Parent:findFirstChild("Humanoid")
  513. if (Human ~= nil) then
  514. Human.Sit = true
  515. Position = Human.Parent.Torso.Position
  516. Direction = PersonT.CFrame.lookVector
  517. Position = Position + 10 * 3 * Direction
  518. error = Position - PersonT.Position
  519. Human.Parent.Torso.Velocity = 10 * error
  520. end
  521. end
  522. end
  523. Connection = Limbs[NormalHand].Touched:connect(Touch)
  524. wait(0.5)
  525. EnableLimb(NormalHand)
  526. Connection:disconnect()
  527. Debounce = false
  528. end
  529. end
  530. if (key == "T") then
  531. E = Instance.new("Explosion")
  532. E.Parent = game.Workspace
  533. E.BlastRadius = 12
  534. E.Position = mouse.hit.p
  535. E.BlastPressure = 1000
  536. end
  537. if (key == "G") then
  538. if (Grabbed == nil) then
  539. if (Debounce == false) then
  540. Debounce = true
  541. DisableLimb(1)
  542. DisableLimb(2)
  543. SetAngle(1, 1.57)
  544. SetAngle(2, 1.57)
  545. Connection1 = Limbs[1].Touched:connect(Grab)
  546. Connection2 = Limbs[2].Touched:connect(Grab)
  547. for E = 1, 30 do
  548. if (Grabbed ~= nil) then
  549. break
  550. end
  551. wait(0.1)
  552. end
  553. if (Grabbed == nil) then
  554. EnableLimb(1)
  555. EnableLimb(2)
  556. Connection1:disconnect()
  557. Connection2:disconnect()
  558. Debounce = false
  559. end
  560. end
  561. else
  562. Person.Character.Torso.Grip:remove()
  563. Position = Grabbed.Character.Torso.Position
  564. Direction = PersonT.CFrame.lookVector
  565. Position = Position + 4 * 3 * Direction
  566. error = Position - PersonT.Position
  567. Grabbed.Character.Torso.Velocity = 4 * error
  568. end
  569. end
  570. if (key == "R") then
  571. if (Flight == false) then
  572. if (Debounce == false) then
  573. Debounce = true
  574. DisableLimb(1)
  575. DisableLimb(2)
  576. Flight = true
  577. DisableLimb(3)
  578. DisableLimb(4)
  579. SetAngle(1, 0)
  580. SetAngle(2, 0)
  581. SetAngle(3, 0)
  582. SetAngle(4, 0)
  583. Engine = Instance.new("Part")
  584. Engine.Parent = Person.Character
  585. Engine.Size = PersonT.Size
  586. Engine.Name = "Engine"
  587. Engine.TopSurface = 0
  588. Engine.BottomSurface = 0
  589. Engine.formFactor = "Symmetric"
  590. Engine.Transparency = 1
  591. Engine:BreakJoints()
  592. Weld = Instance.new("Weld")
  593. Weld.Parent = Engine
  594. Weld.Part0 = PersonT
  595. Weld.Part1 = Engine
  596. Weld.C0 = CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  597. BodyP = Instance.new("BodyPosition")
  598. BodyP.Parent = Engine
  599. BodyP.position = Engine.Position + Vector3.new(0, 10, 0)
  600. BodyP.maxForce = Vector3.new(4e+050, 4e+050, 4e+050)
  601. BodyG = Instance.new("BodyGyro")
  602. BodyG.Parent = Engine
  603. BodyV = Instance.new("BodyVelocity")
  604. BodyV.Parent = Engine
  605. BodyV.velocity = Vector3.new(0, 0, 0)
  606. BodyV.maxForce = Vector3.new(0, 0, 0)
  607. while true do
  608. if (Flight == false) then
  609. break
  610. end
  611. Direct(Engine, mouse.hit.p)
  612. Person.Character.Humanoid.Sit = true
  613. Person.Character.Head.CanCollide = false
  614. Person.Character.Torso.CanCollide = false
  615. wait(0.000000000000000000000000000000001)
  616. end
  617. EnableLimb(1)
  618. EnableLimb(2)
  619. EnableLimb(3)
  620. EnableLimb(4)
  621. Debounce = false
  622. Person.Character.Engine:remove()
  623. Person.Character.Humanoid.Sit = false
  624. end
  625. else
  626. Flight = false
  627. end
  628. end
  629. if (key == "L") then
  630. DisableLimb(NormalHand)
  631. SetAngle(NormalHand, 1.57)
  632. Smoke = Instance.new("Smoke")
  633. Smoke.Parent = Person.Character.Suit.Band
  634. local c = (PersonT.Color.r + PersonT.Color.g + PersonT.Color.b)/3
  635. Smoke.Color = Color3.new(0, 0, 0)
  636. Smoke.Size = 15
  637. Smoke.Opacity = 1
  638. Smoke.RiseVelocity = -15
  639. end
  640. if (key == "H") then
  641. if (Debounce == false) then
  642. if (Lazer == false) then
  643. if (mouse.Target ~= nil) then
  644. Debounce = true
  645. Lazer = true
  646. DisableLimb(NormalHand)
  647. SetAngle(NormalHand, 0.785)
  648. BP = Instance.new("BodyPosition")
  649. BP.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  650. BP.P = BP.P / 4
  651. BG = Instance.new("BodyGyro")
  652. BG.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  653. local Hit = mouse.Target
  654. local _P = mouse.Hit.p
  655. local Mag = (Hit.Position-_P).magnitude
  656. local Pos = (Hit.Position-_P).unit * -Mag
  657. local CF = Hit.CFrame.lookVector
  658. while true do
  659. if (Lazer == false) then
  660. break
  661. end
  662. BP.Parent = PersonT
  663. BP.position = ((((CFrame.new(Hit.Position + Pos)) + (-CF)) + (Hit.CFrame.lookVector)) + (mouse.Hit.lookVector * -16)).p + Vector3.new(0, 5.7, 0)
  664. BG.Parent = PersonT
  665. BG.cframe = CFrame.new((PersonT.CFrame + (mouse.Hit.lookVector * -8)).p, (Hit.Position + Pos))
  666. if (Hit.Parent == nil) or (Hit.Parent.Parent == Person.Character) then
  667. BP.Parent = nil
  668. BG.Parent = nil
  669. end
  670. local P = Instance.new("Part")
  671. P.Name = "Grapple Lazer"
  672. P.formFactor = 0
  673. P.Parent = Person.Character
  674. P.BrickColor = BrickColor.new(1)
  675. P.Anchored = true
  676. P.Transparency = 0.05
  677. P.Locked = true
  678. P.Reflectance = 0.025
  679. P.CanCollide = false
  680. P.Size = Vector3.new(1, 1, 1)
  681. local mesh = Instance.new("CylinderMesh")
  682. local Place0 = Person.Character.Suit.Watch2.CFrame * CFrame.new(0, -0.1, 0)
  683.  
  684. mesh.Scale = Vector3.new(0.1, (Place0.p - (Hit.Position + Pos)).magnitude, 0.1)
  685. mesh.Parent = P
  686. P.CFrame = CFrame.new((Place0.p + (Hit.Position + Pos))/2, Place0.p) * CFrame.fromEulerAnglesXYZ(math.pi/2, 0, 0)
  687. wait()
  688. P:remove()
  689. end
  690. Debounce = false
  691. EnableLimb(NormalHand)
  692. BP.Parent = nil
  693. BG.Parent = nil
  694. end
  695. end
  696. end
  697. end
  698. if (key == "J") then
  699. if (Debounce == false) then
  700. if (Lazer == false) then
  701. Debounce = true
  702. Lazer = true
  703. DisableLimb(NormalHand)
  704. SetAngle(NormalHand, 0.785)
  705. smokeBrick = Instance.new("Part")
  706. smokeBrick.CanCollide = false
  707. smokeBrick.Anchored = true
  708. smokeBrick.Transparency = 1
  709. smokeBrick.Locked = true
  710. smokeBrick.archivable = false
  711. smokeBrick.TopSurface = 0
  712. smokeBrick.BottomSurface = 0
  713. smoke = Instance.new("Smoke")
  714. smoke.Size = smoke.Size * 4
  715. while true do
  716. if (Lazer == false) then
  717. break
  718. end
  719. local Pos = mouse.Hit.p
  720. smokeBrick.Parent = Person.Character
  721. smokeBrick.CFrame = CFrame.new(Pos)
  722. if (mouse.Target) and (mouse.Target ~= nil) then
  723. smoke.Parent = smokeBrick
  724. local c = (mouse.Target.Color.r + mouse.Target.Color.g + mouse.Target.Color.b)/3
  725. smoke.Color = Color3.new(c, c, c)
  726. end
  727. local L = Instance.new("Part")
  728. L.Parent = Person.Character
  729. L.Name = "Kill Lazer"
  730. L.BrickColor = BrickColor.new(21)
  731. L.formFactor = 0
  732. L.Size = Vector3.new(1, 1, 1)
  733. L.Locked = true
  734. L.Anchored = true
  735. L.CanCollide = false
  736. L.Transparency = 0.05
  737. L.Reflectance = 0.1
  738. local Place0 = Person.Character.Suit.Watch2.CFrame * CFrame.new(0, -0.1, 0)
  739. local Mesh = Instance.new("CylinderMesh")
  740. Mesh.Parent = L
  741. Mesh.Scale = Vector3.new(0.1, (Place0.p - Pos).magnitude, 0.1)
  742. L.CFrame = CFrame.new((Place0.p + Pos)/2, Place0.p) * CFrame.fromEulerAnglesXYZ(math.pi/2, 0, 0)
  743. if (mouse.Target ~= nil) then
  744. if (mouse.Target.Parent.Name:lower() == "") or ("" == "") then
  745. if ("" ~= "") then
  746. mouse.Target.Parent:BreakJoints()
  747. else
  748. mouse.Target:BreakJoints()
  749. end
  750. end
  751. end
  752. wait()
  753. L:Remove()
  754. end
  755. Debounce = false
  756. smokeBrick.Parent = nil
  757. EnableLimb(NormalHand)
  758. end
  759. end
  760. end
  761. if (key == "K") then
  762. if (Debounce == false) then
  763. if (Lazer == false) then
  764. Debounce = true
  765. Lazer = true
  766. DisableLimb(NormalHand)
  767. SetAngle(NormalHand, 0.785)
  768. BP = Instance.new("BodyPosition")
  769. BP.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  770. BP.P = BP.P / 4
  771. BG = Instance.new("BodyGyro")
  772. BG.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  773. local targ = nil
  774. local Mag = nil
  775. local Pos = nil
  776. while true do
  777. if (Lazer == false) then
  778. break
  779. end
  780. if (mouse.Target ~= nil) and (targ == nil) then
  781. if (mouse.Target.Anchored == false) then
  782. if ((mouse.Hit.p - Person.Character.Suit.Watch2.Position).magnitude <= 10000) then
  783. targ = mouse.Target
  784. BP.Parent = targ
  785. BG.Parent = targ
  786. Mag = (targ.Position - mouse.Hit.p).magnitude
  787. Pos = (targ.Position - mouse.Hit.p).unit * -Mag
  788. end
  789. end
  790. end
  791. local pop = mouse.Hit.p
  792. local G = Instance.new("Part")
  793. G.Parent = Person.Character
  794. G.Name = "Grab Lazer"
  795. G.Anchored = true
  796. G.Locked = true
  797. G.CanCollide = false
  798. G.formFactor = 0
  799. G.Size = Vector3.new(1, 1, 1)
  800. G.BrickColor = BrickColor.new("Royal blue")
  801. G.Reflectance = 0.05
  802. G.Transparency = 0.025
  803. local Place0 = Person.Character.Suit.Watch2.CFrame * CFrame.new(0, -0.1, 0)
  804. local MeAsh = Instance.new("CylinderMesh")
  805. MeAsh.Parent = G
  806. if (targ == nil) or (targ.Anchored == true) then
  807. MeAsh.Scale = Vector3.new(0.1, (Place0.p-pop).magnitude, 0.1)
  808. G.CFrame = CFrame.new((Place0.p + pop)/2, Place0.p) * CFrame.fromEulerAnglesXYZ(math.pi/2, 0, 0)
  809. else
  810. BP.Parent = targ
  811. BP.position = (PersonT.CFrame + (mouse.Hit.lookVector * 8) + Pos).p + Vector3.new(0, 5.7, 0)
  812. BG.Parent = targ
  813. BG.cframe = CFrame.new(targ.Position, PersonT.Position)
  814. if (targ.Parent == nil) or (targ.Parent.Parent == Person.Character) then
  815. BP.Parent = nil
  816. BG.Parent = nil
  817. end
  818. MeAsh.Scale = Vector3.new(0.1, (Place0.p - targ.Position).magnitude, 0.1)
  819. G.CFrame = CFrame.new((Place0.p + (targ.Position + Pos))/2, Place0.p) * CFrame.fromEulerAnglesXYZ(math.pi/2, 0, 0)
  820. end
  821. wait()
  822. G:Remove()
  823. end
  824. Debounce = false
  825. EnableLimb(NormalHand)
  826. BP.Parent = nil
  827. BG.Parent = nil
  828. end
  829. end
  830. end
  831.  
  832. end
  833. function LiftKey(key, mouse)
  834. key = key:upper()
  835. if (key == "L") then
  836. if (Person.Character.Suit.Band:findFirstChild("Smoke") ~= nil) then
  837. Person.Character.Suit.Band.Smoke:remove()
  838. EnableLimb(NormalHand)
  839. end
  840. end
  841. if (key == "H") then
  842. if (Person.Character:findFirstChild("Grapple Lazer") ~= nil) then
  843. Lazer = false
  844. end
  845. end
  846. if (key == "J") then
  847. if (Person.Character:findFirstChild("Kill Lazer") ~= nil) then
  848. Lazer = false
  849. end
  850. end
  851. if (key == "K") then
  852. if (Person.Character:findFirstChild("Grab Lazer") ~= nil) then
  853. Lazer = false
  854. end
  855. end
  856. if (key == "X") then
  857. if (Person.Character:findFirstChild(" Lazer") ~= nil) then
  858. Lazer = false
  859. end
  860. end
  861. end
  862. function Select(mouse)
  863. mouse.Button1Down:connect(function() Click(mouse) end)
  864. mouse.Button1Up:connect(function() Release(mouse) end)
  865. mouse.KeyDown:connect(function(key) PressKey(key, mouse) end)
  866. mouse.KeyUp:connect(function(key) LiftKey(key, mouse) end)
  867. end
  868. function Deselect(mouse)
  869. Hold = false
  870. Lazer = false
  871. Flight = false
  872. end
  873. Bin.Selected:connect(Select)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement