Advertisement
memberhero

Trap Gun FE

Dec 10th, 2020
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.32 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. do 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
  5. ---------------------------------------------------------------
  6. --=================================--
  7.  
  8.  
  9. -- EDIT BY MELISSA666666GIRL --
  10. -- ORIGINAL SCRIPT --
  11. -- Kirky's Realistic Pistol script --
  12.  
  13. -- https://pastebin.com/raw/2W78wPwu --
  14.  
  15. -- THANKS FOR USING :> --
  16.  
  17.  
  18. --==================================--
  19.  
  20. AnimeHair = false --Change to true to get ANIME HAIR--
  21. TrapShirt = false --Change to true to get a TRAP SHIRT!--
  22.  
  23.  
  24. local Pants = "rbxassetid://889200276"
  25. local Shirt = "rbxassetid://889202926"
  26. local Pants2 = "rbxassetid://756532964"
  27. local Shirt2 = ""
  28. local Pants3 = "rbxassetid://587907973"
  29. local Shirt3 = "rbxassetid://1177765208"
  30. 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
  31. local Speed = 20*Scale
  32. local Gravity = 0.1
  33.  
  34. local Player = game.Players.LocalPlayer
  35. local Character = Player.Character
  36. local Humanoid = Character.Humanoid
  37. Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
  38. local Torso = Character.HumanoidRootPart
  39. local Mouse = game.Players.LocalPlayer:GetMouse()
  40. local RenderStepped = game:GetService("RunService").RenderStepped
  41. local Camera = Workspace.CurrentCamera
  42. Camera:ClearAllChildren()
  43. local Model = Instance.new("Model",Character)
  44. local IgnoreList = {Character,Workspace.Terrain}
  45.  
  46. Player.Character.Head.face.Texture = "rbxassetid://30233519"
  47.  
  48. if TrapShirt == true then
  49. Player.Character.Shirt.ShirtTexture = "rbxassetid://877679540"
  50. end
  51.  
  52. if AnimeHair == true then
  53. for i,v in pairs(Character:GetChildren()) do
  54. if v.ClassName == "Accessory" or v.ClassName == "Hat" then
  55. v:destroy()
  56. end
  57. end
  58.  
  59. local Hair = Instance.new("Part")
  60. Hair.Parent = Character
  61. Hair.Name = "Hair"
  62. Hair.Size = Vector3.new(0.1, 0.1, 0.1)
  63. Hair.CFrame = Character.Head.CFrame
  64. Hair:BreakJoints()
  65. Hair.CanCollide = false
  66. Hair.BrickColor = BrickColor.new("New Yeller")
  67. Hair.TopSurface = "Smooth"
  68. Hair.BottomSurface = "Smooth"
  69. Weld = Instance.new("Weld")
  70. Weld.Name = "Weld"
  71. Weld.Part0 = Character.Head
  72. Weld.Part1 = Hair
  73. Weld.Parent = Character.Head
  74. Weld.C0 = CFrame.new(0, -1.4, 0.2)*CFrame.fromEulerAnglesXYZ(0.1, 0, 0)
  75. Mesh = Instance.new("SpecialMesh")
  76. Mesh.Parent = Hair
  77. Mesh.MeshId = "rbxassetid://1389678629"
  78. Mesh.TextureId = "http://www.roblox.com/asset/?id=1389678737"
  79. Mesh.Scale = Vector3.new(0.050, 0.050, 0.050)
  80. end
  81.  
  82.  
  83. z = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  84. z.SoundId = "rbxassetid://974451759"
  85. z.Looped = true
  86. z.Pitch = 1.2
  87. z.Volume = 4
  88. wait(.1)
  89. z:Play()
  90.  
  91. local Part0Joint = CFrame.new(Vector3.new(1,0.75,0)*Scale*1.25)
  92. local Part1Joint = CFrame.new(Vector3.new(-0.5,0.75,0)*Scale*1.25)
  93. local RotationOffset = CFrame.Angles(math.rad(90),math.rad(0),0)
  94. local Gangster = false
  95.  
  96. local Part0JointHead = CFrame.new(Vector3.new(0,1,0)*Scale*1.25)
  97. local Part1JointHead = CFrame.new(Vector3.new(0,-0.5,0)*Scale*1.25)
  98. local RotationOffsetHead = CFrame.Angles(0,0,0)
  99.  
  100. local Handle = Instance.new("Part",Model)
  101. Handle.CanCollide = false
  102. Handle.Name = "Handle"
  103. Handle.Position = Vector3.new(0,100,0)
  104. Handle:BreakJoints()
  105. Handle.FormFactor = "Custom"
  106. Handle.Size = Vector3.new(0.2,0.2,0.2)
  107. Handle.TopSurface = "SmoothNoOutlines"
  108. Handle.BottomSurface = "SmoothNoOutlines"
  109. Handle.FrontSurface = "SmoothNoOutlines"
  110. Handle.BackSurface = "SmoothNoOutlines"
  111. Handle.RightSurface = "SmoothNoOutlines"
  112. Handle.LeftSurface = "SmoothNoOutlines"
  113. Handle.BrickColor = BrickColor.new("Pink")
  114. Handle.Material = "Neon"
  115. local Mesh = Instance.new("BlockMesh",Handle)
  116. Mesh.Scale = Vector3.new(0.25,1,0.4) / 0.2 * Scale
  117. local HandleWeld = Instance.new("Motor6D")
  118. HandleWeld.Part0 = Character["Right Arm"]
  119. HandleWeld.Part1 = Handle
  120. HandleWeld.C0 = CFrame.new(Vector3.new(0,-1,0)*Scale) * CFrame.Angles(math.rad(-105),0,0)
  121. HandleWeld.Parent = Handle
  122.  
  123. local Part = Instance.new("Part",Model)
  124. Part.CanCollide = false
  125. Part.Position = Vector3.new(0,100,0)
  126. Part:BreakJoints()
  127. Part.FormFactor = "Custom"
  128. Part.Size = Vector3.new(0.2,0.2,0.2)
  129. Part.TopSurface = "SmoothNoOutlines"
  130. Part.BottomSurface = "SmoothNoOutlines"
  131. Part.FrontSurface = "SmoothNoOutlines"
  132. Part.BackSurface = "SmoothNoOutlines"
  133. Part.RightSurface = "SmoothNoOutlines"
  134. Part.LeftSurface = "SmoothNoOutlines"
  135. Part.BrickColor = BrickColor.new("Pink")
  136. Part.Material = "Neon"
  137. local Mesh = Instance.new("CylinderMesh",Part)
  138. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  139. local PartWeld = Instance.new("Motor6D")
  140. PartWeld.Part0 = Handle
  141. PartWeld.Part1 = Part
  142. PartWeld.C0 = CFrame.new(Vector3.new(-0.115,-0.475,-0.190)*Scale) * CFrame.Angles(0,0,0)
  143. PartWeld.Parent = Part
  144.  
  145. local Part = Instance.new("Part",Model)
  146. Part.CanCollide = false
  147. Part.Position = Vector3.new(0,100,0)
  148. Part:BreakJoints()
  149. Part.FormFactor = "Custom"
  150. Part.Size = Vector3.new(0.2,0.2,0.2)
  151. Part.TopSurface = "SmoothNoOutlines"
  152. Part.BottomSurface = "SmoothNoOutlines"
  153. Part.FrontSurface = "SmoothNoOutlines"
  154. Part.BackSurface = "SmoothNoOutlines"
  155. Part.RightSurface = "SmoothNoOutlines"
  156. Part.LeftSurface = "SmoothNoOutlines"
  157. Part.BrickColor = BrickColor.new("Pink")
  158. Part.Material = "Neon"
  159. local Mesh = Instance.new("CylinderMesh",Part)
  160. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  161. local PartWeld = Instance.new("Motor6D")
  162. PartWeld.Part0 = Handle
  163. PartWeld.Part1 = Part
  164. PartWeld.C0 = CFrame.new(Vector3.new(0.115,-0.475,0.190)*Scale) * CFrame.Angles(0,0,0)
  165. PartWeld.Parent = Part
  166.  
  167. local Part = Instance.new("Part",Model)
  168. Part.CanCollide = false
  169. Part.Position = Vector3.new(0,100,0)
  170. Part:BreakJoints()
  171. Part.FormFactor = "Custom"
  172. Part.Size = Vector3.new(0.2,0.2,0.2)
  173. Part.TopSurface = "SmoothNoOutlines"
  174. Part.BottomSurface = "SmoothNoOutlines"
  175. Part.FrontSurface = "SmoothNoOutlines"
  176. Part.BackSurface = "SmoothNoOutlines"
  177. Part.RightSurface = "SmoothNoOutlines"
  178. Part.LeftSurface = "SmoothNoOutlines"
  179. Part.BrickColor = BrickColor.new("Pink")
  180. Part.Material = "Neon"
  181. local Mesh = Instance.new("CylinderMesh",Part)
  182. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  183. local PartWeld = Instance.new("Motor6D")
  184. PartWeld.Part0 = Handle
  185. PartWeld.Part1 = Part
  186. PartWeld.C0 = CFrame.new(Vector3.new(-0.115,-0.475,0.190)*Scale) * CFrame.Angles(0,0,0)
  187. PartWeld.Parent = Part
  188.  
  189. local Part = Instance.new("Part",Model)
  190. Part.CanCollide = false
  191. Part.Position = Vector3.new(0,100,0)
  192. Part:BreakJoints()
  193. Part.FormFactor = "Custom"
  194. Part.Size = Vector3.new(0.2,0.2,0.2)
  195. Part.TopSurface = "SmoothNoOutlines"
  196. Part.BottomSurface = "SmoothNoOutlines"
  197. Part.FrontSurface = "SmoothNoOutlines"
  198. Part.BackSurface = "SmoothNoOutlines"
  199. Part.RightSurface = "SmoothNoOutlines"
  200. Part.LeftSurface = "SmoothNoOutlines"
  201. Part.BrickColor = BrickColor.new("Pink")
  202. Part.Material = "Neon"
  203. local Mesh = Instance.new("CylinderMesh",Part)
  204. Mesh.Scale = Vector3.new(0.07,0.2,0.07) / 0.2 * Scale
  205. local PartWeld = Instance.new("Motor6D")
  206. PartWeld.Part0 = Handle
  207. PartWeld.Part1 = Part
  208. PartWeld.C0 = CFrame.new(Vector3.new(0.115,-0.475,-0.190)*Scale) * CFrame.Angles(0,0,0)
  209. PartWeld.Parent = Part
  210.  
  211. local Part = Instance.new("Part",Model)
  212. Part.CanCollide = false
  213. Part.Position = Vector3.new(0,100,0)
  214. Part:BreakJoints()
  215. Part.FormFactor = "Custom"
  216. Part.Size = Vector3.new(0.2,0.2,0.2)
  217. Part.TopSurface = "SmoothNoOutlines"
  218. Part.BottomSurface = "SmoothNoOutlines"
  219. Part.FrontSurface = "SmoothNoOutlines"
  220. Part.BackSurface = "SmoothNoOutlines"
  221. Part.RightSurface = "SmoothNoOutlines"
  222. Part.LeftSurface = "SmoothNoOutlines"
  223. Part.BrickColor = BrickColor.new("Pink")
  224. Part.Material = "Neon"
  225. local Mesh = Instance.new("BlockMesh",Part)
  226. Mesh.Scale = Vector3.new(0.23,0.2,0.1) / 0.2 * Scale
  227. local PartWeld = Instance.new("Motor6D")
  228. PartWeld.Part0 = Handle
  229. PartWeld.Part1 = Part
  230. PartWeld.C0 = CFrame.new(Vector3.new(0,-0.475,-0.175)*Scale) * CFrame.Angles(0,0,0)
  231. PartWeld.Parent = Part
  232.  
  233. local Part = Instance.new("Part",Model)
  234. Part.CanCollide = false
  235. Part.Position = Vector3.new(0,100,0)
  236. Part:BreakJoints()
  237. Part.FormFactor = "Custom"
  238. Part.Size = Vector3.new(0.2,0.2,0.2)
  239. Part.TopSurface = "SmoothNoOutlines"
  240. Part.BottomSurface = "SmoothNoOutlines"
  241. Part.FrontSurface = "SmoothNoOutlines"
  242. Part.BackSurface = "SmoothNoOutlines"
  243. Part.RightSurface = "SmoothNoOutlines"
  244. Part.LeftSurface = "SmoothNoOutlines"
  245. Part.BrickColor = BrickColor.new("Pink")
  246. Part.Material = "Neon"
  247. local Mesh = Instance.new("BlockMesh",Part)
  248. Mesh.Scale = Vector3.new(0.23,0.2,0.1) / 0.2 * Scale
  249. local PartWeld = Instance.new("Motor6D")
  250. PartWeld.Part0 = Handle
  251. PartWeld.Part1 = Part
  252. PartWeld.C0 = CFrame.new(Vector3.new(0,-0.475,0.175)*Scale) * CFrame.Angles(0,0,0)
  253. PartWeld.Parent = Part
  254.  
  255. local Part = Instance.new("Part",Model)
  256. Part.CanCollide = false
  257. Part.Position = Vector3.new(0,100,0)
  258. Part:BreakJoints()
  259. Part.FormFactor = "Custom"
  260. Part.Size = Vector3.new(0.2,0.2,0.2)
  261. Part.TopSurface = "SmoothNoOutlines"
  262. Part.BottomSurface = "SmoothNoOutlines"
  263. Part.FrontSurface = "SmoothNoOutlines"
  264. Part.BackSurface = "SmoothNoOutlines"
  265. Part.RightSurface = "SmoothNoOutlines"
  266. Part.LeftSurface = "SmoothNoOutlines"
  267. Part.BrickColor = BrickColor.new("Pink")
  268. Part.Material = "Neon"
  269. local Mesh = Instance.new("BlockMesh",Part)
  270. Mesh.Scale = Vector3.new(0.1,0.2,0.38) / 0.2 * Scale
  271. local PartWeld = Instance.new("Motor6D")
  272. PartWeld.Part0 = Handle
  273. PartWeld.Part1 = Part
  274. PartWeld.C0 = CFrame.new(Vector3.new(-0.1,-0.475,0)*Scale) * CFrame.Angles(0,0,0)
  275. PartWeld.Parent = Part
  276.  
  277. local Part = Instance.new("Part",Model)
  278. Part.CanCollide = false
  279. Part.Position = Vector3.new(0,100,0)
  280. Part:BreakJoints()
  281. Part.FormFactor = "Custom"
  282. Part.Size = Vector3.new(0.2,0.2,0.2)
  283. Part.TopSurface = "SmoothNoOutlines"
  284. Part.BottomSurface = "SmoothNoOutlines"
  285. Part.FrontSurface = "SmoothNoOutlines"
  286. Part.BackSurface = "SmoothNoOutlines"
  287. Part.RightSurface = "SmoothNoOutlines"
  288. Part.LeftSurface = "SmoothNoOutlines"
  289. Part.BrickColor = BrickColor.new("Pink")
  290. Part.Material = "Neon"
  291. local Mesh = Instance.new("BlockMesh",Part)
  292. Mesh.Scale = Vector3.new(0.1,0.2,0.38) / 0.2 * Scale
  293. local PartWeld = Instance.new("Motor6D")
  294. PartWeld.Part0 = Handle
  295. PartWeld.Part1 = Part
  296. PartWeld.C0 = CFrame.new(Vector3.new(0.1,-0.475,0)*Scale) * CFrame.Angles(0,0,0)
  297. PartWeld.Parent = Part
  298.  
  299. local Part = Instance.new("Part",Model)
  300. Part.CanCollide = false
  301. Part.Position = Vector3.new(0,100,0)
  302. Part:BreakJoints()
  303. Part.FormFactor = "Custom"
  304. Part.Size = Vector3.new(0.2,0.2,0.2)
  305. Part.TopSurface = "SmoothNoOutlines"
  306. Part.BottomSurface = "SmoothNoOutlines"
  307. Part.FrontSurface = "SmoothNoOutlines"
  308. Part.BackSurface = "SmoothNoOutlines"
  309. Part.RightSurface = "SmoothNoOutlines"
  310. Part.LeftSurface = "SmoothNoOutlines"
  311. Part.BrickColor = BrickColor.new("Pink")
  312. Part.Material = "Neon"
  313. local Mesh = Instance.new("BlockMesh",Part)
  314. Mesh.Scale = Vector3.new(0.1,0.3,0.05) / 0.2 * Scale
  315. local PartWeld = Instance.new("Motor6D")
  316. PartWeld.Part0 = Handle
  317. PartWeld.Part1 = Part
  318. 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)
  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("Pink")
  334. Part.Material = "Neon"
  335. local Mesh = Instance.new("BlockMesh",Part)
  336. Mesh.Scale = Vector3.new(0.1,0.05,0.625) / 0.2 * Scale
  337. local PartWeld = Instance.new("Motor6D")
  338. PartWeld.Part0 = Handle
  339. PartWeld.Part1 = Part
  340. PartWeld.C0 = CFrame.Angles(math.rad(15),0,0) * CFrame.new(Vector3.new(0,0.1,-0.435)*Scale)
  341. PartWeld.Parent = Part
  342.  
  343. for i = 0,80,10 do
  344. local Part = Instance.new("Part",Model)
  345. Part.CanCollide = false
  346. Part.Position = Vector3.new(0,100,0)
  347. Part:BreakJoints()
  348. Part.FormFactor = "Custom"
  349. Part.Size = Vector3.new(0.2,0.2,0.2)
  350. Part.TopSurface = "SmoothNoOutlines"
  351. Part.BottomSurface = "SmoothNoOutlines"
  352. Part.FrontSurface = "SmoothNoOutlines"
  353. Part.BackSurface = "SmoothNoOutlines"
  354. Part.RightSurface = "SmoothNoOutlines"
  355. Part.LeftSurface = "SmoothNoOutlines"
  356. Part.BrickColor = BrickColor.new("Pink")
  357. Part.Material = "Neon"
  358. local Mesh = Instance.new("BlockMesh",Part)
  359. Mesh.Scale = Vector3.new(0.25,0.15,0.03555*2) / 0.2 * Scale
  360. local PartWeld = Instance.new("Motor6D")
  361. PartWeld.Part0 = Handle
  362. PartWeld.Part1 = Part
  363. 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)
  364. PartWeld.Parent = Part
  365. end
  366.  
  367. local Barrel = Instance.new("Part",Model)
  368. Barrel.CanCollide = false
  369. Barrel.Position = Vector3.new(0,100,0)
  370. Barrel:BreakJoints()
  371. Barrel.FormFactor = "Custom"
  372. Barrel.Size = Vector3.new(0.2,0.2,0.2)
  373. Barrel.TopSurface = "SmoothNoOutlines"
  374. Barrel.BottomSurface = "SmoothNoOutlines"
  375. Barrel.FrontSurface = "SmoothNoOutlines"
  376. Barrel.BackSurface = "SmoothNoOutlines"
  377. Barrel.RightSurface = "SmoothNoOutlines"
  378. Barrel.LeftSurface = "SmoothNoOutlines"
  379. Barrel.BrickColor = BrickColor.new("Pink")
  380. Barrel.Material = "Neon"
  381. local Mesh = Instance.new("BlockMesh",Barrel)
  382. Mesh.Scale = Vector3.new(0.25,0.2,2) / 0.2 * Scale
  383. local BarrelWeld = Instance.new("Motor6D")
  384. BarrelWeld.Part0 = Handle
  385. BarrelWeld.Part1 = Barrel
  386. BarrelWeld.C0 = CFrame.Angles(math.rad(15),0,0) * CFrame.new(Vector3.new(0,0.5,-0.7)*Scale)
  387. BarrelWeld.Parent = Barrel
  388.  
  389. local Barrel1 = Barrel
  390.  
  391. local Barrel2 = Instance.new("Part",Model)
  392. Barrel2.CanCollide = false
  393. Barrel2.Position = Vector3.new(0,100,0)
  394. Barrel2:BreakJoints()
  395. Barrel2.FormFactor = "Custom"
  396. Barrel2.Size = Vector3.new(0.2,0.2,0.2)
  397. Barrel2.TopSurface = "SmoothNoOutlines"
  398. Barrel2.BottomSurface = "SmoothNoOutlines"
  399. Barrel2.FrontSurface = "SmoothNoOutlines"
  400. Barrel2.BackSurface = "SmoothNoOutlines"
  401. Barrel2.RightSurface = "SmoothNoOutlines"
  402. Barrel2.LeftSurface = "SmoothNoOutlines"
  403. Barrel2.BrickColor = BrickColor.new("Magenta")
  404. Barrel2.Material = "Neon"
  405. local Mesh = Instance.new("BlockMesh",Barrel2)
  406. Mesh.Scale = Vector3.new(0.25,0.25,2) / 0.2 * Scale
  407. local Barrel2Weld = Instance.new("Motor6D")
  408. Barrel2Weld.Part0 = Barrel
  409. Barrel2Weld.Part1 = Barrel2
  410. Barrel2Weld.C0 = CFrame.new(Vector3.new(0,0.225,0)*Scale)
  411. Barrel2Weld.Parent = Barrel2
  412.  
  413. local RealBarrel = Instance.new("Part",Model)
  414. RealBarrel.CanCollide = false
  415. RealBarrel.Position = Vector3.new(0,100,0)
  416. RealBarrel:BreakJoints()
  417. RealBarrel.FormFactor = "Custom"
  418. RealBarrel.Size = Vector3.new(0.2,0.2,0.2)
  419. RealBarrel.TopSurface = "SmoothNoOutlines"
  420. RealBarrel.BottomSurface = "SmoothNoOutlines"
  421. RealBarrel.FrontSurface = "SmoothNoOutlines"
  422. RealBarrel.BackSurface = "SmoothNoOutlines"
  423. RealBarrel.RightSurface = "SmoothNoOutlines"
  424. RealBarrel.LeftSurface = "SmoothNoOutlines"
  425. RealBarrel.BrickColor = BrickColor.new("Black")
  426. RealBarrel.Material = "Neon"
  427. local Mesh = Instance.new("CylinderMesh",RealBarrel)
  428. Mesh.Scale = Vector3.new(0.2,2,0.2) / 0.2 * Scale
  429. local RealBarrelWeld = Instance.new("Motor6D")
  430. RealBarrelWeld.Part0 = Barrel
  431. RealBarrelWeld.Part1 = RealBarrel
  432. RealBarrelWeld.C0 = CFrame.new(Vector3.new(0,0.1,-0.01)*Scale) * CFrame.Angles(math.rad(-90),0,0)
  433. RealBarrelWeld.Parent = RealBarrel
  434.  
  435. for i = 1,75,15 do
  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.TopSurface = "SmoothNoOutlines"
  443. Part.BottomSurface = "SmoothNoOutlines"
  444. Part.FrontSurface = "SmoothNoOutlines"
  445. Part.BackSurface = "SmoothNoOutlines"
  446. Part.RightSurface = "SmoothNoOutlines"
  447. Part.LeftSurface = "SmoothNoOutlines"
  448. Part.BrickColor = BrickColor.new("Pink")
  449. Part.Material = "Neon"
  450. local Mesh = Instance.new("BlockMesh",Part)
  451. Mesh.Scale = Vector3.new(0.05,0.065,0.05) / 0.2 * Scale
  452. local PartWeld = Instance.new("Motor6D")
  453. PartWeld.Part0 = Handle
  454. PartWeld.Part1 = Part
  455. 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)
  456. PartWeld.Parent = Part
  457. end
  458.  
  459. local Part = Instance.new("Part",Model)
  460. Part.CanCollide = false
  461. Part.Position = Vector3.new(0,100,0)
  462. Part:BreakJoints()
  463. Part.FormFactor = "Custom"
  464. Part.Size = Vector3.new(0.2,0.2,0.2)
  465. Part.TopSurface = "SmoothNoOutlines"
  466. Part.BottomSurface = "SmoothNoOutlines"
  467. Part.FrontSurface = "SmoothNoOutlines"
  468. Part.BackSurface = "SmoothNoOutlines"
  469. Part.RightSurface = "SmoothNoOutlines"
  470. Part.LeftSurface = "SmoothNoOutlines"
  471. Part.BrickColor = BrickColor.new("Magenta")
  472. Part.Material = "Neon"
  473. local Mesh = Instance.new("BlockMesh",Part)
  474. Mesh.Scale = Vector3.new(0.05,0.11,0.1) / 0.2 * Scale
  475. local PartWeld = Instance.new("Motor6D")
  476. PartWeld.Part0 = Barrel2
  477. PartWeld.Part1 = Part
  478. PartWeld.C0 = CFrame.new(Vector3.new(0.06,0.135,0.925)*Scale)
  479. PartWeld.Parent = Part
  480.  
  481. local Part = Instance.new("Part",Model)
  482. Part.CanCollide = false
  483. Part.Position = Vector3.new(0,100,0)
  484. Part:BreakJoints()
  485. Part.FormFactor = "Custom"
  486. Part.Size = Vector3.new(0.2,0.2,0.2)
  487. Part.TopSurface = "SmoothNoOutlines"
  488. Part.BottomSurface = "SmoothNoOutlines"
  489. Part.FrontSurface = "SmoothNoOutlines"
  490. Part.BackSurface = "SmoothNoOutlines"
  491. Part.RightSurface = "SmoothNoOutlines"
  492. Part.LeftSurface = "SmoothNoOutlines"
  493. Part.BrickColor = BrickColor.new("Magenta")
  494. Part.Material = "Neon"
  495. local Mesh = Instance.new("BlockMesh",Part)
  496. Mesh.Scale = Vector3.new(0.05,0.11,0.1) / 0.2 * Scale
  497. local PartWeld = Instance.new("Motor6D")
  498. PartWeld.Part0 = Barrel2
  499. PartWeld.Part1 = Part
  500. PartWeld.C0 = CFrame.new(Vector3.new(-0.06,0.135,0.925)*Scale)
  501. PartWeld.Parent = Part
  502.  
  503. local Part = Instance.new("Part",Model)
  504. Part.CanCollide = false
  505. Part.Position = Vector3.new(0,100,0)
  506. Part:BreakJoints()
  507. Part.FormFactor = "Custom"
  508. Part.Size = Vector3.new(0.2,0.2,0.2)
  509. Part.TopSurface = "SmoothNoOutlines"
  510. Part.BottomSurface = "SmoothNoOutlines"
  511. Part.FrontSurface = "SmoothNoOutlines"
  512. Part.BackSurface = "SmoothNoOutlines"
  513. Part.RightSurface = "SmoothNoOutlines"
  514. Part.LeftSurface = "SmoothNoOutlines"
  515. Part.BrickColor = BrickColor.new("Magenta")
  516. Part.Material = "Neon"
  517. local Mesh = Instance.new("BlockMesh",Part)
  518. Mesh.Scale = Vector3.new(0.025,0.1,0.1) / 0.2 * Scale
  519. local PartWeld = Instance.new("Motor6D")
  520. PartWeld.Part0 = Barrel2
  521. PartWeld.Part1 = Part
  522. PartWeld.C0 = CFrame.new(Vector3.new(0,0.135,-0.925)*Scale)
  523. PartWeld.Parent = Part
  524.  
  525. local Part = Instance.new("Part",Model)
  526. Part.CanCollide = false
  527. Part.Position = Vector3.new(0,100,0)
  528. Part:BreakJoints()
  529. Part.FormFactor = "Custom"
  530. Part.Size = Vector3.new(0.2,0.2,0.2)
  531. Part.Transparency = 1
  532. Part.TopSurface = "SmoothNoOutlines"
  533. Part.BottomSurface = "SmoothNoOutlines"
  534. Part.FrontSurface = "SmoothNoOutlines"
  535. Part.BackSurface = "SmoothNoOutlines"
  536. Part.RightSurface = "SmoothNoOutlines"
  537. Part.LeftSurface = "SmoothNoOutlines"
  538. Part.BrickColor = BrickColor.new("Magenta")
  539. Part.Material = "Neon"
  540. local Mesh = Instance.new("BlockMesh",Part)
  541. Mesh.Scale = Vector3.new(0.1,0.1,0.1) / 0.2 * Scale
  542. local PartWeld = Instance.new("Motor6D")
  543. PartWeld.Part0 = Barrel
  544. PartWeld.Part1 = Part
  545. PartWeld.C0 = CFrame.new(Vector3.new(0,0,-5)*Scale)
  546. PartWeld.Parent = Part
  547.  
  548. local Light = Instance.new("PointLight",Part)
  549. Light.Color = BrickColor.new("Gold").Color
  550. Light.Enabled = true
  551. Light.Shadows = true
  552. Light.Brightness = 0
  553. Light.Range = 6
  554.  
  555. local Part = Instance.new("Part",Model)
  556. Part.Material = "Neon"
  557. Part.CanCollide = false
  558. Part.Position = Vector3.new(0,100,0)
  559. Part:BreakJoints()
  560. Part.FormFactor = "Custom"
  561. Part.Size = Vector3.new(0.2,0.2,0.2)
  562. Part.TopSurface = "SmoothNoOutlines"
  563. Part.BottomSurface = "SmoothNoOutlines"
  564. Part.FrontSurface = "SmoothNoOutlines"
  565. Part.BackSurface = "SmoothNoOutlines"
  566. Part.RightSurface = "SmoothNoOutlines"
  567. Part.LeftSurface = "SmoothNoOutlines"
  568. Part.BrickColor = BrickColor.new("Purple")
  569. Part.Material = "Neon"
  570. Part.Transparency = 0.25
  571. local RecoilMesh = Instance.new("SpecialMesh",Part)
  572. RecoilMesh.MeshType = "FileMesh"
  573. RecoilMesh.MeshId = "http://www.roblox.com/Asset/?id=1323306"
  574. RecoilMesh.TextureId = "http://www.roblox.com/Asset/?id=98896228"
  575. RecoilMesh.Scale = Vector3.new(0.175,0,0.175) * Scale
  576. local PartWeld = Instance.new("Motor6D")
  577. PartWeld.Part0 = RealBarrel
  578. PartWeld.Part1 = Part
  579. PartWeld.C0 = CFrame.new(Vector3.new(0,0.95,0)*Scale)
  580. PartWeld.Parent = Part
  581.  
  582. function ShootBullet(Target,barrel)
  583. local barrel = barrel or Barrel
  584. local Bullet = Instance.new("Part",Workspace)
  585. Barrel.CanCollide = false
  586. Bullet.FormFactor = "Custom"
  587. Bullet.Size = Vector3.new(0.2,0.2,5)*Scale
  588. Bullet.TopSurface = "Smooth"
  589. Bullet.BottomSurface = "Smooth"
  590. Bullet.Anchored = true
  591. Bullet.CanCollide = false
  592. 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)
  593. Bullet.Transparency = 0.1
  594. Bullet.BrickColor = BrickColor.new("Purple")
  595. Bullet.Material = "Neon"
  596. --[[local Mesh = Instance.new("SpecialMesh",Bullet)
  597. Mesh.MeshType = "FileMesh"
  598. Mesh.Scale = Vector3.new(0.5,0.5,0.2)
  599. Mesh.MeshId = "http://www.roblox.com/asset/?id=2697549"
  600. --Mesh.TextureId = "http://www.roblox.com/asset/?id=2697544"]]
  601. local Mesh = Instance.new("BlockMesh",Bullet)
  602. Mesh.Scale = Vector3.new(0.2,0.2,5)*Scale/Bullet.Size
  603. IgnoreList[#IgnoreList+1] = Bullet
  604. RenderStepped:wait()
  605. for i = Speed,1000,Speed do -- Loop to do the bullet movement and stuff.
  606. local ray,Hit,Pos,SurfaceNormal;
  607. ray = Ray.new(Bullet.Position,((Bullet.CFrame*CFrame.Angles(math.rad(-Gravity),0,0)*CFrame.new(0,0,-Speed)).p-Bullet.Position).unit*Speed)
  608. Hit,Pos,SurfaceNormal = Workspace:FindPartOnRayWithIgnoreList(ray,IgnoreList)
  609. Bullet.CFrame = Bullet.CFrame*CFrame.Angles(math.rad(-Gravity),0,0)*CFrame.new(0,0,-Speed)
  610. if Hit ~= nil then
  611. 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"))
  612. if Hum ~= nil then
  613. player2 = Hit.Parent
  614. Hum:TakeDamage(5)
  615. if Hum.Parent.Torso == nil then
  616. q = Instance.new("Sound", Hum.Parent.UpperTorso)
  617. q.SoundId = "rbxassetid://924357545"
  618. q:Play()
  619.  
  620. elseif Hum.Parent.Torso ~= nil then
  621. q = Instance.new("Sound", Hum.Parent.Torso)
  622. q.SoundId = "rbxassetid://924357545"
  623. q:Play()
  624.  
  625. end
  626.  
  627. for i,v in pairs(player2:GetChildren()) do
  628. if v.ClassName == "Accessory" or v.ClassName == "Hat" then
  629. v:destroy()
  630. end
  631. end
  632.  
  633. local Hair = Instance.new("Part")
  634. Hair.Parent = player2
  635. Hair.Name = "Hair"
  636. Hair.Size = Vector3.new(0.1, 0.1, 0.1)
  637. Hair.CFrame = player2.Head.CFrame
  638. Hair:BreakJoints()
  639. Hair.CanCollide = false
  640. Hair.BrickColor = BrickColor.new("New Yeller")
  641. Hair.TopSurface = "Smooth"
  642. Hair.BottomSurface = "Smooth"
  643. Weld = Instance.new("Weld")
  644. Weld.Name = "Weld"
  645. Weld.Part0 = player2.Head
  646. Weld.Part1 = Hair
  647. Weld.Parent = player2.Head
  648. Weld.C0 = CFrame.new(0, -1.4, 0.2)*CFrame.fromEulerAnglesXYZ(0.1, 0, 0)
  649. Mesh = Instance.new("SpecialMesh")
  650. Mesh.Parent = Hair
  651. Mesh.MeshId = "rbxassetid://1389678629"
  652. Mesh.TextureId = "http://www.roblox.com/asset/?id=1389678737"
  653. Mesh.Scale = Vector3.new(0.050, 0.050, 0.050)
  654. Hum.Parent.Head.face.Texture = "rbxassetid://318927908"
  655.  
  656. local num = math.random(1, 3)
  657. print(num)
  658. local charPants = player2:FindFirstChildOfClass("Pants")
  659. local charShirt = player2: FindFirstChildOfClass("Shirt")
  660. if charPants and charShirt then
  661. if num == 1 then
  662. charShirt.ShirtTemplate = Shirt
  663. charPants.PantsTemplate = Pants
  664. elseif num == 2 then
  665. charShirt.ShirtTemplate = Shirt2
  666. charPants.PantsTemplate = Pants2
  667. elseif num == 3 then
  668. charShirt.ShirtTemplate = Shirt3
  669. charPants.PantsTemplate = Pants3
  670. end
  671. end
  672. end
  673. break
  674. end
  675. RenderStepped:wait()
  676. end
  677. Bullet:Destroy()
  678. end
  679.  
  680. Mouse.Button1Down:connect(function()
  681. if not Down and not DB then
  682. Down = true
  683. while Down do
  684. if Humanoid.Health == 0 then break end
  685. if not DB then
  686. DB = true
  687. local Sound = Instance.new("Sound",Barrel)
  688. Sound.SoundId = "rbxassetid://426232201" -- 132373574
  689. Sound.Volume = 5*Scale
  690. Sound.Pitch = (math.random(70,110)/100)/((Scale < 0.25 and 0.25) or (Scale > 4 and 4) or Scale)
  691. Sound:Play()
  692. Spawn(function()
  693. ShootBullet(Mouse.Hit.p,Barrel1)
  694. end)
  695. RecoilMesh.VertexColor = Vector3.new(1,math.random(160,245)/255,20/255)
  696. PartWeld.C0 = PartWeld.C0 * CFrame.Angles(0,math.rad(math.random(-40,40)),0)
  697. local Shell = Instance.new("Part",Workspace)
  698. Shell.FormFactor = "Custom"
  699. Shell.BrickColor = BrickColor.new("Purple")
  700. Shell.Material = "Neon"
  701. Shell.Size = Vector3.new(0.2,0.5,0.2)*Scale
  702. Shell.CFrame = Barrel.CFrame*CFrame.new(0.5,0.5,0)*CFrame.Angles(math.rad(-90),0,0)
  703. Shell.Velocity = ((Barrel.CFrame*CFrame.new(5,0,math.random(-2,2))).p-Barrel.CFrame.p)*5*Scale
  704. local Mesh = Instance.new("CylinderMesh",Shell)
  705. Mesh.Scale = Vector3.new(0.2,0.5,0.2)*Scale/Shell.Size
  706. Spawn(function()
  707. wait(5)
  708. Shell:Destroy()
  709. end)
  710. for i = 1,20,7.5 do
  711. RotationOffset = RotationOffset*CFrame.Angles(math.rad(7.5),0,0)
  712. Part1Joint = Part1Joint*CFrame.new(Vector3.new(0,-0.15,0)*Scale)
  713. Barrel2Weld.C0 = Barrel2Weld.C0*CFrame.new(Vector3.new(0,0,0.15)*Scale)
  714. Light.Brightness = Light.Brightness+38
  715. RecoilMesh.Scale = RecoilMesh.Scale+(Vector3.new(0,0.375,0)*Scale)
  716. RenderStepped:wait()
  717. end
  718. wait(0.02)
  719. for i = 1,20,3.75 do
  720. RotationOffset = RotationOffset*CFrame.Angles(math.rad(-3.75),0,0)
  721. Part1Joint = Part1Joint*CFrame.new(Vector3.new(0,0.075,0)*Scale)
  722. Barrel2Weld.C0 = Barrel2Weld.C0*CFrame.new(Vector3.new(0,0,-0.075)*Scale)
  723. Light.Brightness = Light.Brightness-19
  724. RecoilMesh.Scale = RecoilMesh.Scale+(Vector3.new(0,-0.1875,0)*Scale)
  725. RenderStepped:wait()
  726. end
  727. wait(0.02)
  728. DB = false
  729. end
  730. end
  731. end
  732. end)
  733.  
  734. Mouse.Button1Up:connect(function()
  735. Down = false
  736. end)
  737.  
  738. Mouse.KeyDown:connect(function(Key)
  739. if Key:lower() == "g" and not DB then
  740. DB = true
  741. if Gangster == true then
  742. for i = 1,70,5 do
  743. RotationOffset = RotationOffset*CFrame.Angles(0,math.rad(-5),0)
  744. RenderStepped:wait()
  745. end
  746. Gangster = false
  747. else
  748. for i = 1,70,5 do
  749. RotationOffset = RotationOffset*CFrame.Angles(0,math.rad(5),0)
  750. RenderStepped:wait()
  751. end
  752. Gangster = true
  753. end
  754. DB = false
  755. end
  756. end)
  757.  
  758. local Weld = Instance.new("Weld")
  759. Weld.Part0 = Torso
  760. Weld.Part1 = Character["Right Arm"]
  761. Weld.Parent = Torso
  762.  
  763. local Weld2 = Instance.new("Weld")
  764. Weld2.Part0 = Torso
  765. Weld2.Part1 = Character.Head
  766. Weld2.Parent = Torso
  767.  
  768. local RA = Character["Right Arm"]
  769.  
  770.  
  771. game:GetService("RunService"):BindToRenderStep("Pistol",Enum.RenderPriority.Character.Value,function()
  772. local Point = Torso.CFrame:vectorToObjectSpace(Mouse.Hit.p-Torso.CFrame.p)
  773. if Point.Z > 0 then
  774. if Point.X > 0 then
  775. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(Mouse.Hit.X,Torso.Position.Y,Mouse.Hit.Z))*CFrame.Angles(0,math.rad(90),0)
  776. elseif Point.X < 0 then
  777. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(Mouse.Hit.X,Torso.Position.Y,Mouse.Hit.Z))*CFrame.Angles(0,math.rad(-90),0)
  778. end
  779. end
  780.  
  781. local CFr = (Torso.CFrame*Part0Joint):toObjectSpace(CFrame.new((Torso.CFrame*Part0Joint).p,Mouse.Hit.p))--RayEnd))
  782. Weld.C0 = Part0Joint * (CFr-CFr.p) * RotationOffset
  783. Weld.C1 = Part1Joint
  784. Weld.Part0 = Torso
  785. Weld.Part1 = RA
  786. local CFr = (Torso.CFrame*Part0JointHead):toObjectSpace(CFrame.new((Torso.CFrame*Part0JointHead).p,Mouse.Hit.p))--RayEnd))
  787. Weld2.C0 = Part0JointHead * (CFr-CFr.p) * RotationOffsetHead
  788. Weld2.C1 = Part1JointHead
  789. Weld2.Part0 = Torso
  790. Weld2.Part1 = Character.Head
  791. local Last = Scale
  792. 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
  793. Speed = 20*Scale
  794. if Scale ~= Last then
  795. Part0Joint = CFrame.new(Vector3.new(1,0.75,0)*Scale*1.25)
  796. Part1Joint = CFrame.new(Vector3.new(-0.5,0.75,0)*Scale*1.25)
  797. Part0JointHead = CFrame.new(Vector3.new(0,1,0)*Scale*1.25)
  798. Part1JointHead = CFrame.new(Vector3.new(0,-0.5,0)*Scale*1.25)
  799. end
  800. end)
  801.  
  802. while true do
  803. wait(60)
  804. print("You're Using Trap Gun, Made By Melissa666666girl! :D")
  805. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement