awzp

Revolver (not by me i just really like it)

Jun 1st, 2018
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.82 KB | None | 0 0
  1. --Revolvar u derpnobs
  2. --[[By madiik and don't even steal eet durp or i'll make an another skrept
  3. that will insult Yoo and i'll follow yoo everywhere, so don't even try nub
  4. nobs = stealarz]]--
  5. local plr = game:service'Players'.LocalPlayer
  6. local char = plr.Character
  7. local mouse = plr:GetMouse()
  8. local torso = char:findFirstChild("Torso")
  9. local head = char.Head
  10. local ra = char:findFirstChild("Right Arm")
  11. local la = char:findFirstChild("Left Arm")
  12. local rl = char:findFirstChild("Right Leg")
  13. local ll = char:findFirstChild("Left Leg")
  14. local rs = torso:findFirstChild("Right Shoulder")
  15. local ls = torso:findFirstChild("Left Shoulder")
  16. local neck = torso:findFirstChild("Neck")
  17.  
  18. local spread = -1
  19. local spread2 = 1
  20. local used = false
  21. local shootdebounce = false
  22. local sound = Instance.new("Sound", head)
  23. local ammo = 6
  24. sound.SoundId = "http://roblox.com/asset/?id=10209875"
  25. sound.Volume = 0.5
  26. local sound2 = Instance.new("Sound", head)
  27. sound2.SoundId = "http://roblox.com/asset/?id=10209590"
  28. sound2.Volume = 1
  29. local Screen = Instance.new("ScreenGui", plr:findFirstChild("PlayerGui"))
  30. local TextBox = Instance.new("TextLabel", Screen)
  31. TextBox.Position = UDim2.new(0.1, 0, 0.95, 0)
  32. TextBox.Size = UDim2.new(0, 200, 0.05, 0)
  33. TextBox.BackgroundTransparency = 1
  34. game:service'RunService'.Stepped:connect(function()
  35. TextBox.Text = ("Ammo: "..ammo)
  36. end)
  37. TextBox.Font = "SourceSansBold"
  38. TextBox.TextColor3 = Color3.new(1, 1, 1)
  39. TextBox.FontSize = "Size36"
  40. TextBox.TextStrokeTransparency = 0
  41. TextBox.BackgroundColor = BrickColor.new("Navy blue")
  42. pcall(function()
  43. char:findFirstChild("REVOLVER24/7"):Destroy()
  44. end)
  45. local main = Instance.new("Model", char)
  46. main.Name = "REVOLVER24/7"
  47. function part(parent, size, formfactor, color, collide, transparency)
  48. local p=Instance.new("Part", parent)
  49. p.FormFactor=formfactor
  50. p.CanCollide=false
  51. p.Size=size
  52. p.Locked=true
  53. p.Transparency=transparency
  54. p.Position=torso.Position
  55. p.BrickColor=color
  56. p.FrontSurface="SmoothNoOutlines"
  57. p.BackSurface="SmoothNoOutlines"
  58. p.LeftSurface="SmoothNoOutlines"
  59. p.BottomSurface="SmoothNoOutlines"
  60. p.TopSurface="SmoothNoOutlines"
  61. p.RightSurface="SmoothNoOutlines"
  62. return p
  63. end
  64. function wedge(parent, size, formfactor, color, collide)
  65. local p=Instance.new("Wedge", parent)
  66. p.FormFactor=formfactor
  67. p.CanCollide=false
  68. p.Size=size
  69. p.Locked=true
  70. p.Position = torso.Position
  71. p.BrickColor=color
  72. p.FrontSurface="SmoothNoOutlines"
  73. p.BackSurface="SmoothNoOutlines"
  74. p.LeftSurface="SmoothNoOutlines"
  75. p.BottomSurface="SmoothNoOutlines"
  76. p.TopSurface="SmoothNoOutlines"
  77. p.RightSurface="SmoothNoOutlines"
  78. return p
  79. end
  80. function weld(c0, c1, part1, part0)
  81. local wel=Instance.new("Weld", main)
  82. wel.Part0 = part0
  83. wel.Part1 = part1
  84. wel.C0 = c0
  85. wel.C1 = c1
  86. return wel
  87. end
  88. function specialmesh(parent, meshType, scale, meshId, texture)
  89. local mesh = Instance.new("SpecialMesh", parent)
  90. mesh.Scale = scale
  91. mesh.MeshType = meshType
  92. mesh.MeshId = meshId
  93. mesh.TextureId = texture
  94. return mesh
  95. end
  96.  
  97.  
  98. local p = part(main, Vector3.new(0.3, 0.9, 0.3), "Custom", BrickColor.Black(), false, 0)
  99. local w = weld(CFrame.new(0, -.2, 0.9) * CFrame.Angles(math.rad(105), 0, 0), CFrame.new(), ra, p)
  100. local p1 = part(main, Vector3.new(0.3, 0.5, 0.3), "Custom", BrickColor.Black(), false, 0)
  101. local w1 = weld(CFrame.new(0, -.4, -.1) * CFrame.Angles(math.rad(30), 0, 0), CFrame.new(), p, p1)
  102. local p2 = part(main, Vector3.new(0.2, 1, 0.4), "Custom", BrickColor.Gray(), false, 0)
  103. local w2 = weld(CFrame.new(0, -.2, 0.9) * CFrame.Angles(math.rad(105), 0, 0), CFrame.new(), ra, p2)
  104. local p3 = part(main, Vector3.new(0.2, 0.6, 0.4), "Custom", BrickColor.Gray(), false, 0)
  105. local w3 = weld(CFrame.new(0, -.4, -.1) * CFrame.Angles(math.rad(30), 0, 0), CFrame.new(), p2, p3)
  106. local p4 = part(main, Vector3.new(0.205, 1.2, 0.3), "Custom", BrickColor.Gray(), false, 0)
  107. local w4 = weld(CFrame.new(0, 1.65, 0.55), CFrame.new(), ra, p4)
  108. local p5 = part(main, Vector3.new(0.2, 1.2, 0.2), "Custom", BrickColor.Gray(), false, 0)
  109. local w5 = weld(CFrame.new(0, 0.05, 0.1), CFrame.new(), p4, p5)
  110. local p6 = part(main, Vector3.new(0.2, 1.2, 0.2), "Custom", BrickColor.Black(), false, 0)
  111. Instance.new("CylinderMesh", p6).Scale = Vector3.new(0.5, 1, 0.5)
  112. local w6 = weld(CFrame.new(0, 0.002, 0.02), CFrame.new(), p5, p6)
  113. local p7 = part(main, Vector3.new(0.34, 0.37, 0.34), "Custom", BrickColor.Gray(), false, 0)
  114. local p7mesh = Instance.new("CylinderMesh", p7)
  115. local w7 = weld(CFrame.new(0, 0, 0), CFrame.new(), p6, p7)
  116. local p8 = part(main, Vector3.new(0.2, 1.2, 0.2), "Custom", BrickColor.Gray(), false, 0)
  117. local p8mesh = Instance.new("CylinderMesh", p8)
  118. local w8 = weld(CFrame.new(0, -0.01, 0.05), CFrame.new(), p6, p8)
  119.  
  120.  
  121. function equip()
  122. ar = Instance.new("Part", main)
  123. ar.FormFactor = "Custom"
  124. ar.Size = Vector3.new(1, 1, 1)
  125. ar.Transparency = 1
  126. ar.CanCollide = false
  127. ar.Locked = true
  128. ar:breakJoints()
  129.  
  130.  
  131. fakel = Instance.new("Weld", main)
  132. fakel.Part0 = char.Torso
  133. fakel.Part1 = ar
  134. fakel.C0 = CFrame.new(1.5, 0.5, 0)
  135. welditbro = Instance.new("Weld", main)
  136. welditbro.C0 = CFrame.new(0, 0.5, 0)
  137. welditbro.Part0 = ra
  138. welditbro.Part1 = ar
  139.  
  140. coroutine.wrap(function()
  141. for angle = 0, 70, 10 do
  142. neck.C0 = neck.C0 * CFrame.Angles(0, 0, -math.rad(10))
  143. wait()
  144. end
  145. end)()
  146. coroutine.wrap(function()
  147. for i = 0, 90, 10 do
  148. fakel.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(i), 0, math.rad(i))
  149. wait()
  150. end
  151. end)()
  152.  
  153. bg2 = Instance.new("BodyGyro", torso)
  154. bg2.P = 9999
  155. bg2.D = 2000
  156. bg2.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  157.  
  158. for i = 0, 90, 10 do
  159. bg2.cframe = CFrame.new(torso.Position,Vector3.new(mouse.hit.p.x,torso.Position.y,mouse.hit.p.z)) * CFrame.Angles(0, math.rad(i), 0)
  160. wait()
  161. end
  162. coroutine.wrap(function()
  163. while used do
  164. bg2.cframe = CFrame.new(torso.Position,Vector3.new(mouse.hit.p.x,torso.Position.y,mouse.hit.p.z)) * CFrame.Angles(0, math.rad(90), 0)
  165. game:service'RunService'.Stepped:wait()
  166. end
  167. end)()
  168. debounce = false
  169. end
  170.  
  171.  
  172. function reload()
  173. if not used then return end
  174. local ar2 = Instance.new("Part", main)
  175. ar2.FormFactor = "Custom"
  176. ar2.Size = Vector3.new(1, 1, 1)
  177. ar2.Transparency = 1
  178. ar2.CanCollide = false
  179. ar2.Locked = true
  180. ar2:breakJoints()
  181.  
  182.  
  183. local fakel2 = Instance.new("Weld", main)
  184. fakel2.Part0 = char.Torso
  185. fakel2.Part1 = ar2
  186. fakel2.C0 = CFrame.new(-1.5, 0.5, 0)
  187. local welditbro2 = Instance.new("Weld", main)
  188. welditbro2.C0 = CFrame.new(0, 0.5, 0)
  189. welditbro2.Part0 = la
  190. welditbro2.Part1 = ar2
  191.  
  192. coroutine.wrap(function()
  193. for angle = 0, 70, 10 do
  194. neck.C0 = neck.C0 * CFrame.Angles(0, 0, math.rad(10))
  195. wait()
  196. end
  197. for angle = 0, 70, 10 do
  198. neck.C0 = neck.C0 * CFrame.Angles(math.rad(5), 0, 0)
  199. wait()
  200. end
  201. end)()
  202. coroutine.wrap(function()
  203. for angle = 90, -60, -10 do
  204. fakel.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(angle + 80), 0, math.rad(angle))
  205. wait()
  206. end
  207. end)()
  208. for angle = 0, 60, 10 do
  209. fakel2.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(angle), 0, math.rad(angle))
  210. wait()
  211. end
  212. wait(2)
  213. ammo = 6
  214. coroutine.wrap(function()
  215. for angle = -60, 90, 10 do
  216. fakel.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(angle + 80), 0, math.rad(angle))
  217. wait()
  218. end
  219. fakel.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90), 0, math.rad(90))
  220. end)()
  221. coroutine.wrap(function()
  222. for angle = 0, 70, 10 do
  223. neck.C0 = neck.C0 * CFrame.Angles(-math.rad(5), 0, 0)
  224. wait()
  225. end
  226. for angle = 0, 70, 10 do
  227. neck.C0 = neck.C0 * CFrame.Angles(0, 0,-math.rad(10))
  228. wait()
  229. end
  230. end)()
  231. for angle = 60, 0, -10 do
  232. fakel2.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(angle), 0, math.rad(angle))
  233. wait()
  234. end
  235. pcall(function()
  236. ar2:Destroy()
  237. fakel2:Destory()
  238. welditbro2:Destroy()
  239. end)
  240. shootdebounce = false
  241.  
  242. end
  243. function unequip()
  244. coroutine.wrap(function()
  245. for angle = 0, 70, 10 do
  246. neck.C0 = neck.C0 * CFrame.Angles(0, 0, math.rad(10))
  247. wait()
  248. end
  249. end)()
  250. coroutine.wrap(function()
  251. for i = 90, 0, -10 do
  252. fakel.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(i), 0, math.rad(i))
  253. wait()
  254. end
  255. end)()
  256. for i = 90, 0, -10 do
  257. bg2.cframe = CFrame.new(torso.Position,Vector3.new(mouse.hit.p.x,torso.Position.y,mouse.hit.p.z)) * CFrame.Angles(0, math.rad(i), 0)
  258. wait()
  259. end
  260. pcall(function()
  261. bg2:Destroy()
  262. fakel:Destroy()
  263. welditbro:Destroy()
  264. ar:Destroy()
  265. end)
  266. end
  267.  
  268.  
  269. mouse.KeyDown:connect(function(key)
  270. if key == "q" then
  271. if shootdebounce then return end
  272. if debounce then return end
  273. used = not used
  274. if used then
  275. debounce = true
  276. equip()
  277. else
  278. debounce = true
  279. used = false
  280. unequip()
  281. debounce = false
  282. end
  283.  
  284. end
  285. if key == "r" then
  286. if shootdebounce then return end
  287. if debounce then return end
  288. if not used then return end
  289. shootdebounce = true
  290. reload()
  291. end
  292. end)
  293.  
  294.  
  295. mouse.Button1Down:connect(function(mouse)
  296. if not used then return end
  297. if shootdebounce then return end
  298. if ammo < 1 then sound2:play() return end
  299. if debounce then return end
  300. shootdebounce = true
  301. coroutine.wrap(function()
  302. sound:play()
  303.  
  304. ammo = ammo - 1
  305. local muz = part(main, Vector3.new(0.8, 1.2, 0.8), "Custom", BrickColor.Yellow(), false, 0)
  306. muz.Transparency = 0.2
  307. specialmesh(muz, "Sphere", Vector3.new(1, 1, 1), "", "")
  308. local localweld = weld(CFrame.new(0, 1.2, 0), CFrame.new(), p5, muz)
  309. local muzflash = Instance.new("PointLight", muz)
  310. muzflash.Color = Color3.new(1, 1, 0)
  311. muzflash.Range = 19
  312.  
  313. pcall(function()
  314. local ray = Ray.new(muz.CFrame.p, ((plr:GetMouse().Hit.p + Vector3.new(math.random(spread,spread2), math.random(spread,spread2), math.random(spread,spread2))/4) - muz.CFrame.p).unit*1000)
  315. local hit, position = game.Workspace:FindPartOnRay(ray, char)
  316.  
  317.  
  318. --do damage to any humanoids hit
  319. pcall(function()
  320.  
  321. if hit.Parent:IsA("Hat") then
  322. hit.Parent.Parent:findFirstChild("Humanoid"):TakeDamage(30)
  323. end
  324. if hit:IsA("Part") and hit.Name == "Head" then
  325. hit.Parent:findFirstChild("Humanoid"):TakeDamage(50)
  326. end
  327.  
  328. if hit:IsA("Part") and hit.Name == "Torso" then
  329. coroutine.wrap(function()
  330. local restored = hit.Parent:findFirstChild("Humanoid").WalkSpeed
  331. hit.Parent:findFirstChild("Humanoid"):TakeDamage(30)
  332. hit.Parent:findFirstChild("Humanoid").PlatformStand = true
  333. wait(1)
  334. hit.Parent:findFirstChild("Humanoid").WalkSpeed = 4
  335. hit.Parent:findFirstChild("Humanoid").PlatformStand = false
  336. wait(8)
  337. hit.Parent:findFirstChild("Humanoid").WalkSpeed = restored
  338. end)()
  339. end
  340.  
  341. if hit:IsA("Part") and hit.Name == "Left Leg" or hit.Name == "Right Leg" then
  342. hit.Parent:findFirstChild("Humanoid"):TakeDamage(10)
  343. hit.Parent:findFirstChild("Humanoid").WalkSpeed = hit.Parent:findFirstChild("Humanoid").WalkSpeed - 1
  344. end
  345. if hit:IsA("Part") and hit.Name == "Left Arm" or hit.Name == "Right Arm" then
  346. hit.Parent:findFirstChild("Humanoid"):TakeDamage(10)
  347. hit.Parent:findFirstChild("Humanoid").WalkSpeed = hit.Parent:findFirstChild("Humanoid").WalkSpeed - 0.2
  348. end
  349. end)
  350.  
  351. --draw the ray
  352.  
  353. local distance = (position - muz.CFrame.p).magnitude
  354. local rayPart = Instance.new("Part", char)
  355. rayPart.Name = "RayPart"
  356. rayPart.BrickColor = BrickColor.new("White")
  357. rayPart.Transparency = 0
  358. rayPart.Anchored = true
  359. rayPart.CanCollide = false
  360.  
  361. rayPart.TopSurface = Enum.SurfaceType.Smooth
  362. rayPart.BottomSurface = Enum.SurfaceType.Smooth
  363. rayPart.formFactor = Enum.FormFactor.Custom
  364. rayPart.Size = Vector3.new(0.2, distance, 0.2)
  365. Instance.new("CylinderMesh", rayPart)
  366. rayPart.CFrame = CFrame.new(position, muz.CFrame.p) * CFrame.new(0, 0, -distance/2) * CFrame.Angles(math.pi/2, 0, 0)
  367.  
  368.  
  369. coroutine.wrap(function()
  370. for i = 0, 30 do
  371. if rayPart == nil then return end
  372. rayPart.Transparency = rayPart.Transparency + 0.1
  373. if muz == nil then return end
  374. muz.Transparency = muz.Transparency + 0.2
  375. wait()
  376. end
  377. end)()
  378. end)
  379. wait(0.05)
  380. muz:Destroy()
  381. localweld:Destroy()
  382. game:service'Debris':AddItem(rayPart, 0)
  383. end)()
  384. for i = 0, 30, 15 do
  385. fakel.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(i), math.rad(90))
  386. wait()
  387. end
  388. wait()
  389. for i = 30, 0, -10 do
  390. fakel.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(i), math.rad(90))
  391. wait()
  392. end
  393. shootdebounce = false
  394.  
  395. end)
Add Comment
Please, Sign In to add comment