Advertisement
Dark_EccentricYT

Untitled

Jan 29th, 2018
1,413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.87 KB | None | 0 0
  1. --Created with PenguinAnonymous's compiler
  2. --PenguinAnonymous is not responsible for damages caused to your game
  3. --This plugin does not remove things
  4. --PenguinAnonymous cannot be held resonsible for manual deletion for the purpose of testing
  5. --Keep in mind, any items that cause errors in compilation will be skipped and documented within the last line of the disclaimer comments
  6. --Thank you for using my plugin and enjoy :)
  7. --It is free to use
  8. --If you use this plugin to create your own, please give me credit
  9. --Errors: Camera
  10. local runDummyScript = function(f,scri)
  11. local oldenv = getfenv(f)
  12. local newenv = setmetatable({}, {
  13. __index = function(_, k)
  14. if k:lower() == 'script' then
  15. return scri
  16. else
  17. return oldenv[k]
  18. end
  19. end
  20. })
  21. setfenv(f, newenv)
  22. ypcall(function() f() end)
  23. end
  24. cors = {}
  25. mas = Instance.new("Model",game:GetService("Lighting"))
  26. mas.Name = "CompiledModel"
  27. o1 = Instance.new("Tool")
  28. o2 = Instance.new("Script")
  29. o3 = Instance.new("LocalScript")
  30. o4 = Instance.new("Part")
  31. o5 = Instance.new("Sound")
  32. o6 = Instance.new("Sound")
  33. o7 = Instance.new("SpecialMesh")
  34. o9 = Instance.new("Vector3Value")
  35. o10 = Instance.new("IntValue")
  36. o11 = Instance.new("BoolValue")
  37. o12 = Instance.new("IntValue")
  38. o13 = Instance.new("BoolValue")
  39. o14 = Instance.new("Animation")
  40. o15 = Instance.new("BoolValue")
  41. o16 = Instance.new("ScreenGui")
  42. o17 = Instance.new("Frame")
  43. o18 = Instance.new("Frame")
  44. o19 = Instance.new("TextLabel")
  45. o20 = Instance.new("TextLabel")
  46. o21 = Instance.new("LocalScript")
  47. o22 = Instance.new("SpecialMesh")
  48. o23 = Instance.new("SpecialMesh")
  49. o24 = Instance.new("LocalScript")
  50. o25 = Instance.new("LocalScript")
  51. o1.Name = "DL-44"
  52. o1.Parent = mas
  53. o1.GripForward = Vector3.new(-4.37113883e-08, 1.91068547e-15, -1)
  54. o1.GripPos = Vector3.new(3.05979704e-08, -0.400000006, 0.599999964)
  55. o1.GripRight = Vector3.new(1, 0, -4.37113883e-08)
  56. o1.GripUp = Vector3.new(0, 1, 1.91068547e-15)
  57. o1.ToolTip = "DL-44 Blaster"
  58. o2.Name = "Firescript"
  59. o2.Parent = o1
  60. table.insert(cors,coroutine.create(function()
  61. wait()
  62. runDummyScript(function()
  63. -- Made by Stickmasterluke
  64. -- edited by fusroblox
  65.  
  66. local Tool = script.Parent
  67. local check = true
  68.  
  69. local GunDamage = 20 -- Base output damage per shot.
  70. local FireRate = .25 -- How often the weapon can fire.
  71. local Automatic = false -- hold down to continue firing
  72. local Range = 250 -- Max distance that the weapon can fire.
  73. local Spread = 6 -- The bigger the spread, the more inaccurate the shots will be.
  74. local ClipSize = 9 -- Shots in a clip
  75. local ReloadTime = 1.3 -- Time it takes to reload the tool.
  76. local StartingClips = 10 -- If you want infinit clips, remove the IntValue named "Clips" from the tool.
  77. local SegmentLength = 40 -- How long the shot segments are, or the speed of the shot.
  78. local FadeDelayTime = 1/30
  79.  
  80.  
  81. local BarrelPos = CFrame.new(0, 0, - 1.2) -- L, F, U
  82. local Rate = 1/30
  83. local Intangibles = {"Shock", "Bolt", "Bullet", "Plasma", "Effect", "Laser", "Handle", "Effects", "Effect", "Flash"}
  84. local Colors = {BrickColor.new("Bright red"), BrickColor.new("Really red"), BrickColor.new("Dusty Rose"), BrickColor.new("Medium red")}
  85. local FlashColors = {"Medium red", "Dusty Rose", "Bright red", "Really red"}
  86.  
  87. local Reloading = false
  88. local Debris = game:GetService("Debris")
  89.  
  90. local Ammo = Tool:FindFirstChild("Ammo")
  91. if Ammo ~= nil then
  92. Ammo.Value = ClipSize
  93. end
  94. local Clips = Tool:FindFirstChild("Clips")
  95. if Clips ~= nil then
  96. Clips.Value = StartingClips
  97. end
  98.  
  99. Tool.Equipped:connect(function()
  100. Tool.Handle.Fire:Stop()
  101. Tool.Handle.Reload:Stop()
  102. end)
  103. Tool.Unequipped:connect(function()
  104. Tool.Handle.Fire:Stop()
  105. Tool.Handle.Reload:Stop()
  106. end)
  107.  
  108. function Round(number, decimal)
  109. decimal = decimal or 0
  110. local mult = 10^decimal
  111. return math.floor(number * mult + .5)/mult
  112. end
  113.  
  114. function CheckIntangible(t)
  115. for i3, v3 in ipairs(Intangibles) do
  116. if string.lower(v3) == string.lower(t.Name) or t.Transparency == 1 then
  117. return true
  118. end
  119. end
  120. return false
  121. end
  122.  
  123. function Reload()
  124. Reloading = true
  125. Tool.Reloading.Value = true
  126. if Clips ~= nil then
  127. if Clips.Value > 0 then
  128. Clips.Value = Clips.Value - 1
  129. else
  130. Reloading = false
  131. Tool.Reloading.Value = false
  132. return
  133. end
  134. end
  135. Tool.Handle.Reload:Play()
  136. for i = 1, ClipSize do
  137. wait(ReloadTime/ClipSize)
  138. Ammo.Value = i
  139. end
  140. Reloading = false
  141. Tool.Reloading.Value = false
  142. end
  143.  
  144. function CastRay(startpos, vec, length, ignore, delayifhit)
  145. if length > 999 then
  146. length = 999
  147. end
  148. hit, endpos2 = game.Workspace:FindPartOnRay(Ray.new(startpos, vec * length), ignore)
  149. if hit ~= nil then
  150. if CheckIntangible(hit) then
  151. if delayifhit then
  152. wait()
  153. end
  154. hit, endpos2 = CastRay(endpos2 + (vec * .01), vec, length - ((startpos - endpos2).magnitude), ignore, delayifhit)
  155. end
  156. end
  157. return hit, endpos2
  158. end
  159.  
  160. function SendBullet(boltstart, targetpos, fuzzyness, SegmentLength, ignore, clr, damage, fadedelay)
  161. if Ammo ~= nil then
  162. if Ammo.Value > 0 then
  163. Ammo.Value = Ammo.Value - 1
  164. else
  165. Reload()
  166. return
  167. end
  168. end
  169. Tool.Handle.Fire.Pitch = (math.random() * .5) + .75
  170. Tool.Handle.Fire:Play()
  171. Tool.DoFireAni.Value = not Tool.DoFireAni.Value
  172. print(Tool.Handle.Fire.Pitch)
  173. local boltdist = Range
  174. local clickdist = (boltstart - targetpos).magnitude
  175. local targetpos = targetpos + (Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5) * (clickdist/100) * fuzzyness)
  176. local boltvec = (targetpos - boltstart).unit
  177. local totalsegments = math.ceil(boltdist/SegmentLength)
  178. local lastpos = boltstart
  179. for i = 1, totalsegments do
  180. local newpos = (boltstart + (boltvec * (boltdist * (i/totalsegments))))
  181. local segvec = (newpos - lastpos).unit
  182. local boltlength = (newpos - lastpos).magnitude
  183. local bolthit, endpos = CastRay(lastpos, segvec, boltlength, ignore, false)
  184. DrawBeam(lastpos, endpos, clr, fadedelay)
  185. if bolthit ~= nil then
  186. local h = bolthit.Parent:FindFirstChild("Humanoid")
  187. if h ~= nil then
  188. local plr = game.Players:GetPlayerFromCharacter(Tool.Parent)
  189. if plr ~= nil then
  190. local creator = Instance.new("ObjectValue")
  191. creator.Name = "creator"
  192. creator.Value = plr
  193. creator.Parent = h
  194. end
  195. if hit.Parent:FindFirstChild("BlockShot") then
  196. hit.Parent:FindFirstChild("BlockShot"):Fire(newpos)
  197. delay(0, function() HitEffect(endpos, 10) end)
  198. else
  199. h:TakeDamage(damage)
  200. end
  201. else
  202. delay(0, function() HitEffect(endpos, 5) end)
  203. end
  204. break
  205. end
  206. lastpos = endpos
  207. wait(Rate)
  208. end
  209. end
  210.  
  211. function DrawBeam(beamstart, beamend, clr, fadedelay)
  212. local dis = (beamstart - beamend).magnitude
  213. local laser = Instance.new("Part")
  214. laser.Name = "Bullet"
  215. laser.Anchored = true
  216. laser.CanCollide = false
  217. laser.Shape = "Block"
  218. laser.formFactor = "Custom"
  219. laser.Size = Vector3.new(.2, .2, dis + .2)
  220. laser.Material = Enum.Material.Neon
  221. laser.Locked = true
  222. laser.TopSurface = 0
  223. laser.BottomSurface = 0
  224. laser.BrickColor = clr
  225. laser.CFrame = CFrame.new(beamend, beamstart) * CFrame.new(0, 0, - dis/2)
  226. laser.Parent = game.Workspace
  227. Debris:AddItem(laser, fadedelay)
  228. end
  229.  
  230. function SigNum(num)
  231. if num == 0 then return 1 end
  232. return math.abs(num)/num
  233. end
  234.  
  235. function MakeSpark(pos)
  236. local effect = Instance.new("Part")
  237. effect.Name = "Effect"
  238. effect.Anchored = false
  239. effect.CanCollide = false
  240. effect.Shape = "Block"
  241. effect.formFactor = "Custom"
  242. effect.Material = Enum.Material.Neon
  243. effect.Locked = true
  244. effect.TopSurface = 0
  245. effect.BottomSurface = 0
  246. effect.BrickColor = Colors[1]
  247. effect.CFrame = CFrame.new(pos)
  248. effect.Parent = game.Workspace
  249. -- effect.velocity = Vector3.new(math.random() * 10, math.random() * 10, math.random() * 10)
  250. -- effect.Size = Vector3.new(effect.velocity.x, effect.velocity.y, effect.velocity.z)
  251. local effectVel = Instance.new("BodyVelocity")
  252. effectVel.maxForce = Vector3.new(99999, 99999, 99999)
  253. effectVel.velocity = Vector3.new(math.random() * 15 * SigNum(math.random( - 10, 10)), math.random() * 15 * SigNum(math.random( - 10, 10)), math.random() * 15 * SigNum(math.random( - 10, 10)))
  254. effectVel.Parent = effect
  255. effect.Size = Vector3.new(math.abs(effectVel.velocity.x)/20, math.abs(effectVel.velocity.y)/20, math.abs(effectVel.velocity.z)/20)
  256. wait()
  257. effectVel:Destroy()
  258. local effecttime = .25
  259. Debris:AddItem(effect, effecttime * 2)
  260. local startTime = time()
  261. while time() - startTime < effecttime do
  262. if effect ~= nil then
  263. effect.Transparency = (time() - startTime)/effecttime
  264. end
  265. wait()
  266. end
  267. if effect ~= nil then
  268. effect.Parent = nil
  269. end
  270. end
  271.  
  272. function HitEffect(pos)
  273.  
  274. for i = 0, 10, 1 do
  275. local thread = coroutine.create(MakeSpark)
  276. coroutine.resume(thread, pos)
  277. end
  278.  
  279. end
  280.  
  281. Tool.Down.Changed:connect(function()
  282. while Tool.Down.Value and check and not Reloading do
  283. check = false
  284. local humanoid = Tool.Parent:FindFirstChild("Humanoid")
  285. local plr1 = game.Players:GetPlayerFromCharacter(Tool.Parent)
  286. if humanoid ~= nil and plr1 ~= nil then
  287. if humanoid.Health > 0 then
  288. spos1 = (Tool.Handle.CFrame * BarrelPos).p
  289. delay(0, function() SendBullet(spos1, Tool.Aim.Value, Spread, SegmentLength, Tool.Parent, Colors[1], GunDamage, FadeDelayTime) end)
  290. else
  291. check = true
  292. break
  293. end
  294. else
  295. check = true
  296. break
  297. end
  298. wait(FireRate)
  299. check = true
  300. if not Automatic then
  301. break
  302. end
  303. end
  304. end)
  305.  
  306. end,o2)
  307. end))
  308. o3.Parent = o1
  309. table.insert(cors,coroutine.create(function()
  310. wait()
  311. runDummyScript(function()
  312. -- Made by Stickmasterluke
  313. -- edited by fusroblox
  314.  
  315. function WaitForChild(obj, name)
  316. while not obj:FindFirstChild(name) do
  317. wait()
  318. print("1waiting for " .. name)
  319. end
  320. return obj:FindFirstChild(name)
  321. end
  322.  
  323. local Reloading = "http://www.roblox.com/asset/?id=50911776"
  324.  
  325. local Cursors = {
  326. "http://www.roblox.com/asset/?id=50912619", -- red -- change the cursors
  327. "http://www.roblox.com/asset/?id=50912641", -- blue
  328. "http://www.roblox.com/asset/?id=50911776", -- purple
  329. Reloading = "http://www.roblox.com/asset/?id=50911776", }
  330.  
  331. local ClipSize = 9
  332. local Equipped = false
  333.  
  334. local Tool = script.Parent
  335. local Player = game.Players.localPlayer
  336. local Ammo = WaitForChild(Tool,"Ammo")
  337. local Clips = nil
  338.  
  339. local Gui = nil
  340. while Gui == nil do
  341. wait()
  342. Gui = Tool:FindFirstChild("PlasmaAssaultGui")
  343. end
  344.  
  345. function UpdateGui()
  346. if Equipped then
  347. local Player = game.Players.localPlayer
  348. if Player ~= nil then
  349. if Ammo == nil then
  350. Gui.Bar.GunLabel.Text ="Futuro Heavy Pistol" --Tool.Name
  351. Gui.Bar.AmmoLabel.Text = ""
  352. Gui.Bar.Fill.Size = UDim2.new( - 1, 0, .8, 0)
  353. elseif Clips == nil then
  354. Gui.Bar.GunLabel.Text ="Futuro Heavy Pistol"-- Tool.Name
  355. Gui.Bar.AmmoLabel.Text = tostring(Ammo.Value).."/"..tostring(ClipSize)
  356. Gui.Bar.Fill.Size = UDim2.new( - 1 * Ammo.Value/ClipSize, 0, .8, 0)
  357. Gui.Bar.Fill.Visible = true
  358. else
  359. Gui.Bar.GunLabel.Text = "Futuro Heavy Pistol"--Tool.Name
  360. Gui.Bar.AmmoLabel.Text = tostring(Ammo.Value).."/"..tostring(ClipSize).." "..tostring(Clips.Value)
  361. Gui.Bar.Fill.Size = UDim2.new( - 1 * Ammo.Value/ClipSize, 0, .8, 0)
  362. Gui.Bar.Fill.Visible = true
  363. end
  364. Gui.Bar.Fill.BackgroundColor3 = Color3.new(255, 0, 0)
  365. if Tool.Reloading.Value then
  366. Gui.Bar.AmmoLabel.Text = "Reloading"
  367. end
  368. end
  369. end
  370. end
  371.  
  372. function OnEquipped(mouse)
  373. if mouse ~= nil then
  374. Equipped = true
  375. local Player = game.Players.LocalPlayer
  376. if Player ~= nil then
  377. local plrgui = WaitForChild(Player,"PlayerGui")
  378. if plrgui ~= nil then
  379. Gui.Parent = plrgui
  380. end
  381. mouse.Button1Down:connect(function()
  382. if not Tool.Down.Value then
  383. Tool.Aim.Value = mouse.Hit.p
  384. Tool.Down.Value = true
  385. while Tool.Down.Value do
  386. Tool.Aim.Value = mouse.Hit.p
  387. wait()
  388. end
  389. end
  390. end)
  391. mouse.Button1Up:connect(function()
  392. Tool.Down.Value = false
  393. end)
  394. mouse.Icon = Cursors[1]
  395. Tool.Reloading.Changed:connect(function(val)
  396. if mouse ~= nil and Equipped then
  397. if val then
  398. mouse.Icon = Cursors.Reloading
  399. else
  400. mouse.Icon = Cursors[1]
  401. end
  402. local Player = game.Players.localPlayer
  403. if Player ~= nil then
  404. local gui = WaitForChild(Player.PlayerGui, "AmmoHud")
  405. if gui ~= nil then
  406. UpdateGui()
  407. if Tool.Reloading.Value then
  408. gui.Bar.AmmoLabel.Text = "Reloading"
  409. end
  410. end
  411. end
  412. end
  413. end)
  414. UpdateGui()
  415. end
  416. end
  417. end
  418.  
  419. function OnUnequipped()
  420. Gui.Parent = Tool
  421. Equipped = false
  422. local Player = game.Players.localPlayer
  423. if Player ~= nil then
  424. local gui = WaitForChild(Player.PlayerGui,"AmmoHud")
  425. if gui ~= nil then
  426. gui.Bar.GunLabel.Text = ""
  427. gui.Bar.AmmoLabel.Text = ""
  428. gui.Bar.Fill.Visible = false
  429. end
  430. end
  431. end
  432.  
  433. Tool.Equipped:connect(OnEquipped)
  434. Tool.Unequipped:connect(OnUnequipped)
  435.  
  436. if Ammo ~= nil then
  437. Ammo.Changed:connect(function()
  438. UpdateGui()
  439. end)
  440. if Clips ~= nil then
  441. Clips.Changed:connect(function()
  442. UpdateGui()
  443. end)
  444. end
  445. end
  446.  
  447. while Tool:FindFirstChild("Reloading") == nil do
  448. wait(1)
  449. end
  450. Tool.Reloading.Changed:connect(function()
  451. UpdateGui()
  452. end)
  453.  
  454. function PlayFireAni()
  455. local aniTrack = WaitForChild(Tool.Parent,"Humanoid"):LoadAnimation(Tool.FireAni)
  456. aniTrack:Play()
  457. end
  458.  
  459. Tool.DoFireAni.Changed:connect(PlayFireAni)
  460.  
  461. end,o3)
  462. end))
  463. o4.Name = "Handle"
  464. o4.Parent = o1
  465. o4.BrickColor = BrickColor.new("Really black")
  466. o4.Position = Vector3.new(60.3701706, 0.876942992, 174.099655)
  467. o4.Rotation = Vector3.new(130.229996, 60.5800018, -134.160004)
  468. o4.FormFactor = Enum.FormFactor.Custom
  469. o4.Size = Vector3.new(0.840000033, 1.18000245, 1.75999904)
  470. o4.CFrame = CFrame.new(60.3701706, 0.876942992, 174.099655, -0.342172682, 0.352322668, 0.871084034, 5.35202247e-08, 0.927042186, -0.374955863, -0.939637184, -0.128299654, -0.317208648)
  471. o4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  472. o4.Position = Vector3.new(60.3701706, 0.876942992, 174.099655)
  473. o4.Orientation = Vector3.new(22.0200005, 110.010002, 0)
  474. o4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  475. o5.Name = "Fire"
  476. o5.Parent = o4
  477. o5.Pitch = 0.82116913795471
  478. o5.SoundId = "http://www.roblox.com/asset/?id=145711747"
  479. o5.Volume = 0.75
  480. o6.Name = "Reload"
  481. o6.Parent = o4
  482. o6.SoundId = "http://www.roblox.com/asset/?id=131436135"
  483. o6.Volume = 0.25
  484. o7.Parent = o4
  485. o7.MeshId = "http://www.roblox.com/asset?id=156298302"
  486. o7.TextureId = "http://www.roblox.com/asset/?id=157853834"
  487. o7.MeshType = Enum.MeshType.FileMesh
  488. o9.Name = "Aim"
  489. o9.Parent = o1
  490. o9.Value = Vector3.new(7370.47461, -428.252258, -6819.59961)
  491. o10.Name = "Ammo"
  492. o10.Parent = o1
  493. o11.Name = "Down"
  494. o11.Parent = o1
  495. o12.Name = "NoClips"
  496. o12.Parent = o1
  497. o13.Name = "Reloading"
  498. o13.Parent = o1
  499. o14.Name = "FireAni"
  500. o14.Parent = o1
  501. o14.AnimationId = "http://www.roblox.com/Asset?ID=89456847"
  502. o15.Name = "DoFireAni"
  503. o15.Parent = o1
  504. o16.Name = "PlasmaAssaultGui"
  505. o16.Parent = o1
  506. o17.Name = "Bar"
  507. o17.Parent = o16
  508. o17.Position = UDim2.new(1,-270,1,-70)
  509. o17.Size = UDim2.new(0,200,0,60)
  510. o17.Style = Enum.FrameStyle.RobloxRound
  511. o17.Position = UDim2.new(1,-270,1,-70)
  512. o18.Name = "Fill"
  513. o18.Parent = o17
  514. o18.Position = UDim2.new(1,0,0.20000000298023,0)
  515. o18.Size = UDim2.new(-1,0,0.80000001192093,0)
  516. o18.Position = UDim2.new(1,0,0.20000000298023,0)
  517. o18.BackgroundColor3 = Color3.new(1, 0, 0)
  518. o18.BorderSizePixel = 0
  519. o19.Name = "GunLabel"
  520. o19.Parent = o17
  521. o19.Position = UDim2.new(10000000000,0,0,0)
  522. o19.Text = ""
  523. o19.Position = UDim2.new(10000000000,0,0,0)
  524. o19.ZIndex = 3
  525. o19.Font = Enum.Font.ArialBold
  526. o19.FontSize = Enum.FontSize.Size14
  527. o19.TextColor3 = Color3.new(1, 1, 1)
  528. o19.TextXAlignment = Enum.TextXAlignment.Left
  529. o20.Name = "AmmoLabel"
  530. o20.Parent = o17
  531. o20.Position = UDim2.new(1,0,0,0)
  532. o20.Text = ""
  533. o20.Position = UDim2.new(1,0,0,0)
  534. o20.ZIndex = 3
  535. o20.Font = Enum.Font.ArialBold
  536. o20.FontSize = Enum.FontSize.Size14
  537. o20.TextColor3 = Color3.new(1, 1, 1)
  538. o20.TextXAlignment = Enum.TextXAlignment.Right
  539. o21.Name = "Arms"
  540. o21.Parent = o1
  541. table.insert(cors,coroutine.create(function()
  542. wait()
  543. runDummyScript(function()
  544. sp = script.Parent
  545.  
  546. Mesh = false -- If true will load BC 2.0 Arm meshes as well.
  547. Shirt = true -- If true will load the user's shirt to the arms as well
  548.  
  549. function onEquipped(mouse)
  550. local Player = game:GetService("Players").LocalPlayer
  551. local Cam = game.Workspace.CurrentCamera
  552.  
  553. local Arms = Instance.new("Model")
  554. Arms.Name = "Arms"
  555. Arms.Parent = Cam
  556.  
  557. if Shirt == true then
  558. local Humanoid = Instance.new("Humanoid")
  559. Humanoid.MaxHealth = 0
  560. Humanoid.Health = 0
  561. Humanoid.Name = ""
  562. Humanoid.Parent = Arms
  563. --Packages bro
  564. for i,v in ipairs(Player.Character:GetChildren()) do
  565. if v.className == "CharacterMesh" or v.className == "Shirt" then
  566. baws = v:clone()
  567. baws.Parent = Arms
  568. else
  569. end
  570. end
  571. end
  572. local RightArm = Player.Character:FindFirstChild("Right Arm"):clone()
  573. RightArm.Name = "Right Arm"
  574. RightArm.Transparency = 0
  575. RightArm.CanCollide = false
  576. RightArm.TopSurface = 0
  577. RightArm.BottomSurface = 0
  578.  
  579. local w = Instance.new("Weld")
  580. w.Part0 = RightArm
  581. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  582. w.C0 = CFrame.new()
  583. w.C1 = CFrame.new()
  584. w.Parent = RightArm
  585. RightArm.Parent = Arms
  586.  
  587. local LeftArm = Player.Character:FindFirstChild("Left Arm"):clone()
  588. LeftArm.Name = "Left Arm"
  589. LeftArm.Transparency = 1
  590. LeftArm.CanCollide = false
  591. LeftArm.TopSurface = 0
  592. LeftArm.BottomSurface = 0
  593.  
  594. local w = Instance.new("Weld")
  595. w.Part0 = LeftArm
  596. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  597. w.C0 = CFrame.new()
  598. w.C1 = CFrame.new()
  599. w.Parent = LeftArm
  600. LeftArm.Parent = Arms
  601.  
  602. if Mesh ~= false then
  603. local LeftArmMesh = script:FindFirstChild("LeftArm")
  604. LeftArmMesh.Parent = LeftArm
  605. local RightArmMesh = script:FindFirstChild("RightArm")
  606. RightArmMesh.Parent = RightArm
  607. else end
  608.  
  609. end
  610.  
  611. function onUnequipped(mouse)
  612. local Player = game:GetService("Players").LocalPlayer
  613. local Cam = script.Parent
  614. for _, Model in pairs(game.Workspace.CurrentCamera:GetChildren()) do
  615. if Model.Name == "Arms" then
  616. Model:remove()
  617. else end
  618. end
  619. end
  620.  
  621. sp.Equipped:connect(onEquipped)
  622. sp.Unequipped:connect(onUnequipped)
  623.  
  624. end,o21)
  625. end))
  626. o22.Name = "LeftArm"
  627. o22.Parent = o21
  628. o22.MeshId = "http://www.roblox.com/asset/?id=27111419"
  629. o22.MeshType = Enum.MeshType.FileMesh
  630. o23.Name = "RightArm"
  631. o23.Parent = o21
  632. o23.MeshId = "http://www.roblox.com/asset/?id=27111864"
  633. o23.MeshType = Enum.MeshType.FileMesh
  634. o24.Name = "Sidegun"
  635. o24.Parent = o1
  636. table.insert(cors,coroutine.create(function()
  637. wait()
  638. runDummyScript(function()
  639. --made by alextomcool!!!
  640. --to use: put in type of gun: barrel point left, barrel point right or bull-pup(main hande is in the middle of the gun)
  641. --step 2: put in what type of wepoan it is: assult rifle or pistol(there will be more)
  642. --to do list: make it easyer to modife how it weld's.
  643. guntype = 3--1 is assult rifle, 2 is bullpup, 3 is pistol, 4 is knife
  644. weldmode = 1--1 is barrel point upper-left, 2 is barrel pointing upper-right, 3 is barrel point lower-left and 4 is barrel point lower-right
  645. -------(note: if it is pistol or knife then 1 is on right leg, 2 is on left leg, 3 is in the back of your pants and 4 is in the front of your pants)
  646. model = nil--gun model, that is
  647. distance = 0.65--this is the distance between the part(torso/leg) and the gun. DON'T MAKE negitive
  648. rotation = 45--this is the turning in degrees.
  649. --this area is mode more for someone who's already good at gun's. please do not get mad at me if you don't understand what's under here
  650. y = 0--this is what's added to the current y value. positive number's make it go down. negative make's it go up
  651. x = 0--this is what's added to the x value(it's really the z value but it look's like the x value when on your back). positive number's make it go left. negative make's it go right
  652. -------------------------------------------------------------------------------------------------------------------------------------------------------------------
  653. --no one should have to edit what's under here. this is for people who know what they are doing(it's still might be hard to edit)--
  654. -------------------------------------------------------------------------------------------------------------------------------------------------------------------
  655. parts = {}
  656. local n = 1
  657. --can i have my
  658. function on(mouse)
  659. if model == nil then
  660. n = 1
  661. local m = Instance.new("Model")
  662. local all = script.Parent:GetChildren()
  663. for i = 1, #all do
  664. if all[i].className == "Part" then
  665. parts[n] = all[i].Transparency
  666. local brick = all[i]:clone()
  667. brick.Parent = m
  668. n = n +1
  669. end
  670. end
  671. wait()
  672. if model == nil then
  673. local weld = script:FindFirstChild("Weld2")
  674. if weld ~= nil then
  675. local new = weld:clone()
  676. new.Disabled = false
  677. new.Parent = m
  678. m.Name = script.Parent.Name
  679. m.Parent = script.Parent.Parent
  680. model = m
  681. local handle = model:FindFirstChild("Handle")
  682. if handle ~= nil then
  683. --------------------------------------------------------------------------------
  684. --------------------------------------------------------------------------------
  685. --------------------------------------------------------------------------------
  686. --------------------------------------------------------------------------------
  687. --------------------------------------------------------------------------------
  688. if guntype == 1 then
  689. local torso = model.Parent:FindFirstChild("Torso")
  690. if torso ~= nil then
  691. if weldmode == 1 then--barrel pointing upper-right
  692. local w = Instance.new("Weld")
  693. w.Part0 = torso
  694. w.Parent = w.Part0
  695. w.Part1 = handle
  696. w.C1 = CFrame.new(distance *-1, 0.25 +y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation *-1), (math.pi / 2), 0)
  697. elseif weldmode == 2 then--barrel pointing upper-left
  698. local w = Instance.new("Weld")
  699. w.Part0 = torso
  700. w.Parent = w.Part0
  701. w.Part1 = handle
  702. w.C1 = CFrame.new(distance, 0.25 +y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation *-1), (math.pi / 2 ) *-1, 0)
  703. elseif weldmode == 3 then--barrel pointing upside-right
  704. local w = Instance.new("Weld")
  705. w.Part0 = torso
  706. w.Parent = w.Part0
  707. w.Part1 = handle
  708. w.C1 = CFrame.new(distance *-1, 0.25+y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation), (math.pi / 2), 0)
  709. elseif weldmode == 4 then--barrel pointing upside-left
  710. local w = Instance.new("Weld")
  711. w.Part0 = torso
  712. w.Parent = w.Part0
  713. w.Part1 = handle
  714. w.C1 = CFrame.new(distance, 0.25+y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation), (math.pi / 2 +rotation) *-1, 0)
  715. end
  716. end
  717. --------------------------------------------------------------------------------
  718. --------------------------------------------------------------------------------
  719. --------------------------------------------------------------------------------
  720. --------------------------------------------------------------------------------
  721. --------------------------------------------------------------------------------
  722. elseif guntype == 2 then--BullPup
  723. local torso = model.Parent:FindFirstChild("Torso")
  724. if torso ~= nil then
  725. if weldmode == 1 then--barrel pointing upper-right
  726. local w = Instance.new("Weld")
  727. w.Part0 = torso
  728. w.Parent = w.Part0
  729. w.Part1 = handle
  730. w.C1 = CFrame.new(distance *-1, 0.25+y, -0.5 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation *-1), math.pi / 2, 0)
  731. elseif weldmode == 2 then--barrel pointing upper-left
  732. local w = Instance.new("Weld")
  733. w.Part0 = torso
  734. w.Parent = w.Part0
  735. w.Part1 = handle
  736. w.C1 = CFrame.new(distance, 0.25 +y, -0.5 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation *-1), math.pi / 2 *-1, 0)
  737. elseif weldmode == 3 then--barrel pointing upside-right
  738. local w = Instance.new("Weld")
  739. w.Part0 = torso
  740. w.Parent = w.Part0
  741. w.Part1 = handle
  742. w.C1 = CFrame.new(distance *-1, 0.25 +y, -0.5 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation), math.pi / 2, 0)
  743. elseif weldmode == 4 then--barrel pointing upside-left
  744. local w = Instance.new("Weld")
  745. w.Part0 = torso
  746. w.Parent = w.Part0
  747. w.Part1 = handle
  748. w.C1 = CFrame.new(distance, 0.25 +y, -0.5 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation), math.pi / 2 *-1, 0)
  749. end
  750. end
  751. --------------------------------------------------------------------------------
  752. --------------------------------------------------------------------------------
  753. --------------------------------------------------------------------------------
  754. --------------------------------------------------------------------------------
  755. --------------------------------------------------------------------------------
  756. elseif guntype == 3 then--pistol
  757. local lleg = model.Parent:FindFirstChild("Left Leg")
  758. local rleg = model.Parent:FindFirstChild("Right Leg")
  759. if lleg ~= nil and rleg ~= nil then
  760. if weldmode == 1 then--pistol on right leg
  761. local w = Instance.new("Weld")
  762. w.Part0 = rleg
  763. w.Parent = w.Part0
  764. w.Part1 = handle
  765. w.C1 = CFrame.new(distance *-1, 0 +y, -0.25 +x *-1) * CFrame.fromEulerAnglesXYZ(math.pi / 2, 0, 0)
  766. elseif weldmode == 2 then--pistol on left leg
  767. local w = Instance.new("Weld")
  768. w.Part0 = lleg
  769. w.Parent = w.Part0
  770. w.Part1 = handle
  771. w.C1 = CFrame.new(distance, 0 +y, -0.25 +x *-1) * CFrame.fromEulerAnglesXYZ(math.pi / 2, 0, 0)
  772. elseif weldmode == 3 then--knife in pant's back, gangsta like
  773. local w = Instance.new("Weld")
  774. w.Part0 = torso
  775. w.Parent = w.Part0
  776. w.Part1 = handle
  777. w.C1 = CFrame.new(distance *-1, 0 +y, 0.25 +x) * CFrame.fromEulerAnglesXYZ(math.pi / 2 , math.pi / 2, 0)
  778. elseif weldmode == 4 then--knife in pant's front, gangsta like
  779. local w = Instance.new("Weld")
  780. w.Part0 = torso
  781. w.Parent = w.Part0
  782. w.Part1 = handle
  783. w.C1 = CFrame.new(distance, 0 +y, 0.25 +x) * CFrame.fromEulerAnglesXYZ(math.pi / 2 , math.pi / 2 *-1, 0)
  784. end
  785. end
  786. --------------------------------------------------------------------------------
  787. --------------------------------------------------------------------------------
  788. --------------------------------------------------------------------------------
  789. --------------------------------------------------------------------------------
  790. --------------------------------------------------------------------------------
  791. elseif guntype == 4 then--knife
  792. local lleg = model.Parent:FindFirstChild("Left Leg")
  793. local rleg = model.Parent:FindFirstChild("Right Leg")
  794. local torso = model.Parent:FindFirstChild("Torso")
  795. if lleg ~= nil and rleg ~= nil and torso ~= nil then
  796. if weldmode == 1 then--pistol on right leg
  797. local w = Instance.new("Weld")
  798. w.Part0 = rleg
  799. w.Parent = w.Part0
  800. w.Part1 = handle
  801. w.C1 = CFrame.new(distance *-1, 0.15 +y, -0.25 +x *-1) * CFrame.fromEulerAnglesXYZ(math.pi, 0, 0)
  802. elseif weldmode == 2 then--pistol on left leg
  803. local w = Instance.new("Weld")
  804. w.Part0 = lleg
  805. w.Parent = w.Part0
  806. w.Part1 = handle
  807. w.C1 = CFrame.new(distance, 0.15 +y, -0.25 +x *-1) * CFrame.fromEulerAnglesXYZ(math.pi, 0, 0)
  808. elseif weldmode == 3 then--knife in pant's back, gangsta like
  809. local w = Instance.new("Weld")
  810. w.Part0 = torso
  811. w.Parent = w.Part0
  812. w.Part1 = handle
  813. w.C1 = CFrame.new(distance *-1, 0 +y, 0.25 +x) * CFrame.fromEulerAnglesXYZ(math.pi , math.pi / 2, 0)
  814. elseif weldmode == 4 then--knife in pant's front, gangsta like
  815. local w = Instance.new("Weld")
  816. w.Part0 = torso
  817. w.Parent = w.Part0
  818. w.Part1 = handle
  819. w.C1 = CFrame.new(distance, 0 +y, 0.25 +x) * CFrame.fromEulerAnglesXYZ(math.pi , math.pi / 2 *-1, 0)
  820. end
  821. end
  822. end
  823. end
  824. end
  825. end
  826. end
  827. --------------------------------------------------------------------------------
  828. --------------------------------------------------------------------------------
  829. --------------------------------------------------------------------------------
  830. --------------------------------------------------------------------------------
  831. --------------------------------------------------------------------------------
  832. if model ~= nil then
  833. n = 1
  834. local all = model:GetChildren()
  835. for i = 1, #all do
  836. if all[i].className == "Part" then
  837. all[i].Transparency = 1
  838. end
  839. end
  840. end
  841. end
  842. --check
  843. function off(mouse)
  844. if model ~= nil then
  845. n = 1
  846. local all = model:GetChildren()
  847. for i = 1, #all do
  848. if all[i].className == "Part" then
  849. all[i].Transparency = parts[n]
  850. local Do = true
  851. if Do then
  852. Do = false--dude!
  853. n = n +1
  854. end
  855. end
  856. end
  857. end
  858. end
  859. --please?
  860. script.Parent.Equipped:connect(on)
  861. script.Parent.Unequipped:connect(off)
  862. end,o24)
  863. end))
  864. o25.Name = "Weld2"
  865. o25.Parent = o24
  866. o25.Disabled = true
  867. table.insert(cors,coroutine.create(function()
  868. wait()
  869. runDummyScript(function()
  870. function Weld(x,y)
  871. local W = Instance.new("Weld")
  872. W.Part0 = x
  873. W.Part1 = y
  874. local CJ = CFrame.new(x.Position)
  875. local C0 = x.CFrame:inverse()*CJ
  876. local C1 = y.CFrame:inverse()*CJ
  877. W.C0 = C0
  878. W.C1 = C1
  879. W.Parent = x
  880. end
  881.  
  882. function Get(A)
  883. if A.className == "Part" then
  884. Weld(script.Parent.Handle, A)
  885. A.Anchored = false
  886. else
  887. local C = A:GetChildren()
  888. for i=1, #C do
  889. Get(C[i])
  890. end
  891. end
  892. end
  893. local yes = true
  894. if yes then
  895. yes = false
  896. Get(script.Parent)
  897. end
  898. function onDied()
  899. script.Parent.Parent = nil
  900. end
  901. h = script.Parent.Parent:FindFirstChild("Humanoid")
  902. if h ~= nil then
  903. h.Died:connect(onDied)
  904. end
  905.  
  906. end,o25)
  907. end))
  908. mas.Parent = workspace
  909. mas:MakeJoints()
  910. local mas1 = mas:GetChildren()
  911. for i=1,#mas1 do
  912. mas1[i].Parent = game:GetService("Players").LocalPlayer.Backpack
  913. ypcall(function() mas1[i]:MakeJoints() end)
  914. end
  915. mas:Destroy()
  916. for i=1,#cors do
  917. coroutine.resume(cors[i])
  918. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement