lolita5432

double LOTML

Jan 6th, 2018
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.43 KB | None | 0 0
  1.  
  2. --:3
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Part1 = Instance.new("Part")
  21. Sound2 = Instance.new("Sound")
  22. Weld3 = Instance.new("Weld")
  23. SpecialMesh4 = Instance.new("SpecialMesh")
  24. Part5 = Instance.new("Part")
  25. Sound6 = Instance.new("Sound")
  26. SpecialMesh7 = Instance.new("SpecialMesh")
  27. LocalScript8 = Instance.new("LocalScript")
  28. Script9 = Instance.new("Script")
  29. Script10 = Instance.new("Script")
  30. Sound11 = Instance.new("Sound")
  31. Sound12 = Instance.new("Sound")
  32. SpecialMesh13 = Instance.new("SpecialMesh")
  33. LocalScript14 = Instance.new("LocalScript")
  34. Script15 = Instance.new("Script")
  35. Script16 = Instance.new("Script")
  36. LocalScript17 = Instance.new("LocalScript")
  37. Tool0.Name = "Dual LoTM Launchers"
  38. Tool0.Parent = mas
  39. Tool0.GripForward = Vector3.new(-0, 6.00000021e-05, -1)
  40. Tool0.GripPos = Vector3.new(0, -0.200000003, -0.5)
  41. Tool0.GripUp = Vector3.new(0, 1, 6.00000021e-05)
  42. Part1.Name = "Handle"
  43. Part1.Parent = Tool0
  44. Part1.BrickColor = BrickColor.new("Dark stone grey")
  45. Part1.Rotation = Vector3.new(-180, 0, -180)
  46. Part1.FormFactor = Enum.FormFactor.Symmetric
  47. Part1.Size = Vector3.new(1, 1, 2)
  48. Part1.CFrame = CFrame.new(0.5, 0.500005007, 1, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  49. Part1.BottomSurface = Enum.SurfaceType.Smooth
  50. Part1.TopSurface = Enum.SurfaceType.Smooth
  51. Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  52. Part1.Position = Vector3.new(0.5, 0.500005007, 1)
  53. Part1.Orientation = Vector3.new(0, 180, 0)
  54. Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  55. Sound2.Name = "Fire"
  56. Sound2.Parent = Part1
  57. Sound2.Volume = 1
  58. Weld3.Parent = Part1
  59. Weld3.C1 = CFrame.new(3, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  60. Weld3.Part0 = Part1
  61. Weld3.Part1 = Part5
  62. SpecialMesh4.Parent = Part1
  63. SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=125754898"
  64. SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=125755118"
  65. SpecialMesh4.VertexColor = Vector3.new(1, 0, 0)
  66. SpecialMesh4.MeshType = Enum.MeshType.FileMesh
  67. Part5.Name = "Handle"
  68. Part5.Parent = Tool0
  69. Part5.BrickColor = BrickColor.new("Dark stone grey")
  70. Part5.Rotation = Vector3.new(-180, 0, -180)
  71. Part5.FormFactor = Enum.FormFactor.Symmetric
  72. Part5.Size = Vector3.new(1, 1, 2)
  73. Part5.CFrame = CFrame.new(3.5, 0.500005007, 1, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  74. Part5.BottomSurface = Enum.SurfaceType.Smooth
  75. Part5.TopSurface = Enum.SurfaceType.Smooth
  76. Part5.Color = Color3.new(0.388235, 0.372549, 0.384314)
  77. Part5.Position = Vector3.new(3.5, 0.500005007, 1)
  78. Part5.Orientation = Vector3.new(0, 180, 0)
  79. Part5.Color = Color3.new(0.388235, 0.372549, 0.384314)
  80. Sound6.Name = "Fire"
  81. Sound6.Parent = Part5
  82. Sound6.Volume = 1
  83. SpecialMesh7.Parent = Part5
  84. SpecialMesh7.MeshId = "http://www.roblox.com/asset/?id=125754898"
  85. SpecialMesh7.TextureId = "http://www.roblox.com/asset/?id=125755118"
  86. SpecialMesh7.VertexColor = Vector3.new(1, 0, 0)
  87. SpecialMesh7.MeshType = Enum.MeshType.FileMesh
  88. LocalScript8.Name = "Local Gui"
  89. LocalScript8.Parent = Tool0
  90. table.insert(cors,sandbox(LocalScript8,function()
  91. local Tool = script.Parent;
  92.  
  93. enabled = true
  94. function onButton1Down(mouse)
  95. if not enabled then
  96. return
  97. end
  98.  
  99. enabled = false
  100. mouse.Icon = "http://www.roblox.com/asset/?version=1&id=1279200"
  101.  
  102. wait(5)
  103. mouse.Icon = "http://www.roblox.com/asset/?version=1&id=1279200"
  104. enabled = true
  105.  
  106. end
  107.  
  108. function onEquippedLocal(mouse)
  109.  
  110. if mouse == nil then
  111. print("Mouse not found")
  112. return
  113. end
  114.  
  115. mouse.Icon = "http://www.roblox.com/asset/?version=1&id=1279200"
  116. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  117. end
  118.  
  119.  
  120. Tool.Equipped:connect(onEquippedLocal)
  121.  
  122. end))
  123. Script9.Name = "Server Launcher"
  124. Script9.Parent = Tool0
  125. table.insert(cors,sandbox(Script9,function()
  126. local Rocket = Instance.new("Part")
  127. local Tool = script.Parent
  128.  
  129. Rocket.Locked = true
  130. Rocket.BackSurface = 3
  131. Rocket.BottomSurface = 3
  132. Rocket.FrontSurface = 3
  133. Rocket.LeftSurface = 3
  134. Rocket.RightSurface = 3
  135. Rocket.TopSurface = 3
  136. Rocket.Size = Vector3.new(1,1,4)
  137. Rocket.BrickColor = BrickColor.new(24)
  138.  
  139. Tool.RocketScript:clone().Parent = Rocket
  140. Tool.Explosion:clone().Parent = Rocket
  141. Tool.Swoosh:clone().Parent = Rocket
  142. Tool.RocketMesh:clone().Parent = Rocket
  143.  
  144.  
  145. function fire(vTarget)
  146.  
  147. local vCharacter = Tool.Parent;
  148.  
  149. local vHandle = Tool:findFirstChild("Handle")
  150. if vHandle == nil then
  151. print("Handle not found")
  152. return
  153. end
  154.  
  155. local dir = vTarget - vHandle.Position
  156.  
  157. dir = computeDirection(dir)
  158.  
  159. local missile = Rocket:clone()
  160.  
  161. local pos = vHandle.Position + (dir * 6)
  162.  
  163. --missile.Position = pos
  164. missile.CFrame = CFrame.new(pos, pos + dir)
  165.  
  166. local creator_tag = Instance.new("ObjectValue")
  167.  
  168. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  169.  
  170. if vPlayer == nil then
  171. print("Player not found")
  172. else
  173. if (vPlayer.Neutral == false) then -- nice touch
  174. missile.BrickColor = vPlayer.TeamColor
  175. end
  176. end
  177.  
  178. creator_tag.Value =vPlayer
  179. creator_tag.Name = "creator"
  180. creator_tag.Parent = missile
  181.  
  182. missile.RocketScript.Disabled = false
  183.  
  184. missile.Parent = game.Workspace
  185. end
  186.  
  187. function computeDirection(vec)
  188. local lenSquared = vec.magnitude * vec.magnitude
  189. local invSqrt = 1 / math.sqrt(lenSquared)
  190. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  191. end
  192.  
  193. Tool.Enabled = true
  194. function onActivated()
  195. if not Tool.Enabled then
  196. return
  197. end
  198.  
  199. Tool.Enabled = false
  200.  
  201. local character = Tool.Parent;
  202. local humanoid = character.Humanoid
  203. if humanoid == nil then
  204. print("Humanoid not found")
  205. return
  206. end
  207.  
  208. local targetPos = humanoid.TargetPoint
  209.  
  210. fire(targetPos)
  211.  
  212. wait(0)
  213.  
  214. Tool.Enabled = true
  215. end
  216.  
  217.  
  218. script.Parent.Activated:connect(onActivated)
  219.  
  220.  
  221. end))
  222. Script10.Name = "RocketScript"
  223. Script10.Parent = Tool0
  224. table.insert(cors,sandbox(Script10,function()
  225. r = game:service("RunService")
  226.  
  227. shaft = script.Parent
  228. position = shaft.Position
  229.  
  230. script.Parent.Explosion.PlayOnRemove = true -- play explosion sound when projectile removed from game
  231.  
  232. function fly()
  233. direction = shaft.CFrame.lookVector
  234. position = position + direction * 20
  235. error = position - shaft.Position
  236. shaft.Velocity = 7*error
  237. end
  238.  
  239. function blow()
  240. swoosh:stop()
  241. explosion = Instance.new("Explosion")
  242. explosion.BlastRadius = 8
  243. explosion.BlastPressure = 500000
  244. explosion.DestroyJointRadiusPercent = 200
  245. explosion.Position = shaft.Position
  246.  
  247.  
  248. -- find instigator tag
  249. local creator = script.Parent:findFirstChild("creator")
  250. if creator ~= nil then
  251. explosion.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end)
  252. end
  253.  
  254. explosion.Parent = game.Workspace
  255. connection:disconnect()
  256. wait(1.5)
  257. shaft:remove()
  258. end
  259.  
  260. function onPlayerBlownUp(part, distance, creator)
  261.  
  262. if part.Name == "Head" then
  263.  
  264. local humanoid = part.Parent.Humanoid
  265. tagHumanoid(humanoid, creator)
  266. end
  267. end
  268.  
  269. function tagHumanoid(humanoid, creator)
  270. -- tag does not need to expire iff all explosions lethal
  271.  
  272. if creator ~= nil then
  273. local new_tag = creator:clone()
  274. new_tag.Parent = humanoid
  275.  
  276. end
  277. end
  278.  
  279. function untagHumanoid(humanoid)
  280. if humanoid ~= nil then
  281. local tag = humanoid:findFirstChild("creator")
  282. if tag ~= nil then
  283.  
  284. tag.Parent = nil
  285. end
  286. end
  287. end
  288.  
  289. t, s = r.Stepped:wait()
  290.  
  291. swoosh = script.Parent.Swoosh
  292. swoosh:play()
  293.  
  294. d = t + 10.0 - s
  295. connection = shaft.Touched:connect(blow)
  296.  
  297. while t < d do
  298. fly()
  299. t = r.Stepped:wait()
  300. end
  301.  
  302. -- at max range
  303. script.Parent.Explosion.PlayOnRemove = false
  304. swoosh:stop()
  305. shaft:remove()
  306.  
  307. end))
  308. Sound11.Name = "Swoosh"
  309. Sound11.Parent = Tool0
  310. Sound11.SoundId = "rbxasset://sounds/Rocket whoosh 01.wav"
  311. Sound11.Volume = 0.69999998807907
  312. Sound11.Looped = true
  313. Sound12.Name = "Explosion"
  314. Sound12.Parent = Tool0
  315. Sound12.SoundId = "rbxasset://sounds/collide.wav"
  316. Sound12.Volume = 1
  317. SpecialMesh13.Name = "RocketMesh"
  318. SpecialMesh13.Parent = Tool0
  319. SpecialMesh13.MeshId = "rbxassetid://16974203"
  320. SpecialMesh13.TextureId = "rbxassetid://116524836"
  321. SpecialMesh13.MeshType = Enum.MeshType.FileMesh
  322. LocalScript14.Name = "Crouch"
  323. LocalScript14.Parent = Tool0
  324. table.insert(cors,sandbox(LocalScript14,function()
  325. on = 0
  326. Tool = script.Parent
  327. welds = {}
  328. sh = {}
  329. arms = nil
  330. torso = nil
  331. f = nil
  332. function Crouch(ison)
  333. if arms == nil and torso == nil then
  334. arms = {Tool.Parent:FindFirstChild("Left Leg"), Tool.Parent:FindFirstChild("Right Leg")}
  335. torso = Tool.Parent:FindFirstChild("Torso")
  336. end
  337. if arms ~= nil and torso ~= nil then
  338. sh = {torso:FindFirstChild("Left Hip"), torso:FindFirstChild("Right Hip")}
  339. if sh ~= nil then
  340. local yes = true
  341. if yes then
  342. yes = false
  343. if ison == 1 then
  344. sh[1].Part1 = nil
  345. sh[2].Part1 = nil
  346. local weld1 = Instance.new("Weld")
  347. weld1.Part0 = torso
  348. weld1.Parent = torso
  349. weld1.Part1 = arms[1]
  350. weld1.C1 = CFrame.new(-0.5, 0.75, 1)
  351. arms[1].Name = "LDave"
  352. arms[1].CanCollide = true
  353. welds[1] = weld1
  354. -------------------------------------------
  355. local weld2 = Instance.new("Weld")
  356. weld2.Part0 = torso
  357. weld2.Parent = torso
  358. weld2.Part1 = arms[2]
  359. weld2.C1 = CFrame.new(0.5,0.495,1.25) * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
  360. arms[2].Name = "RDave"
  361. arms[2].CanCollide = true
  362. welds[2] = weld2
  363. ---------------------------------
  364. local force = Instance.new("BodyForce")
  365. force.Parent = torso
  366. f = force
  367. wait(0.01)
  368. elseif ison == 0 then
  369. if arms then
  370. sh[1].Part1 = arms[1]
  371. sh[2].Part1 = arms[2]
  372. f.Parent = nil
  373. arms[2].Name = "Right Leg"
  374. arms[1].Name = "Left Leg"
  375. welds[1].Parent = nil
  376. welds[2].Parent = nil
  377. end
  378. end
  379. --
  380. end
  381. else
  382. print("sh")
  383. end
  384. else
  385. print("arms")
  386. end
  387. end
  388. function Key(key)
  389. if key then
  390. key = string.lower(key)
  391. if (key=="c") then
  392. if on == 1 then
  393. on = 0
  394. elseif on == 0 then
  395. on = 1
  396. end
  397. Crouch(on)
  398. end
  399. end
  400. end
  401. function Equip(mouse)
  402. mouse.KeyDown:connect(Key)
  403. end
  404. script.Parent.Equipped:connect(Equip)
  405.  
  406.  
  407. end))
  408. Script15.Name = "Welding"
  409. Script15.Parent = Tool0
  410. table.insert(cors,sandbox(Script15,function()
  411. function Weld(x,y)
  412. local W = Instance.new("Weld")
  413. W.Part0 = x
  414. W.Part1 = y
  415. local CJ = CFrame.new(x.Position)
  416. local C0 = x.CFrame:inverse()*CJ
  417. local C1 = y.CFrame:inverse()*CJ
  418. W.C0 = C0
  419. W.C1 = C1
  420. W.Parent = x
  421. end
  422.  
  423. function Get(A)
  424. if A.className == "Part" then
  425. Weld(script.Parent.Handle, A)
  426. A.Anchored = false
  427. else
  428. local C = A:GetChildren()
  429. for i=1, #C do
  430. Get(C[i])
  431. end
  432. end
  433. end
  434.  
  435. function Finale()
  436. Get(script.Parent)
  437. end
  438.  
  439. script.Parent.Equipped:connect(Finale)
  440. script.Parent.Unequipped:connect(Finale)
  441. Finale()
  442. end))
  443. Script16.Name = "armmove"
  444. Script16.Parent = Tool0
  445. table.insert(cors,sandbox(Script16,function()
  446. --Stickmasterluke
  447.  
  448. --just put this script under the tool and when weilded the left arm will go up aswell.
  449. tool=script.Parent
  450. while true do
  451. if tool.Parent.Parent.Name=="Workspace" then
  452. local la=tool.Parent:FindFirstChild("Left Arm")
  453. local ra=tool.Parent:FindFirstChild("Left Arm")
  454. local ts=tool.Parent:FindFirstChild("Torso")
  455. if la~=nil and ts~=nil and ra~=nil then
  456. local ls=ts:FindFirstChild("Left Shoulder")
  457. local rs=ts:FindFirstChild("Right Shoulder")
  458. if ls~=nil and rs~=nil then
  459. ls.CurrentAngle=rs.CurrentAngle*-1
  460. ls.MaxVelocity=0
  461. end
  462. end
  463. end
  464. wait(.02) --If arm looks glitchy, then make this number smaller. And avoid setting to 0(game will crash).
  465. end
  466. end))
  467. LocalScript17.Name = "Shooter"
  468. LocalScript17.Parent = Tool0
  469. table.insert(cors,sandbox(LocalScript17,function()
  470. Tool = script.Parent
  471.  
  472. local arms = nil
  473. local torso = nil
  474. local weld33 = nil -- right arm
  475. local weld55 = nil -- left arm
  476. local welds = {}
  477. local reloading = false
  478. local canreload = true
  479. local canshoot = true
  480. local damage = 200
  481.  
  482.  
  483. function Equip(mouse)
  484. wait(0.01)
  485. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  486. torso = Tool.Parent:FindFirstChild("Torso")
  487. if arms ~= nil and torso ~= nil then
  488. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  489. if sh ~= nil then
  490. local yes = true
  491. if yes then
  492. yes = false
  493. sh[1].Part1 = nil
  494. sh[2].Part1 = nil
  495. falsearm1 = arms[1]:clone()
  496. local mesh1 = Instance.new("BlockMesh")
  497. mesh1.Scale = Vector3.new(.9,.9,.9)
  498. mesh1.Parent = falsearm1
  499. local armweld1 = Instance.new("Weld")
  500. falsearm1.BrickColor = BrickColor.new(26)
  501. falsearm1.Parent = Tool
  502. armweld1.Parent = falsearm1
  503. armweld1.Part0 = falsearm1
  504. armweld1.Part1 = arms[1]
  505. falsearm2 = arms[2]:clone()
  506. local mesh2 = Instance.new("BlockMesh")
  507. mesh2.Scale = Vector3.new(.9,.9,.9)
  508. mesh2.Parent = falsearm2
  509. local armweld2 = Instance.new("Weld")
  510. falsearm2.BrickColor = BrickColor.new(26)
  511. falsearm2.Parent = Tool
  512. armweld2.Parent = falsearm2
  513. armweld2.Part0 = falsearm2
  514. armweld2.Part1 = arms[2]
  515. local weld1 = Instance.new("Weld") -- left arm
  516. weld55 = weld1
  517. weld1.Part0 = torso
  518. weld1.Parent = torso
  519. weld1.Part1 = arms[1]
  520. weld1.C1 = CFrame.new(1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, 0)
  521. welds[1] = weld1
  522. local weld2 = Instance.new("Weld") -- right arm
  523. weld33 = weld2
  524. weld2.Part0 = torso
  525. weld2.Parent = torso
  526. weld2.Part1 = arms[2]
  527. weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, 0)
  528. welds[2] = weld2
  529. --Takeout()
  530. end
  531. else
  532. print("sh")
  533. end
  534. else
  535. print("arms")
  536. end
  537. end
  538.  
  539. local legs = nil
  540. local torso2 = nil
  541. local welds2 = {}
  542. local bodyforce = nil
  543.  
  544. function Unequip(mouse)
  545. if arms ~= nil and torso ~= nil then
  546. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  547. if sh ~= nil then
  548. local yes = true
  549. if yes then
  550. yes = false
  551. sh[1].Part1 = arms[1]
  552. sh[2].Part1 = arms[2]
  553. welds[1].Parent = nil
  554. welds[2].Parent = nil
  555. falsearm1:remove()
  556. falsearm2:remove()
  557. end
  558. else
  559. print("sh")
  560. end
  561. else
  562. print("arms")
  563. end
  564. end
  565.  
  566. function onEquippedLocal(mouse)
  567.  
  568. if mouse == nil then
  569. print("Mouse not found")
  570. return
  571. end
  572.  
  573. mouse.Icon = "http://www.roblox.com/asset/?id=49912389"
  574. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  575. mouse.KeyDown:connect(KeyDownFunctions)
  576. while true do
  577. wait()
  578. end
  579. end
  580.  
  581.  
  582. Tool.Equipped:connect(onEquippedLocal)
  583.  
  584.  
  585. script.Parent.Activated:connect(onActivated)
  586. Tool.Equipped:connect(Equip)
  587. Tool.Unequipped:connect(Unequip)
  588.  
  589. end))
  590. for i,v in pairs(mas:GetChildren()) do
  591. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  592. pcall(function() v:MakeJoints() end)
  593. end
  594. mas:Destroy()
  595. for i,v in pairs(cors) do
  596. spawn(function()
  597. pcall(v)
  598. end)
  599. end
Add Comment
Please, Sign In to add comment