Advertisement
InTesting

VS Passive Bubble

Dec 8th, 2018
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.98 KB | None | 0 0
  1. local player = owner
  2. local person = owner.Character
  3.  
  4. -- Doesn't Work against advanced scripts
  5.  
  6. -- CHLua
  7. if person ==nil then
  8. else
  9.     if person:FindFirstChild("Part") then
  10.     else
  11.    
  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("Cyan")
  19.     part.CFrame = person.HumanoidRootPart.CFrame
  20.     local weld = Instance.new("WeldConstraint",part)
  21.     weld.Part1 = part
  22.     weld.Part0 = person.HumanoidRootPart
  23.     if person.Humanoid.RigType=="R15" then
  24.         local part1 = Instance.new("Part",person)
  25.     part1.Shape = "Ball"
  26.     part1.Size = Vector3.new(box.Y*2,box.Y*2,box.Y*2)
  27.     part1.CanCollide = false
  28.     part1.Transparency = 1
  29.     part1.BrickColor = BrickColor.new("Cyan")
  30.     part1.CFrame = person.UpperTorso.CFrame
  31.     local weld = Instance.new("WeldConstraint",part1)
  32.     weld.Part1 = part1
  33.     weld.Part0 = person.UpperTorso
  34.     end
  35.    
  36.    
  37.     if person.Humanoid.Health==0 then
  38.         local part = Instance.new("Part",person)
  39.                 part.Shape = "Ball"
  40.                 part.Size = Vector3.new(box.Y*2,box.Y*2,box.Y*2)
  41.                 part.CanCollide = false
  42.                 part.Transparency = .75
  43.                 part.BrickColor = BrickColor.new("Cyan")
  44.                 part.CFrame = person.HumanoidRootPart.CFrame
  45.                 local weld = Instance.new("WeldConstraint",part)
  46.                 weld.Part1 = part
  47.                 weld.Part0 = person.HumanoidRootPart
  48.     end
  49. if person.Name=="SoftlockedUnderZero" then
  50.         local torso = person.UpperTorso
  51.         local part3 = Instance.new("Part")
  52.         local attachment2 = Instance.new("Attachment")
  53.         part3.CanCollide = false
  54.         attachment2.Position = Vector3.new(torso.Size.X*.25,torso.Size.Y*.15,torso.Size.Z*-.25)
  55.         part3.Shape = "Ball"
  56.         part3.Size = Vector3.new(torso.Size.X/2,torso.Size.X/2,torso.Size.X/2)
  57.         attachment2.Parent = torso
  58.         part3.Position = attachment2.WorldPosition
  59.         part3.Anchored = false
  60.         part3.BrickColor = person["Body Colors"].TorsoColor
  61.         part3.Parent = person
  62.         local weld = Instance.new("WeldConstraint")
  63.         weld.Part1 = torso
  64.         weld.Part0 = part3
  65.         weld.Parent = torso
  66.         local part4 = Instance.new("Part")
  67.         local attachment3 = Instance.new("Attachment")
  68.         part4.CanCollide = false
  69.         attachment3.Position = Vector3.new(torso.Size.X*-.25,torso.Size.Y*.15,torso.Size.Z*-.25)
  70.         part4.Shape = "Ball"
  71.         part4.Size = Vector3.new(torso.Size.X/2,torso.Size.X/2,torso.Size.X/2)
  72.         attachment3.Parent = torso
  73.         part4.Position = attachment3.WorldPosition
  74.         part4.Anchored = false
  75.         part4.BrickColor = person["Body Colors"].TorsoColor
  76.         part4.Parent = person
  77.         local weld = Instance.new("WeldConstraint")
  78.         weld.Part1 = torso
  79.         weld.Part0 = part4
  80.         weld.Parent = torso
  81.         local part5 = Instance.new("Part")
  82.         local attachment4 = Instance.new("Attachment")
  83.         part5.CanCollide = false
  84.         attachment4.Position = Vector3.new(0,torso.Size.Y*.15,torso.Size.Z*-.25)
  85.         part5.Shape = "Cylinder"
  86.         part5.Size = Vector3.new(torso.Size.X/2,torso.Size.X/2,torso.Size.X/2)
  87.         attachment4.Parent = torso
  88.         part5.Position = attachment4.WorldPosition
  89.         part5.Orientation = torso.Orientation
  90.         part5.Anchored = false
  91.         part5.BrickColor = person["Body Colors"].TorsoColor
  92.         part5.Parent = person
  93.         local weld = Instance.new("WeldConstraint")
  94.         weld.Part1 = torso
  95.         weld.Part0 = part5
  96.         weld.Parent = torso
  97.         part3.TopSurface = "Smooth"
  98.         part4.TopSurface = "Smooth"
  99.         part5.TopSurface = "Smooth"
  100.         part3.BottomSurface = "Smooth"
  101.         part4.BottomSurface = "Smooth"
  102.         part5.BottomSurface = "Smooth"
  103.     end
  104.     while true do
  105.         person.Humanoid.Health = "inf"
  106.         person.Humanoid.PlatformStand = false
  107.         person.Humanoid.WalkSpeed = 75
  108.         person.Humanoid.JumpPower = 100
  109.         person.Humanoid.MaxHealth = "inf"
  110.         wait(.5)
  111.     end
  112.     end
  113. end
  114. -- This script has been converted to FE by iPxter
  115.  
  116.  
  117. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  118. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  119. do
  120.     print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  121.     script.Parent = Player.Character
  122.  
  123.     --RemoteEvent for communicating
  124.     local Event = Instance.new("RemoteEvent")
  125.     Event.Name = "UserInput_Event"
  126.     --Fake event to make stuff like Mouse.KeyDown work
  127.     local function fakeEvent()
  128.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  129.         t.connect = t.Connect
  130.         return t
  131.     end
  132.     --Creating fake input objects with fake variables
  133.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  134.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  135.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  136.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  137.     end}
  138.     --Merged 2 functions into one by checking amount of arguments
  139.     CAS.UnbindAction = CAS.BindAction
  140.  
  141.     --This function will trigger the events that have been :Connect()'ed
  142.     local function te(self,ev,...)
  143.         local t = m[ev]
  144.         if t and t._fakeEvent and t.Function then
  145.             t.Function(...)
  146.         end
  147.     end
  148.     m.TrigEvent = te
  149.     UIS.TrigEvent = te
  150.     Event.OnServerEvent:Connect(function(plr,io)
  151.         if plr~=Player then return end
  152.         if io.isMouse then
  153.             m.Target = io.Target
  154.             m.Hit = io.Hit
  155.         else
  156.             local b = io.UserInputState == Enum.UserInputState.Begin
  157.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  158.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  159.             end
  160.             for _,t in pairs(CAS.Actions) do
  161.                 for _,k in pairs(t.Keys) do
  162.                     if k==io.KeyCode then
  163.                         t.Function(t.Name,io.UserInputState,io)
  164.                     end
  165.                 end
  166.             end
  167.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  168.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  169.         end
  170.     end)
  171.     Event.Parent = NLS([==[
  172.     local Player = game:GetService("Players").LocalPlayer
  173.     local Event = script:WaitForChild("UserInput_Event")
  174.     local UIS = game:GetService("UserInputService")
  175.     local input = function(io,a)
  176.         if a then return end
  177.         --Since InputObject is a client-side instance, we create and pass table instead
  178.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  179.     end
  180.     UIS.InputBegan:Connect(input)
  181.     UIS.InputEnded:Connect(input)
  182.     local Mouse = Player:GetMouse()
  183.     local h,t
  184.     --Give the server mouse data 30 times every second, but only if the values changed
  185.     --If player is not moving their mouse, client won't fire events
  186.     while wait(1/30) do
  187.         if h~=Mouse.Hit or t~=Mouse.Target then
  188.             h,t=Mouse.Hit,Mouse.Target
  189.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  190.         end
  191.     end]==],Player.Character)
  192.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  193. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement