Advertisement
yoyo74456

Vlad's Pistol

Sep 13th, 2019
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.65 KB | None | 0 0
  1. print("made by vlad20020 ok")
  2. local rem = Instance.new("RemoteEvent",owner.PlayerGui)
  3. rem.Name = "OwO"
  4. local client = NLS([[
  5. local tweens = game:GetService("TweenService")
  6.  
  7. local plr = game:GetService("Players").LocalPlayer
  8. local mouse = plr:GetMouse()
  9. local deb = false
  10. local coolDownTime = .35
  11. local keyDown = false
  12. local rage = false
  13.  
  14. local directions = {In = Enum.EasingDirection.In,
  15. Out = Enum.EasingDirection.Out,
  16. InOut = Enum.EasingDirection.InOut
  17. }
  18. local styles = {Linear = Enum.EasingStyle.Linear,
  19. Back = Enum.EasingStyle.Back,
  20. Bounce = Enum.EasingStyle.Bounce,
  21. Sine = Enum.EasingStyle.Sine,
  22. Quad = Enum.EasingStyle.Quad,
  23. Elastic = Enum.EasingStyle.Elastic,
  24. Quart = Enum.EasingStyle.Quart,
  25. Quint = Enum.EasingStyle.Quint
  26. }
  27.  
  28. local ins = Instance.new
  29. local v3 = Vector3.new
  30. local cf = CFrame.new
  31. local angles = CFrame.Angles
  32. local rad = math.rad
  33. local huge = math.huge
  34. local cos = math.cos
  35. local sin = math.sin
  36. local tan = math.tan
  37. local ray = Ray.new
  38. local random = math.random
  39. local ud = UDim.new
  40. local ud2 = UDim2.new
  41. local c3 = Color3.new
  42. local rgb = Color3.fromRGB
  43. local bc = BrickColor.new
  44.  
  45. local rem = plr.PlayerGui:WaitForChild("OwO")
  46.  
  47. local tlerp = function(part,tablee,leinght,easingstyle,easingdirec)
  48. local info = TweenInfo.new(
  49. leinght,
  50. easingstyle,
  51. easingdirec,
  52. 0,
  53. false,
  54. 0
  55. )
  56. local lerp = tweens:Create(part,info,tablee)
  57. lerp:Play()
  58. end
  59.  
  60. function remove(instance,time)
  61. game:GetService("Debris"):AddItem(instance,time)
  62. end
  63.  
  64. function removeWithFade(instance,time)
  65. game:GetService("Debris"):AddItem(instance,time+3.5)
  66. coroutine.resume(coroutine.create(function()
  67. wait(time)
  68. tlerp(instance,{Transparency = 1},2.5,styles.Linear,directions.In)
  69. end))
  70. end
  71.  
  72. rem.OnClientEvent:Connect(function(type,part)
  73. if type == "floatPart" then
  74. local vel = ins("BodyVelocity",part)
  75. vel.MaxForce = v3(huge,huge,huge)
  76. vel.Velocity = v3(random(-1,1),random(-1,1),random(-1,1)) * (part.Size*v3(1,1,1)).Magnitude
  77. vel.P = huge
  78. end
  79. end)
  80.  
  81. mouse.KeyDown:Connect(function(key)
  82. if key == "f" then
  83. rem:FireServer("toggleLaser")
  84. end
  85. if plr.UserId == 155304432 then
  86. if key == "y" and not rage then
  87. rage = true
  88. rem:FireServer("rage")
  89. elseif key == "y" and rage then
  90. rage = false
  91. rem:FireServer("rage")
  92. end
  93. end
  94. if key == "t" then
  95. rem:FireServer("vapourise")
  96. end
  97. end)
  98.  
  99. mouse.Button1Down:Connect(function()
  100. keyDown = true
  101. repeat
  102. if not deb then
  103. deb = true
  104. rem:FireServer("fire",mouse.Hit.p)
  105. wait(coolDownTime)
  106. deb = false
  107. end
  108. wait()
  109. until not keyDown
  110. end)
  111. mouse.Button1Up:Connect(function()
  112. keyDown = false
  113. end)
  114. while true do
  115. if rage then
  116. coolDownTime = .1
  117. else
  118. coolDownTime = .35
  119. end
  120. local cf = CFrame.new(owner.Character.HumanoidRootPart.Position,Vector3.new(mouse.Hit.x,mouse.Hit.y,mouse.Hit.z))
  121. local n = cf.LookVector*owner.Character.HumanoidRootPart.CFrame.RightVector
  122. local rot = n.z+n.x
  123. rem:FireServer("follow",cf.LookVector,rot)
  124. wait()
  125. end
  126.  
  127. while true do
  128. for i,v in ipairs(owner.Character:WaitForChild("Ignore"):GetDescendants()) do
  129. if string.find(v.ClassName:lower(),"part") then
  130. v.LocalTransparencyModifier = v.Transparency
  131. end
  132. end
  133. for i,v in ipairs(owner.Character:WaitForChild("Gun"):GetDescendants()) do
  134. if string.find(v.ClassName:lower(),"part") then
  135. v.LocalTransparencyModifier = v.Transparency
  136. end
  137. end
  138. game:GetService("RunService").RenderStepped:Wait()
  139. end
  140. ]],owner.PlayerGui)
  141.  
  142. local tweens = game:GetService("TweenService")
  143.  
  144. --BasicFunctions
  145. local ins = Instance.new
  146. local v3 = Vector3.new
  147. local cf = CFrame.new
  148. local angles = CFrame.Angles
  149. local rad = math.rad
  150. local huge = math.huge
  151. local cos = math.cos
  152. local sin = math.sin
  153. local tan = math.tan
  154. local ray = Ray.new
  155. local random = math.random
  156. local ud = UDim.new
  157. local ud2 = UDim2.new
  158. local c3 = Color3.new
  159. local rgb = Color3.fromRGB
  160. local bc = BrickColor.new
  161.  
  162. local plr = owner
  163. local char = plr.Character
  164. local h = char.Head
  165. local t = char.Torso
  166. local ra = char["Right Arm"]
  167. local la = char["Left Arm"]
  168. local rl = char["Right Leg"]
  169. local ll = char["Left Leg"]
  170. local rut = char.HumanoidRootPart
  171. local hum = char:FindFirstChildOfClass("Humanoid")
  172. local nec = t.Neck
  173. local rutj = rut.RootJoint
  174. local rs = t["Right Shoulder"]
  175. local ls = t["Left Shoulder"]
  176. local rh = t["Right Hip"]
  177. local lh = t["Left Hip"]
  178.  
  179. local startPoint = h
  180.  
  181. local laser = false
  182. local rage = false
  183. local vapouriseModel = false
  184.  
  185. local gunScale = (t.Size.y/2) * 2
  186. local partDamage = .55 * gunScale
  187. local drop = .025
  188. local bulletSize = 50 * (1+gunScale/2)
  189. local animtime = .25
  190. local maxdistance = 1500
  191. local XYSize = .15 * gunScale
  192. local XYSizeSparks = .025
  193. local impactCoolingTime = 2 * (1+gunScale/2)
  194. local impactXZ = XYSize+(XYSize/7.5)
  195. local angle = 0
  196. local laserRange = .75 * gunScale
  197.  
  198. local fireSound = 2329791773 --131164846
  199.  
  200. local starterColor = bc("Daisy orange").Color
  201. local starterMaterial = "Neon"
  202.  
  203. local cs = {
  204. color = starterColor,
  205. material = starterMaterial,
  206. transparency = .5,
  207. impactcolor = bc("Really black").Color,
  208. impactMaterial = "SmoothPlastic",
  209. impactBloodColor = bc("Maroon").Color,
  210. laserColor = bc("Really red").Color,
  211. laserMaterial = "Neon"
  212. }
  213. local specialSounds = {
  214. vapourise = 1842430222
  215. }
  216.  
  217. --Tweening styles and directions
  218. local directions = {In = Enum.EasingDirection.In,
  219. Out = Enum.EasingDirection.Out,
  220. InOut = Enum.EasingDirection.InOut
  221. }
  222. local styles = {Linear = Enum.EasingStyle.Linear,
  223. Back = Enum.EasingStyle.Back,
  224. Bounce = Enum.EasingStyle.Bounce,
  225. Sine = Enum.EasingStyle.Sine,
  226. Quad = Enum.EasingStyle.Quad,
  227. Elastic = Enum.EasingStyle.Elastic,
  228. Quart = Enum.EasingStyle.Quart,
  229. Quint = Enum.EasingStyle.Quint
  230. }
  231.  
  232. local ignoremodel = ins("Model",char)
  233. ignoremodel.Name = "Ignore"
  234.  
  235. local gunModel = ins("Model",char)
  236. gunModel.Name = "Gun"
  237.  
  238. local handle = ins("Part",gunModel)
  239. handle.Locked = true
  240. handle.CanCollide = false
  241. handle.Massless = true
  242. handle.Material = "SmoothPlastic"
  243. handle.Size = v3(.2,.7,.5) * gunScale
  244. handle.Color = bc("Black").Color
  245. local handleWeld = ins("Weld",ra)
  246. handleWeld.Part0 = ra
  247. handleWeld.Part1 = handle
  248. handleWeld.C0 = cf(0,(-ra.Size.y/2) * (1+gunScale/10),0) * angles(rad(-100),0,0)
  249.  
  250. local part = ins("Part",gunModel)
  251. part.Locked = true
  252. part.CanCollide = false
  253. part.Massless = true
  254. part.Material = "SmoothPlastic"
  255. part.Size = v3(.2,.15,1.25) * gunScale
  256. part.Color = bc("Black").Color
  257. local partWeld = ins("Weld",part)
  258. partWeld.Part0 = handle
  259. partWeld.Part1 = part
  260. partWeld.C0 = cf(0,(handle.Size.y/2)+(part.Size.y/2),-part.Size.z/4.15) * angles(rad(10),0,0)
  261. local sliderPointPart = part
  262.  
  263. local slider = ins("Part",gunModel)
  264. slider.Locked = true
  265. slider.CanCollide = false
  266. slider.Massless = true
  267. slider.Material = "SmoothPlastic"
  268. slider.Size = v3(.2,.2,1.25) * gunScale
  269. slider.Color = c3(.085,.085,.085)
  270. local sliderWeld = ins("Weld",slider)
  271. sliderWeld.Part0 = sliderPointPart
  272. sliderWeld.Part1 = slider
  273. sliderWeld.C0 = cf(0,(sliderPointPart.Size.y/2)+(slider.Size.y/2),0)
  274.  
  275. local part = ins("Part",gunModel)
  276. part.Shape = "Cylinder"
  277. part.Locked = true
  278. part.Massless = true
  279. part.CanCollide = false
  280. part.Material = "Metal"
  281. part.Size = v3(1.15,.115,.115) * gunScale
  282. part.Color = c3(0,0,0)
  283. local partWeld = ins("Weld",part)
  284. partWeld.Part0 = sliderPointPart
  285. partWeld.Part1 = part
  286. partWeld.C0 = cf(0,(sliderPointPart.Size.y/2)+(part.Size.y/1.5),-part.Size.z/2) * angles(rad(90),0,rad(90))
  287. startPoint = part
  288.  
  289. local armWeld = ins("Weld",t)
  290. armWeld.Part0 = t
  291. armWeld.Part1 = ra
  292. armWeld.C0 = cf((t.Size.x/2)+t.Size.x/4,t.Size.y/4,0)
  293. armWeld.C1 = cf(0,ra.Size.y/4,0)
  294.  
  295. local neckWeld = ins("Weld",t)
  296. neckWeld.Part0 = t
  297. neckWeld.Part1 = h
  298. neckWeld.C0 = cf(0,t.Size.y/2,0)
  299. neckWeld.C1 = cf(0,-h.Size.y/2,0)
  300.  
  301. local armWeldC0 = armWeld.C0
  302. local neckWeldC0 = neckWeld.C0
  303.  
  304. rs.Parent = nil
  305. nec.Parent = nil
  306.  
  307. function sound(id,vol,pitch,parent,maxdist)
  308. pcall(function()
  309. local mdist = 30 or maxdist
  310. local newsound = Instance.new("Sound",parent)
  311. newsound.EmitterSize = mdist
  312. newsound.Volume = vol
  313. newsound.SoundId = "rbxassetid://"..id
  314. newsound.Pitch = pitch
  315. newsound:Play()
  316. coroutine.resume(coroutine.create(function()
  317. wait(.1)
  318. remove(newsound,newsound.TimeLength/newsound.Pitch)
  319. end))
  320. return newsound
  321. end)
  322. end
  323.  
  324. function placeSoundPart(rcf,id,vol,pitch,maxdist)
  325. pcall(function()
  326. local mdist = 30 or maxdist
  327. local spart = ins("Part",ignoremodel)
  328. spart.Anchored = true
  329. spart.CanCollide = false
  330. spart.Locked = true
  331. spart.Transparency = 1
  332. spart.CFrame = rcf
  333. local ssound = sound(id,vol,pitch,spart,mdist)
  334. remove(spart,10)
  335. end)
  336. end
  337.  
  338. function placeSoundPartWithSpecialSound(rcf,place,vol,maxdist)
  339. pcall(function()
  340. local mdist = 30 or maxdist
  341. local spart = ins("Part",ignoremodel)
  342. spart.Anchored = true
  343. spart.CanCollide = false
  344. spart.Locked = true
  345. spart.Transparency = 1
  346. spart.CFrame = rcf
  347. local soud = ins("Sound",spart)
  348. soud.Volume = vol
  349. soud.Pitch = 1
  350. soud.EmitterSize = mdist
  351. soud.SoundId = "rbxassetid://"..place
  352. if place == 1842430222 then
  353. soud.TimePosition = 4.5
  354. soud:Play()
  355. remove(spart,10)
  356. end
  357. end)
  358. end
  359.  
  360. local tlerp = function(part,tablee,leinght,easingstyle,easingdirec)
  361. local info = TweenInfo.new(
  362. leinght,
  363. easingstyle,
  364. easingdirec,
  365. 0,
  366. false,
  367. 0
  368. )
  369. local lerp = tweens:Create(part,info,tablee)
  370. lerp:Play()
  371. end
  372.  
  373. function remove(instance,time)
  374. game:GetService("Debris"):AddItem(instance,time)
  375. end
  376. function removeWithFade(instance,time)
  377. game:GetService("Debris"):AddItem(instance,time+3.5)
  378. coroutine.resume(coroutine.create(function()
  379. wait(time)
  380. tlerp(instance,{Transparency = 1},2.5,styles.Linear,directions.In)
  381. end))
  382. end
  383.  
  384. function swait()
  385. game:GetService("RunService").Stepped:Wait()
  386. end
  387.  
  388. function rayc(spos,direc,ignore,dist)
  389. local rai = ray(spos,direc.Unit * dist)
  390. local rhit,rpos,rrot = workspace:FindPartOnRayWithIgnoreList(rai,ignore,false,false)
  391. return rhit,rpos,rrot
  392. end
  393.  
  394. function createweld(part1,part2,v3c0,v3c1)
  395. local att1 = ins("Attachment",part1)
  396. local att2 = ins("Attachment",part2)
  397. att1.Position = v3c0
  398. att2.Position = v3c1
  399. local con = ins("BallSocketConstraint",part1)
  400. con.Attachment0 = att1
  401. con.Attachment1 = att2
  402. con.LimitsEnabled = true
  403. con.TwistLimitsEnabled = true
  404. con.TwistLowerAngle = 0
  405. con.TwistUpperAngle = 0
  406. con.UpperAngle = 0
  407. att1.Name = "dontremove"
  408. att2.Name = "dontremove"
  409. con.Name = "dontremove"
  410. return {att0 = att1,att1 = att2,constraint = con}
  411. end
  412.  
  413. function createglue(parent1,parent2,name,part0,part1,c0,c1)
  414. pcall(function()
  415. local att1 = ins("Attachment")
  416. local att2 = ins("Attachment")
  417. local socket = ins("BallSocketConstraint")
  418. att1.Parent = parent1
  419. att2.Parent = parent2
  420. socket.Attachment0 = att1
  421. socket.Attachment1 = att2
  422. att1.Position = c0
  423. att2.Position = c1
  424. socket.Name = "dontremove"
  425. att1.Name = "dontremove"
  426. att2.Name = "dontremove"
  427. socket.Parent = parent2
  428. return socket
  429. end)
  430. end
  431.  
  432. function createhitbox(part,parent)
  433. pcall(function()
  434. local hbpart = ins("Part")
  435. hbpart.Name = "HitboxRagdoll"
  436. hbpart.Locked = true
  437. hbpart.Transparency = 1
  438. hbpart.TopSurface = "Smooth"
  439. hbpart.BottomSurface = "Smooth"
  440. hbpart.Material = "Ice"
  441. if part.Name ~= "Head" then
  442. hbpart.Size = v3(part.Size.x/1.35,part.Size.y/1.2,part.Size.z/1.35)
  443. hbpart.CFrame = part.CFrame
  444. local att1 = ins("Attachment",part)
  445. local att2 = ins("Attachment",hbpart)
  446. att1.Position = v3(0,-part.Size.y/10,0)
  447. local con = ins("BallSocketConstraint",part)
  448. con.Attachment0 = att1
  449. con.Attachment1 = att2
  450. con.LimitsEnabled = true
  451. con.TwistLimitsEnabled = true
  452. con.TwistLowerAngle = 0
  453. con.TwistUpperAngle = 0
  454. con.UpperAngle = 0
  455. else
  456. hbpart.Size = v3(part.Size.x,part.Size.y/2,part.Size.z)
  457. hbpart.CFrame = part.CFrame
  458. local att1 = ins("Attachment",part)
  459. local att2 = ins("Attachment",hbpart)
  460. local con = ins("BallSocketConstraint",part)
  461. con.Attachment0 = att1
  462. con.Attachment1 = att2
  463. con.LimitsEnabled = true
  464. con.TwistLimitsEnabled = true
  465. con.TwistLowerAngle = 0
  466. con.TwistUpperAngle = 0
  467. con.UpperAngle = 0
  468. end
  469. hbpart:BreakJoints()
  470. hbpart.Parent = parent
  471. end)
  472. end
  473.  
  474. function createhitboxr15(part,parent)
  475. pcall(function()
  476. part.Transparency = .5
  477. local hbpart = ins("Part")
  478. hbpart.Name = "HitboxRagdoll"
  479. hbpart.Locked = true
  480. hbpart.Transparency = 0
  481. hbpart.TopSurface = "Smooth"
  482. hbpart.BottomSurface = "Smooth"
  483. hbpart.Material = "Ice"
  484. if part.Name ~= "Head" then
  485. hbpart.Size = v3(part.Size.x/1.35,part.Size.y/4,part.Size.z/1.35)
  486. hbpart.CFrame = part.CFrame
  487. local att1 = ins("Attachment",part)
  488. local att2 = ins("Attachment",hbpart)
  489. local con = ins("BallSocketConstraint",part)
  490. con.Attachment0 = att1
  491. con.Attachment1 = att2
  492. con.LimitsEnabled = true
  493. con.TwistLimitsEnabled = true
  494. con.TwistLowerAngle = 0
  495. con.TwistUpperAngle = 0
  496. con.UpperAngle = 0
  497. else
  498. hbpart.Size = v3(part.Size.x,part.Size.y/2,part.Size.z)
  499. hbpart.CFrame = part.CFrame
  500. local att1 = ins("Attachment",part)
  501. local att2 = ins("Attachment",hbpart)
  502. local con = ins("BallSocketConstraint",part)
  503. con.Attachment0 = att1
  504. con.Attachment1 = att2
  505. con.LimitsEnabled = true
  506. con.TwistLimitsEnabled = true
  507. con.TwistLowerAngle = 0
  508. con.TwistUpperAngle = 0
  509. con.UpperAngle = 0
  510. end
  511. hbpart:BreakJoints()
  512. hbpart.Parent = parent
  513. end)
  514. end
  515.  
  516. function paralizer6(type,who,huma,rip)
  517. pcall(function()
  518. if type == "body" then
  519. local torso = who:FindFirstChild("Torso")
  520. local righta = who:FindFirstChild("Right Arm")
  521. local lefta = who:FindFirstChild("Left Arm")
  522. local rightl = who:FindFirstChild("Right Leg")
  523. local leftl = who:FindFirstChild("Left Leg")
  524. local head = who:FindFirstChild("Head")
  525. local tag = ins("Glue",who) tag.Name = "deletmepls"
  526. if torso then
  527. local root = who:FindFirstChild("HumanoidRootPart")
  528. if root then
  529. root:Destroy()
  530. end
  531. huma.PlatformStand = true
  532. if head then
  533. if head:FindFirstChild("Ripped") then
  534. return
  535. end
  536. head:BreakJoints()
  537. head.Anchored = false
  538. createhitbox(head,torso)
  539. createglue(torso,head,"paralized",torso,leftl,v3(0,torso.Size.y/2,0),v3(0,-head.Size.y/2,0))
  540. head.TopSurface = "Smooth"
  541. head.BottomSurface = "Smooth"
  542. head:MakeJoints()
  543. end
  544. if leftl then
  545. if not leftl:FindFirstChild("Ripped") then
  546. leftl:BreakJoints()
  547. leftl.Anchored = false
  548. createglue(torso,leftl,"paralized",torso,leftl,v3(-torso.Size.x/4,-torso.Size.y/2,0),v3(0,leftl.Size.y/2,0))
  549. createhitbox(leftl,torso)
  550. end
  551. end
  552. if rightl then
  553. if not rightl:FindFirstChild("Ripped") then
  554. rightl:BreakJoints()
  555. rightl.Anchored = false
  556. createglue(torso,rightl,"paralized",torso,rightl,v3(torso.Size.x/4,-torso.Size.y/2,0),v3(0,rightl.Size.y/2,0))
  557. createhitbox(rightl,torso)
  558. end
  559. end
  560. if righta then
  561. righta:BreakJoints()
  562. righta.Anchored = false
  563. if not righta:FindFirstChild("Ripped") then
  564. createglue(torso,righta,"paralized",torso,righta,v3(torso.Size.x/2,torso.Size.y/4,0),v3(-righta.Size.x/2,righta.Size.y/4,0))
  565. end
  566. createhitbox(righta,torso)
  567. end
  568. if lefta then
  569. lefta:BreakJoints()
  570. lefta.Anchored = false
  571. if not lefta:FindFirstChild("Ripped") then
  572. createglue(torso,lefta,"paralized",torso,lefta,v3(-torso.Size.x/2,torso.Size.y/4,0),v3(lefta.Size.x/2,lefta.Size.y/4,0))
  573. end
  574. createhitbox(lefta,torso)
  575. end
  576. else
  577. warn("Cant get the torso")
  578. end
  579. end
  580. end)
  581. end
  582.  
  583. function killr6(who)
  584. pcall(function()
  585. local khum = who:FindFirstChildOfClass("Humanoid")
  586. if khum then
  587. khum.Health = 0
  588. khum.Name = "Dead hobo"
  589. who:BreakJoints()
  590. local khe = khum.Parent:FindFirstChild("Head")
  591. if khe.Size.x ~= khe.Size.z then
  592. khe.Size = v3(khe.Size.z,khe.Size.z,khe.Size.z)
  593. end
  594. for i,v in pairs(who:GetDescendants()) do
  595. if v:IsA("Accessory") or v:IsA("Hat") then
  596. local att1 = ins("Attachment",khe)
  597. local att2 = ins("Attachment",v.Handle)
  598. att1.Position = (v.Handle.Position-khe.Position)
  599. local con = ins("BallSocketConstraint",khe)
  600. con.Attachment0 = att1
  601. con.Attachment1 = att2
  602. con.LimitsEnabled = true
  603. con.TwistLimitsEnabled = true
  604. con.TwistLowerAngle = 0
  605. con.TwistUpperAngle = 0
  606. con.UpperAngle = 0
  607. end
  608. if v:IsA("Script") or v:IsA("LocalScript") or v.Name == "HitboxRagdoll" or v:IsA("Attachment") and v.Name ~= "dontremove" or v:IsA("BallSocketConstraint") and v.Name ~= "dontremove" then
  609. remove(v,0)
  610. end
  611. if v:IsA("Decal") then
  612. removeWithFade(v,5)
  613. end
  614. if v:IsA("Part") or v:IsA("MeshPart") then
  615. v.Anchored = false
  616. v:BreakJoints()
  617. removeWithFade(v,5)
  618. end
  619. end
  620. paralizer6("body",khum.Parent,khum,riphead)
  621. end
  622. end)
  623. end
  624.  
  625. function killr15(who,riphead)
  626. pcall(function()
  627. local khum = who:FindFirstChildOfClass("Humanoid")
  628. if khum then
  629. local joints = {}
  630. for i,v in pairs(who:GetDescendants()) do
  631. if v:IsA("Motor6D") or v:IsA("Motor") then
  632. if v.Part0 and v.Part1 then
  633. table.insert(joints,v)
  634. end
  635. end
  636. end
  637. khum.Health = 0
  638. khum.Name = "Dead hobo"
  639. who:BreakJoints()
  640. local khe = khum.Parent:FindFirstChild("Head")
  641. if khe.Size.x ~= khe.Size.z then
  642. khe.Size = v3(khe.Size.z,khe.Size.z,khe.Size.z)
  643. end
  644. for i,v in pairs(who:GetDescendants()) do
  645. if v:IsA("Accessory") or v:IsA("Hat") then
  646. local att1 = ins("Attachment",khe)
  647. local att2 = ins("Attachment",v.Handle)
  648. att1.Position = (v.Handle.Position-khe.Position)
  649. local con = ins("BallSocketConstraint",khe)
  650. con.Attachment0 = att1
  651. con.Attachment1 = att2
  652. con.LimitsEnabled = true
  653. con.TwistLimitsEnabled = true
  654. con.TwistLowerAngle = 0
  655. con.TwistUpperAngle = 0
  656. con.UpperAngle = 0
  657. end
  658. if v:IsA("Script") or v:IsA("LocalScript") or v.Name == "HitboxRagdoll" or v:IsA("Attachment") and v.Name ~= "dontremove" or v:IsA("BallSocketConstraint") and v.Name ~= "dontremove" then
  659. remove(v,0)
  660. end
  661. if v:IsA("Decal") then
  662. removeWithFade(v,5)
  663. end
  664. if v:IsA("Part") or v:IsA("MeshPart") then
  665. v.Anchored = false
  666. v:BreakJoints()
  667. removeWithFade(v,5)
  668. end
  669. end
  670. for i,v in pairs(joints) do
  671. createglue(v.Part0,v.Part1,"paralized",v.Part0,v.Part1,v3(v.C0.x,v.C0.y,v.C0.z),v3(v.C1.x,v.C1.y,v.C1.z))
  672. if not v.Part0.Name == "UpperTorso" or not v.Part1.Name == "UpperTorso" then
  673. createhitboxr15(v.Part0,v.Part0)
  674. removeWithFade(v.Part0,5)
  675. end
  676. end
  677. end
  678. end)
  679. end
  680.  
  681. function dest(hit)
  682. pcall(function()
  683. if hit.Name == "Base" or hit.Name == "Baseplate" then
  684. return
  685. end
  686. if hit:IsA("Seat") or hit:IsA("VehicleSeat") then
  687. hit.Parent = nil
  688. end
  689. hit:ClearAllChildren()
  690. hit:BreakJoints()
  691. hit.Anchored = false hit.CanCollide = true hit.Parent = ignoremodel
  692. if laser then
  693. hit.CanCollide = false
  694. end
  695. hit.Name = "Destructed"
  696. if hit:IsA("UnionOperation") then
  697. hit.UsePartColor = true
  698. end
  699. if laser then
  700. hit.Color = cs.laserColor
  701. hit.Material = cs.laserMaterial
  702. hit.Transparency = 0
  703. end
  704. hit.Size = v3(hit.Size.x/2,hit.Size.y/2,hit.Size.z/2)
  705. hit.CFrame = hit.CFrame * cf(hit.Size.x/2,hit.Size.y/2,hit.Size.z/2)
  706. local hsize = hit.Size
  707. local hcf = hit.CFrame
  708. local partToTakeProps = hit
  709. local hit = partToTakeProps:Clone() hit.Parent = ignoremodel
  710. remove(partToTakeProps,0)
  711. local clone = hit:Clone() clone.Parent = ignoremodel
  712. local clone1 = hit:Clone() clone1.Parent = ignoremodel
  713. local clone2 = hit:Clone() clone2.Parent = ignoremodel
  714. local clone3 = hit:Clone() clone3.Parent = ignoremodel
  715. local clone4 = hit:Clone() clone4.Parent = ignoremodel
  716. local clone5 = hit:Clone() clone5.Parent = ignoremodel
  717. local clone6 = hit:Clone() clone6.Parent = ignoremodel
  718. clone.CFrame = hit.CFrame * cf(0,-hit.Size.y,0)
  719. clone1.CFrame = hit.CFrame * cf(-hit.Size.x,-hit.Size.y,0)
  720. clone2.CFrame = hit.CFrame * cf(-hit.Size.x,0,0)
  721. clone3.CFrame = hit.CFrame * cf(0,0,-hit.Size.z)
  722. clone4.CFrame = clone.CFrame * cf(0,0,-clone.Size.z)
  723. clone5.CFrame = clone1.CFrame * cf(0,0,-clone1.Size.z)
  724. clone6.CFrame = clone2.CFrame * cf(0,0,-clone2.Size.z)
  725. local parts = {hit,clone,clone1,clone2,clone3,clone4,clone5,clone6}
  726. for i,v in pairs(parts) do
  727. if laser then
  728. v:SetNetworkOwner(owner)
  729. rem:FireAllClients("floatPart",v)
  730. removeWithFade(v,0)
  731. else
  732. v:SetNetworkOwner(owner)
  733. local vel = ins("BodyVelocity",v)
  734. vel.MaxForce = v3(huge,huge,huge)
  735. vel.Velocity = v3(random(-1,1),random(-1,1),random(-1,1)) * (v.Size*v3(2.5,2.5,2.5)).Magnitude
  736. remove(vel,.05)
  737. removeWithFade(v,random(4,7))
  738. end
  739. end
  740. end)
  741. end
  742.  
  743.  
  744. function laserVapourise(hit)
  745. pcall(function()
  746. if hit.Name == "Base" or hit.Name == "Baseplate" then
  747. return
  748. end
  749. hit:ClearAllChildren()
  750. hit:BreakJoints()
  751. hit.Anchored = false
  752. hit.Parent = ignoremodel
  753. hit.CanCollide = false
  754. hit.Name = "Laserd"
  755. if hit:IsA("UnionOperation") then
  756. hit.UsePartColor = true
  757. end
  758. hit.Color = cs.laserColor
  759. hit.Material = cs.laserMaterial
  760. hit.Transparency = 0
  761. rem:FireAllClients("floatPart",hit)
  762. removeWithFade(hit,0)
  763. end)
  764. end
  765.  
  766. function oneStepBullet(pos,direc,size)
  767. local part = ins("Part",ignoremodel)
  768. part.Anchored = true
  769. part.Locked = true
  770. part.CanCollide = false
  771. part.Color = cs.color
  772. part.Material = cs.material
  773. part.Transparency = cs.transparency
  774. part.Size = v3(XYSize,XYSize,size)
  775. part.CFrame = pos
  776. part.CFrame = cf(part.Position,direc) * cf(0,0,-part.Size.z/2) * angles(rad(-drop),0,0)
  777. local mesh = ins("SpecialMesh",part)
  778. mesh.MeshType = "Sphere"
  779. local endsize = size/10
  780. local endcf = part.CFrame * cf(0,0,(-part.Size.z/2)+(endsize/2))
  781. remove(part,animtime)
  782. tlerp(part,{Size = v3(XYSize/4,XYSize/4,endsize),CFrame = endcf,Transparency = 1},animtime,styles.Linear,directions.Out)
  783. return part
  784. end
  785.  
  786. function throwDebree(pos,direc,material,color)
  787. pcall(function()
  788. local part = ins("Part",ignoremodel)
  789. part.Size = v3(.45,.45,.45) * XYSize
  790. part.Material = material
  791. part.Color = color
  792. part.CFrame = pos
  793. part.Transparency = part.Transparency
  794. part.CanCollide = true
  795. part.Locked = true
  796. part.Massless = false
  797. local vel = ins("BodyVelocity",part)
  798. vel.MaxForce = v3(huge,huge,huge)
  799. vel.Velocity = direc * (part.Size*v3(30,30,30)).Magnitude
  800. remove(vel,.05)
  801. remove(part,2.5)
  802. end)
  803. end
  804.  
  805. function spark(pos,direc,size)
  806. pcall(function()
  807. local part = ins("Part",ignoremodel)
  808. part.Anchored = true
  809. part.Locked = true
  810. part.CanCollide = false
  811. part.Color = cs.color
  812. part.Material = cs.material
  813. part.Transparency = cs.transparency
  814. part.Size = v3(XYSizeSparks,XYSizeSparks,size)
  815. part.CFrame = pos
  816. part.CFrame = cf(part.Position,direc) * cf(0,0,-part.Size.z/2) * angles(rad(-drop),0,0)
  817. local mesh = ins("SpecialMesh",part)
  818. mesh.MeshType = "Sphere"
  819. local endsize = size/10
  820. local endcf = part.CFrame * cf(0,0,(-part.Size.z/2)+(endsize/2))
  821. remove(part,animtime/1.5)
  822. tlerp(part,{Size = v3(XYSize/4,XYSize/4,endsize),CFrame = endcf,Transparency = 1},animtime/1.5,styles.Linear,directions.Out)
  823. return part
  824. end)
  825. end
  826.  
  827. function damage(humanoid,damage)
  828. pcall(function()
  829. if humanoid.Health > 500000 then
  830. effbiggerwithback("Brick",humanoid.Parent:FindFirstChildOfClass("Part").CFrame or humanoid.Parent:FindFirstChildOfClass("MeshPart").CFrame,0,v3(75,75,75),c3(.75,0,0),.75)
  831. placeSoundPartWithSpecialSound(humanoid.Parent:FindFirstChildOfClass("Part").CFrame or humanoid.Parent:FindFirstChildOfClass("MeshPart").CFrame,specialSounds.vapourise,7.5,50)
  832. remove(humanoid.Parent,0)
  833. end
  834. humanoid.Health = humanoid.Health - (damage*gunScale)*(humanoid.MaxHealth/100)
  835. end)
  836. end
  837.  
  838. function effbiggerwithback(shape,pos,trans,size,color,time,spread)
  839. pcall(function()
  840. local part = ins("Part",ignoremodel)
  841. part.Size = v3(0,0,0)
  842. part.CFrame = pos
  843. part.Transparency = trans
  844. part.Anchored = true
  845. part.CanCollide = false
  846. part.Locked = true
  847. part.Color = color
  848. part.Material = "Neon"
  849. local mesh = ins("SpecialMesh",part)
  850. mesh.Scale = v3(0,0,0)
  851. mesh.MeshType = shape
  852. local spreadcf = cf(0,0,0)
  853. if spread then
  854. spreadcf = cf((random(-5,5)/10)*gunScale,(random(-5,5)/10)*gunScale,(random(-5,5)/10)*gunScale)
  855. end
  856. coroutine.resume(coroutine.create(function()
  857. remove(part,time*2)
  858. tlerp(part,{Transparency = 1,CFrame = pos * spreadcf * angles(rad(random(-180,180)),rad(random(-180,180)),rad(random(-180,180)))},time*2,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  859. tlerp(mesh,{Scale = size},time,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  860. wait(.5)
  861. tlerp(mesh,{Scale = v3(0,0,0)},time,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  862. end))
  863. end)
  864. end
  865.  
  866. function createImpact(part,pos)
  867. pcall(function()
  868. if laser then
  869. effbiggerwithback("Brick",pos,0,(v3(1,1,1)*20)*laserRange,cs.color,.25)
  870. end
  871. if laser and vapourise then
  872. if part.Parent and part.Parent:IsA("Model") then
  873. for i,v in ipairs(part.Parent:GetDescendants()) do
  874. if string.find(v.ClassName:lower(),"part") and not v:IsA("ParticleEmitter") and part.Parent ~= workspace and part.Parent ~= char then
  875. if v.Name ~= "Base" or v.Name ~= "Baseplate" then
  876. if not v:FindFirstChild("PartHealth") then
  877. local partHealth = ins("NumberValue",v)
  878. partHealth.Name = "PartHealth"
  879. partHealth.Value = (v.Size * v3(1,1,1)).Magnitude
  880. partHealth.Value = partHealth.Value - partDamage
  881. if partHealth.Value <= 0 then
  882. laserVapourise(v)
  883. breakWeld = true
  884. end
  885. else
  886. local partHealth = v.PartHealth
  887. partHealth.Value = partHealth.Value - partDamage
  888. if partHealth.Value <= 0 then
  889. laserVapourise(v)
  890. breakWeld = true
  891. end
  892. end
  893. end
  894. end
  895. end
  896. end
  897. elseif part.Parent.Parent and part.Parent.Parent:IsA("Model") and part.Parent.Parent ~= workspace and part.Parent.Parent ~= char then
  898. for i,v in ipairs(part.Parent.Parent:GetDescendants()) do
  899. if string.find(v.ClassName:lower(),"part") and not v:IsA("ParticleEmitter") then
  900. if v.Name ~= "Base" or v.Name ~= "Baseplate" then
  901. if not v:FindFirstChild("PartHealth") then
  902. local partHealth = ins("NumberValue",v)
  903. partHealth.Name = "PartHealth"
  904. partHealth.Value = (v.Size * v3(1,1,1)).Magnitude
  905. partHealth.Value = partHealth.Value - partDamage
  906. if partHealth.Value <= 0 then
  907. laserVapourise(v)
  908. breakWeld = true
  909. end
  910. else
  911. local partHealth = v.PartHealth
  912. partHealth.Value = partHealth.Value - partDamage
  913. if partHealth.Value <= 0 then
  914. laserVapourise(v)
  915. breakWeld = true
  916. end
  917. end
  918. end
  919. end
  920. end
  921. elseif part.Parent.Parent.Parent and part.Parent.Parent.Parent:IsA("Model") and part.Parent.Parent.Parent ~= workspace and part.Parent.Parent.Parent ~= char then
  922. for i,v in ipairs(part.Parent.Parent.Parent:GetDescendants()) do
  923. if string.find(v.ClassName:lower(),"part") and not v:IsA("ParticleEmitter") then
  924. if v.Name ~= "Base" or v.Name ~= "Baseplate" then
  925. if not v:FindFirstChild("PartHealth") then
  926. local partHealth = ins("NumberValue",v)
  927. partHealth.Name = "PartHealth"
  928. partHealth.Value = (v.Size * v3(1,1,1)).Magnitude
  929. partHealth.Value = partHealth.Value - partDamage
  930. if partHealth.Value <= 0 then
  931. laserVapourise(v)
  932. breakWeld = true
  933. end
  934. else
  935. local partHealth = v.PartHealth
  936. partHealth.Value = partHealth.Value - partDamage
  937. if partHealth.Value <= 0 then
  938. laserVapourise(v)
  939. breakWeld = true
  940. end
  941. end
  942. end
  943. end
  944. end
  945. end
  946. local breakWeld = false
  947. if not laser and not vapourise then
  948. if part.Name ~= "Base" or part.Name ~= "Baseplate" then
  949. if not part:FindFirstChild("PartHealth") then
  950. local partHealth = ins("NumberValue",part)
  951. partHealth.Name = "PartHealth"
  952. partHealth.Value = (part.Size * v3(1,1,1)).Magnitude
  953. partHealth.Value = partHealth.Value - partDamage
  954. if partHealth.Value <= 0 then
  955. dest(part)
  956. breakWeld = true
  957. end
  958. else
  959. local partHealth = part.PartHealth
  960. partHealth.Value = partHealth.Value - partDamage
  961. if partHealth.Value <= 0 then
  962. dest(part)
  963. breakWeld = true
  964. end
  965. end
  966. end
  967. end
  968. local hitHumanoid = false
  969. local endcolor = cs.impactcolor
  970. if part.Parent then
  971. if part.Parent:FindFirstChildOfClass("Humanoid") then
  972. if part.Name == "Head" then
  973. if part.Parent:FindFirstChild("UpperTorso") then
  974. killr15(part.Parent:FindFirstChildOfClass("Humanoid").Parent)
  975. else
  976. killr6(part.Parent:FindFirstChildOfClass("Humanoid").Parent)
  977. end
  978. else
  979. damage(part.Parent:FindFirstChildOfClass("Humanoid"),random(20,40))
  980. if part.Parent:FindFirstChildOfClass("Humanoid").Health < .001 then
  981. if part.Parent:FindFirstChild("UpperTorso") then
  982. killr15(part.Parent:FindFirstChildOfClass("Humanoid").Parent)
  983. else
  984. killr6(part.Parent:FindFirstChildOfClass("Humanoid").Parent)
  985. end
  986. end
  987. end
  988. endcolor = cs.impactBloodColor
  989. hitHumanoid = true
  990. end
  991. end
  992. if part.Parent.Parent then
  993. if part.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  994. if part.Parent:IsA("Tool") then
  995. dest(part)
  996. end
  997. if part.Name == "Handle" and part.Parent:IsA("Accessory") then
  998. if part.Parent.Parent:FindFirstChild("UpperTorso") then
  999. killr15(part.Parent.Parent:FindFirstChildOfClass("Humanoid").Parent)
  1000. else
  1001. killr6(part.Parent.Parent:FindFirstChildOfClass("Humanoid").Parent)
  1002. end
  1003. end
  1004. endcolor = cs.impactBloodColor
  1005. hitHumanoid = true
  1006. end
  1007. end
  1008. if laser then
  1009. local reg = Region3.new(v3(pos.x,pos.y,pos.z)-v3(laserRange,laserRange,laserRange),v3(pos.x,pos.y,pos.z)+v3(laserRange,laserRange,laserRange))
  1010. local parts = workspace:FindPartsInRegion3WithIgnoreList(reg,{char,ignoremodel},25)
  1011. for i,v in pairs(parts) do
  1012. if v.Name ~= "Base" or v.Name ~= "Baseplate" then
  1013. if not v:FindFirstChild("PartHealth") then
  1014. local partHealth = ins("NumberValue",v)
  1015. partHealth.Name = "PartHealth"
  1016. partHealth.Value = (v.Size * v3(1,1,1)).Magnitude
  1017. partHealth.Value = partHealth.Value - partDamage
  1018. if partHealth.Value <= 0 then
  1019. dest(v)
  1020. breakWeld = true
  1021. end
  1022. else
  1023. local partHealth = v.PartHealth
  1024. partHealth.Value = partHealth.Value - partDamage
  1025. if partHealth.Value <= 0 then
  1026. dest(v)
  1027. breakWeld = true
  1028. end
  1029. end
  1030. end
  1031. end
  1032. end
  1033. if not breakWeld then
  1034. local makeDebreesCollidable = true
  1035. local mainpart = ins("Part",ignoremodel)
  1036. mainpart.Size = v3(impactXZ,0,impactXZ)
  1037. mainpart.Material = "Neon"
  1038. mainpart.Color = rgb(255,45,0)
  1039. mainpart.CFrame = pos
  1040. mainpart.CanCollide = false
  1041. mainpart.Locked = true
  1042. local mesh = ins("CylinderMesh",mainpart)
  1043. local weld = ins("Weld",mainpart)
  1044. weld.Part0 = part
  1045. weld.Part1 = mainpart
  1046. weld.C0 = mainpart.CFrame:toObjectSpace(pos)
  1047. if not part.Anchored then
  1048. makeDebreesCollidable = false
  1049. end
  1050. tlerp(mainpart,{Color = endcolor},impactCoolingTime,styles.Bounce,directions.InOut)
  1051. local waitt = coroutine.wrap(function()
  1052. wait(impactCoolingTime)
  1053. mainpart.Material = cs.impactMaterial
  1054. removeWithFade(mainpart,5)
  1055. end)
  1056. waitt()
  1057. for i = 0,360,30 do
  1058. local debree = ins("Part",mainpart)
  1059. debree.CanCollide = false
  1060. debree.Locked = true
  1061. debree.Material = part.Material
  1062. debree.Color = part.Color
  1063. debree.Transparency = part.Transparency
  1064. if hitHumanoid then
  1065. debree.Color = cs.impactBloodColor
  1066. debree.Material = "SmoothPlastic"
  1067. end
  1068. debree.Size = v3(.45,.25,.15)*XYSize
  1069. debree.CFrame = mainpart.CFrame * angles(0,rad(i),0) * cf(0,debree.Size.y/(random(35,50)/10),-mainpart.Size.z/2) * angles(rad(random(-75,85)),rad(random(3,6)),rad(random(-10,10)))
  1070. local weld = ins("WeldConstraint",debree)
  1071. weld.Part0 = mainpart
  1072. weld.Part1 = debree
  1073. removeWithFade(debree,5+impactCoolingTime)
  1074. local sparkLookVector = debree.CFrame * cf(0,debree.Size.y*2,0)
  1075. spark(mainpart.CFrame,sparkLookVector.p,(random(20,30)/10)*XYSize)
  1076. local rand = random(1,3)
  1077. if rand == 2 then
  1078. if not hitHumanoid then
  1079. throwDebree(mainpart.CFrame * cf(0,XYSize/2,0),debree.CFrame.UpVector,part.Material,part.Color)
  1080. else
  1081. throwDebree(mainpart.CFrame * cf(0,XYSize/2,0),debree.CFrame.UpVector,"SmoothPlastic",cs.impactBloodColor)
  1082. end
  1083. end
  1084. end
  1085. if hitHumanoid then
  1086. remove(mainpart,0)
  1087. end
  1088. end
  1089. end)
  1090. end
  1091.  
  1092. function fireBullet(direc)
  1093. pcall(function()
  1094. sound(fireSound,3,random(9,11)/10,ra,25)
  1095. effbiggerwithback("Brick",startPoint.CFrame * cf(-startPoint.Size.x/2,0,0),.3,(v3(.5,.5,.5)*10)*gunScale,cs.color,.15)
  1096. local scf = startPoint.CFrame * cf(-startPoint.Size.x/2,0,0)
  1097. local hit,pos,normalId = rayc(scf.p,(direc-scf.p),{char,ignoremodel},bulletSize)
  1098. local dist = (startPoint.Position-pos).Magnitude
  1099. local newStartPoint = oneStepBullet(startPoint.CFrame * cf(-startPoint.Size.x/2,0,0),pos,dist)
  1100. local canMakeImpact
  1101. local impactPos
  1102. local impactHit
  1103. local effPos
  1104. local canGoFuther = true
  1105. if hit then
  1106. canMakeImpact = true
  1107. effPos = pos
  1108. impactPos = cf(pos,pos+normalId) * angles(rad(-90),0,0)
  1109. impactHit = hit
  1110. canGoFuther = false
  1111. end
  1112. if not canGoFuther then
  1113. if canMakeImpact then
  1114. createImpact(impactHit,impactPos)
  1115. end
  1116. return
  1117. end
  1118. for i = 1,(maxdistance/(bulletSize/2)) -1 do
  1119. local hit,pos,normalId = rayc(newStartPoint.Position,newStartPoint.CFrame.LookVector,{char,ignoremodel},bulletSize)
  1120. dist = (newStartPoint.Position-pos).Magnitude
  1121. newStartPoint = oneStepBullet(newStartPoint.CFrame,pos,dist)
  1122. if hit then
  1123. canMakeImpact = true
  1124. impactPos = cf(pos,pos+normalId) * angles(rad(-90),0,0)
  1125. effPos = pos
  1126. impactHit = hit
  1127. break
  1128. end
  1129. swait()
  1130. end
  1131. if canMakeImpact then
  1132. createImpact(impactHit,impactPos)
  1133. end
  1134. end)
  1135. end
  1136.  
  1137. rem.OnServerEvent:Connect(function(plr,type,direc,dir2)
  1138. if type == "fire" then
  1139. coroutine.resume(coroutine.create(function()
  1140. angle = 30
  1141. spawn(function()
  1142. fireBullet(direc)
  1143. end)
  1144. wait(.1)
  1145. angle = 0
  1146. end))
  1147. end
  1148. if type == "follow" then
  1149. if laser then
  1150. if not vapourise then
  1151. if rage then
  1152. effbiggerwithback("Sphere",startPoint.CFrame * cf(-startPoint.Size.x/1.85,0,0),.3,((v3(.5,.5,.5)*10)*gunScale) * (random(9,12)/10),cs.color,.25,true)
  1153. else
  1154. effbiggerwithback("Sphere",startPoint.CFrame * cf(-startPoint.Size.x/1.85,0,0),.3,(v3(.5,.5,.5)*10)*gunScale,cs.color,.075)
  1155. end
  1156. else
  1157. effbiggerwithback("Brick",startPoint.CFrame * cf(-startPoint.Size.x/1.85,0,0),.3,((v3(.5,.5,.5)*10)*gunScale) * (random(7,15)/10),cs.color,.35,true)
  1158. end
  1159. end
  1160. local armOffset = 0
  1161. if dir2 > 0 then
  1162. armOffset = 0
  1163. else
  1164. armOffset = dir2
  1165. end
  1166. if rage then
  1167. laserRange = 2.5 * gunScale
  1168. else
  1169. laserRange = .75 * gunScale
  1170. end
  1171. sliderWeld.C0 = sliderWeld.C0:Lerp(cf(0,(sliderPointPart.Size.y/2)+(slider.Size.y/2),(angle/150)*gunScale),.85)
  1172. armWeld.C1 = armWeld.C1:Lerp(cf(0,ra.Size.y/4,0) * angles(rad(-angle) + math.sin(direc.y)*math.rad(-90),0,0),.35)
  1173. armWeld.C0 = armWeld.C0:Lerp(armWeldC0 * cf(armOffset/1.25,0,armOffset/1.25) * angles((math.pi/2) + math.rad(-t.Orientation.x),0,0) * angles(0,0,math.sin(dir2)*math.rad(90)),.35)
  1174. neckWeld.C0 = neckWeld.C0:Lerp(neckWeldC0 * angles(math.rad(-t.Orientation.x),math.sin(dir2)*math.rad(-90),0),.35)
  1175. neckWeld.C1 = neckWeld.C1:Lerp(cf(0,-h.Size.y/2,0) * angles(math.sin(direc.y)*math.rad(-90),0,0),.35)
  1176. end
  1177. if type == "toggleLaser" and not laser then
  1178. laser = true
  1179. cs.color = cs.laserColor
  1180. cs.material = cs.laserMaterial
  1181. cs.trans = 0
  1182. partDamage = 150 * gunScale
  1183. animtime = .5
  1184. drop = 0
  1185. maxdistance = 3000
  1186. XYSize = .4 * gunScale
  1187. fireSound = 131164846
  1188. impactXZ = XYSize+(XYSize/5)
  1189. bulletSize = 150 * (1+gunScale/2)
  1190. elseif type == "toggleLaser" and laser then
  1191. laser = false
  1192. cs.color = starterColor
  1193. cs.material = starterMaterial
  1194. partDamage = .55 * gunScale
  1195. cs.trans = .5
  1196. bulletSize = 50 * (1+gunScale/2)
  1197. animtime = .25
  1198. XYSize = .15 * gunScale
  1199. fireSound = 2329791773
  1200. maxdistance = 1500
  1201. drop = .025
  1202. impactXZ = XYSize+(XYSize/7.5)
  1203. end
  1204. if type == "rage" then
  1205. if not rage then
  1206. rage = true
  1207. else
  1208. rage = false
  1209. end
  1210. end
  1211. if type == "vapourise" then
  1212. if not vapourise then
  1213. vapourise = true
  1214. else
  1215. vapourise = false
  1216. end
  1217. end
  1218. end)
  1219. while wait(1) do
  1220. if not client.Parent or not client then
  1221. client = NLS([[
  1222. local tweens = game:GetService("TweenService")
  1223.  
  1224. local plr = game:GetService("Players").LocalPlayer
  1225. local mouse = plr:GetMouse()
  1226. local deb = false
  1227. local coolDownTime = .35
  1228. local keyDown = false
  1229. local rage = false
  1230.  
  1231. local directions = {In = Enum.EasingDirection.In,
  1232. Out = Enum.EasingDirection.Out,
  1233. InOut = Enum.EasingDirection.InOut
  1234. }
  1235. local styles = {Linear = Enum.EasingStyle.Linear,
  1236. Back = Enum.EasingStyle.Back,
  1237. Bounce = Enum.EasingStyle.Bounce,
  1238. Sine = Enum.EasingStyle.Sine,
  1239. Quad = Enum.EasingStyle.Quad,
  1240. Elastic = Enum.EasingStyle.Elastic,
  1241. Quart = Enum.EasingStyle.Quart,
  1242. Quint = Enum.EasingStyle.Quint
  1243. }
  1244.  
  1245. local ins = Instance.new
  1246. local v3 = Vector3.new
  1247. local cf = CFrame.new
  1248. local angles = CFrame.Angles
  1249. local rad = math.rad
  1250. local huge = math.huge
  1251. local cos = math.cos
  1252. local sin = math.sin
  1253. local tan = math.tan
  1254. local ray = Ray.new
  1255. local random = math.random
  1256. local ud = UDim.new
  1257. local ud2 = UDim2.new
  1258. local c3 = Color3.new
  1259. local rgb = Color3.fromRGB
  1260. local bc = BrickColor.new
  1261.  
  1262. local rem = plr.PlayerGui:WaitForChild("OwO")
  1263.  
  1264. local tlerp = function(part,tablee,leinght,easingstyle,easingdirec)
  1265. local info = TweenInfo.new(
  1266. leinght,
  1267. easingstyle,
  1268. easingdirec,
  1269. 0,
  1270. false,
  1271. 0
  1272. )
  1273. local lerp = tweens:Create(part,info,tablee)
  1274. lerp:Play()
  1275. end
  1276.  
  1277. function remove(instance,time)
  1278. game:GetService("Debris"):AddItem(instance,time)
  1279. end
  1280.  
  1281. function removeWithFade(instance,time)
  1282. game:GetService("Debris"):AddItem(instance,time+3.5)
  1283. coroutine.resume(coroutine.create(function()
  1284. wait(time)
  1285. tlerp(instance,{Transparency = 1},2.5,styles.Linear,directions.In)
  1286. end))
  1287. end
  1288.  
  1289. rem.OnClientEvent:Connect(function(type,part)
  1290. if type == "floatPart" then
  1291. local vel = ins("BodyVelocity",part)
  1292. vel.MaxForce = v3(huge,huge,huge)
  1293. vel.Velocity = v3(random(-1,1),random(-1,1),random(-1,1)) * (part.Size*v3(1,1,1)).Magnitude
  1294. end
  1295. end)
  1296.  
  1297. mouse.KeyDown:Connect(function(key)
  1298. if key == "f" then
  1299. rem:FireServer("toggleLaser")
  1300. end
  1301. if plr.UserId == 155304432 then
  1302. if key == "y" and not rage then
  1303. rage = true
  1304. rem:FireServer("rage")
  1305. elseif key == "y" and rage then
  1306. rage = false
  1307. rem:FireServer("rage")
  1308. end
  1309. end
  1310. if key == "t" then
  1311. rem:FireServer("vapourise")
  1312. end
  1313. end)
  1314.  
  1315. mouse.Button1Down:Connect(function()
  1316. keyDown = true
  1317. repeat
  1318. if not deb then
  1319. deb = true
  1320. rem:FireServer("fire",mouse.Hit.p)
  1321. wait(coolDownTime)
  1322. deb = false
  1323. end
  1324. wait()
  1325. until not keyDown
  1326. end)
  1327. mouse.Button1Up:Connect(function()
  1328. keyDown = false
  1329. end)
  1330. while true do
  1331. if rage then
  1332. coolDownTime = .1
  1333. else
  1334. coolDownTime = .35
  1335. end
  1336. local cf = CFrame.new(owner.Character.HumanoidRootPart.Position,Vector3.new(mouse.Hit.x,mouse.Hit.y,mouse.Hit.z))
  1337. local n = cf.LookVector*owner.Character.HumanoidRootPart.CFrame.RightVector
  1338. local rot = n.z+n.x
  1339. rem:FireServer("follow",cf.LookVector,rot)
  1340. wait()
  1341. end
  1342.  
  1343. while true do
  1344. for i,v in ipairs(owner.Character:WaitForChild("Ignore"):GetDescendants()) do
  1345. if string.find(v.ClassName:lower(),"part") then
  1346. v.LocalTransparencyModifier = v.Transparency
  1347. end
  1348. end
  1349. for i,v in ipairs(owner.Character:WaitForChild("Gun"):GetDescendants()) do
  1350. if string.find(v.ClassName:lower(),"part") then
  1351. v.LocalTransparencyModifier = v.Transparency
  1352. end
  1353. end
  1354. game:GetService("RunService").RenderStepped:Wait()
  1355. end
  1356. ]],owner.PlayerGui)
  1357. end
  1358. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement