Advertisement
CaliberMag

Untitled

Oct 27th, 2020 (edited)
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.47 KB | None | 0 0
  1. pcall(function()
  2. epa = game:GetService("Players").LocalPlayer.EquippedPerkAmulet;
  3.  
  4. if game.Players.LocalPlayer.Backpack:FindFirstChild("Super Sniper") then
  5. Tool = game.Players.LocalPlayer.Backpack:FindFirstChild("Super Sniper");
  6. elseif game.Players.LocalPlayer.Character:FindFirstChild("Super Sniper") then
  7. Tool = game.Players.LocalPlayer.Character:FindFirstChild("Super Sniper");
  8. end
  9.  
  10. c = workspace.CurrentCamera;
  11. Handle = Tool:WaitForChild("Handle");
  12. enabled = true;
  13. scoping = false;
  14. color = BrickColor.new("Cyan");
  15. minDamage = _G.Damage;
  16. maxDamage = _G.Damage;
  17. probability = _G.CritChance;
  18. HitSound = Handle:WaitForChild("HitSound");
  19. storage = game:GetService("ReplicatedStorage");
  20. Utl = require(storage:WaitForChild("Utl"));
  21. vPlayer = game:GetService("Players").LocalPlayer;
  22. vCharacter = vPlayer.Character;
  23. debris = game:GetService("Debris");
  24. pro = workspace.Projectiles;
  25. function MakeLightning(p1, p2, p3, p4, p5)
  26. storage.InvolvedRemotes.Replicator:FireServer(Tool.Name, "Shot", {
  27. VFX = Tool.RayGun.VFX,
  28. ray = p1,
  29. partCount = p2,
  30. colour = p3,
  31. amplitude = p4,
  32. boltThickness = p5
  33. });
  34. p2 = p2 and 9;
  35. p3 = p3 or Color3.new(1, 1, 0);
  36. p4 = p4 and 3;
  37. p5 = p5 and 0.4;
  38. local v1 = tick();
  39. local v2 = {};
  40. local v3 = 0 - 1;
  41. while true do
  42. if v3 == 0 then
  43. table.insert(v2, p1.Origin);
  44. elseif v3 == p2 then
  45. table.insert(v2, p1.Origin + p1.Direction.Unit * (p1.Direction.magnitude / p2) * v3);
  46. else
  47. table.insert(v2, p1.Origin + p1.Direction.Unit * (p1.Direction.magnitude / p2) * v3 + Vector3.new(math.random(), math.random(), math.random()) * p4);
  48. end;
  49. if 0 <= 1 then
  50. if v3 < p2 then
  51.  
  52. else
  53. break;
  54. end;
  55. elseif p2 < v3 then
  56.  
  57. else
  58. break;
  59. end;
  60. v3 = v3 + 1;
  61. end;
  62. local v4 = {};
  63. local v5, v6, v7 = pairs(v2);
  64. while true do
  65. local v8, v9 = v5(v6, v7);
  66. if v8 then
  67.  
  68. else
  69. break;
  70. end;
  71. v7 = v8;
  72. if 1 < v8 then
  73. local v10 = Instance.new("Part");
  74. v10.CanCollide = false;
  75. v10.Material = Enum.Material.Neon;
  76. v10.FormFactor = "Custom";
  77. v10.Size = Vector3.new(p5, p5, (v2[v8] - v2[v8 - 1]).magnitude);
  78. v10.Archivable = false;
  79. v10.Anchored = true;
  80. v10.Locked = true;
  81. v10.CFrame = CFrame.new((v2[v8] + v2[v8 - 1]) / 2, v2[v8]);
  82. v10.Transparency = 0;
  83. v10.Color = p3;
  84. v10.Parent = pro;
  85. local v11 = script.VFX:Clone();
  86. v11.Enabled = true;
  87. v11.Parent = v10;
  88. delay(0.15, function()
  89. v11.Enabled = false;
  90. end);
  91. table.insert(v4, v10);
  92. end;
  93. end;
  94. local v12 = 0;
  95. while true do
  96. if v12 < 1 then
  97.  
  98. else
  99. break;
  100. end;
  101. v12 = math.min(1, v12 + 0.15 * (wait(0.06666666666666667) / 0.06666666666666667));
  102. local v13, v14, v15 = pairs(v4);
  103. while true do
  104. local v16, v17 = v13(v14, v15);
  105. if v16 then
  106.  
  107. else
  108. break;
  109. end;
  110. v15 = v16;
  111. v17.Transparency = v12;
  112. end;
  113. end;
  114. local v18, v19, v20 = pairs(v4);
  115. while true do
  116. local v21, v22 = v18(v19, v20);
  117. if v21 then
  118.  
  119. else
  120. break;
  121. end;
  122. v20 = v21;
  123. game.Debris:AddItem(v22, 1.5);
  124. end;
  125. end;
  126. function fire(p6, p7)
  127. local v23 = Ray.new(p7, p6 * 999);
  128. local v24, v25 = workspace:FindPartOnRayWithIgnoreList(v23, { vCharacter, pro });
  129. local l__magnitude__1 = (v23.Origin - v25).magnitude;
  130. spawn(function()
  131. --MakeLightning(Ray.new(v23.Origin, (v25 - v23.Origin).unit * l__magnitude__1), math.min(20, math.floor(l__magnitude__1 / 10) + 2), Color3.new(0, 1, 0.8), 0.5, 0.25);
  132. end);
  133. if v24 then
  134. if v24.Parent then
  135. if v24.Parent.Parent then
  136. if v24.Parent.Parent.Parent then
  137. local v26 = v24.Parent:findFirstChild("Humanoid") or (v24.Parent.Parent:findFirstChild("Humanoid") or (v24.Parent.Parent.Parent:findFirstChild("Humanoid") or (v24.Parent:findFirstChild("Monster") or (v24.Parent.Parent:findFirstChild("Monster") or v24.Parent.Parent.Parent:findFirstChild("Monster")))));
  138. if v26 then
  139. if 0 < v26.Health then
  140. if v26 ~= nil then
  141. if v26.Name ~= "Monster" then
  142. if Utl.canAttack(nil, v26.Parent) then
  143. if Utl.checkForField(v26.Parent) then
  144. local v27 = "";
  145. if v24.Name == "Head" then
  146. v27 = "Head";
  147. end;
  148. local v28, v29 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, v24, v26, v27 .. Utl.isCrtcl(vPlayer, probability));
  149. v26.Parent.TakeDamage:FireServer(v28, Tool.Name, v29);
  150. Utl.Damage(v26, v28, v29);
  151. end;
  152. elseif v24.Parent.Name == "Portal" then
  153. if v24.Parent.Parent:FindFirstChild("PortalHealth") then
  154. if not v24.Parent:FindFirstChild("Shield") then
  155. if 0 < v24.Parent.Parent.PortalHealth.Value then
  156. local l__PortalHealth__30 = v24.Parent.Parent.PortalHealth;
  157. local v31, v32 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, l__PortalHealth__30.Parent, (Utl.isCrtcl(vPlayer, probability)));
  158. Utl.Damage(l__PortalHealth__30, v31, v32, v24);
  159. l__PortalHealth__30.TakeDamage:FireServer(math.min(v31, l__PortalHealth__30.Value), Tool.Name);
  160. elseif v24:FindFirstChild("RayHitEgg") then
  161. v24.RayHitEgg:FireServer();
  162. end;
  163. elseif v24:FindFirstChild("RayHitEgg") then
  164. v24.RayHitEgg:FireServer();
  165. end;
  166. elseif v24:FindFirstChild("RayHitEgg") then
  167. v24.RayHitEgg:FireServer();
  168. end;
  169. elseif v24:FindFirstChild("RayHitEgg") then
  170. v24.RayHitEgg:FireServer();
  171. end;
  172. elseif Utl.checkForField(v26.Parent) then
  173. v27 = "";
  174. if v24.Name == "Head" then
  175. v27 = "Head";
  176. end;
  177. v28, v29 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, v24, v26, v27 .. Utl.isCrtcl(vPlayer, probability));
  178. v26.Parent.TakeDamage:FireServer(v28, Tool.Name, v29);
  179. Utl.Damage(v26, v28, v29);
  180. end;
  181. elseif v24.Parent.Name == "Portal" then
  182. if v24.Parent.Parent:FindFirstChild("PortalHealth") then
  183. if not v24.Parent:FindFirstChild("Shield") then
  184. if 0 < v24.Parent.Parent.PortalHealth.Value then
  185. l__PortalHealth__30 = v24.Parent.Parent.PortalHealth;
  186. v31, v32 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, l__PortalHealth__30.Parent, (Utl.isCrtcl(vPlayer, probability)));
  187. Utl.Damage(l__PortalHealth__30, v31, v32, v24);
  188. l__PortalHealth__30.TakeDamage:FireServer(math.min(v31, l__PortalHealth__30.Value), Tool.Name);
  189. elseif v24:FindFirstChild("RayHitEgg") then
  190. v24.RayHitEgg:FireServer();
  191. end;
  192. elseif v24:FindFirstChild("RayHitEgg") then
  193. v24.RayHitEgg:FireServer();
  194. end;
  195. elseif v24:FindFirstChild("RayHitEgg") then
  196. v24.RayHitEgg:FireServer();
  197. end;
  198. elseif v24:FindFirstChild("RayHitEgg") then
  199. v24.RayHitEgg:FireServer();
  200. end;
  201. elseif v24.Parent.Name == "Portal" then
  202. if v24.Parent.Parent:FindFirstChild("PortalHealth") then
  203. if not v24.Parent:FindFirstChild("Shield") then
  204. if 0 < v24.Parent.Parent.PortalHealth.Value then
  205. l__PortalHealth__30 = v24.Parent.Parent.PortalHealth;
  206. v31, v32 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, l__PortalHealth__30.Parent, (Utl.isCrtcl(vPlayer, probability)));
  207. Utl.Damage(l__PortalHealth__30, v31, v32, v24);
  208. l__PortalHealth__30.TakeDamage:FireServer(math.min(v31, l__PortalHealth__30.Value), Tool.Name);
  209. elseif v24:FindFirstChild("RayHitEgg") then
  210. v24.RayHitEgg:FireServer();
  211. end;
  212. elseif v24:FindFirstChild("RayHitEgg") then
  213. v24.RayHitEgg:FireServer();
  214. end;
  215. elseif v24:FindFirstChild("RayHitEgg") then
  216. v24.RayHitEgg:FireServer();
  217. end;
  218. elseif v24:FindFirstChild("RayHitEgg") then
  219. v24.RayHitEgg:FireServer();
  220. end;
  221. elseif v24.Parent.Name == "Portal" then
  222. if v24.Parent.Parent:FindFirstChild("PortalHealth") then
  223. if not v24.Parent:FindFirstChild("Shield") then
  224. if 0 < v24.Parent.Parent.PortalHealth.Value then
  225. l__PortalHealth__30 = v24.Parent.Parent.PortalHealth;
  226. v31, v32 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, l__PortalHealth__30.Parent, (Utl.isCrtcl(vPlayer, probability)));
  227. Utl.Damage(l__PortalHealth__30, v31, v32, v24);
  228. l__PortalHealth__30.TakeDamage:FireServer(math.min(v31, l__PortalHealth__30.Value), Tool.Name);
  229. elseif v24:FindFirstChild("RayHitEgg") then
  230. v24.RayHitEgg:FireServer();
  231. end;
  232. elseif v24:FindFirstChild("RayHitEgg") then
  233. v24.RayHitEgg:FireServer();
  234. end;
  235. elseif v24:FindFirstChild("RayHitEgg") then
  236. v24.RayHitEgg:FireServer();
  237. end;
  238. elseif v24:FindFirstChild("RayHitEgg") then
  239. v24.RayHitEgg:FireServer();
  240. end;
  241. end;
  242. end;
  243. end;
  244. end;
  245. Handle.Fire:Play();
  246. end;
  247. firerate = _G.Firerate;
  248. lastFire = 0;
  249. am = Tool:WaitForChild("Ammo");
  250. function onButton1Down(p8)
  251. if am.Value == "Y" then
  252. HitSound:Play();
  253. return;
  254. end;
  255. if not Tool.Enabled then
  256. return;
  257. end;
  258. if not enabled then
  259. return;
  260. end;
  261. local v33 = tick();
  262. if v33 - lastFire < firerate then
  263. return;
  264. end;
  265. lastFire = v33;
  266. local l__Humanoid__34 = Tool.Parent.Humanoid;
  267. if l__Humanoid__34 == nil then
  268. print("Humanoid not found");
  269. return;
  270. end;
  271. if not anim then
  272. anim = l__Humanoid__34:LoadAnimation(Tool.Cannon);
  273. end;
  274. enabled = false;
  275. p8.Icon = "rbxasset://textures\\GunWaitCursor.png";
  276. local l__p__35 = (Handle.CFrame * CFrame.new(0, 0.2, -2)).p;
  277. anim:Play(nil, nil, 1.5);
  278. if Utl.GetAmmoNum(epa.Value) then
  279. am.Value = Utl.Encrypt(Utl.Decrypt(am.Value) - 1);
  280. end;
  281. fire((l__Humanoid__34.TargetPoint - l__p__35).unit, l__p__35);
  282. Handle.Reload:Play();
  283. wait(firerate);
  284. enabled = true;
  285. p8.Icon = "rbxasset://textures\\GunCursor.png";
  286. end;
  287. magnifier = 0;
  288. function onEquippedLocal(p9)
  289. scoping = false;
  290. if p9 == nil then
  291. print("Mouse not found");
  292. return;
  293. end;
  294. p9.Icon = "rbxasset://textures\\GunCursor.png";
  295. p9.Button1Down:connect(function()
  296. onButton1Down(p9);
  297. end);
  298. p9.KeyDown:connect(function(p10)
  299. if string.lower(p10) ~= "c" then
  300. return;
  301. end;
  302. scoping = true;
  303. local v36 = magnifier - 0.1;
  304. while true do
  305. magnifier = v36;
  306. c.FieldOfView = 70 - 45 * v36;
  307. wait(0.025);
  308. if scoping then
  309.  
  310. else
  311. break;
  312. end;
  313. if 0 <= 0.1 then
  314. if v36 < 1 then
  315.  
  316. else
  317. break;
  318. end;
  319. elseif 1 < v36 then
  320.  
  321. else
  322. break;
  323. end;
  324. v36 = v36 + 0.1;
  325. end;
  326. while true do
  327. wait(0.025);
  328. if scoping then
  329.  
  330. else
  331. break;
  332. end;
  333. end;
  334. if not game:GetService("Players"):GetPlayerFromCharacter(Tool.Parent) then
  335. return;
  336. end;
  337. local v37 = magnifier - -0.1;
  338. while true do
  339. magnifier = v37;
  340. c.FieldOfView = 70 - 45 * v37;
  341. wait(0.025);
  342. if not scoping then
  343.  
  344. else
  345. break;
  346. end;
  347. if 0 <= -0.1 then
  348. if v37 < 0 then
  349.  
  350. else
  351. break;
  352. end;
  353. elseif 0 < v37 then
  354.  
  355. else
  356. break;
  357. end;
  358. v37 = v37 + -0.1;
  359. end;
  360. magnifier = 0;
  361. end);
  362. p9.KeyUp:connect(function(p11)
  363. if string.lower(p11) ~= "c" then
  364. return;
  365. end;
  366. scoping = false;
  367. end);
  368. end;
  369. function Unequip(p12)
  370. c.FieldOfView = 70;
  371. magnifier = 0;
  372. scoping = false;
  373. end;
  374. Tool.Unequipped:connect(Unequip);
  375. Tool.Equipped:connect(onEquippedLocal);
  376. end)
  377.  
  378. InfAmmo = coroutine.create(function()
  379. while wait() do
  380. pcall(function()
  381. if game.Players.LocalPlayer.Backpack:FindFirstChild("Super Sniper") then
  382. game.Players.LocalPlayer.Backpack["Super Sniper"].Ammo.Value = "6Y"
  383. elseif game.Players.LocalPlayer.Character:FindFirstChild("Super Sniper") then
  384. game.Players.LocalPlayer.Character["Super Sniper"].Ammo.Value = "6Y"
  385. end
  386. end)
  387. end
  388. end)
  389.  
  390. coroutine.resume(InfAmmo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement