Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pcall(function()
- epa = game:GetService("Players").LocalPlayer.EquippedPerkAmulet;
- if game.Players.LocalPlayer.Backpack:FindFirstChild("Super Sniper") then
- Tool = game.Players.LocalPlayer.Backpack:FindFirstChild("Super Sniper");
- elseif game.Players.LocalPlayer.Character:FindFirstChild("Super Sniper") then
- Tool = game.Players.LocalPlayer.Character:FindFirstChild("Super Sniper");
- end
- c = workspace.CurrentCamera;
- Handle = Tool:WaitForChild("Handle");
- enabled = true;
- scoping = false;
- color = BrickColor.new("Cyan");
- minDamage = _G.Damage;
- maxDamage = _G.Damage;
- probability = _G.CritChance;
- HitSound = Handle:WaitForChild("HitSound");
- storage = game:GetService("ReplicatedStorage");
- Utl = require(storage:WaitForChild("Utl"));
- vPlayer = game:GetService("Players").LocalPlayer;
- vCharacter = vPlayer.Character;
- debris = game:GetService("Debris");
- pro = workspace.Projectiles;
- function MakeLightning(p1, p2, p3, p4, p5)
- storage.InvolvedRemotes.Replicator:FireServer(Tool.Name, "Shot", {
- VFX = Tool.RayGun.VFX,
- ray = p1,
- partCount = p2,
- colour = p3,
- amplitude = p4,
- boltThickness = p5
- });
- p2 = p2 and 9;
- p3 = p3 or Color3.new(1, 1, 0);
- p4 = p4 and 3;
- p5 = p5 and 0.4;
- local v1 = tick();
- local v2 = {};
- local v3 = 0 - 1;
- while true do
- if v3 == 0 then
- table.insert(v2, p1.Origin);
- elseif v3 == p2 then
- table.insert(v2, p1.Origin + p1.Direction.Unit * (p1.Direction.magnitude / p2) * v3);
- else
- table.insert(v2, p1.Origin + p1.Direction.Unit * (p1.Direction.magnitude / p2) * v3 + Vector3.new(math.random(), math.random(), math.random()) * p4);
- end;
- if 0 <= 1 then
- if v3 < p2 then
- else
- break;
- end;
- elseif p2 < v3 then
- else
- break;
- end;
- v3 = v3 + 1;
- end;
- local v4 = {};
- local v5, v6, v7 = pairs(v2);
- while true do
- local v8, v9 = v5(v6, v7);
- if v8 then
- else
- break;
- end;
- v7 = v8;
- if 1 < v8 then
- local v10 = Instance.new("Part");
- v10.CanCollide = false;
- v10.Material = Enum.Material.Neon;
- v10.FormFactor = "Custom";
- v10.Size = Vector3.new(p5, p5, (v2[v8] - v2[v8 - 1]).magnitude);
- v10.Archivable = false;
- v10.Anchored = true;
- v10.Locked = true;
- v10.CFrame = CFrame.new((v2[v8] + v2[v8 - 1]) / 2, v2[v8]);
- v10.Transparency = 0;
- v10.Color = p3;
- v10.Parent = pro;
- local v11 = script.VFX:Clone();
- v11.Enabled = true;
- v11.Parent = v10;
- delay(0.15, function()
- v11.Enabled = false;
- end);
- table.insert(v4, v10);
- end;
- end;
- local v12 = 0;
- while true do
- if v12 < 1 then
- else
- break;
- end;
- v12 = math.min(1, v12 + 0.15 * (wait(0.06666666666666667) / 0.06666666666666667));
- local v13, v14, v15 = pairs(v4);
- while true do
- local v16, v17 = v13(v14, v15);
- if v16 then
- else
- break;
- end;
- v15 = v16;
- v17.Transparency = v12;
- end;
- end;
- local v18, v19, v20 = pairs(v4);
- while true do
- local v21, v22 = v18(v19, v20);
- if v21 then
- else
- break;
- end;
- v20 = v21;
- game.Debris:AddItem(v22, 1.5);
- end;
- end;
- function fire(p6, p7)
- local v23 = Ray.new(p7, p6 * 999);
- local v24, v25 = workspace:FindPartOnRayWithIgnoreList(v23, { vCharacter, pro });
- local l__magnitude__1 = (v23.Origin - v25).magnitude;
- spawn(function()
- --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);
- end);
- if v24 then
- if v24.Parent then
- if v24.Parent.Parent then
- if v24.Parent.Parent.Parent then
- 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")))));
- if v26 then
- if 0 < v26.Health then
- if v26 ~= nil then
- if v26.Name ~= "Monster" then
- if Utl.canAttack(nil, v26.Parent) then
- if Utl.checkForField(v26.Parent) then
- local v27 = "";
- if v24.Name == "Head" then
- v27 = "Head";
- end;
- local v28, v29 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, v24, v26, v27 .. Utl.isCrtcl(vPlayer, probability));
- v26.Parent.TakeDamage:FireServer(v28, Tool.Name, v29);
- Utl.Damage(v26, v28, v29);
- end;
- elseif v24.Parent.Name == "Portal" then
- if v24.Parent.Parent:FindFirstChild("PortalHealth") then
- if not v24.Parent:FindFirstChild("Shield") then
- if 0 < v24.Parent.Parent.PortalHealth.Value then
- local l__PortalHealth__30 = v24.Parent.Parent.PortalHealth;
- local v31, v32 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, l__PortalHealth__30.Parent, (Utl.isCrtcl(vPlayer, probability)));
- Utl.Damage(l__PortalHealth__30, v31, v32, v24);
- l__PortalHealth__30.TakeDamage:FireServer(math.min(v31, l__PortalHealth__30.Value), Tool.Name);
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif Utl.checkForField(v26.Parent) then
- v27 = "";
- if v24.Name == "Head" then
- v27 = "Head";
- end;
- v28, v29 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, v24, v26, v27 .. Utl.isCrtcl(vPlayer, probability));
- v26.Parent.TakeDamage:FireServer(v28, Tool.Name, v29);
- Utl.Damage(v26, v28, v29);
- end;
- elseif v24.Parent.Name == "Portal" then
- if v24.Parent.Parent:FindFirstChild("PortalHealth") then
- if not v24.Parent:FindFirstChild("Shield") then
- if 0 < v24.Parent.Parent.PortalHealth.Value then
- l__PortalHealth__30 = v24.Parent.Parent.PortalHealth;
- v31, v32 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, l__PortalHealth__30.Parent, (Utl.isCrtcl(vPlayer, probability)));
- Utl.Damage(l__PortalHealth__30, v31, v32, v24);
- l__PortalHealth__30.TakeDamage:FireServer(math.min(v31, l__PortalHealth__30.Value), Tool.Name);
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24.Parent.Name == "Portal" then
- if v24.Parent.Parent:FindFirstChild("PortalHealth") then
- if not v24.Parent:FindFirstChild("Shield") then
- if 0 < v24.Parent.Parent.PortalHealth.Value then
- l__PortalHealth__30 = v24.Parent.Parent.PortalHealth;
- v31, v32 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, l__PortalHealth__30.Parent, (Utl.isCrtcl(vPlayer, probability)));
- Utl.Damage(l__PortalHealth__30, v31, v32, v24);
- l__PortalHealth__30.TakeDamage:FireServer(math.min(v31, l__PortalHealth__30.Value), Tool.Name);
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24.Parent.Name == "Portal" then
- if v24.Parent.Parent:FindFirstChild("PortalHealth") then
- if not v24.Parent:FindFirstChild("Shield") then
- if 0 < v24.Parent.Parent.PortalHealth.Value then
- l__PortalHealth__30 = v24.Parent.Parent.PortalHealth;
- v31, v32 = Utl.FinaliseDamage(vPlayer, minDamage, maxDamage, l__PortalHealth__30.Parent, (Utl.isCrtcl(vPlayer, probability)));
- Utl.Damage(l__PortalHealth__30, v31, v32, v24);
- l__PortalHealth__30.TakeDamage:FireServer(math.min(v31, l__PortalHealth__30.Value), Tool.Name);
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- elseif v24:FindFirstChild("RayHitEgg") then
- v24.RayHitEgg:FireServer();
- end;
- end;
- end;
- end;
- end;
- Handle.Fire:Play();
- end;
- firerate = _G.Firerate;
- lastFire = 0;
- am = Tool:WaitForChild("Ammo");
- function onButton1Down(p8)
- if am.Value == "Y" then
- HitSound:Play();
- return;
- end;
- if not Tool.Enabled then
- return;
- end;
- if not enabled then
- return;
- end;
- local v33 = tick();
- if v33 - lastFire < firerate then
- return;
- end;
- lastFire = v33;
- local l__Humanoid__34 = Tool.Parent.Humanoid;
- if l__Humanoid__34 == nil then
- print("Humanoid not found");
- return;
- end;
- if not anim then
- anim = l__Humanoid__34:LoadAnimation(Tool.Cannon);
- end;
- enabled = false;
- p8.Icon = "rbxasset://textures\\GunWaitCursor.png";
- local l__p__35 = (Handle.CFrame * CFrame.new(0, 0.2, -2)).p;
- anim:Play(nil, nil, 1.5);
- if Utl.GetAmmoNum(epa.Value) then
- am.Value = Utl.Encrypt(Utl.Decrypt(am.Value) - 1);
- end;
- fire((l__Humanoid__34.TargetPoint - l__p__35).unit, l__p__35);
- Handle.Reload:Play();
- wait(firerate);
- enabled = true;
- p8.Icon = "rbxasset://textures\\GunCursor.png";
- end;
- magnifier = 0;
- function onEquippedLocal(p9)
- scoping = false;
- if p9 == nil then
- print("Mouse not found");
- return;
- end;
- p9.Icon = "rbxasset://textures\\GunCursor.png";
- p9.Button1Down:connect(function()
- onButton1Down(p9);
- end);
- p9.KeyDown:connect(function(p10)
- if string.lower(p10) ~= "c" then
- return;
- end;
- scoping = true;
- local v36 = magnifier - 0.1;
- while true do
- magnifier = v36;
- c.FieldOfView = 70 - 45 * v36;
- wait(0.025);
- if scoping then
- else
- break;
- end;
- if 0 <= 0.1 then
- if v36 < 1 then
- else
- break;
- end;
- elseif 1 < v36 then
- else
- break;
- end;
- v36 = v36 + 0.1;
- end;
- while true do
- wait(0.025);
- if scoping then
- else
- break;
- end;
- end;
- if not game:GetService("Players"):GetPlayerFromCharacter(Tool.Parent) then
- return;
- end;
- local v37 = magnifier - -0.1;
- while true do
- magnifier = v37;
- c.FieldOfView = 70 - 45 * v37;
- wait(0.025);
- if not scoping then
- else
- break;
- end;
- if 0 <= -0.1 then
- if v37 < 0 then
- else
- break;
- end;
- elseif 0 < v37 then
- else
- break;
- end;
- v37 = v37 + -0.1;
- end;
- magnifier = 0;
- end);
- p9.KeyUp:connect(function(p11)
- if string.lower(p11) ~= "c" then
- return;
- end;
- scoping = false;
- end);
- end;
- function Unequip(p12)
- c.FieldOfView = 70;
- magnifier = 0;
- scoping = false;
- end;
- Tool.Unequipped:connect(Unequip);
- Tool.Equipped:connect(onEquippedLocal);
- end)
- InfAmmo = coroutine.create(function()
- while wait() do
- pcall(function()
- if game.Players.LocalPlayer.Backpack:FindFirstChild("Super Sniper") then
- game.Players.LocalPlayer.Backpack["Super Sniper"].Ammo.Value = "6Y"
- elseif game.Players.LocalPlayer.Character:FindFirstChild("Super Sniper") then
- game.Players.LocalPlayer.Character["Super Sniper"].Ammo.Value = "6Y"
- end
- end)
- end
- end)
- coroutine.resume(InfAmmo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement