Advertisement
lafur

Untitled

Dec 15th, 2018
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end local Scale = game.Players.LocalPlayer.Character.Torso.Size.X/2*(game.Players.LocalPlayer.Character.Torso:FindFirstChild("ScaleInserted") ~= nil and game.Players.LocalPlayer.Character.Torso:FindFirstChild("ScaleInserted").Scale.Z or 1)*0.8
  6. local Speed = 20*Scale
  7. local Gravity = 0.1
  8.  
  9. local Player = game.Players.LocalPlayer
  10. local Character = Player.Character
  11. local Humanoid = Character.Humanoid
  12. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
  13. local Torso = Character.HumanoidRootPart
  14. local Mouse = game.Players.LocalPlayer:GetMouse()
  15. local RenderStepped = game:GetService("RunService").RenderStepped
  16. local Camera = Workspace.CurrentCamera
  17. Camera:ClearAllChildren()
  18. local Model = Instance.new("Model",Character)
  19. local IgnoreList = {Character,Workspace.Terrain}
  20.  
  21. local Part0Joint = CFrame.new(Vector3.new(1,0.75,0)*Scale*1.25)
  22. local Part1Joint = CFrame.new(Vector3.new(-0.5,0.75,0)*Scale*1.25)
  23. local RotationOffset = CFrame.Angles(math.rad(90),math.rad(0),0)
  24. local Gangster = false
  25.  
  26. local Part0JointHead = CFrame.new(Vector3.new(0,1,0)*Scale*1.25)
  27. local Part1JointHead = CFrame.new(Vector3.new(0,-0.5,0)*Scale*1.25)
  28. local RotationOffsetHead = CFrame.Angles(0,0,0)
  29.  
  30. local Handle = Instance.new("Part",Model)
  31. Handle.CanCollide = false
  32. Handle.Name = "Handle"
  33. Handle.Position = Vector3.new(0,100,0)
  34. Handle:BreakJoints()
  35. Handle.FormFactor = "Custom"
  36. Handle.Size = Vector3.new(0.2,0.2,0.2)
  37. Handle.TopSurface = "SmoothNoOutlines"
  38. Handle.BottomSurface = "SmoothNoOutlines"
  39. Handle.FrontSurface = "SmoothNoOutlines"
  40. Handle.BackSurface = "SmoothNoOutlines"
  41. Handle.RightSurface = "SmoothNoOutlines"
  42. Handle.LeftSurface = "SmoothNoOutlines"
  43. Handle.BrickColor = BrickColor.new("Black")
  44. local Mesh = Instance.new("BlockMesh",Handle)
  45. Mesh.Scale = Vector3.new(0.25,1,0.4) / 0.2 * Scale
  46. local HandleWeld = Instance.new("Motor6D")
  47. HandleWeld.Part0 = Character["Right Arm"]
  48. HandleWeld.Part1 = Handle
  49. HandleWeld.C0 = CFrame.new(Vector3.new(0,-1,0)*Scale) * CFrame.Angles(math.rad(-105),0,0)
  50. HandleWeld.Parent = Handle
  51.  
  52. local Part = Instance.new("Part",Model)
  53. Part.CanCollide = false
  54. Part.Position = Vector3.new(0,100,0)
  55. Part:BreakJoints()
  56. Part.FormFactor = "Custom"
  57. Part.Size = Vector3.new(0.2,0.2,0.2)
  58. Part.TopSurface = "SmoothNoOutlines"
  59. Part.BottomSurface = "SmoothNoOutlines"
  60. Part.FrontSurface = "SmoothNoOutlines"
  61. Part.BackSurface = "SmoothNoOutlines"
  62. Part.RightSurface = "SmoothNoOutlines"
  63. Part.LeftSurface = "SmoothNoOutlines"
  64. Part.BrickColor = BrickColor.new("Black")
  65. local Mesh = Instance.new("CylinderMesh",Part)
  66. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  67. local PartWeld = Instance.new("Motor6D")
  68. PartWeld.Part0 = Handle
  69. PartWeld.Part1 = Part
  70. PartWeld.C0 = CFrame.new(Vector3.new(-0.115,-0.475,-0.190)*Scale) * CFrame.Angles(0,0,0)
  71. PartWeld.Parent = Part
  72.  
  73. local Part = Instance.new("Part",Model)
  74. Part.CanCollide = false
  75. Part.Position = Vector3.new(0,100,0)
  76. Part:BreakJoints()
  77. Part.FormFactor = "Custom"
  78. Part.Size = Vector3.new(0.2,0.2,0.2)
  79. Part.TopSurface = "SmoothNoOutlines"
  80. Part.BottomSurface = "SmoothNoOutlines"
  81. Part.FrontSurface = "SmoothNoOutlines"
  82. Part.BackSurface = "SmoothNoOutlines"
  83. Part.RightSurface = "SmoothNoOutlines"
  84. Part.LeftSurface = "SmoothNoOutlines"
  85. Part.BrickColor = BrickColor.new("Black")
  86. local Mesh = Instance.new("CylinderMesh",Part)
  87. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  88. local PartWeld = Instance.new("Motor6D")
  89. PartWeld.Part0 = Handle
  90. PartWeld.Part1 = Part
  91. PartWeld.C0 = CFrame.new(Vector3.new(0.115,-0.475,0.190)*Scale) * CFrame.Angles(0,0,0)
  92. PartWeld.Parent = Part
  93.  
  94. local Part = Instance.new("Part",Model)
  95. Part.CanCollide = false
  96. Part.Position = Vector3.new(0,100,0)
  97. Part:BreakJoints()
  98. Part.FormFactor = "Custom"
  99. Part.Size = Vector3.new(0.2,0.2,0.2)
  100. Part.TopSurface = "SmoothNoOutlines"
  101. Part.BottomSurface = "SmoothNoOutlines"
  102. Part.FrontSurface = "SmoothNoOutlines"
  103. Part.BackSurface = "SmoothNoOutlines"
  104. Part.RightSurface = "SmoothNoOutlines"
  105. Part.LeftSurface = "SmoothNoOutlines"
  106. Part.BrickColor = BrickColor.new("Black")
  107. local Mesh = Instance.new("CylinderMesh",Part)
  108. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  109. local PartWeld = Instance.new("Motor6D")
  110. PartWeld.Part0 = Handle
  111. PartWeld.Part1 = Part
  112. PartWeld.C0 = CFrame.new(Vector3.new(-0.115,-0.475,0.190)*Scale) * CFrame.Angles(0,0,0)
  113. PartWeld.Parent = Part
  114.  
  115. local Part = Instance.new("Part",Model)
  116. Part.CanCollide = false
  117. Part.Position = Vector3.new(0,100,0)
  118. Part:BreakJoints()
  119. Part.FormFactor = "Custom"
  120. Part.Size = Vector3.new(0.2,0.2,0.2)
  121. Part.TopSurface = "SmoothNoOutlines"
  122. Part.BottomSurface = "SmoothNoOutlines"
  123. Part.FrontSurface = "SmoothNoOutlines"
  124. Part.BackSurface = "SmoothNoOutlines"
  125. Part.RightSurface = "SmoothNoOutlines"
  126. Part.LeftSurface = "SmoothNoOutlines"
  127. Part.BrickColor = BrickColor.new("Black")
  128. local Mesh = Instance.new("CylinderMesh",Part)
  129. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  130. local PartWeld = Instance.new("Motor6D")
  131. PartWeld.Part0 = Handle
  132. PartWeld.Part1 = Part
  133. PartWeld.C0 = CFrame.new(Vector3.new(0.115,-0.475,-0.190)*Scale) * CFrame.Angles(0,0,0)
  134. PartWeld.Parent = Part
  135.  
  136. local Part = Instance.new("Part",Model)
  137. Part.CanCollide = false
  138. Part.Position = Vector3.new(0,100,0)
  139. Part:BreakJoints()
  140. Part.FormFactor = "Custom"
  141. Part.Size = Vector3.new(0.2,0.2,0.2)
  142. Part.TopSurface = "SmoothNoOutlines"
  143. Part.BottomSurface = "SmoothNoOutlines"
  144. Part.FrontSurface = "SmoothNoOutlines"
  145. Part.BackSurface = "SmoothNoOutlines"
  146. Part.RightSurface = "SmoothNoOutlines"
  147. Part.LeftSurface = "SmoothNoOutlines"
  148. Part.BrickColor = BrickColor.new("Black")
  149. local Mesh = Instance.new("BlockMesh",Part)
  150. Mesh.Scale = Vector3.new(0.23,0.2,0.1) / 0.2 * Scale
  151. local PartWeld = Instance.new("Motor6D")
  152. PartWeld.Part0 = Handle
  153. PartWeld.Part1 = Part
  154. PartWeld.C0 = CFrame.new(Vector3.new(0,-0.475,-0.175)*Scale) * CFrame.Angles(0,0,0)
  155. PartWeld.Parent = Part
  156.  
  157. local Part = Instance.new("Part",Model)
  158. Part.CanCollide = false
  159. Part.Position = Vector3.new(0,100,0)
  160. Part:BreakJoints()
  161. Part.FormFactor = "Custom"
  162. Part.Size = Vector3.new(0.2,0.2,0.2)
  163. Part.TopSurface = "SmoothNoOutlines"
  164. Part.BottomSurface = "SmoothNoOutlines"
  165. Part.FrontSurface = "SmoothNoOutlines"
  166. Part.BackSurface = "SmoothNoOutlines"
  167. Part.RightSurface = "SmoothNoOutlines"
  168. Part.LeftSurface = "SmoothNoOutlines"
  169. Part.BrickColor = BrickColor.new("Black")
  170. local Mesh = Instance.new("BlockMesh",Part)
  171. Mesh.Scale = Vector3.new(0.23,0.2,0.1) / 0.2 * Scale
  172. local PartWeld = Instance.new("Motor6D")
  173. PartWeld.Part0 = Handle
  174. PartWeld.Part1 = Part
  175. PartWeld.C0 = CFrame.new(Vector3.new(0,-0.475,0.175)*Scale) * CFrame.Angles(0,0,0)
  176. PartWeld.Parent = Part
  177.  
  178. local Part = Instance.new("Part",Model)
  179. Part.CanCollide = false
  180. Part.Position = Vector3.new(0,100,0)
  181. Part:BreakJoints()
  182. Part.FormFactor = "Custom"
  183. Part.Size = Vector3.new(0.2,0.2,0.2)
  184. Part.TopSurface = "SmoothNoOutlines"
  185. Part.BottomSurface = "SmoothNoOutlines"
  186. Part.FrontSurface = "SmoothNoOutlines"
  187. Part.BackSurface = "SmoothNoOutlines"
  188. Part.RightSurface = "SmoothNoOutlines"
  189. Part.LeftSurface = "SmoothNoOutlines"
  190. Part.BrickColor = BrickColor.new("Black")
  191. local Mesh = Instance.new("BlockMesh",Part)
  192. Mesh.Scale = Vector3.new(0.1,0.2,0.38) / 0.2 * Scale
  193. local PartWeld = Instance.new("Motor6D")
  194. PartWeld.Part0 = Handle
  195. PartWeld.Part1 = Part
  196. PartWeld.C0 = CFrame.new(Vector3.new(-0.1,-0.475,0)*Scale) * CFrame.Angles(0,0,0)
  197. PartWeld.Parent = Part
  198.  
  199. local Part = Instance.new("Part",Model)
  200. Part.CanCollide = false
  201. Part.Position = Vector3.new(0,100,0)
  202. Part:BreakJoints()
  203. Part.FormFactor = "Custom"
  204. Part.Size = Vector3.new(0.2,0.2,0.2)
  205. Part.TopSurface = "SmoothNoOutlines"
  206. Part.BottomSurface = "SmoothNoOutlines"
  207. Part.FrontSurface = "SmoothNoOutlines"
  208. Part.BackSurface = "SmoothNoOutlines"
  209. Part.RightSurface = "SmoothNoOutlines"
  210. Part.LeftSurface = "SmoothNoOutlines"
  211. Part.BrickColor = BrickColor.new("Black")
  212. local Mesh = Instance.new("BlockMesh",Part)
  213. Mesh.Scale = Vector3.new(0.1,0.2,0.38) / 0.2 * Scale
  214. local PartWeld = Instance.new("Motor6D")
  215. PartWeld.Part0 = Handle
  216. PartWeld.Part1 = Part
  217. PartWeld.C0 = CFrame.new(Vector3.new(0.1,-0.475,0)*Scale) * CFrame.Angles(0,0,0)
  218. PartWeld.Parent = Part
  219.  
  220. local Part = Instance.new("Part",Model)
  221. Part.CanCollide = false
  222. Part.Position = Vector3.new(0,100,0)
  223. Part:BreakJoints()
  224. Part.FormFactor = "Custom"
  225. Part.Size = Vector3.new(0.2,0.2,0.2)
  226. Part.TopSurface = "SmoothNoOutlines"
  227. Part.BottomSurface = "SmoothNoOutlines"
  228. Part.FrontSurface = "SmoothNoOutlines"
  229. Part.BackSurface = "SmoothNoOutlines"
  230. Part.RightSurface = "SmoothNoOutlines"
  231. Part.LeftSurface = "SmoothNoOutlines"
  232. Part.BrickColor = BrickColor.new("Black")
  233. local Mesh = Instance.new("BlockMesh",Part)
  234. Mesh.Scale = Vector3.new(0.1,0.3,0.05) / 0.2 * Scale
  235. local PartWeld = Instance.new("Motor6D")
  236. PartWeld.Part0 = Handle
  237. PartWeld.Part1 = Part
  238. PartWeld.C0 = CFrame.Angles(math.rad(15),0,0) * CFrame.new(Vector3.new(0,0.25,-0.75)*Scale) * CFrame.Angles(math.rad(-10),0,0)
  239. PartWeld.Parent = Part
  240.  
  241. local Part = Instance.new("Part",Model)
  242. Part.CanCollide = false
  243. Part.Position = Vector3.new(0,100,0)
  244. Part:BreakJoints()
  245. Part.FormFactor = "Custom"
  246. Part.Size = Vector3.new(0.2,0.2,0.2)
  247. Part.TopSurface = "SmoothNoOutlines"
  248. Part.BottomSurface = "SmoothNoOutlines"
  249. Part.FrontSurface = "SmoothNoOutlines"
  250. Part.BackSurface = "SmoothNoOutlines"
  251. Part.RightSurface = "SmoothNoOutlines"
  252. Part.LeftSurface = "SmoothNoOutlines"
  253. Part.BrickColor = BrickColor.new("Black")
  254. local Mesh = Instance.new("BlockMesh",Part)
  255. Mesh.Scale = Vector3.new(0.1,0.05,0.625) / 0.2 * Scale
  256. local PartWeld = Instance.new("Motor6D")
  257. PartWeld.Part0 = Handle
  258. PartWeld.Part1 = Part
  259. PartWeld.C0 = CFrame.Angles(math.rad(15),0,0) * CFrame.new(Vector3.new(0,0.1,-0.435)*Scale)
  260. PartWeld.Parent = Part
  261.  
  262. for i = 0,80,10 do
  263. local Part = Instance.new("Part",Model)
  264. Part.CanCollide = false
  265. Part.Position = Vector3.new(0,100,0)
  266. Part:BreakJoints()
  267. Part.FormFactor = "Custom"
  268. Part.Size = Vector3.new(0.2,0.2,0.2)
  269. Part.TopSurface = "SmoothNoOutlines"
  270. Part.BottomSurface = "SmoothNoOutlines"
  271. Part.FrontSurface = "SmoothNoOutlines"
  272. Part.BackSurface = "SmoothNoOutlines"
  273. Part.RightSurface = "SmoothNoOutlines"
  274. Part.LeftSurface = "SmoothNoOutlines"
  275. Part.BrickColor = BrickColor.new("Black")
  276. local Mesh = Instance.new("BlockMesh",Part)
  277. Mesh.Scale = Vector3.new(0.25,0.15,0.03555*2) / 0.2 * Scale
  278. local PartWeld = Instance.new("Motor6D")
  279. PartWeld.Part0 = Handle
  280. PartWeld.Part1 = Part
  281. PartWeld.C0 = CFrame.new(Vector3.new(0,0.15,0.315)*Scale) * CFrame.Angles(math.rad(i-65),0,0) * CFrame.new(Vector3.new(0,0.2,0)*Scale)
  282. PartWeld.Parent = Part
  283. end
  284.  
  285. local Barrel = Instance.new("Part",Model)
  286. Barrel.CanCollide = false
  287. Barrel.Position = Vector3.new(0,100,0)
  288. Barrel:BreakJoints()
  289. Barrel.FormFactor = "Custom"
  290. Barrel.Size = Vector3.new(0.2,0.2,0.2)
  291. Barrel.TopSurface = "SmoothNoOutlines"
  292. Barrel.BottomSurface = "SmoothNoOutlines"
  293. Barrel.FrontSurface = "SmoothNoOutlines"
  294. Barrel.BackSurface = "SmoothNoOutlines"
  295. Barrel.RightSurface = "SmoothNoOutlines"
  296. Barrel.LeftSurface = "SmoothNoOutlines"
  297. Barrel.BrickColor = BrickColor.new("Black")
  298. local Mesh = Instance.new("BlockMesh",Barrel)
  299. Mesh.Scale = Vector3.new(0.25,0.2,2) / 0.2 * Scale
  300. local BarrelWeld = Instance.new("Motor6D")
  301. BarrelWeld.Part0 = Handle
  302. BarrelWeld.Part1 = Barrel
  303. BarrelWeld.C0 = CFrame.Angles(math.rad(15),0,0) * CFrame.new(Vector3.new(0,0.5,-0.7)*Scale)
  304. BarrelWeld.Parent = Barrel
  305.  
  306. local Barrel1 = Barrel
  307.  
  308. local Barrel2 = Instance.new("Part",Model)
  309. Barrel2.CanCollide = false
  310. Barrel2.Position = Vector3.new(0,100,0)
  311. Barrel2:BreakJoints()
  312. Barrel2.FormFactor = "Custom"
  313. Barrel2.Size = Vector3.new(0.2,0.2,0.2)
  314. Barrel2.TopSurface = "SmoothNoOutlines"
  315. Barrel2.BottomSurface = "SmoothNoOutlines"
  316. Barrel2.FrontSurface = "SmoothNoOutlines"
  317. Barrel2.BackSurface = "SmoothNoOutlines"
  318. Barrel2.RightSurface = "SmoothNoOutlines"
  319. Barrel2.LeftSurface = "SmoothNoOutlines"
  320. Barrel2.BrickColor = BrickColor.new("Really black")
  321. local Mesh = Instance.new("BlockMesh",Barrel2)
  322. Mesh.Scale = Vector3.new(0.25,0.25,2) / 0.2 * Scale
  323. local Barrel2Weld = Instance.new("Motor6D")
  324. Barrel2Weld.Part0 = Barrel
  325. Barrel2Weld.Part1 = Barrel2
  326. Barrel2Weld.C0 = CFrame.new(Vector3.new(0,0.225,0)*Scale)
  327. Barrel2Weld.Parent = Barrel2
  328.  
  329. local RealBarrel = Instance.new("Part",Model)
  330. RealBarrel.CanCollide = false
  331. RealBarrel.Position = Vector3.new(0,100,0)
  332. RealBarrel:BreakJoints()
  333. RealBarrel.FormFactor = "Custom"
  334. RealBarrel.Size = Vector3.new(0.2,0.2,0.2)
  335. RealBarrel.TopSurface = "SmoothNoOutlines"
  336. RealBarrel.BottomSurface = "SmoothNoOutlines"
  337. RealBarrel.FrontSurface = "SmoothNoOutlines"
  338. RealBarrel.BackSurface = "SmoothNoOutlines"
  339. RealBarrel.RightSurface = "SmoothNoOutlines"
  340. RealBarrel.LeftSurface = "SmoothNoOutlines"
  341. RealBarrel.BrickColor = BrickColor.new("Dark grey metallic")
  342. local Mesh = Instance.new("CylinderMesh",RealBarrel)
  343. Mesh.Scale = Vector3.new(0.2,2,0.2) / 0.2 * Scale
  344. local RealBarrelWeld = Instance.new("Motor6D")
  345. RealBarrelWeld.Part0 = Barrel
  346. RealBarrelWeld.Part1 = RealBarrel
  347. RealBarrelWeld.C0 = CFrame.new(Vector3.new(0,0.1,-0.01)*Scale) * CFrame.Angles(math.rad(-90),0,0)
  348. RealBarrelWeld.Parent = RealBarrel
  349.  
  350. for i = 1,75,15 do
  351. local Part = Instance.new("Part",Model)
  352. Part.CanCollide = false
  353. Part.Position = Vector3.new(0,100,0)
  354. Part:BreakJoints()
  355. Part.FormFactor = "Custom"
  356. Part.Size = Vector3.new(0.2,0.2,0.2)
  357. Part.TopSurface = "SmoothNoOutlines"
  358. Part.BottomSurface = "SmoothNoOutlines"
  359. Part.FrontSurface = "SmoothNoOutlines"
  360. Part.BackSurface = "SmoothNoOutlines"
  361. Part.RightSurface = "SmoothNoOutlines"
  362. Part.LeftSurface = "SmoothNoOutlines"
  363. Part.BrickColor = BrickColor.new("Black")
  364. local Mesh = Instance.new("BlockMesh",Part)
  365. Mesh.Scale = Vector3.new(0.05,0.065,0.05) / 0.2 * Scale
  366. local PartWeld = Instance.new("Motor6D")
  367. PartWeld.Part0 = Handle
  368. PartWeld.Part1 = Part
  369. PartWeld.C0 = CFrame.new(Vector3.new(0,0.525,-0.515)*Scale) * CFrame.Angles(math.rad(i),0,0) * CFrame.new(Vector3.new(0,0,0.2)*Scale)
  370. PartWeld.Parent = Part
  371. end
  372.  
  373. local Part = Instance.new("Part",Model)
  374. Part.CanCollide = false
  375. Part.Position = Vector3.new(0,100,0)
  376. Part:BreakJoints()
  377. Part.FormFactor = "Custom"
  378. Part.Size = Vector3.new(0.2,0.2,0.2)
  379. Part.TopSurface = "SmoothNoOutlines"
  380. Part.BottomSurface = "SmoothNoOutlines"
  381. Part.FrontSurface = "SmoothNoOutlines"
  382. Part.BackSurface = "SmoothNoOutlines"
  383. Part.RightSurface = "SmoothNoOutlines"
  384. Part.LeftSurface = "SmoothNoOutlines"
  385. Part.BrickColor = BrickColor.new("Really black")
  386. local Mesh = Instance.new("BlockMesh",Part)
  387. Mesh.Scale = Vector3.new(0.05,0.11,0.1) / 0.2 * Scale
  388. local PartWeld = Instance.new("Motor6D")
  389. PartWeld.Part0 = Barrel2
  390. PartWeld.Part1 = Part
  391. PartWeld.C0 = CFrame.new(Vector3.new(0.06,0.135,0.925)*Scale)
  392. PartWeld.Parent = Part
  393.  
  394. local Part = Instance.new("Part",Model)
  395. Part.CanCollide = false
  396. Part.Position = Vector3.new(0,100,0)
  397. Part:BreakJoints()
  398. Part.FormFactor = "Custom"
  399. Part.Size = Vector3.new(0.2,0.2,0.2)
  400. Part.TopSurface = "SmoothNoOutlines"
  401. Part.BottomSurface = "SmoothNoOutlines"
  402. Part.FrontSurface = "SmoothNoOutlines"
  403. Part.BackSurface = "SmoothNoOutlines"
  404. Part.RightSurface = "SmoothNoOutlines"
  405. Part.LeftSurface = "SmoothNoOutlines"
  406. Part.BrickColor = BrickColor.new("Really black")
  407. local Mesh = Instance.new("BlockMesh",Part)
  408. Mesh.Scale = Vector3.new(0.05,0.11,0.1) / 0.2 * Scale
  409. local PartWeld = Instance.new("Motor6D")
  410. PartWeld.Part0 = Barrel2
  411. PartWeld.Part1 = Part
  412. PartWeld.C0 = CFrame.new(Vector3.new(-0.06,0.135,0.925)*Scale)
  413. PartWeld.Parent = Part
  414.  
  415. local Part = Instance.new("Part",Model)
  416. Part.CanCollide = false
  417. Part.Position = Vector3.new(0,100,0)
  418. Part:BreakJoints()
  419. Part.FormFactor = "Custom"
  420. Part.Size = Vector3.new(0.2,0.2,0.2)
  421. Part.TopSurface = "SmoothNoOutlines"
  422. Part.BottomSurface = "SmoothNoOutlines"
  423. Part.FrontSurface = "SmoothNoOutlines"
  424. Part.BackSurface = "SmoothNoOutlines"
  425. Part.RightSurface = "SmoothNoOutlines"
  426. Part.LeftSurface = "SmoothNoOutlines"
  427. Part.BrickColor = BrickColor.new("Really black")
  428. local Mesh = Instance.new("BlockMesh",Part)
  429. Mesh.Scale = Vector3.new(0.025,0.1,0.1) / 0.2 * Scale
  430. local PartWeld = Instance.new("Motor6D")
  431. PartWeld.Part0 = Barrel2
  432. PartWeld.Part1 = Part
  433. PartWeld.C0 = CFrame.new(Vector3.new(0,0.135,-0.925)*Scale)
  434. PartWeld.Parent = Part
  435.  
  436. local Part = Instance.new("Part",Model)
  437. Part.CanCollide = false
  438. Part.Position = Vector3.new(0,100,0)
  439. Part:BreakJoints()
  440. Part.FormFactor = "Custom"
  441. Part.Size = Vector3.new(0.2,0.2,0.2)
  442. Part.Transparency = 1
  443. Part.TopSurface = "SmoothNoOutlines"
  444. Part.BottomSurface = "SmoothNoOutlines"
  445. Part.FrontSurface = "SmoothNoOutlines"
  446. Part.BackSurface = "SmoothNoOutlines"
  447. Part.RightSurface = "SmoothNoOutlines"
  448. Part.LeftSurface = "SmoothNoOutlines"
  449. Part.BrickColor = BrickColor.new("Really black")
  450. local Mesh = Instance.new("BlockMesh",Part)
  451. Mesh.Scale = Vector3.new(0.1,0.1,0.1) / 0.2 * Scale
  452. local PartWeld = Instance.new("Motor6D")
  453. PartWeld.Part0 = Barrel
  454. PartWeld.Part1 = Part
  455. PartWeld.C0 = CFrame.new(Vector3.new(0,0,-5)*Scale)
  456. PartWeld.Parent = Part
  457.  
  458. local Light = Instance.new("PointLight",Part)
  459. Light.Color = BrickColor.new("Gold").Color
  460. Light.Enabled = true
  461. Light.Shadows = true
  462. Light.Brightness = 0
  463. Light.Range = 6
  464.  
  465. local Part = Instance.new("Part",Model)
  466. Part.Material = "Neon"
  467. Part.CanCollide = false
  468. Part.Position = Vector3.new(0,100,0)
  469. Part:BreakJoints()
  470. Part.FormFactor = "Custom"
  471. Part.Size = Vector3.new(0.2,0.2,0.2)
  472. Part.TopSurface = "SmoothNoOutlines"
  473. Part.BottomSurface = "SmoothNoOutlines"
  474. Part.FrontSurface = "SmoothNoOutlines"
  475. Part.BackSurface = "SmoothNoOutlines"
  476. Part.RightSurface = "SmoothNoOutlines"
  477. Part.LeftSurface = "SmoothNoOutlines"
  478. Part.BrickColor = BrickColor.new("Bright yellow")
  479. Part.Transparency = 0.25
  480. local RecoilMesh = Instance.new("SpecialMesh",Part)
  481. RecoilMesh.MeshType = "FileMesh"
  482. RecoilMesh.MeshId = "http://www.roblox.com/Asset/?id=1323306"
  483. RecoilMesh.TextureId = "http://www.roblox.com/Asset/?id=98896228"
  484. RecoilMesh.Scale = Vector3.new(0.175,0,0.175) * Scale
  485. local PartWeld = Instance.new("Motor6D")
  486. PartWeld.Part0 = RealBarrel
  487. PartWeld.Part1 = Part
  488. PartWeld.C0 = CFrame.new(Vector3.new(0,0.95,0)*Scale)
  489. PartWeld.Parent = Part
  490.  
  491. function ShootBullet(Target,barrel)
  492. local barrel = barrel or Barrel
  493. local Bullet = Instance.new("Part",Workspace)
  494. Barrel.CanCollide = false
  495. Bullet.FormFactor = "Custom"
  496. Bullet.Size = Vector3.new(0.2,0.2,5)*Scale
  497. Bullet.TopSurface = "Smooth"
  498. Bullet.BottomSurface = "Smooth"
  499. Bullet.Anchored = true
  500. Bullet.CanCollide = false
  501. Bullet.CFrame = CFrame.new((barrel.CFrame*CFrame.new(0,0,-barrel.Size.Z*barrel.Mesh.Scale.Z/2)).p,Target)*CFrame.new(0,0,-Bullet.Size.Z/2)
  502. Bullet.Transparency = 0.1
  503. Bullet.BrickColor = BrickColor.new("Gold")
  504. --[[local Mesh = Instance.new("SpecialMesh",Bullet)
  505. Mesh.MeshType = "FileMesh"
  506. Mesh.Scale = Vector3.new(0.5,0.5,0.2)
  507. Mesh.MeshId = "http://www.roblox.com/asset/?id=2697549"
  508. --Mesh.TextureId = "http://www.roblox.com/asset/?id=2697544"]]
  509. local Mesh = Instance.new("BlockMesh",Bullet)
  510. Mesh.Scale = Vector3.new(0.2,0.2,5)*Scale/Bullet.Size
  511. IgnoreList[#IgnoreList+1] = Bullet
  512. RenderStepped:wait()
  513. for i = Speed,1000,Speed do -- Loop to do the bullet movement and stuff.
  514. local ray,Hit,Pos,SurfaceNormal;
  515. ray = Ray.new(Bullet.Position,((Bullet.CFrame*CFrame.Angles(math.rad(-Gravity),0,0)*CFrame.new(0,0,-Speed)).p-Bullet.Position).unit*Speed)
  516. Hit,Pos,SurfaceNormal = Workspace:FindPartOnRayWithIgnoreList(ray,IgnoreList)
  517. Bullet.CFrame = Bullet.CFrame*CFrame.Angles(math.rad(-Gravity),0,0)*CFrame.new(0,0,-Speed)
  518. if Hit ~= nil then
  519. local Hum = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid") or (Hit.Parent.Parent.Parent ~= nil and Hit.Parent.Parent.Parent:FindFirstChild("Humanoid"))
  520. if Hum ~= nil then
  521. Hum:TakeDamage((((Gangster and math.random(99999,99999) or math.random(99999,99999))*Scale)/100)*Hum.MaxHealth)
  522. end
  523. break
  524. end
  525. RenderStepped:wait()
  526. end
  527. Bullet:Destroy()
  528. end
  529.  
  530. Mouse.Button1Down:connect(function()
  531. if not Down and not DB then
  532. Down = true
  533. while Down do
  534. if Humanoid.Health == 0 then break end
  535. if not DB then
  536. DB = true
  537. local Sound = Instance.new("Sound",Barrel)
  538. Sound.SoundId = "http://www.roblox.com/Asset/?id=165946426" -- 132373574
  539. Sound.Volume = 5*Scale
  540. Sound.Pitch = (math.random(70,110)/100)/((Scale < 0.25 and 0.25) or (Scale > 4 and 4) or Scale)
  541. Sound:Play()
  542. Spawn(function()
  543. ShootBullet(Mouse.Hit.p,Barrel1)
  544. end)
  545. RecoilMesh.VertexColor = Vector3.new(1,math.random(160,245)/255,20/255)
  546. PartWeld.C0 = PartWeld.C0 * CFrame.Angles(0,math.rad(math.random(-40,40)),0)
  547. local Shell = Instance.new("Part",Workspace)
  548. Shell.FormFactor = "Custom"
  549. Shell.BrickColor = BrickColor.new("Bright yellow")
  550. Shell.Size = Vector3.new(0.2,0.5,0.2)*Scale
  551. Shell.CFrame = Barrel.CFrame*CFrame.new(0.5,0.5,0)*CFrame.Angles(math.rad(-90),0,0)
  552. Shell.Velocity = ((Barrel.CFrame*CFrame.new(5,0,math.random(-2,2))).p-Barrel.CFrame.p)*5*Scale
  553. local Mesh = Instance.new("CylinderMesh",Shell)
  554. Mesh.Scale = Vector3.new(0.2,0.5,0.2)*Scale/Shell.Size
  555. Spawn(function()
  556. wait(5)
  557. Shell:Destroy()
  558. end)
  559. for i = 1,20,7.5 do
  560. RotationOffset = RotationOffset*CFrame.Angles(math.rad(7.5),0,0)
  561. Part1Joint = Part1Joint*CFrame.new(Vector3.new(0,-0.15,0)*Scale)
  562. Barrel2Weld.C0 = Barrel2Weld.C0*CFrame.new(Vector3.new(0,0,0.15)*Scale)
  563. Light.Brightness = Light.Brightness+38
  564. RecoilMesh.Scale = RecoilMesh.Scale+(Vector3.new(0,0.375,0)*Scale)
  565. RenderStepped:wait()
  566. end
  567. wait(0.02)
  568. for i = 1,20,3.75 do
  569. RotationOffset = RotationOffset*CFrame.Angles(math.rad(-3.75),0,0)
  570. Part1Joint = Part1Joint*CFrame.new(Vector3.new(0,0.075,0)*Scale)
  571. Barrel2Weld.C0 = Barrel2Weld.C0*CFrame.new(Vector3.new(0,0,-0.075)*Scale)
  572. Light.Brightness = Light.Brightness-19
  573. RecoilMesh.Scale = RecoilMesh.Scale+(Vector3.new(0,-0.1875,0)*Scale)
  574. RenderStepped:wait()
  575. end
  576. wait(0.02)
  577. DB = false
  578. end
  579. end
  580. end
  581. end)
  582.  
  583. Mouse.Button1Up:connect(function()
  584. Down = false
  585. end)
  586.  
  587. Mouse.KeyDown:connect(function(Key)
  588. if Key:lower() == "g" and not DB then
  589. DB = true
  590. if Gangster == true then
  591. for i = 1,70,5 do
  592. RotationOffset = RotationOffset*CFrame.Angles(0,math.rad(-5),0)
  593. RenderStepped:wait()
  594. end
  595. Gangster = false
  596. else
  597. for i = 1,70,5 do
  598. RotationOffset = RotationOffset*CFrame.Angles(0,math.rad(5),0)
  599. RenderStepped:wait()
  600. end
  601. Gangster = true
  602. end
  603. DB = false
  604. end
  605. end)
  606.  
  607. local Weld = Instance.new("Weld")
  608. Weld.Part0 = Torso
  609. Weld.Part1 = Character["Right Arm"]
  610. Weld.Parent = Torso
  611.  
  612. local Weld2 = Instance.new("Weld")
  613. Weld2.Part0 = Torso
  614. Weld2.Part1 = Character.Head
  615. Weld2.Parent = Torso
  616.  
  617. local RA = Character["Right Arm"]
  618.  
  619. game:GetService("RunService"):BindToRenderStep("Pistol",Enum.RenderPriority.Character.Value,function()
  620. local Point = Torso.CFrame:vectorToObjectSpace(Mouse.Hit.p-Torso.CFrame.p)
  621. if Point.Z > 0 then
  622. if Point.X > 0 then
  623. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(Mouse.Hit.X,Torso.Position.Y,Mouse.Hit.Z))*CFrame.Angles(0,math.rad(90),0)
  624. elseif Point.X < 0 then
  625. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(Mouse.Hit.X,Torso.Position.Y,Mouse.Hit.Z))*CFrame.Angles(0,math.rad(-90),0)
  626. end
  627. end
  628.  
  629. local CFr = (Torso.CFrame*Part0Joint):toObjectSpace(CFrame.new((Torso.CFrame*Part0Joint).p,Mouse.Hit.p))--RayEnd))
  630. Weld.C0 = Part0Joint * (CFr-CFr.p) * RotationOffset
  631. Weld.C1 = Part1Joint
  632. Weld.Part0 = Torso
  633. Weld.Part1 = RA
  634. local CFr = (Torso.CFrame*Part0JointHead):toObjectSpace(CFrame.new((Torso.CFrame*Part0JointHead).p,Mouse.Hit.p))--RayEnd))
  635. Weld2.C0 = Part0JointHead * (CFr-CFr.p) * RotationOffsetHead
  636. Weld2.C1 = Part1JointHead
  637. Weld2.Part0 = Torso
  638. Weld2.Part1 = Character.Head
  639. local Last = Scale
  640. Scale = game.Players.LocalPlayer.Character.Torso.Size.X/2*(game.Players.LocalPlayer.Character.Torso:FindFirstChild("ScaleInserted") ~= nil and game.Players.LocalPlayer.Character.Torso:FindFirstChild("ScaleInserted").Scale.Z or 1)*0.8
  641. Speed = 20*Scale
  642. if Scale ~= Last then
  643. Part0Joint = CFrame.new(Vector3.new(1,0.75,0)*Scale*1.25)
  644. Part1Joint = CFrame.new(Vector3.new(-0.5,0.75,0)*Scale*1.25)
  645. Part0JointHead = CFrame.new(Vector3.new(0,1,0)*Scale*1.25)
  646. Part1JointHead = CFrame.new(Vector3.new(0,-0.5,0)*Scale*1.25)
  647. end
  648. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement