Advertisement
SheeityArtist

PEESTOL

Aug 19th, 2017
939
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.45 KB | None | 0 0
  1. -------------------------------------------
  2. --YOU SEE IVAN, IF HOLD PEESTOL LIKE THIS--
  3. -------------------------------------------
  4. --By CKbackup--
  5. ---------------
  6.  
  7. player = game.Players.LocalPlayer
  8. mouse = player:GetMouse()
  9. chara = player.Character
  10. equipped = false
  11. del = false
  12.  
  13. ArtificialHB = Instance.new("BindableEvent", script)
  14. ArtificialHB.Name = "Heartbeat"
  15. script:WaitForChild("Heartbeat")
  16. frame = 0.03333333333333
  17. tf = 0
  18. allowframeloss = false
  19. tossremainder = false
  20. lastframe = tick()
  21. script.Heartbeat:Fire()
  22. game:GetService("RunService").Heartbeat:connect(function(s, p)
  23. tf = tf + s
  24. if tf >= frame then
  25. if allowframeloss then
  26. script.Heartbeat:Fire()
  27. lastframe = tick()
  28. else
  29. for i = 1, math.floor(tf / frame) do
  30. script.Heartbeat:Fire()
  31. end
  32. lastframe = tick()
  33. end
  34. if tossremainder then
  35. tf = 0
  36. else
  37. tf = tf - frame * math.floor(tf / frame)
  38. end
  39. end
  40. end)
  41. function swait(num)
  42. if num == 0 or num == nil then
  43. ArtificialHB.Event:wait()
  44. else
  45. for i = 0, num*30 do
  46. ArtificialHB.Event:wait()
  47. end
  48. end
  49. end
  50.  
  51. idleweldc0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, -0.866025388, -0.500000238, 0, -0.500000238, 0.866025388)
  52. equipweldc0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  53.  
  54.  
  55. New = function(Object, Parent, Name, Data)
  56. local Object = Instance.new(Object)
  57. for Index, Value in pairs(Data or {}) do
  58. Object[Index] = Value
  59. end
  60. Object.Parent = Parent
  61. Object.Name = Name
  62. return Object
  63. end
  64.  
  65. Pistol = New("Model",chara,"Pistol",{})
  66. PistolPart = New("Part",Pistol,"PistolPart",{FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.600000024, 1.39999998, 1),CFrame = CFrame.new(-11.6999979, 0.700000286, 0.299999952, 1, 0, 0, 0, -0, 1, 0, -1, 0),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  67. Mesh = New("SpecialMesh",PistolPart,"Mesh",{Scale = Vector3.new(2, 2, 2),VertexColor = Vector3.new(0.100000001, 0.100000001, 0.100000001),MeshId = "http://www.roblox.com/Asset/?id=72012879",TextureId = "http://www.roblox.com/asset/?id=72012859",MeshType = Enum.MeshType.FileMesh,})
  68. HandleWeld = New("ManualWeld",PistolPart,"HandleWeld",{Part0 = PistolPart,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, -0.866025388, -0.500000238, 0, -0.500000238, 0.866025388),C1 = CFrame.new(-1.09999752, -1.10000038, -0.199999988, 1, 0, 0, 0, 0, 1, 0, -1, 0),})
  69. MuzzleFlash = New("Part",Pistol,"MuzzleFlash",{Transparency = 1,Transparency = 1,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000033, 0.199999973, 0.200000033),CFrame = CFrame.new(-11.6999989, 1.10000026, -0.699999928, 1, 0, 0, 0, 0, 1, 0, -1, 0),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  70. Weld = New("ManualWeld",MuzzleFlash,"Weld",{Part0 = MuzzleFlash,Part1 = PistolPart,C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 1, 0),C1 = CFrame.new(-9.53674316e-07, 0.999999881, 0.399999976, 1, 0, 0, -0, -0, -1, 0, 1, 0),})
  71.  
  72. local li = Instance.new("PointLight",MuzzleFlash)
  73. li.Enabled = false
  74. li.Range = 3
  75. li.Color = Color3.new(1,.5,0)
  76. flash = Instance.new("BillboardGui",MuzzleFlash)
  77. flash.Size = UDim2.new(.5,0,.5,0)
  78. flash.Adornee = MuzzleFlash
  79. simgl = Instance.new("ImageLabel",flash)
  80. simgl.Position = UDim2.new(0,0,0,0)
  81. simgl.Size = UDim2.new(1,0,1,0)
  82. simgl.Image = "http://www.roblox.com/asset/?id=386535299"
  83. simgl.BackgroundTransparency = 1
  84. simgl.ImageTransparency = 1
  85.  
  86. --Sounds--
  87. function LoadSnd(id,loop,vol,pit)
  88. local snd = New("Sound",PistolPart,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit})
  89. return snd
  90. end
  91. EquipSnd = LoadSnd(169799883,false,1,1)
  92. ReloadSnd = LoadSnd(147323220,false,1,1)
  93. ShootSnd = LoadSnd(846233576,false,1,1)
  94.  
  95. --Play Sound in Part--
  96. function PlaySnd(snd,part)
  97. local sound = snd:Clone()
  98. sound.PlayOnRemove = true
  99. sound.Parent = part
  100. sound:Destroy()
  101. end
  102.  
  103. --Damage Function--
  104. function dealdmg(dude,damage,env,toim,kby,kbx)
  105. coroutine.resume(coroutine.create(function()
  106. if dude ~= chara and dude:FindFirstChild("IsHit") == nil then
  107. finaldmg = damage + math.random(-env,env)
  108. dudehum = dude:FindFirstChildOfClass("Humanoid")
  109. dudehum.MaxHealth = 100
  110. dudehum.Health = dudehum.Health - finaldmg
  111. local vall = Instance.new("ObjectValue",dude)
  112. vall.Name = "IsHit"
  113. game.Debris:AddItem(vall,toim)
  114. local bfos = Instance.new("BodyVelocity",dude.Head)
  115. bfos.P = 20000
  116. bfos.MaxForce = Vector3.new(bfos.P,bfos.P,bfos.P)
  117. bfos.Velocity = Vector3.new(0,kby,0) + chara.HumanoidRootPart.CFrame.lookVector * kbx
  118. game.Debris:AddItem(bfos,.1)
  119. local naeeym2 = Instance.new("BillboardGui",dude)
  120. naeeym2.Size = UDim2.new(0,100,0,40)
  121. naeeym2.StudsOffset = Vector3.new(0,3,0)
  122. naeeym2.Adornee = dude.Head
  123. naeeym2.Name = "TalkingBillBoard"
  124. local tecks2 = Instance.new("TextLabel",naeeym2)
  125. tecks2.BackgroundTransparency = 1
  126. tecks2.BorderSizePixel = 0
  127. tecks2.Font = "Fantasy"
  128. tecks2.FontSize = "Size24"
  129. tecks2.TextStrokeTransparency = 0
  130. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  131. tecks2.Size = UDim2.new(1,0,0.5,0)
  132. if chara.Name == "CKbackup" then
  133. dude:BreakJoints()
  134. tecks2.Text = "DEATH"
  135. tecks2.TextColor3 = Color3.new(1,0,0)
  136. else
  137. tecks2.Text = "-"..finaldmg
  138. tecks2.TextColor3 = Color3.new(1,0.6,0)
  139. end
  140. for i = 1, 5 do
  141. wait(.1)
  142. tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0)
  143. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2
  144. tecks2.TextTransparency = tecks2.TextTransparency + .2
  145. end
  146. naeeym2:Destroy()
  147. end
  148. end))
  149. end
  150.  
  151. --Explode Hitbox--
  152. function ExHitbox(rad,pos,damage,env,toim,kby,kbx)
  153. local E = Instance.new("Explosion")
  154. E.Position = pos
  155. E.Parent = game.Workspace
  156. E.BlastRadius = rad
  157. E.BlastPressure = 0
  158. E.Visible = false
  159. E.Hit:connect(function(hit)
  160. if hit.Parent:FindFirstChildOfClass("Humanoid")~=nil then
  161. dealdmg(hit.Parent,damage,env,toim,kby,kbx)
  162. end
  163. end)
  164. end
  165. --Chat Function--
  166. function chatfunc(text)
  167. coroutine.resume(coroutine.create(function()
  168. if chara:FindFirstChild("TalkingBillBoard")~= nil then
  169. chara:FindFirstChild("TalkingBillBoard"):destroy()
  170. end
  171. local naeeym2 = Instance.new("BillboardGui",chara)
  172. naeeym2.Size = UDim2.new(0,100,0,40)
  173. naeeym2.StudsOffset = Vector3.new(0,3,0)
  174. naeeym2.Adornee = chara.Head
  175. naeeym2.Name = "TalkingBillBoard"
  176. local tecks2 = Instance.new("TextLabel",naeeym2)
  177. tecks2.BackgroundTransparency = 1
  178. tecks2.BorderSizePixel = 0
  179. tecks2.Text = ""
  180. tecks2.Font = "Fantasy"
  181. tecks2.FontSize = "Size24"
  182. tecks2.TextStrokeTransparency = 0
  183. tecks2.TextColor3 = Color3.new(1,1,1)
  184. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  185. tecks2.Size = UDim2.new(1,0,0.5,0)
  186. for i = 1,string.len(text),1 do
  187. tecks2.Text = string.sub(text,1,i)
  188. swait(.01)
  189. end
  190. swait(1)
  191. for i = 1, 10 do
  192. swait()
  193. tecks2.Position = tecks2.Position - UDim2.new(0,0,.025,0)
  194. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.1
  195. tecks2.TextTransparency = tecks2.TextTransparency + .1
  196. end
  197. naeeym2:Destroy()
  198. end))
  199. end
  200.  
  201. function onChatted(msg)
  202. --chatfunc(msg)
  203. end
  204. player.Chatted:connect(onChatted)
  205.  
  206. --Clerp Animations--
  207. TC = chara.HumanoidRootPart.RootJoint
  208. HC = chara.Torso.Neck
  209. RAC = chara.Torso["Right Shoulder"]
  210. LAC = chara.Torso["Left Shoulder"]
  211. RLC = chara.Torso["Right Hip"]
  212. LLC = chara.Torso["Left Hip"]
  213. TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  214. HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  215. RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  216. LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  217. RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  218. LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  219. RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  220. LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  221. RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  222. LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  223. RW = nil
  224. LW = nil
  225. RLW = nil
  226. LLW = nil
  227.  
  228. function DestroyLegWelds()
  229. RLC = New("Motor6D",chara.Torso,"Right Hip",{Part0 = chara.Torso,Part1 = chara["Right Leg"],C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),})
  230. LLC = New("Motor6D",chara.Torso,"Left Hip",{Part0 = chara.Torso,Part1 = chara["Left Leg"],C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),})
  231. RLW:Destroy()
  232. LLW:Destroy()
  233. end
  234.  
  235. function clerp(a,b,c)
  236. return a:lerp(b,c)
  237. end
  238.  
  239. ITCF = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  240. IHCF = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  241. IRWF = (RWF + Vector3.new(1,1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(-90))
  242.  
  243. local motor6dm = Instance.new("Model",chara)
  244.  
  245. function equip()
  246. if equipped == false then
  247. del = true
  248. equipped = true
  249. EquipSnd:Play()
  250. LAC.Parent = motor6dm
  251. RAC.Parent = motor6dm
  252. RW = Instance.new("Weld",HC.Parent)
  253. RW.Part1 = HC.Parent
  254. RW.Part0 = chara["Right Arm"]
  255. RW.C0 = RWF
  256. LW = Instance.new("Weld",HC.Parent)
  257. LW.Part1 = HC.Parent
  258. LW.Part0 = chara["Left Arm"]
  259. LW.C0 = LWF
  260. for i = 0,.6,.1 do
  261. swait()
  262. TC.C0 = clerp(TCF,ITCF,.4+i)
  263. HC.C0 = clerp(HCF,IHCF,.4+i)
  264. RW.C0 = clerp(RWF,(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-40),math.rad(-70),0),.4+i)
  265. end
  266. HandleWeld:Destroy()
  267. HandleWeld = New("ManualWeld",PistolPart,"HandleWeld",{Part0 = PistolPart,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 1, 0, 0, -0, -0, -1, 0, 1, 0),C1 = CFrame.new(-0.199997902, -1.70000005, -0.200000286, 1, 0, 0, 0, 0, 1, 0, -1, 0),})
  268. for i = 0,.6,.1 do
  269. swait()
  270. RW.C0 = clerp((RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-40),math.rad(-70),0),IRWF,.4+i)
  271. end
  272. elseif equipped == true then
  273. equipped = false
  274. for i = 0,.6,.1 do
  275. swait()
  276. RW.C0 = clerp((RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-40),math.rad(-70),0),IRWF,.6-i)
  277. end
  278. HandleWeld:Destroy()
  279. HandleWeld = New("ManualWeld",PistolPart,"HandleWeld",{Part0 = PistolPart,Part1 = chara.Torso,C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, -0.866025388, -0.500000238, 0, -0.500000238, 0.866025388),C1 = CFrame.new(-1.09999752, -1.10000038, -0.199999988, 1, 0, 0, 0, 0, 1, 0, -1, 0),})
  280. for i = 0,.6,.1 do
  281. swait()
  282. TC.C0 = clerp(TCF,ITCF,.6-i)
  283. HC.C0 = clerp(HCF,IHCF,.6-i)
  284. RW.C0 = clerp(RWF,(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-40),math.rad(-70),0),.6-i)
  285. end
  286. RW:Destroy()
  287. LW:Destroy()
  288. LAC.Parent = chara["Left Arm"]
  289. RAC.Parent = chara["Right Arm"]
  290. end
  291. del = false
  292. end
  293.  
  294. function reload()
  295. if ammo < 7 and del == false and equipped == true then
  296. del = true
  297. ReloadSnd:Play()
  298. local MagPartt = New("Part",chara,"MagPart",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000033, 0.399999976, 1),CFrame = CFrame.new(-9.29999638, 0.700002313, -0.200002074, 1, 0, 0, 0, 0, 1, 0, -1, 0),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  299. MagPartt.CFrame = PistolPart.CFrame
  300. coroutine.resume(coroutine.create(function()
  301. swait(3)
  302. for i = 0,1.1 do
  303. swait()
  304. MagPartt.Transparency = i
  305. end
  306. MagPartt:Destroy()
  307. end))
  308. for i = 0,.6,.1 do
  309. swait()
  310. TC.C0 = clerp(ITCF,TCF,.4+i)
  311. HC.C0 = clerp(IHCF,HCF,.4+i)
  312. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-110),math.rad(-70),0),.4+i)
  313. end
  314. local MagPart = New("Part",chara,"MagPart",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000033, 0.399999976, 1),CFrame = CFrame.new(-9.29999638, 0.700002313, -0.200002074, 1, 0, 0, 0, 0, 1, 0, -1, 0),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  315. local Weld = New("ManualWeld",MagPart,"Weld",{Part0 = MagPart,Part1 = chara["Left Arm"],C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 1, 0),C1 = CFrame.new(0.200001717, -1.20000005, -0.200000286, 1, 0, 0, 0, 0, 1, 0, -1, 0),})
  316. for i = 0,.6,.1 do
  317. swait()
  318. LW.C0 = clerp(LWF,(LWF + Vector3.new(-.5,-.5,.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(70),0),.4+i)
  319. end
  320. swait(.5)
  321. MagPart:Destroy()
  322. for i = 0,.6,.1 do
  323. swait()
  324. LW.C0 = clerp(LWF,(LWF + Vector3.new(-.5,-.5,.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(70),0),.6-i)
  325. end
  326. for i = 0,.6,.1 do
  327. swait()
  328. TC.C0 = clerp(ITCF,TCF,.6-i)
  329. HC.C0 = clerp(IHCF,HCF,.6-i)
  330. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-110),math.rad(-70),0),.6-i)
  331. end
  332. ammo = 7
  333. del = false
  334. end
  335. end
  336.  
  337. --Keys--
  338. ammo = 7
  339. function onKeyDown(key)
  340. if del == false then
  341. if key == "f" then
  342. equip()
  343. elseif key == "r" then
  344. reload()
  345. end
  346. end
  347. end
  348. function onButton1Down()
  349. if del == false and equipped == true then
  350. del = true
  351. ammo = ammo - 1
  352. local EffectPart = Instance.new("Part",chara)
  353. EffectPart.Size = Vector3.new(1,1,1)
  354. EffectPart.Anchored = true
  355. EffectPart.BrickColor = BrickColor.new("Bright yellow")
  356. EffectPart.Material = "Neon"
  357. EffectPart.Position = mouse.Hit.p
  358. local mehs1 = Instance.new("SpecialMesh",EffectPart)
  359. mehs1.MeshType = "Sphere"
  360. mehs1.Scale = Vector3.new(.2,.2,.2)
  361. local P = Instance.new("Part")
  362. local Place0 = MuzzleFlash.CFrame
  363. local Place1 = EffectPart.CFrame
  364. local meshla = Instance.new("BlockMesh", P)
  365. meshla.Scale = Vector3.new(.2,.2,1)
  366. P.formFactor = 0
  367. P.Size = Vector3.new(1,1,(Place0.p - Place1.p).magnitude)
  368. P.Name = "Laser"
  369. P.CFrame = CFrame.new((Place0.p + Place1.p)/2,Place0.p)
  370. P.Parent = game.Workspace
  371. P.BrickColor = BrickColor.new("Bright yellow")
  372. P.Material = "Neon"
  373. P.Anchored = true
  374. P.CanCollide = false
  375. P.Locked = true
  376. P.BottomSurface = "Smooth"
  377. P.TopSurface = "Smooth"
  378. ExHitbox(1,EffectPart.Position,16,3,.1,0,0)
  379. ShootSnd:Play()
  380. coroutine.resume(coroutine.create(function()
  381. for i = 0,1,.2 do
  382. swait(.001)
  383. local Place0 = MuzzleFlash.CFrame
  384. local Place1 = EffectPart.CFrame
  385. P.Size = Vector3.new(1,1,(Place0.p - Place1.p).magnitude)
  386. P.CFrame = CFrame.new((Place0.p + Place1.p)/2,Place0.p)
  387. mehs1.Scale = Vector3.new(.2+.3*i,.2+.3*i,.2+.3*i)
  388. meshla.Scale = Vector3.new(.1+.3*i,.1+.3*i,1)
  389. EffectPart.Transparency = i
  390. P.Transparency = i
  391. end
  392. P:Destroy()
  393. EffectPart:Destroy()
  394. end))
  395. local hitpt = Instance.new("Part",game.Workspace)
  396. hitpt.Size = Vector3.new(0,0,1)
  397. hitpt.TopSurface = 0
  398. hitpt.BottomSurface = 0
  399. local bf = Instance.new("BodyVelocity",hitpt)
  400. bf.P = 10000
  401. bf.MaxForce = Vector3.new(bf.P,bf.P,bf.P)
  402. game.Debris:AddItem(bf,.1)
  403. hitpt.Position = PistolPart.Position
  404. hitpt.CFrame = PistolPart.CFrame
  405. bf.Velocity = Vector3.new(0,5,0) + PistolPart.CFrame.rightVector*10
  406. local hitm = Instance.new("SpecialMesh",hitpt)
  407. hitm.MeshId = "http://www.roblox.com/asset/?id=94295100"
  408. hitm.TextureId = "http://www.roblox.com/asset/?id=94287792"
  409. hitm.Scale = Vector3.new(3,3,4)
  410. coroutine.resume(coroutine.create(function()
  411. swait(3)
  412. for i = 0,1.1 do
  413. swait(.001)
  414. hitpt.Transparency = i
  415. end
  416. hitpt:Destroy()
  417. end))
  418. simgl.ImageTransparency = 0
  419. li.Enabled = true
  420. for i = 0,1,.2 do
  421. RW.C0 = clerp(IRWF,(RWF + Vector3.new(1,1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(-120)),i)
  422. simgl.ImageTransparency = i
  423. li.Range = 5 - 5*i
  424. swait()
  425. end
  426. li.Enabled = false
  427. simgl.ImageTransparency = 1
  428. for i = 0,1,.2 do
  429. RW.C0 = clerp(IRWF,(RWF + Vector3.new(1,1.4,.5)) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),math.rad(-120)),1-i)
  430. swait()
  431. end
  432. if ammo == 0 then
  433. ReloadSnd:Play()
  434. local MagPartt = New("Part",chara,"MagPart",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000033, 0.399999976, 1),CFrame = CFrame.new(-9.29999638, 0.700002313, -0.200002074, 1, 0, 0, 0, 0, 1, 0, -1, 0),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  435. MagPartt.CFrame = PistolPart.CFrame
  436. coroutine.resume(coroutine.create(function()
  437. swait(3)
  438. for i = 0,1.1 do
  439. swait()
  440. MagPartt.Transparency = i
  441. end
  442. MagPartt:Destroy()
  443. end))
  444. for i = 0,.6,.1 do
  445. swait()
  446. TC.C0 = clerp(ITCF,TCF,.4+i)
  447. HC.C0 = clerp(IHCF,HCF,.4+i)
  448. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-110),math.rad(-70),0),.4+i)
  449. end
  450. local MagPart = New("Part",chara,"MagPart",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000033, 0.399999976, 1),CFrame = CFrame.new(-9.29999638, 0.700002313, -0.200002074, 1, 0, 0, 0, 0, 1, 0, -1, 0),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
  451. local Weld = New("ManualWeld",MagPart,"Weld",{Part0 = MagPart,Part1 = chara["Left Arm"],C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 1, 0),C1 = CFrame.new(0.200001717, -1.20000005, -0.200000286, 1, 0, 0, 0, 0, 1, 0, -1, 0),})
  452. for i = 0,.6,.1 do
  453. swait()
  454. LW.C0 = clerp(LWF,(LWF + Vector3.new(-.5,-.5,.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(70),0),.4+i)
  455. end
  456. swait(.5)
  457. MagPart:Destroy()
  458. for i = 0,.6,.1 do
  459. swait()
  460. LW.C0 = clerp(LWF,(LWF + Vector3.new(-.5,-.5,.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(70),0),.6-i)
  461. end
  462. for i = 0,.6,.1 do
  463. swait()
  464. TC.C0 = clerp(ITCF,TCF,.6-i)
  465. HC.C0 = clerp(IHCF,HCF,.6-i)
  466. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.5,.5,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-110),math.rad(-70),0),.6-i)
  467. end
  468. ammo = 7
  469. end
  470. del = false
  471. end
  472. end
  473. if mouse then
  474. mouse.Button1Down:connect(onButton1Down)
  475. mouse.KeyDown:connect(onKeyDown)
  476. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement