Advertisement
Abejaron23

Untitled

May 25th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.51 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  2.  
  3. -----------------------------------------------------
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Mokiros | Showcase by Bacon Hair!")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147.  
  148. 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 5)*0.8
  149. local Speed = 20*Scale
  150. local Gravity = 0.1
  151.  
  152. local Player = game.Players.LocalPlayer
  153. local Character = Player.Character
  154. local Humanoid = Character.Humanoid
  155. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
  156. local Torso = Character.HumanoidRootPart
  157. local Mouse = game.Players.LocalPlayer:GetMouse()
  158. local RenderStepped = game:GetService("RunService").RenderStepped
  159. local Camera = Workspace.CurrentCamera
  160. Camera:ClearAllChildren()
  161. local Model = Instance.new("Model",Character)
  162. local IgnoreList = {Character,Workspace.Terrain}
  163.  
  164. local Part0Joint = CFrame.new(Vector3.new(1,0.75,0)*Scale*1.25)
  165. local Part1Joint = CFrame.new(Vector3.new(-0.5,0.75,0)*Scale*1.25)
  166. local RotationOffset = CFrame.Angles(math.rad(90),math.rad(0),0)
  167. local Gangster = false
  168.  
  169. local Part0JointHead = CFrame.new(Vector3.new(0,1,0)*Scale*1.25)
  170. local Part1JointHead = CFrame.new(Vector3.new(0,-0.5,0)*Scale*1.25)
  171. local RotationOffsetHead = CFrame.Angles(0,0,0)
  172.  
  173. local Handle = Instance.new("Part",Model)
  174. Handle.CanCollide = false
  175. Handle.Name = "Handle"
  176. Handle.Position = Vector3.new(0,100,0)
  177. Handle:BreakJoints()
  178. Handle.FormFactor = "Custom"
  179. Handle.Size = Vector3.new(0.2,0.2,0.2)
  180. Handle.TopSurface = "SmoothNoOutlines"
  181. Handle.BottomSurface = "SmoothNoOutlines"
  182. Handle.FrontSurface = "SmoothNoOutlines"
  183. Handle.BackSurface = "SmoothNoOutlines"
  184. Handle.RightSurface = "SmoothNoOutlines"
  185. Handle.LeftSurface = "SmoothNoOutlines"
  186. Handle.BrickColor = BrickColor.new("Black")
  187. local Mesh = Instance.new("BlockMesh",Handle)
  188. Mesh.Scale = Vector3.new(0.25,1,0.4) / 0.2 * Scale
  189. local HandleWeld = Instance.new("Motor6D")
  190. HandleWeld.Part0 = Character["Right Arm"]
  191. HandleWeld.Part1 = Handle
  192. HandleWeld.C0 = CFrame.new(Vector3.new(0,-0.4,0)*Scale) * CFrame.Angles(math.rad(-105),0,0)
  193. HandleWeld.Parent = Handle
  194.  
  195. local Part = Instance.new("Part",Model)
  196. Part.CanCollide = false
  197. Part.Position = Vector3.new(0,100,0)
  198. Part:BreakJoints()
  199. Part.FormFactor = "Custom"
  200. Part.Size = Vector3.new(0.2,0.2,0.2)
  201. Part.TopSurface = "SmoothNoOutlines"
  202. Part.BottomSurface = "SmoothNoOutlines"
  203. Part.FrontSurface = "SmoothNoOutlines"
  204. Part.BackSurface = "SmoothNoOutlines"
  205. Part.RightSurface = "SmoothNoOutlines"
  206. Part.LeftSurface = "SmoothNoOutlines"
  207. Part.BrickColor = BrickColor.new("Black")
  208. local Mesh = Instance.new("CylinderMesh",Part)
  209. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  210. local PartWeld = Instance.new("Motor6D")
  211. PartWeld.Part0 = Handle
  212. PartWeld.Part1 = Part
  213. PartWeld.C0 = CFrame.new(Vector3.new(-0.115,-0.475,-0.190)*Scale) * CFrame.Angles(0,0,0)
  214. PartWeld.Parent = Part
  215.  
  216. local Part = Instance.new("Part",Model)
  217. Part.CanCollide = false
  218. Part.Position = Vector3.new(0,100,0)
  219. Part:BreakJoints()
  220. Part.FormFactor = "Custom"
  221. Part.Size = Vector3.new(0.2,0.2,0.2)
  222. Part.TopSurface = "SmoothNoOutlines"
  223. Part.BottomSurface = "SmoothNoOutlines"
  224. Part.FrontSurface = "SmoothNoOutlines"
  225. Part.BackSurface = "SmoothNoOutlines"
  226. Part.RightSurface = "SmoothNoOutlines"
  227. Part.LeftSurface = "SmoothNoOutlines"
  228. Part.BrickColor = BrickColor.new("Black")
  229. local Mesh = Instance.new("CylinderMesh",Part)
  230. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  231. local PartWeld = Instance.new("Motor6D")
  232. PartWeld.Part0 = Handle
  233. PartWeld.Part1 = Part
  234. PartWeld.C0 = CFrame.new(Vector3.new(0.115,-0.475,0.190)*Scale) * CFrame.Angles(0,0,0)
  235. PartWeld.Parent = Part
  236.  
  237. local Part = Instance.new("Part",Model)
  238. Part.CanCollide = false
  239. Part.Position = Vector3.new(0,100,0)
  240. Part:BreakJoints()
  241. Part.FormFactor = "Custom"
  242. Part.Size = Vector3.new(0.2,0.2,0.2)
  243. Part.TopSurface = "SmoothNoOutlines"
  244. Part.BottomSurface = "SmoothNoOutlines"
  245. Part.FrontSurface = "SmoothNoOutlines"
  246. Part.BackSurface = "SmoothNoOutlines"
  247. Part.RightSurface = "SmoothNoOutlines"
  248. Part.LeftSurface = "SmoothNoOutlines"
  249. Part.BrickColor = BrickColor.new("Black")
  250. local Mesh = Instance.new("CylinderMesh",Part)
  251. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  252. local PartWeld = Instance.new("Motor6D")
  253. PartWeld.Part0 = Handle
  254. PartWeld.Part1 = Part
  255. PartWeld.C0 = CFrame.new(Vector3.new(-0.115,-0.475,0.190)*Scale) * CFrame.Angles(0,0,0)
  256. PartWeld.Parent = Part
  257.  
  258. local Part = Instance.new("Part",Model)
  259. Part.CanCollide = false
  260. Part.Position = Vector3.new(0,100,0)
  261. Part:BreakJoints()
  262. Part.FormFactor = "Custom"
  263. Part.Size = Vector3.new(0.2,0.2,0.2)
  264. Part.TopSurface = "SmoothNoOutlines"
  265. Part.BottomSurface = "SmoothNoOutlines"
  266. Part.FrontSurface = "SmoothNoOutlines"
  267. Part.BackSurface = "SmoothNoOutlines"
  268. Part.RightSurface = "SmoothNoOutlines"
  269. Part.LeftSurface = "SmoothNoOutlines"
  270. Part.BrickColor = BrickColor.new("Black")
  271. local Mesh = Instance.new("CylinderMesh",Part)
  272. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  273. local PartWeld = Instance.new("Motor6D")
  274. PartWeld.Part0 = Handle
  275. PartWeld.Part1 = Part
  276. PartWeld.C0 = CFrame.new(Vector3.new(0.115,-0.475,-0.190)*Scale) * CFrame.Angles(0,0,0)
  277. PartWeld.Parent = Part
  278.  
  279. local Part = Instance.new("Part",Model)
  280. Part.CanCollide = false
  281. Part.Position = Vector3.new(0,100,0)
  282. Part:BreakJoints()
  283. Part.FormFactor = "Custom"
  284. Part.Size = Vector3.new(0.2,0.2,0.2)
  285. Part.TopSurface = "SmoothNoOutlines"
  286. Part.BottomSurface = "SmoothNoOutlines"
  287. Part.FrontSurface = "SmoothNoOutlines"
  288. Part.BackSurface = "SmoothNoOutlines"
  289. Part.RightSurface = "SmoothNoOutlines"
  290. Part.LeftSurface = "SmoothNoOutlines"
  291. Part.BrickColor = BrickColor.new("Black")
  292. local Mesh = Instance.new("BlockMesh",Part)
  293. Mesh.Scale = Vector3.new(0.23,0.2,0.1) / 0.2 * Scale
  294. local PartWeld = Instance.new("Motor6D")
  295. PartWeld.Part0 = Handle
  296. PartWeld.Part1 = Part
  297. PartWeld.C0 = CFrame.new(Vector3.new(0,-0.475,-0.175)*Scale) * CFrame.Angles(0,0,0)
  298. PartWeld.Parent = Part
  299.  
  300. local Part = Instance.new("Part",Model)
  301. Part.CanCollide = false
  302. Part.Position = Vector3.new(0,100,0)
  303. Part:BreakJoints()
  304. Part.FormFactor = "Custom"
  305. Part.Size = Vector3.new(0.2,0.2,0.2)
  306. Part.TopSurface = "SmoothNoOutlines"
  307. Part.BottomSurface = "SmoothNoOutlines"
  308. Part.FrontSurface = "SmoothNoOutlines"
  309. Part.BackSurface = "SmoothNoOutlines"
  310. Part.RightSurface = "SmoothNoOutlines"
  311. Part.LeftSurface = "SmoothNoOutlines"
  312. Part.BrickColor = BrickColor.new("Black")
  313. local Mesh = Instance.new("BlockMesh",Part)
  314. Mesh.Scale = Vector3.new(0.23,0.2,0.1) / 0.2 * Scale
  315. local PartWeld = Instance.new("Motor6D")
  316. PartWeld.Part0 = Handle
  317. PartWeld.Part1 = Part
  318. PartWeld.C0 = CFrame.new(Vector3.new(0,-0.475,0.175)*Scale) * CFrame.Angles(0,0,0)
  319. PartWeld.Parent = Part
  320.  
  321. local Part = Instance.new("Part",Model)
  322. Part.CanCollide = false
  323. Part.Position = Vector3.new(0,100,0)
  324. Part:BreakJoints()
  325. Part.FormFactor = "Custom"
  326. Part.Size = Vector3.new(0.2,0.2,0.2)
  327. Part.TopSurface = "SmoothNoOutlines"
  328. Part.BottomSurface = "SmoothNoOutlines"
  329. Part.FrontSurface = "SmoothNoOutlines"
  330. Part.BackSurface = "SmoothNoOutlines"
  331. Part.RightSurface = "SmoothNoOutlines"
  332. Part.LeftSurface = "SmoothNoOutlines"
  333. Part.BrickColor = BrickColor.new("Black")
  334. local Mesh = Instance.new("BlockMesh",Part)
  335. Mesh.Scale = Vector3.new(0.1,0.2,0.38) / 0.2 * Scale
  336. local PartWeld = Instance.new("Motor6D")
  337. PartWeld.Part0 = Handle
  338. PartWeld.Part1 = Part
  339. PartWeld.C0 = CFrame.new(Vector3.new(-0.1,-0.475,0)*Scale) * CFrame.Angles(0,0,0)
  340. PartWeld.Parent = Part
  341.  
  342. local Part = Instance.new("Part",Model)
  343. Part.CanCollide = false
  344. Part.Position = Vector3.new(0,100,0)
  345. Part:BreakJoints()
  346. Part.FormFactor = "Custom"
  347. Part.Size = Vector3.new(0.2,0.2,0.2)
  348. Part.TopSurface = "SmoothNoOutlines"
  349. Part.BottomSurface = "SmoothNoOutlines"
  350. Part.FrontSurface = "SmoothNoOutlines"
  351. Part.BackSurface = "SmoothNoOutlines"
  352. Part.RightSurface = "SmoothNoOutlines"
  353. Part.LeftSurface = "SmoothNoOutlines"
  354. Part.BrickColor = BrickColor.new("Black")
  355. local Mesh = Instance.new("BlockMesh",Part)
  356. Mesh.Scale = Vector3.new(0.1,0.2,0.38) / 0.2 * Scale
  357. local PartWeld = Instance.new("Motor6D")
  358. PartWeld.Part0 = Handle
  359. PartWeld.Part1 = Part
  360. PartWeld.C0 = CFrame.new(Vector3.new(0.1,-0.475,0)*Scale) * CFrame.Angles(0,0,0)
  361. PartWeld.Parent = Part
  362.  
  363. local Part = Instance.new("Part",Model)
  364. Part.CanCollide = false
  365. Part.Position = Vector3.new(0,100,0)
  366. Part:BreakJoints()
  367. Part.FormFactor = "Custom"
  368. Part.Size = Vector3.new(0.2,0.2,0.2)
  369. Part.TopSurface = "SmoothNoOutlines"
  370. Part.BottomSurface = "SmoothNoOutlines"
  371. Part.FrontSurface = "SmoothNoOutlines"
  372. Part.BackSurface = "SmoothNoOutlines"
  373. Part.RightSurface = "SmoothNoOutlines"
  374. Part.LeftSurface = "SmoothNoOutlines"
  375. Part.BrickColor = BrickColor.new("Black")
  376. local Mesh = Instance.new("BlockMesh",Part)
  377. Mesh.Scale = Vector3.new(0.1,0.3,0.05) / 0.2 * Scale
  378. local PartWeld = Instance.new("Motor6D")
  379. PartWeld.Part0 = Handle
  380. PartWeld.Part1 = Part
  381. 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)
  382. PartWeld.Parent = Part
  383.  
  384. local Part = Instance.new("Part",Model)
  385. Part.CanCollide = false
  386. Part.Position = Vector3.new(0,100,0)
  387. Part:BreakJoints()
  388. Part.FormFactor = "Custom"
  389. Part.Size = Vector3.new(0.2,0.2,0.2)
  390. Part.TopSurface = "SmoothNoOutlines"
  391. Part.BottomSurface = "SmoothNoOutlines"
  392. Part.FrontSurface = "SmoothNoOutlines"
  393. Part.BackSurface = "SmoothNoOutlines"
  394. Part.RightSurface = "SmoothNoOutlines"
  395. Part.LeftSurface = "SmoothNoOutlines"
  396. Part.BrickColor = BrickColor.new("Black")
  397. local Mesh = Instance.new("BlockMesh",Part)
  398. Mesh.Scale = Vector3.new(0.1,0.05,0.625) / 0.2 * Scale
  399. local PartWeld = Instance.new("Motor6D")
  400. PartWeld.Part0 = Handle
  401. PartWeld.Part1 = Part
  402. PartWeld.C0 = CFrame.Angles(math.rad(15),0,0) * CFrame.new(Vector3.new(0,0.1,-0.435)*Scale)
  403. PartWeld.Parent = Part
  404.  
  405. for i = 0,80,10 do
  406. local Part = Instance.new("Part",Model)
  407. Part.CanCollide = false
  408. Part.Position = Vector3.new(0,100,0)
  409. Part:BreakJoints()
  410. Part.FormFactor = "Custom"
  411. Part.Size = Vector3.new(0.2,0.2,0.2)
  412. Part.TopSurface = "SmoothNoOutlines"
  413. Part.BottomSurface = "SmoothNoOutlines"
  414. Part.FrontSurface = "SmoothNoOutlines"
  415. Part.BackSurface = "SmoothNoOutlines"
  416. Part.RightSurface = "SmoothNoOutlines"
  417. Part.LeftSurface = "SmoothNoOutlines"
  418. Part.BrickColor = BrickColor.new("Black")
  419. local Mesh = Instance.new("BlockMesh",Part)
  420. Mesh.Scale = Vector3.new(0.25,0.15,0.03555*2) / 0.2 * Scale
  421. local PartWeld = Instance.new("Motor6D")
  422. PartWeld.Part0 = Handle
  423. PartWeld.Part1 = Part
  424. 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)
  425. PartWeld.Parent = Part
  426. end
  427.  
  428. local Barrel = Instance.new("Part",Model)
  429. Barrel.CanCollide = false
  430. Barrel.Position = Vector3.new(0,100,0)
  431. Barrel:BreakJoints()
  432. Barrel.FormFactor = "Custom"
  433. Barrel.Size = Vector3.new(0.2,0.2,0.2)
  434. Barrel.TopSurface = "SmoothNoOutlines"
  435. Barrel.BottomSurface = "SmoothNoOutlines"
  436. Barrel.FrontSurface = "SmoothNoOutlines"
  437. Barrel.BackSurface = "SmoothNoOutlines"
  438. Barrel.RightSurface = "SmoothNoOutlines"
  439. Barrel.LeftSurface = "SmoothNoOutlines"
  440. Barrel.BrickColor = BrickColor.new("Black")
  441. local Mesh = Instance.new("BlockMesh",Barrel)
  442. Mesh.Scale = Vector3.new(0.25,0.2,2) / 0.2 * Scale
  443. local BarrelWeld = Instance.new("Motor6D")
  444. BarrelWeld.Part0 = Handle
  445. BarrelWeld.Part1 = Barrel
  446. BarrelWeld.C0 = CFrame.Angles(math.rad(15),0,0) * CFrame.new(Vector3.new(0,0.5,-0.7)*Scale)
  447. BarrelWeld.Parent = Barrel
  448.  
  449. local Barrel1 = Barrel
  450.  
  451. local Barrel2 = Instance.new("Part",Model)
  452. Barrel2.CanCollide = false
  453. Barrel2.Position = Vector3.new(0,100,0)
  454. Barrel2:BreakJoints()
  455. Barrel2.FormFactor = "Custom"
  456. Barrel2.Size = Vector3.new(0.2,0.2,0.2)
  457. Barrel2.TopSurface = "SmoothNoOutlines"
  458. Barrel2.BottomSurface = "SmoothNoOutlines"
  459. Barrel2.FrontSurface = "SmoothNoOutlines"
  460. Barrel2.BackSurface = "SmoothNoOutlines"
  461. Barrel2.RightSurface = "SmoothNoOutlines"
  462. Barrel2.LeftSurface = "SmoothNoOutlines"
  463. Barrel2.BrickColor = BrickColor.new("Really black")
  464. local Mesh = Instance.new("BlockMesh",Barrel2)
  465. Mesh.Scale = Vector3.new(0.25,0.25,2) / 0.2 * Scale
  466. local Barrel2Weld = Instance.new("Motor6D")
  467. Barrel2Weld.Part0 = Barrel
  468. Barrel2Weld.Part1 = Barrel2
  469. Barrel2Weld.C0 = CFrame.new(Vector3.new(0,0.225,0)*Scale)
  470. Barrel2Weld.Parent = Barrel2
  471.  
  472. local RealBarrel = Instance.new("Part",Model)
  473. RealBarrel.CanCollide = false
  474. RealBarrel.Position = Vector3.new(0,100,0)
  475. RealBarrel:BreakJoints()
  476. RealBarrel.FormFactor = "Custom"
  477. RealBarrel.Size = Vector3.new(0.2,0.2,0.2)
  478. RealBarrel.TopSurface = "SmoothNoOutlines"
  479. RealBarrel.BottomSurface = "SmoothNoOutlines"
  480. RealBarrel.FrontSurface = "SmoothNoOutlines"
  481. RealBarrel.BackSurface = "SmoothNoOutlines"
  482. RealBarrel.RightSurface = "SmoothNoOutlines"
  483. RealBarrel.LeftSurface = "SmoothNoOutlines"
  484. RealBarrel.BrickColor = BrickColor.new("Dark grey metallic")
  485. local Mesh = Instance.new("CylinderMesh",RealBarrel)
  486. Mesh.Scale = Vector3.new(0.2,2,0.2) / 0.2 * Scale
  487. local RealBarrelWeld = Instance.new("Motor6D")
  488. RealBarrelWeld.Part0 = Barrel
  489. RealBarrelWeld.Part1 = RealBarrel
  490. RealBarrelWeld.C0 = CFrame.new(Vector3.new(0,0.1,-0.01)*Scale) * CFrame.Angles(math.rad(-90),0,0)
  491. RealBarrelWeld.Parent = RealBarrel
  492.  
  493. for i = 1,75,15 do
  494. local Part = Instance.new("Part",Model)
  495. Part.CanCollide = false
  496. Part.Position = Vector3.new(0,100,0)
  497. Part:BreakJoints()
  498. Part.FormFactor = "Custom"
  499. Part.Size = Vector3.new(0.2,0.2,0.2)
  500. Part.TopSurface = "SmoothNoOutlines"
  501. Part.BottomSurface = "SmoothNoOutlines"
  502. Part.FrontSurface = "SmoothNoOutlines"
  503. Part.BackSurface = "SmoothNoOutlines"
  504. Part.RightSurface = "SmoothNoOutlines"
  505. Part.LeftSurface = "SmoothNoOutlines"
  506. Part.BrickColor = BrickColor.new("Black")
  507. local Mesh = Instance.new("BlockMesh",Part)
  508. Mesh.Scale = Vector3.new(0.05,0.065,0.05) / 0.2 * Scale
  509. local PartWeld = Instance.new("Motor6D")
  510. PartWeld.Part0 = Handle
  511. PartWeld.Part1 = Part
  512. 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)
  513. PartWeld.Parent = Part
  514. end
  515.  
  516. local Part = Instance.new("Part",Model)
  517. Part.CanCollide = false
  518. Part.Position = Vector3.new(0,100,0)
  519. Part:BreakJoints()
  520. Part.FormFactor = "Custom"
  521. Part.Size = Vector3.new(0.2,0.2,0.2)
  522. Part.TopSurface = "SmoothNoOutlines"
  523. Part.BottomSurface = "SmoothNoOutlines"
  524. Part.FrontSurface = "SmoothNoOutlines"
  525. Part.BackSurface = "SmoothNoOutlines"
  526. Part.RightSurface = "SmoothNoOutlines"
  527. Part.LeftSurface = "SmoothNoOutlines"
  528. Part.BrickColor = BrickColor.new("Really black")
  529. local Mesh = Instance.new("BlockMesh",Part)
  530. Mesh.Scale = Vector3.new(0.05,0.11,0.1) / 0.2 * Scale
  531. local PartWeld = Instance.new("Motor6D")
  532. PartWeld.Part0 = Barrel2
  533. PartWeld.Part1 = Part
  534. PartWeld.C0 = CFrame.new(Vector3.new(0.06,0.135,0.925)*Scale)
  535. PartWeld.Parent = Part
  536.  
  537. local Part = Instance.new("Part",Model)
  538. Part.CanCollide = false
  539. Part.Position = Vector3.new(0,100,0)
  540. Part:BreakJoints()
  541. Part.FormFactor = "Custom"
  542. Part.Size = Vector3.new(0.2,0.2,0.2)
  543. Part.TopSurface = "SmoothNoOutlines"
  544. Part.BottomSurface = "SmoothNoOutlines"
  545. Part.FrontSurface = "SmoothNoOutlines"
  546. Part.BackSurface = "SmoothNoOutlines"
  547. Part.RightSurface = "SmoothNoOutlines"
  548. Part.LeftSurface = "SmoothNoOutlines"
  549. Part.BrickColor = BrickColor.new("Really black")
  550. local Mesh = Instance.new("BlockMesh",Part)
  551. Mesh.Scale = Vector3.new(0.05,0.11,0.1) / 0.2 * Scale
  552. local PartWeld = Instance.new("Motor6D")
  553. PartWeld.Part0 = Barrel2
  554. PartWeld.Part1 = Part
  555. PartWeld.C0 = CFrame.new(Vector3.new(-0.06,0.135,0.925)*Scale)
  556. PartWeld.Parent = Part
  557.  
  558. local Part = Instance.new("Part",Model)
  559. Part.CanCollide = false
  560. Part.Position = Vector3.new(0,100,0)
  561. Part:BreakJoints()
  562. Part.FormFactor = "Custom"
  563. Part.Size = Vector3.new(0.2,0.2,0.2)
  564. Part.TopSurface = "SmoothNoOutlines"
  565. Part.BottomSurface = "SmoothNoOutlines"
  566. Part.FrontSurface = "SmoothNoOutlines"
  567. Part.BackSurface = "SmoothNoOutlines"
  568. Part.RightSurface = "SmoothNoOutlines"
  569. Part.LeftSurface = "SmoothNoOutlines"
  570. Part.BrickColor = BrickColor.new("Really black")
  571. local Mesh = Instance.new("BlockMesh",Part)
  572. Mesh.Scale = Vector3.new(0.025,0.1,0.1) / 0.2 * Scale
  573. local PartWeld = Instance.new("Motor6D")
  574. PartWeld.Part0 = Barrel2
  575. PartWeld.Part1 = Part
  576. PartWeld.C0 = CFrame.new(Vector3.new(0,0.135,-0.925)*Scale)
  577. PartWeld.Parent = Part
  578.  
  579. local Part = Instance.new("Part",Model)
  580. Part.CanCollide = false
  581. Part.Position = Vector3.new(0,100,0)
  582. Part:BreakJoints()
  583. Part.FormFactor = "Custom"
  584. Part.Size = Vector3.new(0.2,0.2,0.2)
  585. Part.Transparency = 1
  586. Part.TopSurface = "SmoothNoOutlines"
  587. Part.BottomSurface = "SmoothNoOutlines"
  588. Part.FrontSurface = "SmoothNoOutlines"
  589. Part.BackSurface = "SmoothNoOutlines"
  590. Part.RightSurface = "SmoothNoOutlines"
  591. Part.LeftSurface = "SmoothNoOutlines"
  592. Part.BrickColor = BrickColor.new("Really black")
  593. local Mesh = Instance.new("BlockMesh",Part)
  594. Mesh.Scale = Vector3.new(0.1,0.1,0.1) / 0.2 * Scale
  595. local PartWeld = Instance.new("Motor6D")
  596. PartWeld.Part0 = Barrel
  597. PartWeld.Part1 = Part
  598. PartWeld.C0 = CFrame.new(Vector3.new(0,0,-5)*Scale)
  599. PartWeld.Parent = Part
  600.  
  601. local Light = Instance.new("PointLight",Part)
  602. Light.Color = BrickColor.new("Gold").Color
  603. Light.Enabled = true
  604. Light.Shadows = true
  605. Light.Brightness = 0
  606. Light.Range = 6
  607.  
  608. local Part = Instance.new("Part",Model)
  609. Part.Material = "Neon"
  610. Part.CanCollide = false
  611. Part.Position = Vector3.new(0,100,0)
  612. Part:BreakJoints()
  613. Part.FormFactor = "Custom"
  614. Part.Size = Vector3.new(0.2,0.2,0.2)
  615. Part.TopSurface = "SmoothNoOutlines"
  616. Part.BottomSurface = "SmoothNoOutlines"
  617. Part.FrontSurface = "SmoothNoOutlines"
  618. Part.BackSurface = "SmoothNoOutlines"
  619. Part.RightSurface = "SmoothNoOutlines"
  620. Part.LeftSurface = "SmoothNoOutlines"
  621. Part.BrickColor = BrickColor.new("Bright yellow")
  622. Part.Transparency = 0.25
  623. local RecoilMesh = Instance.new("SpecialMesh",Part)
  624. RecoilMesh.MeshType = "FileMesh"
  625. RecoilMesh.MeshId = "http://www.roblox.com/Asset/?id=1323306"
  626. RecoilMesh.TextureId = "http://www.roblox.com/Asset/?id=98896228"
  627. RecoilMesh.Scale = Vector3.new(0.175,0,0.175) * Scale
  628. local PartWeld = Instance.new("Motor6D")
  629. PartWeld.Part0 = RealBarrel
  630. PartWeld.Part1 = Part
  631. PartWeld.C0 = CFrame.new(Vector3.new(0,0.95,0)*Scale)
  632. PartWeld.Parent = Part
  633.  
  634. function ShootBullet(Target,barrel)
  635. local barrel = barrel or Barrel
  636. local Bullet = Instance.new("Part",Workspace)
  637. Barrel.CanCollide = false
  638. Bullet.FormFactor = "Custom"
  639. Bullet.Size = Vector3.new(0.2,0.2,5)*Scale
  640. Bullet.TopSurface = "Smooth"
  641. Bullet.BottomSurface = "Smooth"
  642. Bullet.Anchored = true
  643. Bullet.CanCollide = false
  644. 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)
  645. Bullet.Transparency = 0.1
  646. Bullet.BrickColor = BrickColor.new("Gold")
  647. --[[local Mesh = Instance.new("SpecialMesh",Bullet)
  648. Mesh.MeshType = "FileMesh"
  649. Mesh.Scale = Vector3.new(0.5,0.5,0.2)
  650. Mesh.MeshId = "http://www.roblox.com/asset/?id=2697549"
  651. --Mesh.TextureId = "http://www.roblox.com/asset/?id=2697544"]]
  652. local Mesh = Instance.new("BlockMesh",Bullet)
  653. Mesh.Scale = Vector3.new(0.2,0.2,5)*Scale/Bullet.Size
  654. IgnoreList[#IgnoreList+1] = Bullet
  655. RenderStepped:wait()
  656. for i = Speed,1000,Speed do -- Loop to do the bullet movement and stuff.
  657. local ray,Hit,Pos,SurfaceNormal;
  658. ray = Ray.new(Bullet.Position,((Bullet.CFrame*CFrame.Angles(math.rad(-Gravity),0,0)*CFrame.new(0,0,-Speed)).p-Bullet.Position).unit*Speed)
  659. Hit,Pos,SurfaceNormal = Workspace:FindPartOnRayWithIgnoreList(ray,IgnoreList)
  660. Bullet.CFrame = Bullet.CFrame*CFrame.Angles(math.rad(-Gravity),0,0)*CFrame.new(0,0,-Speed)
  661. if Hit ~= nil then
  662. 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"))
  663. if Hum ~= nil then
  664. Hum:TakeDamage((((Gangster and math.random(99999,99999) or math.random(99999,99999))*Scale)/100)*Hum.MaxHealth)
  665. end
  666. break
  667. end
  668. RenderStepped:wait()
  669. end
  670. Bullet:Destroy()
  671. end
  672.  
  673. Mouse.Button1Down:connect(function()
  674. if not Down and not DB then
  675. Down = true
  676. while Down do
  677. if Humanoid.Health == 0 then break end
  678. if not DB then
  679. DB = true
  680. local Sound = Instance.new("Sound",Barrel)
  681. Sound.SoundId = "http://www.roblox.com/Asset/?id=165946426" -- 132373574
  682. Sound.Volume = 5*Scale
  683. Sound.Pitch = (math.random(70,110)/100)/((Scale < 0.25 and 0.25) or (Scale > 4 and 4) or Scale)
  684. Sound:Play()
  685. Spawn(function()
  686. ShootBullet(Mouse.Hit.p,Barrel1)
  687. end)
  688. RecoilMesh.VertexColor = Vector3.new(1,math.random(160,245)/255,20/255)
  689. PartWeld.C0 = PartWeld.C0 * CFrame.Angles(0,math.rad(math.random(-40,40)),0)
  690. local Shell = Instance.new("Part",Workspace)
  691. Shell.FormFactor = "Custom"
  692. Shell.BrickColor = BrickColor.new("Bright yellow")
  693. Shell.Size = Vector3.new(0.2,0.5,0.2)*Scale
  694. Shell.CFrame = Barrel.CFrame*CFrame.new(0.5,0.5,0)*CFrame.Angles(math.rad(-90),0,0)
  695. Shell.Velocity = ((Barrel.CFrame*CFrame.new(5,0,math.random(-2,2))).p-Barrel.CFrame.p)*5*Scale
  696. local Mesh = Instance.new("CylinderMesh",Shell)
  697. Mesh.Scale = Vector3.new(0.2,0.5,0.2)*Scale/Shell.Size
  698. Spawn(function()
  699. wait(5)
  700. Shell:Destroy()
  701. end)
  702. for i = 1,20,7.5 do
  703. RotationOffset = RotationOffset*CFrame.Angles(math.rad(7.5),0,0)
  704. Part1Joint = Part1Joint*CFrame.new(Vector3.new(0,-0.15,0)*Scale)
  705. Barrel2Weld.C0 = Barrel2Weld.C0*CFrame.new(Vector3.new(0,0,0.15)*Scale)
  706. Light.Brightness = Light.Brightness+38
  707. RecoilMesh.Scale = RecoilMesh.Scale+(Vector3.new(0,0.375,0)*Scale)
  708. RenderStepped:wait()
  709. end
  710. wait(0.02)
  711. for i = 1,20,3.75 do
  712. RotationOffset = RotationOffset*CFrame.Angles(math.rad(-3.75),0,0)
  713. Part1Joint = Part1Joint*CFrame.new(Vector3.new(0,0.075,0)*Scale)
  714. Barrel2Weld.C0 = Barrel2Weld.C0*CFrame.new(Vector3.new(0,0,-0.075)*Scale)
  715. Light.Brightness = Light.Brightness-19
  716. RecoilMesh.Scale = RecoilMesh.Scale+(Vector3.new(0,-0.1875,0)*Scale)
  717. RenderStepped:wait()
  718. end
  719. wait()
  720. DB = false
  721. end
  722. end
  723. end
  724. end)
  725.  
  726. Mouse.Button1Up:connect(function()
  727. Down = false
  728. end)
  729.  
  730. Mouse.KeyDown:connect(function(Key)
  731. if Key:lower() == "g" and not DB then
  732. DB = true
  733. if Gangster == true then
  734. for i = 1,70,5 do
  735. RotationOffset = RotationOffset*CFrame.Angles(0,math.rad(-5),0)
  736. RenderStepped:wait()
  737. end
  738. Gangster = false
  739. else
  740. for i = 1,70,5 do
  741. RotationOffset = RotationOffset*CFrame.Angles(0,math.rad(5),0)
  742. RenderStepped:wait()
  743. end
  744. Gangster = true
  745. end
  746. DB = false
  747. end
  748. end)
  749.  
  750. local Weld = Instance.new("Weld")
  751. Weld.Part0 = Torso
  752. Weld.Part1 = Character["Right Arm"]
  753. Weld.Parent = Torso
  754.  
  755. local Weld2 = Instance.new("Weld")
  756. Weld2.Part0 = Torso
  757. Weld2.Part1 = Character.Head
  758. Weld2.Parent = Torso
  759.  
  760. local RA = Character["Right Arm"]
  761.  
  762. game:GetService("RunService"):BindToRenderStep("Pistol",Enum.RenderPriority.Character.Value,function()
  763. local Point = Torso.CFrame:vectorToObjectSpace(Mouse.Hit.p-Torso.CFrame.p)
  764. if Point.Z > 0 then
  765. if Point.X > 0 then
  766. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(Mouse.Hit.X,Torso.Position.Y,Mouse.Hit.Z))*CFrame.Angles(0,math.rad(90),0)
  767. elseif Point.X < 0 then
  768. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(Mouse.Hit.X,Torso.Position.Y,Mouse.Hit.Z))*CFrame.Angles(0,math.rad(-90),0)
  769. end
  770. end
  771.  
  772. local CFr = (Torso.CFrame*Part0Joint):toObjectSpace(CFrame.new((Torso.CFrame*Part0Joint).p,Mouse.Hit.p))--RayEnd))
  773. Weld.C0 = Part0Joint * (CFr-CFr.p) * RotationOffset
  774. Weld.C1 = Part1Joint
  775. Weld.Part0 = Torso
  776. Weld.Part1 = RA
  777. local CFr = (Torso.CFrame*Part0JointHead):toObjectSpace(CFrame.new((Torso.CFrame*Part0JointHead).p,Mouse.Hit.p))--RayEnd))
  778. Weld2.C0 = Part0JointHead * (CFr-CFr.p) * RotationOffsetHead
  779. Weld2.C1 = Part1JointHead
  780. Weld2.Part0 = Torso
  781. Weld2.Part1 = Character.Head
  782. local Last = Scale
  783. 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
  784. Speed = 20*Scale
  785. if Scale ~= Last then
  786. Part0Joint = CFrame.new(Vector3.new(1,0.75,0)*Scale*1.25)
  787. Part1Joint = CFrame.new(Vector3.new(-0.5,0.75,0)*Scale*1.25)
  788. Part0JointHead = CFrame.new(Vector3.new(0,1,0)*Scale*1.25)
  789. Part1JointHead = CFrame.new(Vector3.new(0,-0.5,0)*Scale*1.25)
  790. end
  791. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement