Advertisement
InTesting

VS Bubble Trouble V2

Dec 9th, 2018
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.54 KB | None | 0 0
  1. local player = owner
  2. local person = owner.Character
  3.  
  4. -- Doesn't Work against advanced scripts
  5. -- Also thanks for 1k visits guys.
  6. -- CHLua
  7. if person ==nil then
  8. else
  9.    
  10.     if person:FindFirstChild("Part") then
  11.     else
  12.     local box = person:GetExtentsSize()
  13.     local part = Instance.new("Part",person)
  14.     part.Shape = "Ball"
  15.     part.Size = Vector3.new(box.Y*2,box.Y*2,box.Y*2)
  16.     part.CanCollide = false
  17.     part.Transparency = .75
  18.     part.BrickColor = BrickColor.new("Really red")
  19.     part.Material = Enum.Material.Granite
  20.     part.CFrame = person.HumanoidRootPart.CFrame
  21.     local weld = Instance.new("WeldConstraint",part)
  22.     weld.Part1 = part
  23.     weld.Part0 = person.HumanoidRootPart
  24.     local at = Instance.new("Attachment",part)
  25.     at.Position = Vector3.new(0,part.Size.Y/2,0)
  26.     local at1 = Instance.new("Attachment",part)
  27.     at1.Position = Vector3.new(0,part.Size.Y/-2,0)
  28.     local trail = Instance.new("Trail",part)
  29.     trail.Attachment0 = at
  30.     trail.Attachment1 = at1
  31.     trail.Lifetime = 1
  32.     trail.MinLength = 0
  33.     trail.MaxLength = 10
  34.     local at2 = Instance.new("Attachment",part)
  35.     at2.Position = Vector3.new(part.Size.X/2,0,0)
  36.     local at3 = Instance.new("Attachment",part)
  37.     at3.Position = Vector3.new(part.Size.X/-2,0,0)
  38.     local trail = Instance.new("Trail",part)
  39.     trail.Attachment0 = at2
  40.     trail.Attachment1 = at3
  41.     trail.Lifetime = 1
  42.     trail.MinLength = 0
  43.     trail.MaxLength = 10
  44.     if person.Humanoid.RigType=="R15" then
  45.         local part1 = Instance.new("Part",person)
  46.     part1.Shape = "Ball"
  47.     part1.Size = Vector3.new(box.Y*2,box.Y*2,box.Y*2)
  48.     part1.CanCollide = false
  49.     part1.Transparency = 1
  50.     part1.BrickColor = BrickColor.new("Cyan")
  51.     part1.CFrame = person.UpperTorso.CFrame
  52.     local weld = Instance.new("WeldConstraint",part1)
  53.     weld.Part1 = part1
  54.     weld.Part0 = person.UpperTorso
  55.     end
  56.     part.Touched:Connect(function(hit)
  57.         if hit.Parent.Name==person.Name then
  58.         else
  59.             local head = hit.Parent:FindFirstChild("Head")
  60.             local HRP = hit.Parent:FindFirstChild("HumanoidRootPart")
  61.             if hit.Parent:FindFirstChild("Humanoid") then
  62.                 hit.Parent.Humanoid.Health = 0
  63.             elseif head then
  64.                 head:Destroy()
  65.             elseif HRP then
  66.                 HRP:Destroy()
  67.             elseif hit.Parent:FindFirstChildWhichIsA("SpecialMesh",true) then
  68.                 if hit.Parent:FindFirstChildWhichIsA("SpecialMesh",true).MeshType=="Head" then
  69.                     hit.Parent:FindFirstChildWhichIsA("SpecialMesh",true):Destroy()
  70.                 end
  71.             elseif hit.Parent:FindFirstChild("Humanoid") then
  72.                 local humanoid = hit.Parent:FindFirstChild("Humanoid")
  73.                 if humanoid.Health==0 then
  74.                 else
  75.                
  76.                 part:Destroy()
  77.                 local part = Instance.new("Part",person)
  78.                 part.Shape = "Ball"
  79.                 part.Size = Vector3.new(box.Y*2,box.Y*2,box.Y*2)
  80.                 part.CanCollide = false
  81.                 part.Transparency = .75
  82.                 part.BrickColor = BrickColor.new("Cyan")
  83.                 part.CFrame = person.HumanoidRootPart.CFrame
  84.                 local weld = Instance.new("WeldConstraint",part)
  85.                 weld.Part1 = part
  86.                 weld.Part0 = person.HumanoidRootPart
  87.                 end
  88.             end
  89.            
  90.         end
  91.     end)
  92.     if person.Humanoid.Health==0 then
  93.         local part = Instance.new("Part",person)
  94.                 part.Shape = "Ball"
  95.                 part.Size = Vector3.new(box.Y*2,box.Y*2,box.Y*2)
  96.                 part.CanCollide = false
  97.                 part.Transparency = .75
  98.                 part.BrickColor = BrickColor.new("Cyan")
  99.                 part.CFrame = person.HumanoidRootPart.CFrame
  100.                 local weld = Instance.new("WeldConstraint",part)
  101.                 weld.Part1 = part
  102.                 weld.Part0 = person.HumanoidRootPart
  103.     end
  104.     end
  105. end
  106.  
  107. local rope = Instance.new("RopeConstraint")    
  108.     if person.Humanoid.RigType==Enum.HumanoidRigType.R15 then
  109.         rope.Attachment0 = person.LeftHand.LeftGripAttachment
  110.     elseif person.Humanoid.RigType==Enum.HumanoidRigType.R6 then
  111.         local attachment2 = Instance.new("Attachment")
  112.         attachment2.Position = Vector3.new(0,-1,0)
  113.         attachment2.Parent = person["Left Arm"]
  114.         rope.Attachment0 = attachment2
  115.     end
  116.     rope.Length = 20
  117.     rope.Visible = true
  118.     local part1 = Instance.new("Part")
  119.     part1.Shape = "Ball"
  120.     part1.Size = Vector3.new(4,4,4)
  121.     part1.Material = Enum.Material.Granite
  122.     part1.BrickColor = BrickColor.new("Really red")
  123.     part1.Position = person.Head.Position
  124.     part1.Massless = true
  125.     local attachment = Instance.new("Attachment")
  126.     attachment.Parent = part1
  127.     part1.Parent = game.Workspace
  128.     rope.Attachment1 = attachment
  129.     rope.Parent = person
  130. local rope = Instance.new("RopeConstraint")    
  131.     if person.Humanoid.RigType==Enum.HumanoidRigType.R15 then
  132.         rope.Attachment0 = person.RightHand.RightGripAttachment
  133.     elseif person.Humanoid.RigType==Enum.HumanoidRigType.R6 then
  134.         local attachment2 = Instance.new("Attachment")
  135.         attachment2.Position = Vector3.new(0,-1,0)
  136.         attachment2.Parent = person["Right Arm"]
  137.         rope.Attachment0 = attachment2
  138.     end
  139.     rope.Length = 20
  140.     rope.Visible = true
  141.     local part2 = Instance.new("Part")
  142.     part2.Shape = "Ball"
  143.     part2.Size = Vector3.new(4,4,4)
  144.     part2.Material = Enum.Material.Granite
  145.     part2.BrickColor = BrickColor.new("Really red")
  146.     part2.Position = person.Head.Position
  147.     part2.Massless = true
  148.     local attachment = Instance.new("Attachment")
  149.     attachment.Parent = part2
  150.     part2.Parent = game.Workspace
  151.     rope.Attachment1 = attachment
  152.     rope.Parent = person
  153.     part2.Touched:Connect(function(hit)
  154.         if hit.Parent.Name==person.Name then
  155.         else
  156.         local humanoid = hit.Parent:FindFirstChild("Humanoid")
  157.         local head = hit.Parent:FindFirstChild("Head")
  158.         local HRP = hit.Parent:FindFirstChild("HumanoidRootPart")
  159.             if humanoid then
  160.                 humanoid.Health = 0
  161.             elseif head then
  162.                 head:Destroy()
  163.             elseif HRP then
  164.                 HRP:Destroy()
  165.             elseif hit.Parent:FindFirstChildWhichIsA("SpecialMesh",true) then
  166.                 if hit.Parent:FindFirstChildWhichIsA("SpecialMesh",true).MeshType=="Head" then
  167.                     hit.Parent:FindFirstChildWhichIsA("SpecialMesh",true):Destroy()
  168.                 end
  169.             end
  170.         end
  171.             end)
  172.             part1.Touched:Connect(function(hit)
  173.         if hit.Parent.Name==person.Name then
  174.         else
  175.         local humanoid = hit.Parent:FindFirstChild("Humanoid")
  176.         local head = hit.Parent:FindFirstChild("Head")
  177.         local HRP = hit.Parent:FindFirstChild("HumanoidRootPart")
  178.             if humanoid then
  179.                 humanoid.Health = 0
  180.             elseif head then
  181.                 head:Destroy()
  182.             elseif HRP then
  183.                 HRP:Destroy()
  184.             elseif hit.Parent:FindFirstChildWhichIsA("SpecialMesh",true) then
  185.                 if hit.Parent:FindFirstChildWhichIsA("SpecialMesh",true).MeshType=="Head" then
  186.                     hit.Parent:FindFirstChildWhichIsA("SpecialMesh",true):Destroy()
  187.                 end
  188.             end
  189.         end
  190.     end)
  191.     if person.Name=="SoftlockedUnderZero" then
  192.         local torso = person.UpperTorso
  193.         local part3 = Instance.new("Part")
  194.         local attachment2 = Instance.new("Attachment")
  195.         part3.CanCollide = false
  196.         attachment2.Position = Vector3.new(torso.Size.X*.25,torso.Size.Y*.15,torso.Size.Z*-.25)
  197.         part3.Shape = "Ball"
  198.         part3.Size = Vector3.new(torso.Size.X/2,torso.Size.X/2,torso.Size.X/2)
  199.         attachment2.Parent = torso
  200.         part3.Position = attachment2.WorldPosition
  201.         part3.Anchored = false
  202.         part3.BrickColor = person["Body Colors"].TorsoColor
  203.         part3.Parent = person
  204.         local weld = Instance.new("WeldConstraint")
  205.         weld.Part1 = torso
  206.         weld.Part0 = part3
  207.         weld.Parent = torso
  208.         local part4 = Instance.new("Part")
  209.         local attachment3 = Instance.new("Attachment")
  210.         part4.CanCollide = false
  211.         attachment3.Position = Vector3.new(torso.Size.X*-.25,torso.Size.Y*.15,torso.Size.Z*-.25)
  212.         part4.Shape = "Ball"
  213.         part4.Size = Vector3.new(torso.Size.X/2,torso.Size.X/2,torso.Size.X/2)
  214.         attachment3.Parent = torso
  215.         part4.Position = attachment3.WorldPosition
  216.         part4.Anchored = false
  217.         part4.BrickColor = person["Body Colors"].TorsoColor
  218.         part4.Parent = person
  219.         local weld = Instance.new("WeldConstraint")
  220.         weld.Part1 = torso
  221.         weld.Part0 = part4
  222.         weld.Parent = torso
  223.         local part5 = Instance.new("Part")
  224.         local attachment4 = Instance.new("Attachment")
  225.         part5.CanCollide = false
  226.         attachment4.Position = Vector3.new(0,torso.Size.Y*.15,torso.Size.Z*-.25)
  227.         part5.Shape = "Cylinder"
  228.         part5.Size = Vector3.new(torso.Size.X/2,torso.Size.X/2,torso.Size.X/2)
  229.         attachment4.Parent = torso
  230.         part5.Position = attachment4.WorldPosition
  231.         part5.Orientation = torso.Orientation
  232.         part5.Anchored = false
  233.         part5.BrickColor = person["Body Colors"].TorsoColor
  234.         part5.Parent = person
  235.         local weld = Instance.new("WeldConstraint")
  236.         weld.Part1 = torso
  237.         weld.Part0 = part5
  238.         weld.Parent = torso
  239.         part3.TopSurface = "Smooth"
  240.         part4.TopSurface = "Smooth"
  241.         part5.TopSurface = "Smooth"
  242.         part3.BottomSurface= "Smooth"
  243.         part4.BottomSurface= "Smooth"
  244.         part5.BottomSurface= "Smooth"
  245.     end
  246.     while true do
  247.         person.Humanoid.Health = "inf"
  248.         person.Humanoid.PlatformStand = false
  249.         person.Humanoid.WalkSpeed = 200
  250.         person.Humanoid.JumpPower = 200
  251.         person.Humanoid.MaxHealth = "inf"
  252.         wait(.25)
  253.     end
  254.  
  255.  
  256. -- This script has been converted to FE by iPxter
  257.  
  258.  
  259. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  260. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  261. do
  262.     print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  263.     script.Parent = Player.Character
  264.  
  265.     --RemoteEvent for communicating
  266.     local Event = Instance.new("RemoteEvent")
  267.     Event.Name = "UserInput_Event"
  268.     --Fake event to make stuff like Mouse.KeyDown work
  269.     local function fakeEvent()
  270.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  271.         t.connect = t.Connect
  272.         return t
  273.     end
  274.     --Creating fake input objects with fake variables
  275.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  276.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  277.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  278.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  279.     end}
  280.     --Merged 2 functions into one by checking amount of arguments
  281.     CAS.UnbindAction = CAS.BindAction
  282.  
  283.     --This function will trigger the events that have been :Connect()'ed
  284.     local function te(self,ev,...)
  285.         local t = m[ev]
  286.         if t and t._fakeEvent and t.Function then
  287.             t.Function(...)
  288.         end
  289.     end
  290.     m.TrigEvent = te
  291.     UIS.TrigEvent = te
  292.     Event.OnServerEvent:Connect(function(plr,io)
  293.         if plr~=Player then return end
  294.         if io.isMouse then
  295.             m.Target = io.Target
  296.             m.Hit = io.Hit
  297.         else
  298.             local b = io.UserInputState == Enum.UserInputState.Begin
  299.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  300.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  301.             end
  302.             for _,t in pairs(CAS.Actions) do
  303.                 for _,k in pairs(t.Keys) do
  304.                     if k==io.KeyCode then
  305.                         t.Function(t.Name,io.UserInputState,io)
  306.                     end
  307.                 end
  308.             end
  309.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  310.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  311.         end
  312.     end)
  313.     Event.Parent = NLS([==[
  314.     local Player = game:GetService("Players").LocalPlayer
  315.     local Event = script:WaitForChild("UserInput_Event")
  316.     local UIS = game:GetService("UserInputService")
  317.     local input = function(io,a)
  318.         if a then return end
  319.         --Since InputObject is a client-side instance, we create and pass table instead
  320.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  321.     end
  322.     UIS.InputBegan:Connect(input)
  323.     UIS.InputEnded:Connect(input)
  324.     local Mouse = Player:GetMouse()
  325.     local h,t
  326.     --Give the server mouse data 30 times every second, but only if the values changed
  327.     --If player is not moving their mouse, client won't fire events
  328.     while wait(1/30) do
  329.         if h~=Mouse.Hit or t~=Mouse.Target then
  330.             h,t=Mouse.Hit,Mouse.Target
  331.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  332.         end
  333.     end]==],Player.Character)
  334.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  335. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement