Advertisement
Sheckles

oof

Jun 2nd, 2018
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.80 KB | None | 0 0
  1. -- oofer
  2. wait()
  3.  
  4. --[[ Missile properties ]]--
  5. local currentSpeed = 0
  6. local ejectedSpeed = 0
  7. local maxSpeed = 5000
  8. local increaseTime = 0.3
  9. local increaseIncrement = 30
  10. local decreaseTime = 0.2
  11. local decreaseIncrement = 15
  12. local collisionSpeed = 100
  13. local doPrints = false
  14. local Color = false
  15. local speedGauge = true
  16.  
  17. local Player = game.Players.LocalPlayer
  18. local Mouse = Player:GetMouse()
  19. Mouse.TargetFilter = workspace
  20. local mousePos
  21. repeat wait() until Player.Character:IsDescendantOf(workspace)
  22. local Character = Player.Character
  23. repeat wait() until Character:FindFirstChild("Humanoid")
  24. local Humanoid = Character.Humanoid
  25. Humanoid:WaitForChild("Animator"):Destroy()
  26.  
  27.  
  28. -- Services
  29. local InputService = game:GetService("UserInputService")
  30. local RunService = game:GetService("RunService")
  31.  
  32. -- Set up character variables
  33. local bodyParts = {}
  34. local Joints = {}
  35.  
  36.  
  37.  
  38. local scanCharacter = function()
  39. Scan = function(Target)
  40. for _, child in pairs(Target:GetChildren()) do
  41. if child:IsA("Part") then
  42. bodyParts[child.Name] = child
  43. if #child:GetChildren() > 0 then
  44. Scan(child)
  45. end
  46. elseif child:IsA("Motor6D") then
  47. Joints[child.Name] = child
  48. end
  49. end
  50. end
  51. Scan(Character)
  52. end
  53. scanCharacter()
  54.  
  55. local fromRootC0, fromRootC1 = Joints["RootJoint"].C0, Joints["RootJoint"].C1
  56. local fromNeck = Joints["Neck"].C1
  57. local fromLeftShoulder = Joints["Left Shoulder"].C1
  58. local fromRightShoulder = Joints["Right Shoulder"].C1
  59. local fromLeftHip = Joints["Left Hip"].C1
  60. local fromRightHip = Joints["Right Hip"].C1
  61.  
  62. local Seat = Instance.new("Seat", Character)
  63. Seat.Transparency = 1
  64. Seat.CanCollide = false
  65. Seat.FormFactor = Enum.FormFactor.Custom
  66. Seat.Size = Vector3.new(1, 0.5, 1)
  67. local seatWeld = Instance.new("Weld", Seat)
  68. seatWeld.Part0 = Seat
  69. seatWeld.Part1 = bodyParts["Torso"]
  70. seatWeld.C1 = CFrame.new(0, -0.8, 0) * CFrame.Angles(math.pi/2, 0, 0)
  71.  
  72. Seat.Parent.Torso.Transparency = 1
  73. Seat.Parent:FindFirstChild("Left Arm").Transparency = 1
  74. Seat.Parent:FindFirstChild("Right Arm").Transparency = 1
  75. Seat.Parent:FindFirstChild("Right Leg").Transparency = 1
  76. Seat.Parent:FindFirstChild("Left Leg").Transparency = 1
  77. Seat.Parent:FindFirstChild("Head").Transparency = 1
  78. local OOF = Seat.Parent:GetChildren()
  79.  
  80.  
  81. local lastSeatChar
  82. local preLeftJoint, preRightJoint
  83. Seat.Changed:connect(function(Property)
  84. if Property == "Occupant" and Seat.Occupant then
  85. lastSeatChar = Seat.Occupant.Parent
  86. local Torso = lastSeatChar:FindFirstChild("Torso")
  87. if Torso then
  88. local LeftJoint = Torso["Left Hip"]
  89. local RightJoint = Torso["Right Hip"]
  90. preLeftJoint = LeftJoint.C1
  91. preRightJoint = RightJoint.C1
  92. LeftJoint.C1 = LeftJoint.C1 * CFrame.Angles(math.rad(25), 0, 0)
  93. RightJoint.C1 = RightJoint.C1 * CFrame.Angles(math.rad(25), 0, 0)
  94. end
  95. elseif not Seat.Occupant and lastSeatChar then
  96. local Torso = lastSeatChar:FindFirstChild("Torso")
  97. if Torso then
  98. local LeftJoint = Torso["Left Hip"]
  99. local RightJoint = Torso["Right Hip"]
  100. LeftJoint.C1 = preLeftJoint
  101. RightJoint.C1 = preRightJoint
  102. end
  103. end
  104. end)
  105.  
  106. createMissile = function()
  107. local Ejected = false
  108.  
  109. Humanoid.Jump = true; wait(0.3)
  110.  
  111. local Missile = Instance.new("Part", Character)
  112. Missile.Name = "Missile"
  113. if Color then Missile.BrickColor = Color end
  114. Missile.FormFactor = Enum.FormFactor.Custom
  115. Missile.Size = Vector3.new(1.56, 1.37, 5.65)
  116.  
  117. local Mesh = Instance.new("SpecialMesh", Missile)
  118. Mesh.MeshId = "http://www.roblox.com/asset/?id=1047997"
  119. if not Color then Mesh.TextureId = "http://www.roblox.com/asset/?id=1047998" end
  120. Mesh.Scale = Vector3.new(4, 4, 4)
  121.  
  122. local EmitterPart = Instance.new("Part", Character)
  123. EmitterPart.Name = "SmokeEmitter"
  124. EmitterPart.CanCollide = false
  125. EmitterPart.Transparency = 1
  126. EmitterPart.FormFactor = Enum.FormFactor.Custom
  127. EmitterPart.Size = Vector3.new(0.2, 0.2, 0.2)
  128.  
  129. local EmitterWeld = Instance.new("Weld", Missile)
  130. EmitterWeld.Part0 = Missile
  131. EmitterWeld.Part1 = EmitterPart
  132. EmitterWeld.C0 = CFrame.Angles(math.pi/2, 0, 0)
  133. EmitterWeld.C1 = CFrame.new(0, -Missile.Size.Z/2, 0)
  134.  
  135. local Smoke = Instance.new("ParticleEmitter", EmitterPart)
  136. Smoke.Enabled = false
  137. Smoke.Size = NumberSequence.new(2)
  138. Smoke.Texture = "rbxassetid://1008438636"
  139. Smoke.Lifetime = NumberRange.new(0.5, 1)
  140. Smoke.Rate = 1000
  141. Smoke.Rotation = NumberRange.new(-15, 15)
  142. Smoke.RotSpeed = NumberRange.new(50)
  143. Smoke.Speed = NumberRange.new(5, 10)
  144. Smoke.VelocitySpread = 30
  145.  
  146. Joints["RootJoint"].C0 = fromRootC0 * CFrame.Angles(math.pi/2, 0, 0)
  147. Joints["RootJoint"].C1 = fromRootC1 * CFrame.new(0, 3, 0)
  148. local Weld = Instance.new("Weld", bodyParts["Torso"])
  149. Weld.Part0 = bodyParts["Torso"]
  150. Weld.Part1 = Missile
  151. Weld.C0 = CFrame.new(0, 0, -1)
  152. Weld.C1 = CFrame.Angles(-math.pi/2, 0, 0)
  153.  
  154. -- Set up posture!
  155. local currentLeftShoulder, currentRightShoulder = Joints["Left Shoulder"].C1, Joints["Right Shoulder"].C1
  156. local currentLeftHip, currentRightHip = Joints["Left Hip"].C1, Joints["Right Hip"].C1
  157. local currentNeck = Joints["Neck"].C1
  158. local toNeck = fromNeck * CFrame.new(0, 0.25, 0) * CFrame.Angles(math.rad(80), 0, 0)
  159. local toLeftShoulder = fromLeftShoulder * CFrame.new(-0.3, 0, 0.5) * CFrame.Angles(math.pi/2, math.rad(120), 0)
  160. local toRightShoulder = fromRightShoulder * CFrame.new(0.3, 0, 0.5) * CFrame.Angles(math.pi/2, -math.rad(120), 0)
  161. local toLeftHip = fromLeftHip * CFrame.new(0.5, -0.5, 0) * CFrame.Angles(math.rad(30), math.rad(40), math.rad(20))
  162. local toRightHip = fromRightHip * CFrame.new(-0.5, -0.5, 0) * CFrame.Angles(math.rad(30), -math.rad(40), -math.rad(20))
  163. spawn(function()
  164. for i = 0, 1, 0.1 do
  165. Joints["Neck"].C1 = currentNeck:lerp(toNeck, i)
  166. Joints["Left Shoulder"].C1 = currentLeftShoulder:lerp(toLeftShoulder, i)
  167. Joints["Right Shoulder"].C1 = currentRightShoulder:lerp(toRightShoulder, i)
  168. Joints["Left Hip"].C1 = currentLeftHip:lerp(toLeftHip, i)
  169. Joints["Right Hip"].C1 = currentRightHip:lerp(toRightHip, i)
  170. RunService.RenderStepped:wait()
  171. end
  172. end)
  173.  
  174. local EjectAnimation = function()
  175. local currentLeftShoulder, currentRightShoulder = Joints["Left Shoulder"].C1, Joints["Right Shoulder"].C1
  176. local currentLeftHip, currentRightHip = Joints["Left Hip"].C1, Joints["Right Hip"].C1
  177. local currentRootC0, currentRootC1 = Joints["RootJoint"].C0, Joints["RootJoint"].C1
  178. local currentNeck = Joints["Neck"].C1
  179. local toRootC0, toRootC1 = fromRootC0, fromRootC1
  180. local toLeftShoulder = fromLeftShoulder * CFrame.new(0, 0.5, 0.5) * CFrame.Angles(math.rad(120), math.rad(30), 0)
  181. local toRightShoulder = fromRightShoulder * CFrame.new(0, 0.5, 0.5) * CFrame.Angles(math.rad(120), -math.rad(30), 0)
  182. local toLeftHip = fromLeftHip * CFrame.new(0, -0.3, -0.1) * CFrame.Angles(math.rad(20), 0, 0)
  183. local toRightHip = fromRightHip * CFrame.new(0, -0.3, -0.1) * CFrame.Angles(math.rad(20), 0, 0)
  184. for i = 0, 1, 0.1 do
  185. Joints["Neck"].C1 = currentNeck:lerp(fromNeck, i)
  186. Joints["RootJoint"].C0 = currentRootC0:lerp(toRootC0, i)
  187. Joints["RootJoint"].C1 = currentRootC1:lerp(toRootC1, i)
  188. Joints["Left Shoulder"].C1 = currentLeftShoulder:lerp(toLeftShoulder, i)
  189. Joints["Right Shoulder"].C1 = currentRightShoulder:lerp(toRightShoulder, i)
  190. Joints["Left Hip"].C1 = currentLeftHip:lerp(toLeftHip, i)
  191. Joints["Right Hip"].C1 = currentRightHip:lerp(toRightHip, i)
  192. RunService.RenderStepped:wait()
  193. end
  194. end
  195.  
  196. -- Set up HUD
  197. local HUD = Instance.new("ScreenGui", Player.PlayerGui)
  198. HUD.Name = "HUD"
  199. local ActivateFrame = Instance.new("Frame", HUD)
  200. ActivateFrame.Name = "ActivateFrame"
  201. ActivateFrame.Position = UDim2.new(1, -150, 1, -50)
  202. ActivateFrame.Size = UDim2.new(0, 150, 0, 50)
  203. ActivateFrame.Style = "RobloxRound"
  204. local Button = Instance.new("TextButton", ActivateFrame)
  205. Button.Name = "Button"
  206. Button.Position = UDim2.new(0, -8, 0, -8)
  207. Button.Size = UDim2.new(1, 16, 1, 16)
  208. Button.Style = "RobloxRoundDropdownButton"
  209. Button.Text = ""
  210. local buttonText = Instance.new("TextLabel", Button)
  211. buttonText.ZIndex = 2
  212. buttonText.Name = "Text"
  213. buttonText.BackgroundTransparency = 1
  214. buttonText.Position = UDim2.new(0, -5, 0, -5)
  215. buttonText.Size = UDim2.new(1, 10, 1, 10)
  216. buttonText.Font = Enum.Font.SourceSansBold
  217. buttonText.TextScaled = true
  218. buttonText.Text = "Activate"
  219. buttonText.TextColor3 = Color3.new()
  220. buttonText.TextTransparency = 0.2
  221. local Shadow = buttonText:Clone()
  222. Shadow.Parent = Button
  223. Shadow.Name = "Shadow"
  224. Shadow.Position = UDim2.new(0, -3, 0, -3)
  225. Shadow.ZIndex = 1
  226. Shadow.TextColor3 = Color3.new(116/255, 116/255, 116/255)
  227.  
  228. if speedGauge then
  229. local speedFrame = ActivateFrame:Clone()
  230. speedFrame.Position = UDim2.new(1, -305, 1, -50)
  231. local speedButton = speedFrame:WaitForChild("Button")
  232. speedButton.Active = false
  233. speedButton.AutoButtonColor = false
  234. speedButtonText = speedButton:WaitForChild("Text")
  235. speedButtonText.Text = "0 Studs/s"
  236. speedShadow = speedButton:WaitForChild("Shadow")
  237. speedShadow.Text = "0 Studs/s"
  238. speedFrame.Parent = HUD
  239. end
  240.  
  241. local Activated = true
  242. Button.Style = "RobloxRoundButton"
  243. buttonText.Text = "Un-Activate"
  244. Shadow.Text = "Un-Activate"
  245.  
  246. Button.MouseButton1Click:connect(function()
  247. if not Activated then
  248. Activated = true
  249. Button.Style = "RobloxRoundButton"
  250. buttonText.Text = "Un-Activate"
  251. Shadow.Text = "Un-Activate"
  252. else
  253. Activated = false
  254. Button.Style = "RobloxRoundDropdownButton"
  255. buttonText.Text = "Activate"
  256. Shadow.Text = "Activate"
  257. end
  258. end)
  259.  
  260. -- Fly away stanley, be free!
  261. local bodyGyro = Instance.new("BodyGyro", Missile)
  262. bodyGyro.maxTorque = Vector3.new(400000, 400000, 400000)
  263. bodyGyro.P = 6000
  264. bodyGyro.cframe = Missile.CFrame
  265.  
  266. local bodyPos = Instance.new("BodyPosition", Missile)
  267. bodyPos.maxForce = Vector3.new(100000, 100000, 100000)
  268. bodyPos.P = 1000
  269. bodyPos.position = bodyParts["Torso"].Position
  270.  
  271. local Sound = Instance.new("Sound", Missile)
  272. Sound.SoundId = "rbxassetid://1289692552"
  273. Sound.Looped = true
  274.  
  275. local lastTick = tick()
  276. local Connection1 = InputService.InputBegan:connect(function(Input)
  277. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  278. Sound:Play(); Smoke.Enabled = true
  279. RunService:UnbindFromRenderStep("Stopping")
  280. RunService:BindToRenderStep("Flying", 1, function()
  281. local currentTick = tick()
  282. if currentTick - lastTick >= increaseTime and currentSpeed < maxSpeed then
  283. currentSpeed = currentSpeed + increaseIncrement
  284. if currentSpeed > maxSpeed then currentSpeed = maxSpeed end
  285. if doPrints then print("Increased speed!", "Current speed: "..currentSpeed) end
  286. if speedGauge then
  287. speedButtonText.Text = currentSpeed .. " Studs/s"
  288. speedShadow.Text = currentSpeed .. " Studs/s"
  289. end
  290. lastTick = currentTick
  291. end
  292. mousePos = Mouse.Hit.p
  293. bodyGyro.cframe = CFrame.new(Missile.Position, mousePos)
  294. bodyPos.position = Missile.Position + (mousePos - Missile.Position).unit * currentSpeed
  295. end)
  296. end
  297. end)
  298.  
  299. local Connection2 = InputService.InputEnded:connect(function(Input)
  300. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  301. Sound:Stop(); Smoke.Enabled = false
  302. RunService:UnbindFromRenderStep("Flying")
  303. RunService:BindToRenderStep("Stopping", 1, function()
  304. local currentTick = tick()
  305. if currentTick - lastTick >= decreaseTime and currentSpeed > 0 then
  306. currentSpeed = currentSpeed - decreaseIncrement
  307. if currentSpeed < 0 then currentSpeed = 0 end
  308. if doPrints then print("Decreased speed!", "Current speed: "..currentSpeed) end
  309. if speedGauge then
  310. speedButtonText.Text = currentSpeed .. " Studs/s"
  311. speedShadow.Text = currentSpeed .. " Studs/s"
  312. end
  313. lastTick = currentTick
  314. end
  315. mousePos = Mouse.Hit.p
  316. bodyGyro.cframe = CFrame.new(Missile.Position, mousePos)
  317. bodyPos.position = Missile.Position + (mousePos - Missile.Position).unit * currentSpeed
  318. end)
  319. end
  320. end)
  321.  
  322. local killConnections = function(Destroy)
  323. RunService:UnbindFromRenderStep("Flying")
  324. RunService:UnbindFromRenderStep("Stopping")
  325. if Connection1 and Connection2 then Connection1:disconnect(); Connection2:disconnect() end
  326. if Destroy then Missile:Destroy(); EmitterPart:Destroy() end
  327. end
  328.  
  329. local Explode = function(Missile, isEjected)
  330. local Explosion = Instance.new("Explosion")
  331. Explosion.BlastRadius = 50
  332. Explosion.DestroyJointRadiusPercent = 20
  333. Explosion.Position = Missile.Position
  334. Explosion.Parent = workspace
  335.  
  336. local boomPart = Instance.new("Part", workspace)
  337. boomPart.Name = "Boom"
  338. boomPart.Transparency = 1
  339. boomPart.Anchored = true
  340. boomPart.CanCollide = false
  341. boomPart.FormFactor = Enum.FormFactor.Custom
  342. boomPart.Size = Vector3.new(0.2, 0.2, 0.2)
  343. boomPart.Position = Missile.Position
  344. local Boom = Instance.new("Sound", boomPart)
  345. Boom.SoundId = "rbxassetid://12222208"
  346. Boom.Volume = 10
  347. Boom:Play()
  348. game:GetService("Debris"):AddItem(boomPart, 1)
  349.  
  350. if isEjected then
  351. Missile:Destroy(); EmitterPart:Destroy()
  352. else
  353. killConnections(true)
  354. end
  355. end
  356.  
  357. local MissileCon = Missile.Touched:connect(function(Hit)
  358. if Activated and not Hit:IsDescendantOf(Character) and Hit.CanCollide and (currentSpeed >= collisionSpeed or (Ejected and ejectedSpeed >= collisionSpeed)) then
  359. Explode(Missile)
  360. end
  361. end)
  362.  
  363. if Humanoid.Health <= 0 then killConnections(true) end
  364. Humanoid.Died:connect(function() killConnections(true) end)
  365.  
  366. local Connection3
  367. Connection3 = InputService.InputBegan:connect(function(Input)
  368. if Input.KeyCode == Enum.KeyCode.E and currentSpeed >= 100 then
  369. Connection3:disconnect()
  370. killConnections()
  371. MissileCon:disconnect()
  372. Ejected = true
  373.  
  374. local ejectedMissile = Missile
  375. ejectedMissile.Touched:connect(function(Hit)
  376. if not Hit:IsDescendantOf(Character) and Hit.CanCollide then
  377. Explode(ejectedMissile, true)
  378. end
  379. end)
  380.  
  381. local ejectedBodyPos = bodyPos
  382. ejectedSpeed = currentSpeed
  383. currentSpeed = 0
  384. local toPos = mousePos
  385. Weld:Destroy()
  386. HUD:Destroy()
  387. game:GetService("Debris"):AddItem(ejectedMissile, 5); game:GetService("Debris"):AddItem(EmitterPart, 5)
  388. local Ejected = RunService.RenderStepped:connect(function()
  389. ejectedBodyPos.position = ejectedMissile.Position + (toPos - ejectedMissile.Position).unit * ejectedSpeed
  390. end)
  391. wait(0.1)
  392. bodyParts["Torso"].Velocity = Vector3.new(0, 100, 0)
  393. EjectAnimation()
  394. wait(0.5)
  395. createMissile()
  396. end
  397. end)
  398. end
  399. createMissile()
  400.  
  401.  
  402. local d = Seat.Parent:GetChildren()
  403. for i=1, #d do
  404. if (d[i].className == "Accessory") then
  405. d[i]:remove()
  406. end
  407. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement