Advertisement
vibrantsinger423

bruh

Oct 2nd, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.38 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. MeshPart1 = Instance.new("MeshPart")
  21. Sound2 = Instance.new("Sound")
  22. Script3 = Instance.new("Script")
  23. LocalScript4 = Instance.new("LocalScript")
  24. RemoteFunction5 = Instance.new("RemoteFunction")
  25. Part6 = Instance.new("Part")
  26. WeldConstraint7 = Instance.new("WeldConstraint")
  27. Script8 = Instance.new("Script")
  28. LocalScript9 = Instance.new("LocalScript")
  29. RemoteFunction10 = Instance.new("RemoteFunction")
  30. Tool0.Name = "M16"
  31. Tool0.Parent = mas
  32. Tool0.CanBeDropped = false
  33. Tool0.Grip = CFrame.new(-1, -0.100000001, 0, 0, 0, -1, -1, 0, 0, 0, 1, 0)
  34. Tool0.GripForward = Vector3.new(1, -0, -0)
  35. Tool0.GripPos = Vector3.new(-1, -0.100000001, 0)
  36. Tool0.GripRight = Vector3.new(0, -1, 0)
  37. Tool0.GripUp = Vector3.new(0, 0, 1)
  38. MeshPart1.Name = "Handle"
  39. MeshPart1.Parent = Tool0
  40. MeshPart1.CFrame = CFrame.new(-19.7733021, 1.20430827, -770.653015, -4.37113883e-08, -1, 0, -4.37113883e-08, 1.91068547e-15, 1, -1, 4.37113883e-08, -4.37113883e-08)
  41. MeshPart1.Orientation = Vector3.new(-90, 90, 0)
  42. MeshPart1.Position = Vector3.new(-19.7733021, 1.20430827, -770.653015)
  43. MeshPart1.Rotation = Vector3.new(-90, 0, 90)
  44. MeshPart1.Size = Vector3.new(7.03528309, 0.635280371, 2.32869124)
  45. MeshPart1.CanCollide = false
  46. MeshPart1.TextureID = "rbxassetid://450215258"
  47. Sound2.Name = "M16 Shot [Free]"
  48. Sound2.Parent = MeshPart1
  49. Sound2.SoundId = "rbxassetid://151997297"
  50. Script3.Name = "Handler"
  51. Script3.Parent = Tool0
  52. table.insert(cors,sandbox(Script3,function()
  53. Player = script.Parent.Parent.Parent
  54. Character=Player.Character
  55. hitev = script.Hit
  56. local mouse=Player:GetMouse()
  57.  
  58. active = false
  59.  
  60. NLS([[
  61.  
  62. ]],Player)
  63.  
  64. function rayCast(Pos, Dir, Max, Ignore)
  65. local ig = workspace.ignoreFolder:GetChildren()
  66. table.insert(ig,0,script.Parent.Handle)
  67. table.insert(ig,0,script.Parent.FirePart)
  68. return game:service("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Pos, Dir.unit * (Max or 5000)), ig)
  69. end
  70. function nooutline(part)
  71. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  72. end
  73.  
  74. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  75. local fp=Instance.new("Part")
  76. fp.formFactor=formfactor
  77. fp.Parent=parent
  78. fp.Reflectance=reflectance
  79. fp.Transparency=transparency
  80. fp.CanCollide=false
  81. fp.Locked=true
  82. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  83. fp.Name=name
  84. fp.Size=size
  85. fp.Position=Player.Character.Torso.Position
  86. nooutline(fp)
  87. fp.Material=material
  88. fp:BreakJoints()
  89. return fp
  90. end
  91.  
  92. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  93. local mesh=Instance.new(Mesh)
  94. mesh.Parent=part
  95. if Mesh=="SpecialMesh" then
  96. mesh.MeshType=meshtype
  97. mesh.MeshId=meshid
  98. end
  99. mesh.Offset=offset
  100. mesh.Scale=scale
  101. return mesh
  102. end
  103.  
  104. function swait(num)
  105. if num==0 or num==nil then
  106. game:service'RunService'.Heartbeat:wait(0)
  107. else
  108. for i=0,num do
  109. game:service'RunService'.Heartbeat:wait(0)
  110. end
  111. end
  112. end
  113.  
  114. vt=Vector3.new
  115. cf=CFrame.new
  116. euler=CFrame.fromEulerAnglesXYZ
  117. angles=CFrame.Angles
  118.  
  119. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  120. local prt=part(3,workspace.ignoreFolder,"Neon",0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  121. prt.Anchored=true
  122. prt.CFrame=cframe
  123. local msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1))
  124. game:GetService("Debris"):AddItem(prt,2)
  125. coroutine.resume(coroutine.create(function(Part,Mesh)
  126. for i=0,1,delay do
  127. swait()
  128. Part.CFrame=Part.CFrame
  129. Part.Transparency=i
  130. Part.Scale=Part.Scale+vt(x3,y3,z3)
  131. end
  132. Part.Parent=nil
  133. end),prt,msh)
  134. end
  135.  
  136.  
  137. function MagicPart(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  138. local prt=part(3,workspace.ignoreFolder,"Neon",0,0,brickcolor,"Effect",vt())
  139. prt.Anchored=true
  140. prt.CFrame=cframe
  141. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  142. game:GetService("Debris"):AddItem(prt,2)
  143. coroutine.resume(coroutine.create(function(Part,Mesh)
  144. for i=0,1,delay do
  145. swait()
  146. Part.CFrame=Part.CFrame
  147. Part.Transparency=i
  148. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  149. end
  150. Part.Parent=nil
  151. end),prt,msh)
  152. end
  153.  
  154. attack = false
  155.  
  156. function Shoot(Prt,Parent)
  157. attack=true
  158. local sfx = script.Parent.Handle["M16 Shot [Free]"]:Clone()
  159. sfx.Parent=script.Parent
  160. sfx:Play()
  161. game:GetService("Debris"):AddItem(sfx,2)
  162. local efprt=part(3,workspace.ignoreFolder,"Neon",0,0.5,BrickColor.new("Bright green"),"Effect",vt(0.2,0.2,0.2))
  163. efprt.Anchored=true
  164. local efmsh=mesh("CylinderMesh",efprt,"","",vt(0,0,0),vt(1,1,1))
  165. local spread=vt((math.random(-1,0)+math.random())*2,(math.random(-1,0)+math.random())*2,(math.random(-1,0)+math.random())*2)*((Prt.Position-hitev:InvokeClient(Player).Position).magnitude/40)
  166. coroutine.resume(coroutine.create(function(Part,Mesh,Spreaded)
  167. game:GetService("Debris"):AddItem(Part,6)
  168. local TheHit=hitev:InvokeClient(Player).Position
  169. local MouseLook=cf((Prt.Position+TheHit)/2,TheHit+Spreaded/14)
  170. local hit,pos = rayCast(Prt.Position,MouseLook.lookVector,2000,Parent)
  171. local tefprt=part(3,workspace.ignoreFolder,"Neon",0,1,BrickColor.new("Black"),"Effect",vt(0.2,0.2,0.2))
  172. tefprt.CFrame=cf(pos)
  173. game:GetService("Debris"):AddItem(tefprt,3)
  174. Part.CFrame=CFrame.new((Prt.Position+pos)/2,pos)*angles(1.57,0,0)
  175. if(hit.Parent:FindFirstChild("Enemy")~= nil)then
  176. if hit.Parent:FindFirstChild("Enemy") ~= nil and hit.Name ~= "Base" and hit.Parent.Name ~= Player.Name then
  177. hit.Parent:FindFirstChild("Enemy"):TakeDamage(4)
  178. end
  179. end
  180. local mag=(Prt.Position-pos).magnitude
  181. MagicCylinder(BrickColor.new("Bright yellow"),Part.CFrame,1,mag*5,-0.5,-0.05,0,-0.5,0.05) --really yellow
  182. end),efprt,efmsh,spread)
  183. wait(0.05)
  184. attack = false
  185. end
  186.  
  187. function Shoot3(Prt,Parent)
  188. local MainPos=Prt.Position
  189. local TheHit=hitev:InvokeClient(Player).Position
  190. local MouseLook=cf((Prt.Position+TheHit)/2,TheHit)
  191. local hit,pos = rayCast(Prt.Position,MouseLook.lookVector,2000,Parent)
  192. local MainPos=MainPos+(MouseLook.lookVector*10)
  193. --[[
  194. local bullet2 = Instance.new("Part",workspace)
  195. local bodyVel = Instance.new("BodyVelocity",bullet2)
  196.  
  197. bullet2.Size = Vector3.new(0.5, 0.5, 22.5)
  198. bullet2.Position = script.Parent.Handle.Position
  199. bullet2.CFrame = CFrame.new(script.Parent.Handle.CFrame.p,hitev:InvokeClient(Player).Position)
  200.  
  201. bodyVel.Velocity = bullet2.CFrame.LookVector * 1000
  202. ]]--
  203. local bullet = game.ReplicatedStorage.Bullet:Clone()
  204. bullet.Parent = workspace.ignoreFolder
  205. bullet.Position = script.Parent.Handle.Position
  206. bullet.CFrame = CFrame.new(script.Parent.Handle.Position,hitev:InvokeClient(Player).Position)
  207. bullet.Ignore.Value = Player.Character
  208. game:GetService("Debris"):AddItem(bullet,10)
  209. end
  210.  
  211.  
  212. script.Parent.Deactivated:Connect(function()
  213. active = false
  214. end)
  215. script.Parent.Equipped:Connect(function()
  216. local trck = Player.Character.Humanoid:LoadAnimation(game.ServerStorage.Equip16:Clone())
  217. trck:Play()
  218. wait(1.5)
  219. local trck0 = Player.Character.Humanoid:LoadAnimation(Player.Character.Idle)
  220. trck0:Play()
  221. trck0:GetMarkerReachedSignal("End"):Connect(function()
  222. print('A')
  223. trck0:Play()
  224. end)
  225. end)
  226.  
  227. script.Parent.Activated:Connect(function()
  228. if not attack then
  229. active = true
  230. repeat
  231. Shoot3(script.Parent.FirePart)
  232. until not active
  233. end
  234. end)
  235. end))
  236. Script3.Disabled = true
  237. LocalScript4.Name = "Local"
  238. LocalScript4.Parent = Script3
  239. table.insert(cors,sandbox(LocalScript4,function()
  240. q = script.Parent:WaitForChild("Hit")
  241. plr = script.Parent.Parent.Parent.Parent
  242.  
  243.  
  244. q.OnClientInvoke = function()
  245. return plr:GetMouse().Hit
  246. end
  247. end))
  248. RemoteFunction5.Name = "Hit"
  249. RemoteFunction5.Parent = Script3
  250. Part6.Name = "FirePart"
  251. Part6.Parent = Tool0
  252. Part6.CFrame = CFrame.new(-16.3010826, 1.72269416, -770.552185, 1, 0, -1.85062657e-16, 0, 1, 0, -1.85062657e-16, 0, 1)
  253. Part6.Position = Vector3.new(-16.3010826, 1.72269416, -770.552185)
  254. Part6.Color = Color3.new(0.105882, 0.164706, 0.207843)
  255. Part6.Size = Vector3.new(0.0522434749, 0.10971082, 0.0888137147)
  256. Part6.BottomSurface = Enum.SurfaceType.Smooth
  257. Part6.BrickColor = BrickColor.new("Black")
  258. Part6.CanCollide = false
  259. Part6.Material = Enum.Material.SmoothPlastic
  260. Part6.TopSurface = Enum.SurfaceType.Smooth
  261. Part6.brickColor = BrickColor.new("Black")
  262. WeldConstraint7.Parent = Part6
  263. WeldConstraint7.Part0 = Part6
  264. WeldConstraint7.Part1 = MeshPart1
  265. Script8.Name = "Handler"
  266. Script8.Parent = Tool0
  267. table.insert(cors,sandbox(Script8,function()
  268. Player = script.Parent.Parent.Parent
  269. Character=Player.Character
  270. hitev = script.Hit
  271. local mouse=Player:GetMouse()
  272.  
  273. wait(2)
  274.  
  275. hum = Player.Character:WaitForChild("Humanoid")
  276.  
  277. trck0 = hum:LoadAnimation(Player.Character.Idle0)
  278.  
  279. trck = hum:LoadAnimation(game.ServerStorage.Equip16:Clone())
  280.  
  281. active = false
  282.  
  283. function Shoot3(Prt,Parent)
  284. local bullet = game.ReplicatedStorage.Bullet:Clone()
  285. bullet.Position = script.Parent.Handle.Position
  286. bullet.CFrame = CFrame.new(script.Parent.Handle.Position,hitev:InvokeClient(Player).Position) * CFrame.new(0,0,-4)
  287. bullet.Ignore.Value = Player.Character
  288. bullet.Parent = workspace.ignoreFolder
  289. game:GetService("Debris"):AddItem(bullet,5)
  290. end
  291.  
  292. script.Parent.Deactivated:Connect(function()
  293. active = false
  294. end)
  295.  
  296. script.Parent.Equipped:Connect(function()
  297. trck:Play()
  298. wait(1.5)
  299. trck0:Play()
  300. end)
  301.  
  302. script.Parent.Unequipped:Connect(function()
  303. trck0:Stop()
  304. end)
  305.  
  306. script.Parent.Activated:Connect(function()
  307. active = true
  308. while active do
  309. Shoot3(script.Parent.FirePart)
  310. wait(0.05)
  311. end
  312. end)
  313. end))
  314. LocalScript9.Name = "Local"
  315. LocalScript9.Parent = Script8
  316. table.insert(cors,sandbox(LocalScript9,function()
  317. q = script.Parent:WaitForChild("Hit")
  318. plr = script.Parent.Parent.Parent.Parent
  319.  
  320.  
  321. q.OnClientInvoke = function()
  322. return plr:GetMouse().Hit
  323. end
  324. end))
  325. RemoteFunction10.Name = "Hit"
  326. RemoteFunction10.Parent = Script8
  327. for i,v in pairs(mas:GetChildren()) do
  328. v.Parent = game.Players.VarixDog.Backpack
  329. pcall(function() v:MakeJoints() end)
  330. end
  331. mas:Destroy()
  332. for i,v in pairs(cors) do
  333. spawn(function()
  334. pcall(v)
  335. end)
  336. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement