Advertisement
Wubzer

Wxsp

Aug 30th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.89 KB | None | 0 0
  1. --// Variables
  2. local ScriptInfo = ({
  3.     ["Name"] = "Wxsp",
  4.     ["Description"] = "OP Laser Wisp",
  5.     ["Version"] = "v1.0",
  6.     ["Author"] = "WXBZ",
  7.     ["Editted"] = false,
  8.     ["EditAuthor"] = ""
  9. });
  10. local Players = (game.Players);
  11. local Player = (Players.LocalPlayer);
  12. local Character = (Player.Character);
  13. local Mouse = (Player:GetMouse());
  14. local WxspPart;
  15. local GuiText;
  16. local Mode = (1);
  17. local Modes = {
  18.     "Beam",
  19.     "Aimbot",
  20.     "Automatic"
  21. };
  22.  
  23.  
  24.  
  25.  
  26. --// TypeWriter Function
  27. do
  28.     function TypeWriter(DebrisTime, String, BaseObj)
  29.         --// Type Writer Effect
  30.         --// Created by: Wubzer
  31.         --// I found the "magic number" 0.58333 just through trial and error of finding the perfect dynamic factor.
  32.         --// Destroy Extra Type Writer
  33.         if (String == "[" .. Player.Name .. "]: " or String == nil) then return; end;
  34.         if (workspace:FindFirstChild(Player.Name .. "[TypeWriterText]")) then workspace[Player.Name .. "[TypeWriterText]"]:Destroy(); end;
  35.         --// Variables
  36.         local VectorUp = (CFrame.new(0, -3.5, 0));
  37.         local TypePart = (Instance.new("Part", workspace));
  38.         local TypeBill = (Instance.new("BillboardGui", TypePart));
  39.         local TypeText = (Instance.new("TextLabel", TypeBill));
  40.         local TypeWeld = (Instance.new("Weld", TypePart));
  41.         --// TypePart
  42.         TypePart.BrickColor = (BrickColor.new("Really black"));
  43.         TypePart.Transparency = (1);
  44.         TypePart.Name = (Player.Name .. "[TypeWriterText]");
  45.         TypePart.CFrame = (BaseObj.CFrame)
  46.         TypePart.Anchored = (false);
  47.         TypePart.CanCollide = (false);
  48.         TypePart.Size = (Vector3.new(1, 1, 1));
  49.         --// TypeBill
  50.         TypeBill.Name = ("TypeBill");
  51.         TypeBill.Size = UDim2.new(string.len(String) * 0.58333, 0, 0.86, 0);
  52.         --// TypeText
  53.         TypeText.BackgroundTransparency = (1);
  54.         TypeText.Name = ("TypeText");
  55.         TypeText.Size = (UDim2.new(1, 0, 1, 0));
  56.         TypeText.Font = (Enum.Font.Bodoni);
  57.         TypeText.Text = ("");
  58.         TypeText.TextColor3 = (Color3.new(0, 0, 0));
  59.         TypeText.TextScaled = (true);
  60.         TypeText.TextStrokeColor3 = (Color3.new(1, 0, 0));
  61.         TypeText.TextStrokeTransparency = (0);
  62.         --// TypeWeld
  63.         TypeWeld.Part0 = (BaseObj);
  64.         TypeWeld.Part1 = (TypePart);
  65.         TypeWeld.C0 = (BaseObj.CFrame:inverse());
  66.         TypeWeld.C1 = (BaseObj.CFrame:inverse() * VectorUp);
  67.         --// Debris
  68.         game.Debris:AddItem(TypePart, (DebrisTime + (string.len(String) * 0.05)));
  69.         --// Change Text
  70.         for i = 1, string.len(String) do
  71.             if (not workspace:FindFirstChild(Player.Name .. "[TypeWriterText]")) then break; end;
  72.             workspace:FindFirstChild(Player.Name .. "[TypeWriterText]").TypeBill.TypeText.Text = (string.sub(String, 1, i));
  73.             wait(0.05);
  74.         end;
  75.     end;
  76.     Player.Chatted:Connect(function(Msg)
  77.         TypeWriter(7, "[" .. Player.Name .. "]: " .. Msg, Character.HumanoidRootPart);
  78.     end);
  79. end;
  80.  
  81.  
  82.  
  83.  
  84. --// Init
  85. do
  86.     --// Wxsp
  87.     --// Variables
  88.     WxspPart = (Instance.new("Part", Character));
  89.     local Weld = (Instance.new("Weld", WxspPart));
  90.     local PEmit = (Instance.new("ParticleEmitter", WxspPart));
  91.     --// WxspPart
  92.     WxspPart.BrickColor = (BrickColor.new("Really red"));
  93.     WxspPart.Material = (Enum.Material.Neon);
  94.     WxspPart.Transparency = (0.1);
  95.     WxspPart.Name = ("WxspPart");
  96.     WxspPart.CanCollide = (false);
  97.     WxspPart.Shape = (Enum.PartType.Ball);
  98.     WxspPart.Size = (Vector3.new(0.7));
  99.     --// Weld
  100.     Weld.Part0 = (Character.HumanoidRootPart);
  101.     Weld.Part1 = (WxspPart);
  102.     Weld.C0 = (Character.HumanoidRootPart.CFrame:inverse());
  103.     Weld.C1 = (Character.HumanoidRootPart.CFrame:inverse() * CFrame.new(3, -4, 2));
  104.     --// PEmit
  105.     local clr = (Color3.new(1, 0, 0));
  106.     PEmit.Color = (ColorSequence.new(clr, clr));
  107.     PEmit.LightEmission = (0.3);
  108.     PEmit.Size = (NumberSequence.new(0.13, 0.0625));
  109.     PEmit.Texture = ("rbxassetid://930850620");
  110.     PEmit.Transparency = (NumberSequence.new(0, 1));
  111.     PEmit.Acceleration = (Vector3.new(0, -50, 0));
  112.     PEmit.Lifetime = (NumberRange.new(0.3, 0.5));
  113.     PEmit.Rate = (100);
  114.     PEmit.Speed = (NumberRange.new(0, 0));
  115.     PEmit.SpreadAngle = (Vector2.new(5, 0));
  116.     --// Gui
  117.     --// Variables
  118.     local Gui = (Instance.new("ScreenGui", Player.PlayerGui));
  119.     GuiText = (Instance.new("TextLabel", Gui));
  120.     local TextCons = (Instance.new("UITextSizeConstraint", GuiText));
  121.     --// Gui
  122.     Gui.Name = ("WxspGui");
  123.     --// GuiText
  124.     GuiText.BackgroundTransparency = (1);
  125.     GuiText.Name =  ("WxspText");
  126.     GuiText.Position = (UDim2.new(0, 0, 0.9, 0));
  127.     GuiText.Size = (UDim2.new(1, 0, 0.06, 0));
  128.     GuiText.Font = (Enum.Font.Bodoni);
  129.     GuiText.Text = ("Mode: " .. Modes[Mode]);
  130.     GuiText.TextColor3 = (Color3.new(0, 0, 0));
  131.     GuiText.TextScaled = (true);
  132.     GuiText.TextStrokeColor3 = (Color3.new(1, 0, 0));
  133.     GuiText.TextStrokeTransparency = (0);
  134.     --// TextCons
  135.     TextCons.Name = ("TextConstraint");
  136.     TextCons.MaxTextSize = (35);
  137.     --// Init Message
  138.     TypeWriter(0.7, "Name: " .. ScriptInfo["Name"], Character.HumanoidRootPart);
  139.     repeat wait() until (not workspace:FindFirstChild(Player.Name .. "[TypeWriterText]"));
  140.     TypeWriter(0.7, "Desc: " .. ScriptInfo["Description"], Character.HumanoidRootPart);
  141.     repeat wait() until (not workspace:FindFirstChild(Player.Name .. "[TypeWriterText]"));
  142.     TypeWriter(0.7, "Version: " .. ScriptInfo["Version"], Character.HumanoidRootPart);
  143.     repeat wait() until (not workspace:FindFirstChild(Player.Name .. "[TypeWriterText]"));
  144.     TypeWriter(0.7, "Author: " .. ScriptInfo["Author"], Character.HumanoidRootPart);
  145.     repeat wait() until (not workspace:FindFirstChild(Player.Name .. "[TypeWriterText]"));
  146.     if (ScriptInfo["Editted"]) then TypeWriter(0.7, "Edit Author: " .. ScriptInfo["EditAuthor"], Character.HumanoidRootPart); end;
  147. end;
  148.  
  149.  
  150.  
  151.  
  152. --// Handling
  153. do
  154.     function KeyPressing()
  155.         for _, i in pairs(game:GetService("UserInputService"):GetKeysPressed()) do
  156.             if (i.KeyCode == Enum.KeyCode.X) then
  157.                 return true;
  158.             end;
  159.         end;
  160.         return false;
  161.     end;
  162.     --// "Tools"
  163.     game:GetService("UserInputService").InputBegan:Connect(function(K)
  164.         if (K.KeyCode == Enum.KeyCode.Z) then
  165.             if (Mode < #Modes) then
  166.                 Mode = (Mode + 1);
  167.                 GuiText.Text = ("Mode: " .. Modes[Mode]);
  168.             else
  169.                 Mode = (1);
  170.                 GuiText.Text = ("Mode: " .. Modes[Mode]);
  171.             end;
  172.         elseif (K.KeyCode == Enum.KeyCode.X) then
  173.             --// Beam
  174.             if (Mode == 1) then
  175.                 local BeamRay = Ray.new(WxspPart.CFrame.p, (Mouse.Hit.p - WxspPart.CFrame.p).unit * 1e8);
  176.                 local Obj, Pos = workspace:FindPartOnRay(BeamRay, WxspPart, false, true);
  177.                 local Beam = Instance.new("Part", workspace);
  178.                 local Dis = (WxspPart.CFrame.p - Pos).magnitude;
  179.                 Beam.Anchored = (true);
  180.                 Beam.CanCollide = (false);
  181.                 Beam.BrickColor = BrickColor.new("Really red");
  182.                 Beam.Material = Enum.Material.Neon;
  183.                 Beam.Size = Vector3.new(0.3, 0.3, Dis);
  184.                 Beam.CFrame = CFrame.new(WxspPart.CFrame.p, Pos) * CFrame.new(0, 0, -Dis / 2);
  185.                 if (Obj ~= nil and Obj.Parent and game.Players:FindFirstChild(Obj.Parent.Name) and Obj.Parent ~= Character or Obj ~= nil and Obj.Parent and Obj.Parent:FindFirstChild("Humanoid") and Obj.Parent ~= Character) then
  186.                     Obj.Parent:BreakJoints();
  187.                 elseif (Obj ~= nil and Obj.Parent.Parent and game.Players:FindFirstChild(Obj.Parent.Parent.Name) and Obj.Parent.Parent ~= Character or Obj ~= nil and Obj.Parent.Parent and Obj.Parent.Parent:FindFirstChild("Humanoid") and Obj.Parent.Parent ~= Character) then
  188.                     Obj.Parent.Parent:BreakJoints();
  189.                 end
  190.                 game.Debris:AddItem(Beam, .1);
  191.             --// Aimbot
  192.             elseif (Mode == 2) then
  193.                 for _, i in pairs(game.Players:GetPlayers()) do
  194.                     if (i ~= Player and i.Character:FindFirstChild("Humanoid") and i.Character.Humanoid.Health > 0) then
  195.                         local BeamRay = Ray.new(WxspPart.CFrame.p, (i.Character.Head.CFrame.p - WxspPart.CFrame.p).unit * 1e8);
  196.                         local Obj, Pos = workspace:FindPartOnRay(BeamRay, WxspPart, false, true);
  197.                         local Beam = Instance.new("Part", workspace);
  198.                         local Dis = (WxspPart.CFrame.p - Pos).magnitude;
  199.                         if (Obj ~= nil and Obj.Parent and Obj.Parent.Name == i.Name) then
  200.                             Beam.Anchored = (true);
  201.                             Beam.CanCollide = (false);
  202.                             Beam.BrickColor = BrickColor.new("Really red");
  203.                             Beam.Material = Enum.Material.Neon;
  204.                             Beam.Size = Vector3.new(0.3, 0.3, Dis);
  205.                             Beam.CFrame = CFrame.new(WxspPart.CFrame.p, Pos) * CFrame.new(0, 0, -Dis / 2);
  206.                             Obj.Parent:BreakJoints();
  207.                             game.Debris:AddItem(Beam, 0.1);
  208.                             break;
  209.                         end;
  210.                     end
  211.                 end
  212.             --// Automatic
  213.             elseif (Mode == 3) then
  214.                 repeat wait()
  215.                     local BeamRay = Ray.new(WxspPart.CFrame.p, (Mouse.Hit.p - WxspPart.CFrame.p).unit * 1e8);
  216.                     local Obj, Pos = workspace:FindPartOnRay(BeamRay, WxspPart, false, true);
  217.                     if (Obj ~= nil and Obj.Name ~= "AutomaticLaser") then
  218.                         local Beam = Instance.new("Part", workspace);
  219.                         local Dis = (WxspPart.CFrame.p - Pos).magnitude;
  220.                         Beam.Name = "AutomaticLaser";
  221.                         Beam.Anchored = (true);
  222.                         Beam.CanCollide = (false);
  223.                         Beam.BrickColor = BrickColor.new("Really red");
  224.                         Beam.Material = Enum.Material.Neon;
  225.                         Beam.Size = Vector3.new(0.3, 0.3, Dis);
  226.                         Beam.CFrame = CFrame.new(WxspPart.CFrame.p, Pos) * CFrame.new(0, 0, -Dis / 2);
  227.                         if (Obj.Parent and Obj.Parent:FindFirstChild("Humanoid") and Obj.Parent ~= Character and Obj.Parent:FindFirstChild("Humanoid").Health > 0) then
  228.                             local dmg = math.random(35, 80);
  229.                             local DamagePart = (Instance.new("Part", workspace));
  230.                             local DamageBill = (Instance.new("BillboardGui", DamagePart));
  231.                             local DamageText = (Instance.new("TextLabel", DamageBill));
  232.                             local BodyVelocity = (Instance.new("BodyVelocity", DamagePart))
  233.                             DamagePart.BrickColor = BrickColor.new("Really black");
  234.                             DamagePart.Transparency = 1;
  235.                             DamagePart.CFrame = Obj.Parent.Humanoid.RootPart.CFrame * CFrame.new(math.random(-4, 4), 3, math.random(-4, 4));
  236.                             DamagePart.Size = Vector3.new(0, 0, 0);
  237.                             DamageBill.Size = UDim2.new(4, 0, 2, 0);
  238.                             DamageText.BackgroundTransparency = 1;
  239.                             DamageText.Size = UDim2.new(1, 0, 1, 0);
  240.                             DamageText.Font = Enum.Font.Bodoni;
  241.                             DamageText.Text = "-" .. dmg;
  242.                             DamageText.TextColor3 = Color3.new(0, 0, 0);
  243.                             DamageText.TextScaled = true;
  244.                             DamageText.TextStrokeColor3 = Color3.new(1, 0, 0);
  245.                             DamageText.TextStrokeTransparency = 0;
  246.                             BodyVelocity.MaxForce = Vector3.new(1e8, 1e8, 1e8);
  247.                             BodyVelocity.P = 1e8;
  248.                             BodyVelocity.Velocity = Vector3.new(0, 0.7, 0);
  249.                             game.Debris:AddItem(DamagePart, 2);
  250.                             Obj.Parent:FindFirstChild("Humanoid").Health = Obj.Parent:FindFirstChild("Humanoid").Health - dmg;
  251.                         elseif (Obj.Parent.Parent and Obj.Parent.Parent:FindFirstChild("Humanoid") and Obj.Parent.Parent ~= Character and Obj.Parent.Parent:FindFirstChild("Humanoid").Health > 0) then
  252.                             local dmg = math.random(35, 80);
  253.                             local DamagePart = (Instance.new("Part", workspace));
  254.                             local DamageBill = (Instance.new("BillboardGui", DamagePart));
  255.                             local DamageText = (Instance.new("TextLabel", DamageBill));
  256.                             local BodyVelocity = (Instance.new("BodyVelocity", DamagePart))
  257.                             DamagePart.BrickColor = BrickColor.new("Really black");
  258.                             DamagePart.Transparency = 1;
  259.                             DamagePart.CFrame = Obj.Parent.Parent.Humanoid.RootPart.CFrame * CFrame.new(math.random(-4, 4), 3, math.random(-4, 4));
  260.                             DamagePart.Size = Vector3.new(0, 0, 0);
  261.                             DamageBill.Size = UDim2.new(4, 0, 2, 0);
  262.                             DamageText.BackgroundTransparency = 1;
  263.                             DamageText.Size = UDim2.new(1, 0, 1, 0);
  264.                             DamageText.Font = Enum.Font.Bodoni;
  265.                             DamageText.Text = "-" .. dmg;
  266.                             DamageText.TextColor3 = Color3.new(0, 0, 0);
  267.                             DamageText.TextScaled = true;
  268.                             DamageText.TextStrokeColor3 = Color3.new(1, 0, 0);
  269.                             DamageText.TextStrokeTransparency = 0;
  270.                             BodyVelocity.MaxForce = Vector3.new(1e8, 1e8, 1e8);
  271.                             BodyVelocity.P = 1e8;
  272.                             BodyVelocity.Velocity = Vector3.new(0, 0.7, 0);
  273.                             game.Debris:AddItem(DamagePart, 2);
  274.                             Obj.Parent.Parent:FindFirstChild("Humanoid").Health = Obj.Parent.Parent:FindFirstChild("Humanoid").Health - dmg;
  275.                         end
  276.                         game.Debris:AddItem(Beam, .1);
  277.                     end;
  278.                 until (not KeyPressing());
  279.             end;
  280.         end;
  281.     end);
  282. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement