Advertisement
JuicyPenguin

Jetpack script

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